/**
 * Hyperina — Design System
 * Premium dark theme with navy blue accents, glassmorphism
 */

/* ═══════════════════════════════════════════
   IMPORTS & VARIABLES
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* ── Colors ─────────────────────────────── */
    --bg-primary:     #06060b;
    --bg-secondary:   #0c0c14;
    --bg-tertiary:    #12121e;
    --bg-card:        rgba(15, 15, 28, 0.7);
    --bg-card-hover:  rgba(20, 20, 40, 0.85);
    --bg-glass:       rgba(10, 10, 20, 0.6);

    --navy-deep:      #0a1628;
    --navy:           #0f1b3d;
    --navy-mid:       #1a2a5e;
    --navy-light:     #243b7f;
    --navy-accent:    #3358b5;
    --navy-glow:      #4a7aff;

    --white:          #ffffff;
    --white-90:       rgba(255,255,255,0.9);
    --white-70:       rgba(255,255,255,0.7);
    --white-50:       rgba(255,255,255,0.5);
    --white-30:       rgba(255,255,255,0.3);
    --white-15:       rgba(255,255,255,0.15);
    --white-08:       rgba(255,255,255,0.08);
    --white-05:       rgba(255,255,255,0.05);

    --accent-gradient: linear-gradient(135deg, #3358b5 0%, #4a7aff 50%, #6d9bff 100%);
    --sidebar-gradient: linear-gradient(180deg, #0a1628 0%, #0c0c14 100%);
    --card-gradient:   linear-gradient(135deg, rgba(15,27,61,0.4) 0%, rgba(10,10,20,0.4) 100%);

    --success:        #22c55e;
    --warning:        #f59e0b;
    --danger:         #ef4444;
    --info:           #3b82f6;

    /* ── Typography ────────────────────────── */
    --font-body:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading:   'Outfit', 'Inter', sans-serif;

    /* ── Sizing ────────────────────────────── */
    --sidebar-width:  280px;
    --sidebar-collapsed: 80px;
    --header-height:  72px;
    --radius-sm:      8px;
    --radius-md:      12px;
    --radius-lg:      16px;
    --radius-xl:      20px;
    --radius-full:    9999px;

    /* ── Transitions ───────────────────────── */
    --ease-out:       cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce:    cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-fast: 0.2s var(--ease-out);
    --transition-med:  0.35s var(--ease-out);
    --transition-slow: 0.5s var(--ease-out);

    /* ── Shadows ───────────────────────────── */
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg:  0 8px 32px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 20px rgba(74,122,255,0.15);
}

.form-select option {
    background-color: var(--bg-card);
    color: var(--white-90);
}

/* ── Light Theme Overrides ──────────────── */
[data-theme="light"] {
    --bg-primary:     #f4f6fa;
    --bg-secondary:   #ffffff;
    --bg-tertiary:    #f0f2f8;
    --bg-card:        rgba(255, 255, 255, 0.8);
    --bg-card-hover:  rgba(255, 255, 255, 0.95);
    --bg-glass:       rgba(255, 255, 255, 0.6);

    --navy-deep:      #e5e9f2;
    --navy:           #f0f4fb;
    --navy-mid:       #d8e0f0;
    --navy-light:     #c0cde5;
    
    --white:          #0a1628;
    --white-90:       rgba(10, 22, 40, 0.9);
    --white-70:       rgba(10, 22, 40, 0.7);
    --white-50:       rgba(10, 22, 40, 0.5);
    --white-30:       rgba(10, 22, 40, 0.3);
    --white-15:       rgba(10, 22, 40, 0.15);
    --white-08:       rgba(10, 22, 40, 0.08);
    --white-05:       rgba(10, 22, 40, 0.05);

    --sidebar-gradient: linear-gradient(180deg, #ffffff 0%, #f4f6fa 100%);
    --card-gradient:   linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(245,247,252,0.9) 100%);

    --shadow-sm:  0 2px 8px rgba(0,0,0,0.05);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg:  0 8px 32px rgba(0,0,0,0.12);
}

/* ═══════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--white-90);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
    background: none;
    color: inherit;
}

input, select, textarea {
    font-family: inherit;
    outline: none;
    border: none;
    background: none;
    color: inherit;
}

/* ═══════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════ */

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.main-area {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-med);
}

