/* ─────────────────────────────────────────────────────────────
   Myxdai - Custom CSS
   Dark theme with Iris Purple (#6B5EE4) primary color
───────────────────────────────────────────────────────────── */

/* ─── CSS Variables ──────────────────────────────────────── */
:root {
    /* Iris Purple Palette */
    --iris: #6B5EE4;
    --iris-dark: #5647C8;
    --iris-light: #8578F0;
    --iris-glow: rgba(107, 94, 228, 0.3);
    --iris-glow-strong: rgba(107, 94, 228, 0.5);

    /* Dark Background Palette */
    --bg-primary: #0D0D1A;
    --bg-secondary: #13131F;
    --bg-card: #1A1A2E;
    --bg-card-hover: #1F1F38;
    --bg-input: #13131F;

    /* Border Colors */
    --border-default: #2A2A45;
    --border-focus: #6B5EE4;
    --border-error: #EF4444;

    /* Text Colors */
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0C0;
    --text-muted: #6B6B8A;

    /* Semantic Colors */
    --color-success: #10B981;
    --color-error: #EF4444;
    --color-warning: #F59E0B;
    --color-info: #6B5EE4;

    /* Transitions */
    --transition-base: 150ms ease;
    --transition-smooth: 250ms ease;
}

/* ─── Base Reset & Typography ────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--iris);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-default) var(--bg-secondary);
}

/* ─── Button Components ──────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--iris) 0%, var(--iris-light) 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
    border: none;
    border-radius: 0.625rem;
    cursor: pointer;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    user-select: none;
    text-decoration: none;
    min-height: 48px;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--iris-light) 0%, var(--iris) 100%);
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.btn-primary:hover:not(:disabled)::before {
    opacity: 1;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px var(--iris-glow-strong);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 12px var(--iris-glow);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary span,
.btn-primary svg {
    position: relative;
    z-index: 1;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9375rem;
    border: 1px solid var(--border-default);
    border-radius: 0.625rem;
    cursor: pointer;
    transition: all var(--transition-smooth);
    min-height: 48px;
    text-decoration: none;
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--iris);
    background: rgba(107, 94, 228, 0.08);
    color: var(--iris-light);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* ─── Input Fields ───────────────────────────────────────── */
.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-default);
    border-radius: 0.625rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all var(--transition-base);
    outline: none;
    min-height: 48px;
}

.input-field::placeholder {
    color: var(--text-muted);
}

.input-field:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--iris-glow);
    background: var(--bg-secondary);
}

.input-field.error {
    border-color: var(--border-error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.input-field:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-wrapper {
    position: relative;
}

.input-icon-right {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-base);
    background: none;
    border: none;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-icon-right:hover {
    color: var(--text-primary);
}

.input-with-icon-right {
    padding-right: 2.75rem;
}

/* ─── Card Component ─────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 1rem;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(107, 94, 228, 0.4), transparent);
}

/* Glossy glass card — used on auth/public pages over Spline background */
.card-glossy {
    background: rgba(13, 13, 30, 0.52);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid rgba(107, 94, 228, 0.22);
    border-radius: 1rem;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.5),
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 -1px 0 rgba(0, 0, 0, 0.25) inset;
}

/* Top iris shimmer line */
.card-glossy::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(107, 94, 228, 0.7), rgba(255, 255, 255, 0.18), rgba(107, 94, 228, 0.7), transparent);
}

/* Glossy sheen sweep across top portion */
.card-glossy::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 220%;
    height: 45%;
    background: linear-gradient(170deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.012) 40%, transparent 100%);
    pointer-events: none;
    border-radius: 1rem 1rem 0 0;
}

.card-glass {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(42, 42, 69, 0.8);
    border-radius: 1rem;
    position: relative;
}

.card-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(107, 94, 228, 0.5), transparent);
}

.card-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 0.875rem;
    padding: 1.5rem;
    transition: all var(--transition-smooth);
}

.card-stat:hover {
    border-color: var(--iris);
    box-shadow: 0 4px 20px var(--iris-glow);
    transform: translateY(-2px);
}

