/* ========================================
   RAG Knowledge Manager — Shared Styles
   Solvant dark anodized aluminium + Electric Blue glow
   Matches clientes.solvant.com.ar 1:1
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ---------- CSS Variables ---------- */
:root {
    /* Brand accent */
    --accent: #2457f5;
    --accent-rgb: 36, 87, 245;
    --accent-hover: #3d6bff;
    --accent-dark: #3d6bff;
    --accent-soft: #8aa8ff;

    /* Surfaces (glass) */
    --bg: #050505;
    --surface: rgba(255, 255, 255, 0.06);
    --surface-2: rgba(0, 0, 0, 0.4);
    --surface-3: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.10);

    /* Text */
    --text-primary: #ffffff;
    --text-muted: #A1A1AA;
    --text-faint: rgba(255, 255, 255, 0.45);

    /* Borders */
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --border-glow: rgba(80, 130, 255, 0.18);

    /* Status */
    --success: #34d399;
    --error: #f87171;
    --warning: #fbbf24;
    --info: #60a5fa;

    /* Legacy mapping (kept for inline usages across HTML pages) */
    --space: #ffffff;
    --purple: #7c3aed;
}

/* ---------- Reset & Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    color-scheme: dark;
}

body {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    color: var(--text-primary);
    background-color: #050505;
    background-image:
        radial-gradient(circle at 15% 0%, rgba(36, 87, 245, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 100%, rgba(32, 51, 93, 0.06) 0%, transparent 40%),
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(20, 22, 28, 0.5) 0%, transparent 60%);
    background-attachment: fixed;
}

/* Poppins/Roboto legacy aliases now map to Inter */
h1, h2, h3, h4, h5, h6, .font-heading, .font-body { font-family: 'Inter', sans-serif; }

::selection {
    background: var(--accent);
    color: #fff;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.02); border-radius: 3px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.15); }

/* ---------- Animated Glow Orbs (kept, darker) ---------- */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.18;
    pointer-events: none;
    z-index: 0;
}
.glow-orb-1 {
    width: 480px; height: 480px;
    background: rgba(36, 87, 245, 0.6);
    top: -160px; left: -120px;
    /* animation off: blur(120px) animado fundia la GPU (2026-07-06) */
}
.glow-orb-2 {
    width: 420px; height: 420px;
    background: rgba(32, 51, 93, 0.7);
    bottom: -140px; right: -100px;
    /* animation off: blur(120px) animado fundia la GPU (2026-07-06) */
}
.glow-orb-3 {
    width: 280px; height: 280px;
    background: rgba(36, 87, 245, 0.35);
    top: 40%; right: 10%;
    /* animation off: blur(120px) animado fundia la GPU (2026-07-06) */
}
@keyframes floatOrb1 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, 25px); }
    66% { transform: translate(-15px, 40px); }
}
@keyframes floatOrb2 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-25px, -30px); }
    66% { transform: translate(15px, -15px); }
}
@keyframes floatOrb3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, 25px); }
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.fade-up-d1 { animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.08s forwards; opacity: 0; }
.fade-up-d2 { animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.16s forwards; opacity: 0; }
.fade-up-d3 { animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.24s forwards; opacity: 0; }

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ---------- Solvant Logo ---------- */
.solvant-logo { height: 24px; object-fit: contain; }

/* ---------- Stat Pill ---------- */
.stat-pill {
    background: rgba(36, 87, 245, 0.12);
    border: 1px solid rgba(36, 87, 245, 0.25);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 11px;
    color: var(--accent-soft);
    letter-spacing: 0.02em;
    font-weight: 500;
    white-space: nowrap;
}

/* ---------- Glass Card (hero pattern) ---------- */
.glass-card,
.section-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-top: 1px solid rgba(80, 130, 255, 0.18);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(80, 130, 255, 0.06);
    border-radius: 16px;
}

/* ---------- Divider ---------- */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(80, 130, 255, 0.2), transparent);
}