.main-content {
    flex: 1;
    padding: 28px 32px;
    max-width: 1600px;
}

/* ═══════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════ */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-gradient);
    border-right: 1px solid var(--white-08);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: width var(--transition-med), transform var(--transition-med);
    overflow: hidden;
}

/* ── Logo ──────────────────────────────────── */

.sidebar-logo {
    display: flex;
    align-items: center;
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--white-08);
    flex-shrink: 0;
}

.sidebar-logo img {
    height: 44px;
    width: auto;
}

.sidebar-logo .logo-light {
    display: none;
}

[data-theme="light"] .sidebar-logo .logo-dark {
    display: none;
}

[data-theme="light"] .sidebar-logo .logo-light {
    display: block;
}

/* ── Navigation ────────────────────────────── */

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--white-15) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--white-15);
    border-radius: var(--radius-full);
}

.nav-section {
    margin-bottom: 8px;
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--white-30);
    padding: 12px 16px 6px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 450;
    color: var(--white-50);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0;
    border-radius: var(--radius-md);
    transition: opacity var(--transition-fast);
}

.nav-link:hover {
    color: var(--white-90);
}

.nav-link:hover::before {
    opacity: 0.08;
}

.nav-link.active {
    color: var(--white);
    font-weight: 550;
}

.nav-link.active::before {
    opacity: 0.15;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent-gradient);
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
    box-shadow: var(--shadow-glow);
}

.nav-link .nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
    opacity: 1;
}

.nav-link .nav-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-link .nav-text {
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

/* ── Dropdown Toggle ───────────────────────── */

.nav-dropdown-toggle {
    cursor: pointer;
}

.nav-dropdown-toggle .dropdown-arrow {
    margin-left: auto;
    position: relative;
    z-index: 1;
    transition: transform var(--transition-fast);
}

.nav-dropdown-toggle .dropdown-arrow svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.nav-item.open > .nav-dropdown-toggle .dropdown-arrow {
    transform: rotate(180deg);
}

/* ── Dropdown Submenu ──────────────────────── */

.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-med);
}

.nav-item.open > .nav-submenu {
    max-height: 300px;
}

.nav-submenu .nav-link {
    padding: 9px 16px 9px 48px;
    font-size: 0.85rem;
}

.nav-submenu .nav-link::after {
    left: 24px;
}

/* ── Sidebar Footer ────────────────────────── */

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--white-08);
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.sidebar-user:hover {
    background: var(--white-05);
}

.sidebar-user .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--white);
    flex-shrink: 0;
}

.sidebar-user .user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user .user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white-90);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-role {
    font-size: 0.72rem;
    color: var(--white-30);
}

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */

.header {
    height: var(--header-height);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--white-08);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--white-05);
    color: var(--white-70);
    transition: all var(--transition-fast);
}

.mobile-toggle:hover {
    background: var(--white-08);
    color: var(--white);
}

.mobile-toggle svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.header-search {
    position: relative;
}

.header-search .search-input {
    width: 320px;
    padding: 10px 16px 10px 42px;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    border: 1px solid var(--white-08);
    color: var(--white-90);
    font-size: 0.88rem;
    transition: all var(--transition-fast);
}

.header-search .search-input:focus {
    background: var(--bg-secondary);
    border-color: var(--navy-accent);
    box-shadow: 0 0 0 3px rgba(51,88,181,0.15);
    width: 380px;
}

.header-search .search-input::placeholder {
    color: var(--white-30);
}

.header-search .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--white-30);
    pointer-events: none;
}

.header-search .search-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Header Buttons ────────────────────────── */

.header-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--white-50);
    transition: all var(--transition-fast);
    position: relative;
}

.header-btn:hover {
    background: var(--white-05);
    color: var(--white);
}