/* ─── Toast Notifications ────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    max-width: 380px;
    width: calc(100vw - 2.5rem);
    pointer-events: none;
}

.toast {
    padding: 1rem 1.125rem;
    border-radius: 0.75rem;
    border: 1px solid;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    pointer-events: all;
    transform: translateX(110%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 0 0 0 0;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(110%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6EE7B7;
}

.toast-success::before {
    background: #10B981;
}

.toast-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
}

.toast-error::before {
    background: #EF4444;
}

.toast-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #FCD34D;
}

.toast-warning::before {
    background: #F59E0B;
}

.toast-info {
    background: rgba(107, 94, 228, 0.1);
    border-color: rgba(107, 94, 228, 0.3);
    color: #C4B9FF;
}

.toast-info::before {
    background: var(--iris);
}

/* ─── Password Strength Bar ──────────────────────────────── */
.password-strength-container {
    margin-top: 0.5rem;
}

.password-strength-track {
    height: 4px;
    background: var(--border-default);
    border-radius: 9999px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
    width: 0%;
}

/* ─── Form Labels ────────────────────────────────────────── */
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

/* ─── Checkbox Custom Style ──────────────────────────────── */
.checkbox-iris {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--iris);
    border-radius: 0.25rem;
    cursor: pointer;
    flex-shrink: 0;
}

/* ─── Avatar / Initials ──────────────────────────────────── */
.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, var(--iris), var(--iris-light));
    color: #ffffff;
    flex-shrink: 0;
}

.avatar-sm { width: 2rem; height: 2rem; font-size: 0.75rem; }
.avatar-md { width: 2.5rem; height: 2.5rem; font-size: 0.875rem; }
.avatar-lg { width: 4rem; height: 4rem; font-size: 1.25rem; }
.avatar-xl { width: 5rem; height: 5rem; font-size: 1.5rem; }

/* ─── Badge ──────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #6EE7B7;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #FCD34D;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-error {
    background: rgba(239, 68, 68, 0.15);
    color: #FCA5A5;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-iris {
    background: rgba(107, 94, 228, 0.15);
    color: var(--iris-light);
    border: 1px solid rgba(107, 94, 228, 0.25);
}

/* ─── Sidebar ────────────────────────────────────────────── */
.sidebar {
    width: 240px;
    min-height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-default);
    transition: transform var(--transition-smooth);
    flex-shrink: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-base);
    position: relative;
}

.sidebar-link:hover {
    color: var(--text-primary);
    background: rgba(107, 94, 228, 0.08);
}

.sidebar-link.active {
    color: var(--iris-light);
    background: rgba(107, 94, 228, 0.15);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--iris);
    border-radius: 0 9999px 9999px 0;
}

/* ─── Navbar ─────────────────────────────────────────────── */
.navbar {
    height: 64px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* ─── Dropdown ───────────────────────────────────────────── */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 0.75rem;
    padding: 0.375rem;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    z-index: 200;
    transform-origin: top right;
    animation: dropdownIn 0.15s ease;
}

@keyframes dropdownIn {
    from { opacity: 0; transform: scale(0.95) translateY(-8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    text-decoration: none;
}

.dropdown-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-item.danger:hover {
    color: #FCA5A5;
    background: rgba(239, 68, 68, 0.08);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-default);
    margin: 0.375rem 0;
}

/* ─── OTP / Code Input ───────────────────────────────────── */
.otp-input {
    width: 3rem;
    height: 3.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border-default);
    border-radius: 0.625rem;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    outline: none;
    transition: all var(--transition-base);
    caret-color: var(--iris);
}

.otp-input:focus {
    border-color: var(--iris);
    box-shadow: 0 0 0 3px var(--iris-glow);
    background: var(--bg-secondary);
}

.otp-input.filled {
    border-color: var(--iris);
    color: var(--iris-light);
}