/* ---------- Action Button ---------- */
.action-btn {
    transition: color 0.2s, background-color 0.2s, transform 0.15s;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
}
.action-btn:hover { background-color: rgba(255, 255, 255, 0.05); color: var(--text-primary); }
.action-btn:active { transform: scale(0.92); }

/* ---------- Primary Button ---------- */
.btn-primary {
    background: var(--accent);
    color: #fff;
    font-weight: 500;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid rgba(80, 130, 255, 0.35);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(36, 87, 245, 0.35);
    font-family: 'Inter', sans-serif;
}
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 6px 28px rgba(36, 87, 245, 0.5); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

/* ---------- Secondary Button (glass) ---------- */
.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--text-primary);
}

/* ---------- Danger Button ---------- */
.btn-danger {
    background: rgba(248, 113, 113, 0.12);
    color: #f87171;
    font-weight: 500;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid rgba(248, 113, 113, 0.25);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    font-family: 'Inter', sans-serif;
}
.btn-danger:hover { background: rgba(248, 113, 113, 0.2); border-color: rgba(248, 113, 113, 0.4); }

/* ---------- Form Input ---------- */
.form-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}
.form-input:focus {
    border-color: rgba(36, 87, 245, 0.5);
    box-shadow: 0 0 0 3px rgba(36, 87, 245, 0.15);
    background: rgba(0, 0, 0, 0.4);
}
.form-input::placeholder { color: rgba(255, 255, 255, 0.35); }

/* ---------- Form Label ---------- */
.form-label {
    display: block;
    font-size: 10px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---------- Form Select ---------- */
.form-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
.form-select:focus {
    border-color: rgba(36, 87, 245, 0.5);
    box-shadow: 0 0 0 3px rgba(36, 87, 245, 0.15);
}
.form-select option {
    background: #0a0c14;
    color: var(--text-primary);
}

/* ---------- Toggle Switch ---------- */
.toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: background 0.25s;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0;
    flex-shrink: 0;
}
.toggle-switch.active { background: var(--accent); border-color: rgba(80, 130, 255, 0.5); }
.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    transition: transform 0.25s;
}
.toggle-switch.active::after { transform: translateX(18px); }

/* ---------- Badge ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.badge-admin    { background: rgba(36, 87, 245, 0.2); color: #8aa8ff; }
.badge-client   { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.badge-upload   { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.badge-delete   { background: rgba(248, 113, 113, 0.15); color: #f87171; }
.badge-login    { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.badge-logout   { background: rgba(167, 139, 250, 0.15); color: #a78bfa; }
.badge-user_created     { background: rgba(192, 132, 252, 0.15); color: #c084fc; }
.badge-user_updated     { background: rgba(251, 146, 60, 0.15); color: #fb923c; }
.badge-user_deactivated { background: rgba(248, 113, 113, 0.15); color: #f87171; }
.badge-password_changed { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.badge-email_changed    { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.badge-profile_updated  { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }

/* ---------- Avatar ---------- */
.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: #fff;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.avatar-sm { width: 32px; height: 32px; font-size: 12px; border-radius: 10px; }
.avatar-md { width: 44px; height: 44px; font-size: 15px; }
.avatar-lg { width: 72px; height: 72px; font-size: 24px; border-radius: 18px; }

/* ---------- Status Dot ---------- */
.status-dot {
    width: 6px; height: 6px; border-radius: 50%;
    flex-shrink: 0;
}
.status-dot-active { background: var(--success); box-shadow: 0 0 8px rgba(52,211,153,0.6); }
.status-dot-inactive { background: rgba(255, 255, 255, 0.25); }