.header-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

.header-btn .badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--danger);
    border: 2px solid var(--bg-primary);
}

/* ── Language Dropdown ─────────────────────── */

.lang-dropdown {
    position: relative;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--white-70);
    background: var(--white-05);
    border: 1px solid var(--white-08);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.lang-toggle:hover {
    background: var(--white-08);
    color: var(--white);
}

.lang-toggle svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--bg-tertiary);
    border: 1px solid var(--white-08);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: all var(--transition-fast);
    z-index: 200;
    max-height: 320px;
    overflow-y: auto;
}

.lang-dropdown.open .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.lang-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--white-70);
    transition: all var(--transition-fast);
}

.lang-menu a:hover {
    background: var(--white-05);
    color: var(--white);
}

.lang-menu a.active {
    background: rgba(51,88,181,0.15);
    color: var(--white);
}

.lang-flag {
    font-size: 1.1rem;
    line-height: 1;
}

/* ── Profile Area ──────────────────────────── */

.header-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    margin-left: 4px;
}

.header-profile:hover {
    background: var(--white-05);
}

.header-profile .profile-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--white);
}

.header-profile .profile-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--white-70);
}

/* ═══════════════════════════════════════════
   PAGE HEADER
   ═══════════════════════════════════════════ */

.page-header {
    margin-bottom: 28px;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 0.92rem;
    color: var(--white-50);
    margin-top: 4px;
}

/* ═══════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--white-08);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition-fast);
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--white-15);
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--white-90);
}

.card-action {
    font-size: 0.82rem;
    color: var(--navy-glow);
    font-weight: 500;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.card-action:hover {
    color: var(--white);
}

/* ═══════════════════════════════════════════
   STAT CARDS
   ═══════════════════════════════════════════ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--card-gradient);
    border: 1px solid var(--white-08);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all var(--transition-fast);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at top right, rgba(74,122,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.stat-card:hover {
    border-color: var(--white-15);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    position: relative;
}

.stat-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

.stat-icon.blue {
    background: rgba(74,122,255,0.12);
    color: var(--navy-glow);
}

.stat-icon.green {
    background: rgba(34,197,94,0.12);
    color: var(--success);
}

.stat-icon.purple {
    background: rgba(139,92,246,0.12);
    color: #8b5cf6;
}

.stat-icon.orange {
    background: rgba(245,158,11,0.12);
    color: var(--warning);
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--white-50);
    font-weight: 450;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.stat-change.up {
    color: var(--success);
    background: rgba(34,197,94,0.1);
}

.stat-change.down {
    color: var(--danger);
    background: rgba(239,68,68,0.1);
}

.stat-change svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
}

/* ═══════════════════════════════════════════
   CONTENT GRID
   ═══════════════════════════════════════════ */

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.content-grid-3 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

/* ═══════════════════════════════════════════
   CHART PLACEHOLDER
   ═══════════════════════════════════════════ */

.chart-container {
    width: 100%;
    height: 260px;
    border-radius: var(--radius-md);
    background: var(--white-05);
    display: flex;
    align-items: flex-end;
    padding: 20px 16px 16px;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.chart-bar {
    flex: 1;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: var(--accent-gradient);
    opacity: 0.6;
    min-height: 16px;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    position: relative;
}

.chart-bar:hover {
    opacity: 1;
    transform: scaleY(1.05);
    transform-origin: bottom;
}

/* ═══════════════════════════════════════════
   TABLE
   ═══════════════════════════════════════════ */

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--white-30);
    border-bottom: 1px solid var(--white-08);
}

.data-table td {
    padding: 14px 16px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--white-05);
    color: var(--white-70);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: var(--white-05);
}

/* ═══════════════════════════════════════════
   ACTIVITY LIST
   ═══════════════════════════════════════════ */

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.activity-item:hover {
    background: var(--white-05);
}

.activity-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

.activity-icon.release {
    background: rgba(74,122,255,0.12);
    color: var(--navy-glow);
}