/* ─── Skeleton Loading ───────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

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

/* ─── Modal ──────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 420px;
    width: 100%;
    position: relative;
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── Animations ─────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 var(--iris-glow); }
    50% { box-shadow: 0 0 0 12px transparent; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.animate-fade-in { animation: fadeIn 0.4s ease; }
.animate-slide-up { animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.animate-slide-down { animation: slideDown 0.3s ease; }
.animate-scale-in { animation: scaleIn 0.3s ease; }
.animate-pulse-glow { animation: pulseGlow 2s ease-in-out infinite; }

/* ─── Auth Page Layout ───────────────────────────────────── */
.auth-bg {
    min-height: 100vh;
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(ellipse 80% 60% at 50% -20%, rgba(107, 94, 228, 0.15) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 80% 80%, rgba(107, 94, 228, 0.08) 0%, transparent 60%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 1.25rem;
    padding: 2.5rem;
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(107, 94, 228, 0.6), transparent);
}

.auth-logo {
    display: block;
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* ─── Divider ────────────────────────────────────────────── */
.divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-default);
}

/* ─── Social Auth Buttons ────────────────────────────────── */
.btn-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    flex: 1;
    padding: 0.625rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-default);
    border-radius: 0.625rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn-social:hover {
    border-color: rgba(107, 94, 228, 0.4);
    background: var(--bg-card-hover);
}

/* ─── Status Dot ─────────────────────────────────────────── */
.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-dot-online { background: var(--color-success); }
.status-dot-offline { background: var(--text-muted); }
.status-dot-warning { background: var(--color-warning); }

