/* Customer Portal - Ultra Modern Premium Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Deep Space Glass Palette */
    --bg-dark: #070a12;
    --bg-sidebar: #0b101d;
    --bg-card: rgba(15, 22, 38, 0.75);
    --bg-card-solid: #0f172a;
    --bg-card-hover: rgba(26, 36, 60, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(99, 102, 241, 0.6);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    /* Vibrant Neon Accents */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.18);
    --primary-glow: rgba(99, 102, 241, 0.35);
    
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.15);
    --info: #3b82f6;
    --info-light: rgba(59, 130, 246, 0.15);
    --purple: #8b5cf6;
    --purple-light: rgba(139, 92, 246, 0.15);
    --teal: #14b8a6;
    --teal-light: rgba(20, 184, 166, 0.15);

    /* Glassmorphism & Elevation Shadows */
    --backdrop-blur: blur(20px);
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 4px 10px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 25px 35px -5px rgba(0, 0, 0, 0.6), 0 15px 15px -5px rgba(0, 0, 0, 0.4);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.08) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(59, 130, 246, 0.04) 0px, transparent 60%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: #818cf8;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* App Main Grid Structure */
#app-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* Sidebar Styling */
.sidebar {
    width: 270px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 21px;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.sidebar-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.4px;
}

.sidebar-sub {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.sidebar-nav {
    padding: 20px 12px;
    flex: 1;
    overflow-y: auto;
}

.nav-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-dim);
    letter-spacing: 1px;
    padding: 14px 14px 6px 14px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11.5px 16px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
    margin-bottom: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    transform: translateX(3px);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(99,102,241,0.22), rgba(139,92,246,0.18));
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.25);
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--info), var(--primary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35);
}

.user-info {
    overflow: hidden;
}

.user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    background: var(--primary-light);
    color: #a5b4fc;
}

/* Main Content Area */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top Navbar */
.navbar {
    height: 70px;
    background-color: rgba(11, 16, 29, 0.85);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    backdrop-filter: var(--backdrop-blur);
    position: sticky;
    top: 0;
    z-index: 90;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.mobile-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    padding: 8px;
}

.search-box {
    position: relative;
    width: 320px;
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background-color: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 13.5px;
    outline: none;
    transition: all 0.25s ease;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    background-color: rgba(0, 0, 0, 0.5);
}

.search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 10px;
    border-radius: var(--radius-md);
    position: relative;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    transform: translateY(-1px);
}

.badge-counter {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 800;
    height: 18px;
    min-width: 18px;
    padding: 0 5px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
}

/* Page View Area */
.page-content {
    flex: 1;
    padding: 28px;
    overflow-y: auto;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.page-title-group h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.6px;
}

.page-title-group p {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        top: 0; bottom: 0; left: 0;
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .search-box {
        width: 220px;
    }
}

@media (max-width: 640px) {
    .page-content {
        padding: 16px;
    }
    .search-box {
        display: none;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
}