.activity-icon.payment {
    background: rgba(34,197,94,0.12);
    color: var(--success);
}

.activity-icon.alert {
    background: rgba(245,158,11,0.12);
    color: var(--warning);
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--white-90);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-desc {
    font-size: 0.78rem;
    color: var(--white-30);
    margin-top: 2px;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--white-30);
    white-space: nowrap;
}

/* ═══════════════════════════════════════════
   QUICK ACTIONS
   ═══════════════════════════════════════════ */

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--white-05);
    border: 1px solid var(--white-08);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--white-70);
    transition: all var(--transition-fast);
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.quick-action-btn:hover {
    background: var(--white-08);
    border-color: var(--navy-accent);
    color: var(--white);
    transform: translateX(4px);
}

.quick-action-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

.quick-action-btn .action-arrow {
    margin-left: auto;
    opacity: 0;
    transform: translateX(-8px);
    transition: all var(--transition-fast);
}

.quick-action-btn:hover .action-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ═══════════════════════════════════════════
   PLATFORM LIST
   ═══════════════════════════════════════════ */

.platform-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.platform-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.platform-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--white-05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.platform-info {
    flex: 1;
}

.platform-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--white-90);
}

.platform-bar-bg {
    width: 100%;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--white-08);
    margin-top: 6px;
    overflow: hidden;
}

.platform-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    transition: width 1s var(--ease-out);
}

.platform-value {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--white-70);
    min-width: 45px;
    text-align: right;
}

/* ═══════════════════════════════════════════
   EMPTY STATE / PLACEHOLDER
   ═══════════════════════════════════════════ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    text-align: center;
}

.empty-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-xl);
    background: var(--white-05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.empty-icon svg {
    width: 36px;
    height: 36px;
    stroke: var(--white-30);
    fill: none;
    stroke-width: 1.5;
}

.empty-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--white-70);
    margin-bottom: 8px;
}

.empty-desc {
    font-size: 0.88rem;
    color: var(--white-30);
    max-width: 360px;
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 550;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--white);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(74,122,255,0.3);
}

.btn-secondary {
    background: var(--white-05);
    border: 1px solid var(--white-15);
    color: var(--white-70);
}

.btn-secondary:hover {
    background: var(--white-08);
    color: var(--white);
    border-color: var(--white-30);
}

.btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* ═══════════════════════════════════════════
   STATUS BADGES
   ═══════════════════════════════════════════ */

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 550;
}

.badge-status.live {
    background: rgba(34,197,94,0.1);
    color: var(--success);
}

.badge-status.pending {
    background: rgba(245,158,11,0.1);
    color: var(--warning);
}

.badge-status.draft {
    background: var(--white-05);
    color: var(--white-50);
}

.badge-status.rejected,
.badge-status.takedown {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-status.approved {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: currentColor;
}

/* ═══════════════════════════════════════════
   MOBILE OVERLAY
   ═══════════════════════════════════════════ */

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-med);
}

.sidebar-overlay.active {
    opacity: 1;
}

/* ═══════════════════════════════════════════
   PAGE-SPECIFIC CONTENT
   ═══════════════════════════════════════════ */

.page-content-card {
    background: var(--bg-card);
    border: 1px solid var(--white-08);
    border-radius: var(--radius-lg);
    padding: 32px;
    backdrop-filter: blur(10px);
    min-height: 400px;
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.animate-in {
    animation: fadeIn 0.5s var(--ease-out) both;
}

.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.15s; }
.animate-in:nth-child(4) { animation-delay: 0.2s; }
.animate-in:nth-child(5) { animation-delay: 0.25s; }
.animate-in:nth-child(6) { animation-delay: 0.3s; }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

/* ── 1440px: Large desktop ──────────────────── */
@media (max-width: 1440px) {
    .main-content {
        padding: 24px 28px;
    }
}

/* ── 1280px: Small desktop / large tablet ──── */
@media (max-width: 1280px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .content-grid, .content-grid-3 {
        grid-template-columns: 1fr;
    }
    .main-content {
        padding: 22px 24px;
    }
}

