/* RapidSite AI - Premium Enterprise Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Construction Enterprise Palette */
    --bg-dark: #f1f5f9;
    /* Slate 100 - Light clean background for workspace feeling */
    --bg-sidebar: #ffffff;
    /* Pure White Sidebar */

    /* Card Backgrounds */
    --bg-card: #ffffff;
    /* Pure White */
    --bg-card-hover: #f8fafc;
    /* Slate 50 */

    /* Accents */
    --accent-primary: #f97316;
    /* Construction Orange */
    --accent-primary-hover: #ea580c;
    --accent-secondary: #3b82f6;
    /* Steel Blue */
    --accent-success: #15803d;
    /* Engineering Green */
    --accent-warning: #b45309;
    /* Amber 700 */
    --accent-danger: #b91c1c;
    /* Red 700 */

    /* Text */
    --text-primary: #1e293b;
    /* Slate 800 */
    --text-secondary: #64748b;
    /* Slate 500 */
    --text-muted: #94a3b8;
    /* Slate 400 */
    --text-on-dark: #f8fafc;
    /* White text for sidebar/buttons */

    /* Borders & Shadows - Clean & Rigid */
    --border-light: #e2e8f0;
    /* Slate 200 */
    --border-dark: #cbd5e1;
    /* Slate 300 (for subtle lines) */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    /* More angular, industrial look */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Layout */
.app-container {
    display: flex;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 260px;
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}

.logo-container {
    margin-bottom: 2.5rem;
    padding-left: 0.75rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--bg-dark);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-primary);
    color: white;
    border-left-color: transparent;
    box-shadow: 0 4px 6px -1px rgba(249, 115, 22, 0.3);
}

.nav-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.user-panel {
    margin-top: auto;
    background: var(--bg-card-hover);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid var(--border-light);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
}

.user-details h4 {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.user-details p {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.logout-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--accent-danger);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.logout-link:hover {
    background: #fef2f2;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    /* Sidebar width */
    padding: 2.5rem;
    max-width: 1600px;
    margin-right: auto;
}

/* Typography Utilities */
.page-header {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.page-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Cards (Cleaner, Industrial) */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.glass-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    border: 1px solid var(--accent-primary-hover);
}

.btn-primary:hover {
    background: var(--accent-primary-hover);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: white;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: #f1f5f9;
    color: var(--text-primary);
    border-color: #cbd5e1;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Tables (Construction Standard) */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: white;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
}

.premium-table th {
    text-align: left;
    padding: 1rem;
    background-color: #f8fafc;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-light);
}

.premium-table tbody tr {
    background: transparent;
    transition: background 0.15s ease;
}

.premium-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.premium-table tbody tr:hover {
    background: var(--bg-card-hover);
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    /* Pill shape */
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.badge-pending {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
}

.badge-approved {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.badge-rejected {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.badge-synced {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}