/* ---------- Toast ---------- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid;
    font-size: 13px;
    max-width: 360px;
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    background: rgba(10, 12, 20, 0.85);
    color: var(--text-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: toastSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.toast.removing { animation: toastSlideOut 0.25s ease-in forwards; }
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(16px) scale(0.94); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastSlideOut {
    to { opacity: 0; transform: translateY(-8px) scale(0.94); }
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeInBg 0.2s ease-out forwards;
}
@keyframes fadeInBg { from { opacity: 0; } to { opacity: 1; } }
.modal-content {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(32px) saturate(160%);
    -webkit-backdrop-filter: blur(32px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: 1px solid rgba(80, 130, 255, 0.22);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(80, 130, 255, 0.08);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    color: var(--text-primary);
}
.modal-content.modal-sm { max-width: 400px; }
.modal-content.modal-md { max-width: 520px; }
.modal-content.modal-lg { max-width: 640px; }

/* ---------- Data Table ---------- */
.data-table { width: 100%; border-collapse: collapse; }
.data-table-header {
    display: grid;
    padding: 12px 20px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.data-table-row {
    display: grid;
    padding: 14px 20px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background-color 0.2s;
    color: var(--text-primary);
}
.data-table-row:last-child { border-bottom: none; }
.data-table-row:hover { background-color: rgba(255, 255, 255, 0.03); }

/* ---------- Skeleton ---------- */
.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
}

/* ---------- Progress Bar ---------- */
.progress-bar {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    box-shadow: 0 0 12px rgba(36, 87, 245, 0.5);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Stat Card ---------- */
.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-top: 1px solid rgba(80, 130, 255, 0.18);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(80, 130, 255, 0.06);
    border-radius: 16px;
    padding: 20px 24px;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.stat-card:hover {
    transform: translateY(-2px);
    border-top-color: rgba(80, 130, 255, 0.3);
    box-shadow: 0 34px 70px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(80, 130, 255, 0.08), inset 0 1px 0 rgba(80, 130, 255, 0.12);
}
.stat-card-value {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 28px;
    color: var(--text-primary);
    line-height: 1;
    margin: 8px 0 4px;
    font-variant-numeric: tabular-nums;
}
.stat-card-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.stat-card-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.4);
    color: #E4E4E7;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.page-btn {
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}
.page-btn:hover { border-color: rgba(80, 130, 255, 0.4); color: var(--accent-soft); background: rgba(36, 87, 245, 0.08); }
.page-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: rgba(80, 130, 255, 0.5);
    box-shadow: 0 2px 12px rgba(36, 87, 245, 0.4);
}
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ---------- Search Bar ---------- */
.search-bar {
    position: relative;
}
.search-bar input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}
.search-bar input::placeholder { color: rgba(255, 255, 255, 0.35); }
.search-bar input:focus {
    border-color: rgba(36, 87, 245, 0.5);
    box-shadow: 0 0 0 3px rgba(36, 87, 245, 0.15);
}
.search-bar svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

/* ---------- Navigation (floating glass pill) ---------- */
.nav-bar {
    position: sticky;
    top: 16px;
    z-index: 50;
    padding: 16px 16px 0;
    background: transparent;
    border: none;
}
.nav-inner {
    max-width: 920px;
    margin: 0 auto;
    padding: 6px 6px 6px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(30px) saturate(160%);
    -webkit-backdrop-filter: blur(30px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(80, 130, 255, 0.22);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    box-shadow:
        0 22px 50px -12px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(80, 130, 255, 0.04),
        inset 0 1px 0 rgba(80, 130, 255, 0.12);
}

/* Brand (iso logo only, minimal) */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 6px 0 4px;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity 0.2s;
}
.nav-brand:hover { opacity: 0.85; }
.nav-brand img { height: 22px; width: auto; display: block; }
.nav-brand-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

/* Group separator */
.nav-sep {
    width: 1px;
    height: 20px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.12), transparent);
    flex-shrink: 0;
    margin: 0 4px;
}