/* ── 1024px: Tablet landscape ──────────────── */
@media (max-width: 1024px) {
    .header-search .search-input {
        width: 200px;
    }
    .header-search .search-input:focus {
        width: 240px;
    }
    .header-profile .profile-name {
        display: none;
    }
    .stat-value {
        font-size: 1.5rem;
    }
    .page-title {
        font-size: 1.6rem;
    }
    .chart-container {
        height: 220px;
    }
}

/* ── 768px: Tablet portrait / Mobile ───────── */
@media (max-width: 768px) {
    /* Sidebar becomes overlay drawer */
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: 1100;
        box-shadow: var(--shadow-lg);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .sidebar-overlay {
        display: none;
    }
    .sidebar-overlay.active {
        display: block;
        opacity: 1;
        z-index: 1050;
    }

    /* Main area fills screen */
    .main-area {
        margin-left: 0;
    }

    /* Show hamburger menu */
    .mobile-toggle {
        display: flex;
    }

    /* Header adjustments */
    .header {
        padding: 0 16px;
        height: 64px;
    }

    /* Content spacing */
    .main-content {
        padding: 20px 16px;
    }

    /* Stat cards: 2 columns on tablet, better touch target */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .stat-card {
        padding: 20px;
    }
    .stat-value {
        font-size: 1.4rem;
    }
    .stat-label {
        font-size: 0.78rem;
    }

    /* Search shrinks */
    .header-search .search-input {
        width: 180px;
        padding: 9px 14px 9px 38px;
        font-size: 0.85rem;
    }
    .header-search .search-input:focus {
        width: 220px;
    }

    /* Page header */
    .page-title {
        font-size: 1.4rem;
    }
    .page-subtitle {
        font-size: 0.85rem;
    }

    /* Cards */
    .card {
        padding: 20px;
    }
    .page-content-card {
        padding: 24px;
    }

    /* Data table scrollable */
    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    .data-table thead,
    .data-table tbody,
    .data-table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
    .data-table {
        min-width: 500px;
    }

    /* Activity items */
    .activity-item {
        padding: 10px 8px;
        gap: 12px;
    }
    .activity-time {
        font-size: 0.7rem;
    }

    /* Quick actions */
    .quick-action-btn {
        padding: 12px 14px;
    }

    /* Platform list */
    .platform-item {
        gap: 10px;
    }

    /* Buttons — larger touch targets */
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    /* Chart */
    .chart-container {
        height: 200px;
        padding: 16px 12px 12px;
    }

    /* Language dropdown */
    .lang-menu {
        right: -20px;
    }
}