/* ─── Mobile Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
    .auth-card {
        padding: 1.75rem 1.5rem;
        border-radius: 1rem;
    }

    .card {
        padding: 1.25rem;
    }

    .sidebar {
        position: fixed;
        top: 64px;
        left: 0;
        bottom: 0;
        z-index: 300;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
    }

    .toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: 100%;
        width: auto;
    }

    .otp-input {
        width: 2.5rem;
        height: 3rem;
        font-size: 1.25rem;
    }

    .navbar {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem 1.25rem;
    }

    .btn-primary,
    .btn-secondary {
        font-size: 0.875rem;
    }
}

/* ─── Autofill override ──────────────────────────────────── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px var(--bg-input) inset !important;
    box-shadow: 0 0 0 1000px var(--bg-input) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    caret-color: var(--text-primary);
}

/* ─── Focus Visible (Accessibility) ─────────────────────── */
:focus-visible {
    outline: 2px solid var(--iris);
    outline-offset: 0;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

/* ─── Selection ──────────────────────────────────────────── */
::selection {
    background: var(--iris-glow);
    color: var(--text-primary);
}

/* ─── Link Styles ────────────────────────────────────────── */
.link-iris {
    color: var(--iris-light);
    text-decoration: none;
    transition: color var(--transition-base);
}

.link-iris:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ─── Section Divider ────────────────────────────────────── */
.section-divider {
    height: 1px;
    background: var(--border-default);
    margin: 1.5rem 0;
}

/* ─── Overlay (sidebar mobile) ───────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: 64px;
    background: rgba(0, 0, 0, 0.5);
    z-index: 299;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* ─── Iris Glow Text ─────────────────────────────────────── */
.text-iris { color: var(--iris); }
.text-iris-light { color: var(--iris-light); }

.gradient-text {
    background: linear-gradient(135deg, var(--iris-light), #C4B9FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Disabled elements — remove hover effects ──────────── */
[disabled]:hover,
button:disabled:hover,
.seg-disabled:hover,
[style*="pointer-events:none"]:hover {
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    border-color: inherit !important;
    background: inherit;
    color: inherit;
}

/* ─── Page Title Accent ──────────────────────────────────── */
.page-title::after {
    content: '';
    display: block;
    width: 2.5rem;
    height: 3px;
    background: linear-gradient(90deg, var(--iris), var(--iris-light));
    border-radius: 9999px;
    margin-top: 0.5rem;
}

/* ─── Top-of-page indeterminate progress bar ──────────────────
   Used by showHeaderLoader() / hideHeaderLoader() helpers in utils.js.
   Iris-purple stripe that slides across a fixed bar at the top of
   the viewport whenever a page-level fetch is in flight. */
.header-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    overflow: hidden;
    pointer-events: none;
    z-index: 1000;
    display: none;
}
.header-progress.active { display: block; }
.header-progress::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40%;
    background: linear-gradient(90deg, transparent, #8578F0, transparent);
    animation: hp-slide 1.1s linear infinite;
}
@keyframes hp-slide {
    0%   { left: -40%; }
    100% { left: 100%; }
}
input[type="date"] { color-scheme: dark; cursor: pointer; }
input[type="date"]::-webkit-calendar-picker-indicator { filter:invert(0.5); cursor:pointer; position:absolute; inset:0; width:100%; height:100%; opacity:0; }

.seg-ctrl { display:inline-flex; align-items:center; gap:2px; background:#0D0D1A; border:1px solid #1E1E35; border-radius:10px; padding:3px; }
.seg-btn  { display:inline-flex; align-items:center; gap:5px; padding:6px 14px; border-radius:7px; font-size:12px; font-weight:600; cursor:pointer; transition:all .15s; border:none; background:transparent; color:#6b7280; white-space:nowrap; }
.seg-btn:hover:not(.seg-active) { color:#d1d5db; background:rgba(255,255,255,0.04); }
.seg-btn.seg-active { background:linear-gradient(135deg,#6B5EE4,#8578F0); color:#fff; box-shadow:0 2px 8px rgba(107,94,228,0.3); }

.tbl-wrap { background:#13131F; border:1px solid #1E1E35; border-radius:12px; overflow:hidden; }
.tbl { width:100%; border-collapse:collapse; min-width:760px; }
.tbl th { background:#0D0D1A; padding:10px 14px; font-size:11px; font-weight:600; color:#6b7280; text-transform:uppercase; letter-spacing:.05em; text-align:left; white-space:nowrap; border-bottom:1px solid #1E1E35; }
.tbl td { padding:11px 14px; font-size:13px; color:#d1d5db; border-bottom:1px solid #1E1E35; white-space:nowrap; }
.tbl tr:last-child td { border-bottom:none; }
.tbl tr:hover td { background:rgba(107,94,228,0.04); }

.act-icon { display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; border-radius:7px; cursor:pointer; border:1px solid #1E1E35; background:#0D0D1A; color:#6b7280; transition:all .15s; }
.act-icon.edit:hover { border-color:#fb923c; color:#fb923c; background:rgba(251,146,60,0.1); }
.act-icon.del:hover  { border-color:#ef4444; color:#f87171; background:rgba(239,68,68,0.1); }

.thumb { width:32px; height:32px; border-radius:8px; background:linear-gradient(135deg,#1E1E35,#0D0D1A); display:inline-flex; align-items:center; justify-content:center; color:#8578F0; flex-shrink:0; border:1px solid #1E1E35; }

.badge-free { display:inline-flex; align-items:center; gap:4px; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:600; background:rgba(34,197,94,0.12); color:#4ade80; border:1px solid rgba(34,197,94,0.25); }
.badge-paid { display:inline-flex; align-items:center; gap:4px; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:600; background:rgba(107,94,228,0.12); color:#8578F0; border:1px solid rgba(107,94,228,0.25); }
.badge-listed   { display:inline-flex; align-items:center; gap:4px; padding:3px 9px; border-radius:999px; font-size:11px; font-weight:600; background:rgba(34,197,94,0.12); color:#4ade80; }
.badge-delisted { display:inline-flex; align-items:center; gap:4px; padding:3px 9px; border-radius:999px; font-size:11px; font-weight:600; background:rgba(251,146,60,0.12); color:#fb923c; }

.empty-state { text-align:center; padding:60px 20px; color:#4b5563; }
.empty-state svg { margin:0 auto 12px; opacity:.25; }

.modal-backdrop { position:fixed; inset:0; background:rgba(0,0,0,0.75); z-index:50; display:flex; align-items:flex-start; justify-content:center; padding:40px 16px; overflow-y:auto; }
.modal-card { background:#13131F; border:1px solid #1E1E35; border-radius:16px; width:100%; max-width:760px; }

.form-label { display:block; font-size:12px; font-weight:600; color:#9ca3af; margin-bottom:6px; }
.form-label .req { color:#f87171; }
.form-input, .form-select {
    width:100%; background:#0D0D1A; border:1px solid #1E1E35; color:#fff; font-size:13px;
    border-radius:10px; padding:10px 12px; outline:none; transition:border-color .15s, box-shadow .15s;
}
.form-input:focus, .form-select:focus { border-color:#6B5EE4; box-shadow:0 0 0 3px rgba(107,94,228,0.15); }
.form-input::placeholder { color:#4b5563; }

.upload-box { display:flex; align-items:center; gap:12px; background:#0D0D1A; border:1px dashed #2A2A45; border-radius:10px; padding:14px; cursor:pointer; transition:border-color .15s; }
.upload-box:hover { border-color:#6B5EE4; }
.upload-icon { width:36px; height:36px; border-radius:9px; background:rgba(107,94,228,0.12); color:#8578F0; display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; }

.btn-primary-grad { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:9px 16px; border-radius:10px; font-size:13px; font-weight:700; color:#fff; background:linear-gradient(135deg,#6B5EE4,#8578F0); border:none; cursor:pointer; box-shadow:0 4px 14px rgba(107,94,228,0.25); transition:transform .15s, box-shadow .15s; }
.btn-primary-grad:hover { transform:translateY(-1px); box-shadow:0 8px 22px rgba(107,94,228,0.35); }
.btn-ghost { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:9px 16px; border-radius:10px; font-size:13px; font-weight:600; color:#d1d5db; background:transparent; border:1px solid #1E1E35; cursor:pointer; transition:all .15s; }
.btn-ghost:hover { border-color:#2A2A45; color:#fff; background:rgba(255,255,255,0.02); }

.pricing-seg { display:inline-flex; background:#0D0D1A; border:1px solid #1E1E35; border-radius:10px; padding:3px; }
.pricing-btn { padding:7px 14px; border-radius:7px; font-size:12px; font-weight:600; color:#6b7280; cursor:pointer; border:none; background:transparent; transition:all .15s; }
.pricing-btn.active { background:linear-gradient(135deg,#6B5EE4,#8578F0); color:#fff; }

.tag { display:inline-flex; align-items:center; gap:6px; padding:4px 10px; background:rgba(107,94,228,0.12); color:#c4b9ff; border:1px solid rgba(107,94,228,0.25); border-radius:999px; font-size:12px; font-weight:500; }
.tag button { background:none; border:none; color:#8578F0; cursor:pointer; line-height:1; font-size:14px; }
.tag button:hover { color:#f87171; }

.sim-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px,1fr)); gap:16px; }
.sim-card { background:#13131F; border:1px solid #1E1E35; border-radius:14px; overflow:hidden; transition:border-color .2s, transform .2s; }
.sim-card:hover { border-color:rgba(107,94,228,0.4); transform:translateY(-2px); }
.sim-poster { height:140px; background:linear-gradient(135deg,#1a1a2e,#0D0D1A); display:flex; align-items:center; justify-content:center; color:#4b5563; position:relative; }
.sim-poster svg { width:40px; height:40px; opacity:.35; }
.sim-status-pill { position:absolute; top:10px; right:10px; }
.sim-body { padding:14px; }
.sim-title { color:#fff; font-size:13px; font-weight:700; margin-bottom:3px; }
.sim-author { color:#6b7280; font-size:12px; margin-bottom:10px; }

.pg-btn { min-width:32px; height:32px; padding:0 8px; display:inline-flex; align-items:center; justify-content:center; border-radius:8px; font-size:12px; font-weight:600; color:#9ca3af; background:#0D0D1A; border:1px solid #1E1E35; cursor:pointer; transition:all .15s; }
.pg-btn:hover:not(.disabled):not(.active) { border-color:#2A2A45; color:#fff; }
.pg-btn.active { background:rgba(107,94,228,0.2); border-color:#6B5EE4; color:#fff; }
.pg-btn.disabled { opacity:0.3; cursor:default; }

.filter-chip { display:inline-flex; align-items:center; gap:4px; padding:2px 8px; border-radius:6px; font-size:10px; font-weight:500; background:#1E1E35; color:#9ca3af; margin-right:4px; }