/* Nav link pills */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 2px;
}
.nav-link {
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.58);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    border: 1px solid transparent;
    line-height: 1.2;
}
.nav-link:hover {
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.05);
}
.nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(36, 87, 245, 0.32) 0%, rgba(36, 87, 245, 0.14) 100%);
    border-color: rgba(80, 130, 255, 0.38);
    box-shadow:
        0 2px 14px rgba(36, 87, 245, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* Right cluster: avatar + logout */
.nav-right {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}
.nav-user { display: none; }

.nav-avatar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-avatar-btn:hover { transform: scale(1.06); }
.nav-avatar-btn .avatar {
    width: 26px;
    height: 26px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 999px;
    background: linear-gradient(135deg, #2457f5 0%, #3d6bff 100%);
    box-shadow:
        0 2px 12px rgba(36, 87, 245, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(80, 130, 255, 0.5);
    color: #ffffff;
}

.nav-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.55);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.95);
}
.nav-icon-btn.nav-logout:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.12);
}

.nav-mobile-toggle {
    display: none;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 999px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: background 0.2s;
}
.nav-mobile-toggle:hover { background: rgba(255, 255, 255, 0.06); }

/* Mobile menu (floating pill with dropdown) */
.nav-mobile-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    max-width: 920px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(30px) saturate(160%);
    -webkit-backdrop-filter: blur(30px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(80, 130, 255, 0.22);
    border-radius: 20px;
    box-shadow:
        0 32px 64px -12px rgba(0, 0, 0, 0.75),
        inset 0 1px 0 rgba(80, 130, 255, 0.12);
    padding: 10px;
    flex-direction: column;
    gap: 2px;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu .nav-link {
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    text-align: left;
}

@media (max-width: 768px) {
    .nav-inner { padding: 6px 6px 6px 12px; }
    .nav-links { display: none; }
    .nav-sep { display: none; }
    .nav-mobile-toggle { display: flex; }
}

/* ---------- Page Layout ---------- */
.page-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px;
    position: relative;
    z-index: 1;
}
.page-header {
    margin-bottom: 28px;
}
.page-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 28px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.page-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

/* ---------- Empty State ---------- */
.empty-state {
    padding: 64px 20px;
    text-align: center;
}
.empty-state-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.4);
}
.empty-state-title {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
}
.empty-state-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

/* ---------- Footer ---------- */
.app-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: 48px;
    position: relative;
    z-index: 1;
}
.app-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
}

/* ---------- Utility ---------- */
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ========================================
   Tailwind utility overrides for dark theme
   ======================================== */

/* Neutrals → dark theme equivalents */
.text-neutral-900,
.text-neutral-800,
.text-neutral-700 { color: var(--text-primary) !important; }
.text-neutral-600,
.text-neutral-500 { color: rgba(255, 255, 255, 0.7) !important; }
.text-neutral-400,
.text-neutral-300 { color: rgba(255, 255, 255, 0.45) !important; }
.text-neutral-200,
.text-neutral-100 { color: rgba(255, 255, 255, 0.25) !important; }

.text-gray-900,
.text-gray-800,
.text-gray-700 { color: var(--text-primary) !important; }
.text-gray-600,
.text-gray-500 { color: rgba(255, 255, 255, 0.7) !important; }
.text-gray-400,
.text-gray-300 { color: rgba(255, 255, 255, 0.45) !important; }
.text-gray-200,
.text-gray-100 { color: rgba(255, 255, 255, 0.25) !important; }

/* White backgrounds → glass */
.bg-white {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%) !important;
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
}

.bg-gray-50,
.bg-gray-100,
.bg-neutral-50,
.bg-neutral-100 { background-color: rgba(255, 255, 255, 0.03) !important; }
.bg-red-50 { background-color: rgba(248, 113, 113, 0.12) !important; }
.bg-green-50 { background-color: rgba(52, 211, 153, 0.12) !important; }

/* Borders */
.border-gray-100,
.border-gray-200,
.border-neutral-100,
.border-neutral-200 { border-color: rgba(255, 255, 255, 0.06) !important; }
.border-gray-300 { border-color: rgba(255, 255, 255, 0.10) !important; }

/* Red keeps its intent */
.text-red-500 { color: #f87171 !important; }
.text-red-400 { color: #fca5a5 !important; }

/* Link default */
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-soft); }