/* ── 576px: Large phones ───────────────────── */
@media (max-width: 576px) {
    .header {
        height: 58px;
        gap: 8px;
    }

    .header-right {
        gap: 4px;
    }

    /* Hide search on small phones */
    .header-search {
        display: none;
    }

    /* Stat cards: still 2 cols but tighter */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .stat-card {
        padding: 16px;
    }
    .stat-icon {
        width: 38px;
        height: 38px;
        margin-bottom: 12px;
    }
    .stat-icon svg {
        width: 18px;
        height: 18px;
    }
    .stat-value {
        font-size: 1.25rem;
    }
    .stat-change {
        font-size: 0.72rem;
        padding: 2px 6px;
    }

    /* Language: hide text */
    .lang-toggle .lang-label {
        display: none;
    }
    .lang-toggle {
        padding: 8px 10px;
    }

    /* Card adjustments */
    .card {
        padding: 16px;
        border-radius: var(--radius-md);
    }
    .card-header {
        margin-bottom: 16px;
    }
    .card-title {
        font-size: 0.95rem;
    }
    .page-content-card {
        padding: 20px;
        border-radius: var(--radius-md);
    }

    /* Page header */
    .page-title {
        font-size: 1.25rem;
    }
    .page-header {
        margin-bottom: 20px;
    }

    /* Main content */
    .main-content {
        padding: 16px 12px;
    }

    /* Content grids */
    .content-grid, .content-grid-3 {
        gap: 14px;
        margin-bottom: 14px;
    }

    /* Activity */
    .activity-icon {
        width: 34px;
        height: 34px;
    }
    .activity-icon svg {
        width: 16px;
        height: 16px;
    }
    .activity-title {
        font-size: 0.82rem;
    }
    .activity-desc {
        font-size: 0.72rem;
    }

    /* Platform bars */
    .platform-icon {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }
    .platform-name {
        font-size: 0.8rem;
    }
    .platform-value {
        font-size: 0.78rem;
    }

    /* Empty state */
    .empty-state {
        padding: 40px 20px;
    }
    .empty-icon {
        width: 64px;
        height: 64px;
    }
    .empty-icon svg {
        width: 28px;
        height: 28px;
    }
    .empty-title {
        font-size: 1rem;
    }
    .empty-desc {
        font-size: 0.82rem;
    }

    /* Header buttons — larger touch target */
    .header-btn {
        width: 38px;
        height: 38px;
    }
    .mobile-toggle {
        width: 38px;
        height: 38px;
    }

    /* Sidebar when open */
    .sidebar {
        width: 260px;
    }
    .sidebar-logo {
        padding: 20px 20px 16px;
    }
    .sidebar-logo .logo-text {
        font-size: 1.2rem;
    }
    .nav-link {
        padding: 10px 14px;
        font-size: 0.88rem;
    }
    .nav-submenu .nav-link {
        padding: 8px 14px 8px 44px;
        font-size: 0.82rem;
    }

    /* Chart */
    .chart-container {
        height: 180px;
        gap: 4px;
    }

    /* Language menu positioning */
    .lang-menu {
        right: -60px;
        min-width: 160px;
    }
}

/* ── 380px: Small phones ───────────────────── */
@media (max-width: 380px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .stat-card {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 16px;
    }
    .stat-icon {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    .stat-card::before {
        display: none;
    }
    .stat-change {
        margin-top: 6px;
    }

    .header-profile {
        padding: 4px 6px;
    }
    .header-profile .profile-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.72rem;
    }

    .page-title {
        font-size: 1.15rem;
    }
    .page-subtitle {
        font-size: 0.8rem;
    }

    .main-content {
        padding: 14px 10px;
    }

    .card {
        padding: 14px;
    }

    /* Sidebar */
    .sidebar {
        width: 240px;
    }

    .lang-menu {
        right: -80px;
        min-width: 150px;
    }
    .lang-menu a {
        padding: 8px 12px;
        font-size: 0.82rem;
    }
}

/* ── Landscape phones ──────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
    .sidebar {
        width: 240px;
    }
    .sidebar-nav {
        padding: 8px 10px;
    }
    .nav-link {
        padding: 8px 14px;
    }
    .sidebar-logo {
        padding: 14px 20px 12px;
    }
    .sidebar-footer {
        padding: 10px 16px;
    }
    .header {
        height: 52px;
    }
    .main-content {
        padding: 14px 16px;
    }
}

/* ── iOS safe area support ─────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .main-content {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
    .sidebar {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ── Touch device hover optimization ──────── */
@media (hover: none) {
    .stat-card:hover {
        transform: none;
        box-shadow: none;
    }
    .card:hover {
        background: var(--bg-card);
        border-color: var(--white-08);
        box-shadow: none;
    }
    .nav-link::before {
        display: none;
    }
    .nav-link.active::before {
        display: block;
    }
    .quick-action-btn:hover {
        transform: none;
    }
    .quick-action-btn .action-arrow {
        opacity: 0.5;
        transform: translateX(0);
    }
}

/* ── Toast Animations ──────────────────── */
@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
/* ── Autocomplete Dropdowns ──────────────── */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #111;
    border: 1px solid var(--white-15);
    border-radius: var(--radius-md);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.autocomplete-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--white);
    transition: background 0.2s;
    border-bottom: 1px solid var(--white-05);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: rgba(255,255,255,0.05);
}
