/* ============================================================
   Spotify Scraper Admin — Elevated UI v2
   Design: deep space dark, teal/green accent, glassy surfaces
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
    /* Backgrounds — four-layer depth */
    --bg-void: #070710;
    --bg-primary: #0c0c17;
    --bg-secondary: #111120;
    --bg-card: #161628;
    --bg-card-hover: #1c1c30;

    --bg-input: #131323;
    --bg-glass: rgba(22, 22, 40, 0.85);

    /* Borders */
    --border-color: #232338;
    --border-light: #2e2e4a;
    --border-accent: rgba(11, 133, 87, 0.28);

    /* Text */
    --text-primary: #f0f0fa;
    --text-secondary: #9090aa;
    --text-muted: #555568;
    --text-on-accent: #ffffff;

    /* Accent — Hafrikplay Green */
    --accent: #0b8557;
    --accent-hover: #0a7a4e;
    --accent-dim: rgba(11, 133, 87, 0.13);
    --accent-glow: rgba(11, 133, 87, 0.28);
    --spotify: #1ed760;
    --spotify-dim: rgba(30, 215, 96, 0.12);

    /* Status */
    --success: #00d68f;
    --warning: #ffaa00;
    --danger: #ff3d71;
    --info: #3d9eff;

    /* Layout */
    --sidebar-width: 72px;
    --sidebar-expanded: 248px;
    --header-height: 60px;

    /* Shape */
    --radius: 14px;
    --radius-sm: 8px;
    --radius-xs: 5px;
    --radius-pill: 999px;

    /* Elevation */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.55);
    --shadow-accent: 0 4px 20px rgba(11, 133, 87, 0.25);

    /* Motion */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.22s var(--ease);

    /* Type */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── RESET ───────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    display: block;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Focus ring */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ── ANIMATIONS ──────────────────────────────────────────── */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -400px 0;
    }

    100% {
        background-position: 400px 0;
    }
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.85);
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(16px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Stagger for stat cards */
.stats-grid .stat-card:nth-child(1) {
    animation-delay: 0ms;
}

.stats-grid .stat-card:nth-child(2) {
    animation-delay: 60ms;
}

.stats-grid .stat-card:nth-child(3) {
    animation-delay: 120ms;
}

.stats-grid .stat-card:nth-child(4) {
    animation-delay: 180ms;
}

.stat-card {
    animation: fadeUp 0.4s var(--ease) both;
}

/* ── LOGIN PAGE ──────────────────────────────────────────── */
/* ── SPLIT SCREEN LOGIN PAGE ───────────────────────────────── */
.login-page-split {
    min-height: 100vh;
    display: flex;
    background: var(--bg-void);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.login-left {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at 50% 50%, rgba(20, 184, 166, 0.04) 0%, rgba(139, 92, 246, 0.02) 70%, transparent 100%), #0c0d0e;
    padding: 40px;
    position: relative;
    border-right: 1px solid var(--border-light);
}

@media (max-width: 1024px) {
    .login-left {
        display: none;
    }
}

.login-left-brand {
    position: absolute;
    top: 40px;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-left-brand img {
    height: 32px;
    width: auto;
}

.login-left-brand span {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--text-primary);
}

.login-illustration-container {
    max-width: 85%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-illustration {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #111213;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
}

.login-right-brand {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .login-right-brand {
        display: flex;
    }
}

.login-right-brand img {
    height: 32px;
    width: auto;
}

.login-right-brand span {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
}

.login-form-container h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 28px;
}

.login-form-container .form-group {
    margin-bottom: 20px;
}

.login-form-container label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-form-container .form-control {
    background: #1c1d1f;
    border: 1px solid #2d2f34;
    border-radius: 8px;
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 14px;
    width: 100%;
    transition: border-color 0.2s;
}

.login-form-container .form-control:focus {
    border-color: var(--accent);
    outline: none;
}

.login-form-container .input-icon-wrapper {
    position: relative;
}

.login-form-container .input-icon-wrapper input {
    padding-left: 42px;
}

.login-form-container .input-icon-wrapper .icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.login-form-container .password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    font-size: 14px;
}

.login-form-container .password-toggle:hover {
    color: var(--text-primary);
}

.login-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.login-remember-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    margin-bottom: 0;
    letter-spacing: normal;
}

.login-remember-row input[type="checkbox"] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
}

.login-btn {
    background: #2dd4bf;
    color: #0c0d0e;
    font-weight: 600;
    font-size: 15px;
    padding: 12px;
    border-radius: 50px;
    border: none;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s, transform 0.1s;
}

.login-btn:hover {
    background: #14b8a6;
}

.login-btn:active {
    transform: scale(0.98);
}

/* ── FORM ELEMENTS ───────────────────────────────────────── */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 7px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.form-hint {
    display: block;
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font);
    transition: var(--transition);
    outline: none;
}

.form-control:hover:not(:focus) {
    border-color: var(--border-light);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
    background: var(--bg-card);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23555568' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .form-control {
    padding-left: 42px;
}

.input-icon-wrapper .icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 15px;
    pointer-events: none;
    transition: var(--transition);
}

.input-icon-wrapper:focus-within .icon {
    color: var(--accent);
}

/* Password toggle button */
.input-icon-wrapper--password {
    position: relative;
}

.form-control--has-toggle {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 15px;
    cursor: pointer;
    padding: 4px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xs);
    transition: var(--transition);
    line-height: 1;
}

.password-toggle:hover {
    color: var(--accent);
    background: var(--accent-dim);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* Logo image variant */
.logo-icon-img {
    background: rgba(11, 133, 87, 0.08) !important;
    border-color: rgba(11, 133, 87, 0.3) !important;
    box-shadow: 0 0 24px rgba(11, 133, 87, 0.2) !important;
    padding: 8px;
}

.logo-icon-img img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    display: block;
}

.required {
    color: var(--danger);
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background 0.15s;
}

.btn:active::after {
    background: rgba(255, 255, 255, 0.06);
}

.btn-primary {
    background: var(--accent);
    color: var(--text-on-accent);
    border-color: var(--accent);
    font-weight: 700;
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-accent);
    color: var(--text-on-accent);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--text-muted);
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(255, 61, 113, 0.12);
    color: var(--danger);
    border-color: rgba(255, 61, 113, 0.3);
}

.btn-danger:hover {
    background: rgba(255, 61, 113, 0.2);
    border-color: var(--danger);
}

.btn-danger-outline {
    background: transparent;
    color: var(--danger);
    border-color: rgba(255, 61, 113, 0.3);
}

.btn-danger-outline:hover {
    background: rgba(255, 61, 113, 0.1);
    border-color: var(--danger);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 12.5px;
}

.btn-lg {
    padding: 13px 28px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ── ALERTS ──────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 18px;
    display: none;
    gap: 8px;
    align-items: flex-start;
    border: 1px solid;
}

.alert.show {
    display: flex;
}

.alert-error {
    background: rgba(255, 61, 113, 0.08);
    color: var(--danger);
    border-color: rgba(255, 61, 113, 0.25);
}

.alert-success {
    background: rgba(0, 214, 143, 0.08);
    color: var(--success);
    border-color: rgba(0, 214, 143, 0.25);
}

.alert-warning {
    background: rgba(255, 170, 0, 0.08);
    color: var(--warning);
    border-color: rgba(255, 170, 0, 0.2);
    display: block;
}

/* ── ADMIN LAYOUT ────────────────────────────────────────── */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: width 0.28s var(--ease);
    overflow: hidden;
}

.sidebar.expanded {
    width: var(--sidebar-expanded);
}

/* Glow line at the top of the sidebar */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), #3d9eff);
    opacity: 0.7;
}

.sidebar-logo {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    padding: 0 16px;
    gap: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-logo .logo-mini {
    font-size: 20px;
    color: var(--accent);
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.sidebar-logo .logo-mini-img {
    font-size: unset;
    color: unset;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo .logo-mini-img img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(11, 133, 87, 0.45));
}

.sidebar-logo span {
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s var(--ease);
    letter-spacing: -0.3px;
}

.sidebar.expanded .sidebar-logo span {
    opacity: 1;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar {
    width: 0;
}

/* Nav section label */
.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 10px 24px 4px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s var(--ease);
}

.sidebar.expanded .nav-section-label {
    opacity: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px 24px;
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
    color: var(--accent);
    background: var(--accent-dim);
}

/* Animated active indicator */
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 10px var(--accent-glow);
}

.nav-item i {
    font-size: 17px;
    min-width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item span {
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.18s var(--ease);
    flex: 1;
}

.sidebar.expanded .nav-item span {
    opacity: 1;
}

/* Nav badge (e.g. "3 running") */
.nav-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: var(--radius-pill);
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.18s var(--ease);
}

.sidebar.expanded .nav-badge {
    opacity: 1;
}

.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 18px;
}

.sidebar-footer {
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* ── MAIN CONTENT ────────────────────────────────────────── */
.main-wrapper {
    flex: 1;
    min-width: 0;
    /* flex items default to min-width:auto, which refuses to
                     shrink below content size — without this, wide tables
                     push the whole layout past the viewport and get clipped
                     by body's overflow-x:hidden instead of scrolling */
    margin-left: var(--sidebar-width);
    transition: margin-left 0.28s var(--ease);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar.expanded~.main-wrapper {
    margin-left: var(--sidebar-expanded);
}

/* ── HEADER ──────────────────────────────────────────────── */
.header {
    height: var(--header-height);
    background: rgba(17, 17, 32, 0.88);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Breadcrumb in header */
.header-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.header-breadcrumb .crumb-sep {
    color: var(--text-muted);
    font-size: 11px;
}

.header-breadcrumb .crumb-home {
    color: var(--text-muted);
}

.page-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.menu-toggle:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 17px;
    cursor: pointer;
    padding: 8px 9px;
    border-radius: var(--radius-sm);
    position: relative;
    transition: var(--transition);
}

.header-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.header-btn.active {
    color: var(--accent);
    background: var(--accent-dim);
}

.notification-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    min-width: 8px;
    height: 8px;
    padding: 0 3px;
    background: var(--danger);
    border-radius: 10px;
    border: 2px solid var(--bg-secondary);
    font-size: 0;
    animation: pulse-dot 2s ease-in-out infinite;
}

.notification-dot.has-count {
    min-width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 3px;
    right: 3px;
    animation: none;
}

/* Header dropdowns */
.header-dropdown-wrap {
    position: relative;
}

.header-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    max-width: calc(100vw - 32px);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0.18s;
    overflow: hidden;
}

.header-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-dropdown-user {
    width: 260px;
}

.header-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.header-dropdown-head h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.link-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    padding: 0;
    transition: var(--transition);
}

.link-btn:hover {
    color: var(--accent-hover);
}

.header-dropdown-body {
    max-height: 340px;
    overflow-y: auto;
}

.header-dropdown-foot {
    padding: 10px 16px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.header-dropdown-foot a {
    font-size: 13px;
    font-weight: 500;
}

.header-dropdown-loading,
.header-dropdown-empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.header-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    cursor: pointer;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item:hover {
    background: var(--bg-card-hover);
}

.notif-item.unread {
    background: rgba(11, 133, 87, 0.05);
}

.notif-item.unread:hover {
    background: rgba(11, 133, 87, 0.08);
}

.notif-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-dim);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-text {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.notif-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.user-menu-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.user-menu-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #3d9eff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    flex-shrink: 0;
}

.user-menu-name {
    font-size: 14px;
    font-weight: 600;
}

.user-menu-email {
    font-size: 12px;
    color: var(--text-muted);
    word-break: break-all;
}

.header-dropdown-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 16px;
    color: var(--text-primary);
    font-size: 13.5px;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    background: none;
    width: 100%;
    font-family: var(--font);
    cursor: pointer;
    text-align: left;
}

.header-dropdown-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.header-dropdown-item i {
    width: 16px;
    text-align: center;
    color: var(--text-secondary);
}

.header-dropdown-item.danger {
    color: var(--danger);
}

.header-dropdown-item.danger i {
    color: var(--danger);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #3d9eff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #000;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    font-family: var(--font);
    padding: 0;
    transition: var(--transition);
}

.user-avatar:hover {
    border-color: var(--accent);
}

.user-avatar .status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 9px;
    height: 9px;
    background: var(--success);
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
}

/* ── CONTENT ─────────────────────────────────────────────── */
.content {
    flex: 1;
    padding: 28px 24px 24px;
}

/* ── FOOTER ──────────────────────────────────────────────── */
.footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: var(--accent);
    font-size: 12px;
}

/* ── CARDS ───────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.22s var(--ease);
}

.card:hover {
    border-color: var(--border-light);
}

.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 22px;
}

.card-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border-color);
}

/* ── STATS GRID ──────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 22px 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: default;
}

/* Subtle glow corner on hover */
.stat-card::after {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-card:nth-child(1)::after {
    background: radial-gradient(circle, rgba(11, 133, 87, 0.12), transparent 70%);
}

.stat-card:nth-child(2)::after {
    background: radial-gradient(circle, rgba(61, 158, 255, 0.12), transparent 70%);
}

.stat-card:nth-child(3)::after {
    background: radial-gradient(circle, rgba(255, 170, 0, 0.1), transparent 70%);
}

.stat-card:nth-child(4)::after {
    background: radial-gradient(circle, rgba(0, 214, 143, 0.12), transparent 70%);
}

.stat-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}

.stat-icon.playlists {
    background: rgba(11, 133, 87, 0.12);
    color: var(--accent);
}

.stat-icon.artists {
    background: rgba(61, 158, 255, 0.12);
    color: var(--info);
}

.stat-icon.emails {
    background: rgba(255, 170, 0, 0.12);
    color: var(--warning);
}

.stat-icon.completed {
    background: rgba(0, 214, 143, 0.12);
    color: var(--success);
}

.stat-card .stat-value {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 5px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
}

.stat-card .stat-label {
    font-size: 12.5px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ── CHARTS ──────────────────────────────────────────────── */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.charts-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.chart-container {
    position: relative;
    height: 260px;
}

.chart-container-donut {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── TABLE ───────────────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 11px 16px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.12);
}

.data-table td {
    padding: 13px 16px;
    font-size: 13.5px;
    border-bottom: 1px solid rgba(35, 35, 56, 0.7);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background 0.14s var(--ease);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.022);
}

/* Row accent on hover — left border flash */
.data-table tbody tr {
    position: relative;
}

.data-table tbody tr::before {
    /* content: ''; */
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.18s var(--ease);
}

.data-table tbody tr:hover::before {
    opacity: 1;
}

.data-table .artist-cell {
    display: flex;
    align-items: center;
    gap: 11px;
}

.artist-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-input);
    flex-shrink: 0;
}

.artist-avatar-placeholder {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
}

/* ── BADGES ──────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.badge-success {
    background: rgba(0, 214, 143, 0.12);
    color: var(--success);
}

.badge-warning {
    background: rgba(255, 170, 0, 0.12);
    color: var(--warning);
}

.badge-danger {
    background: rgba(255, 61, 113, 0.12);
    color: var(--danger);
}

.badge-info {
    background: rgba(61, 158, 255, 0.12);
    color: var(--info);
}

.badge-secondary {
    background: rgba(160, 160, 184, 0.1);
    color: var(--text-secondary);
}

.badge-accent {
    background: var(--accent-dim);
    color: var(--accent);
}

.badge .fa-spotify {
    margin-right: 3px;
}

/* ── SIDE DRAWER ─────────────────────────────────────────── */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 250;
    display: none;
}

.drawer-overlay.show {
    display: block;
}

.side-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: var(--bg-card);
    border-left: 1px solid var(--border-light);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s var(--ease);
}

.drawer-overlay.show .side-drawer {
    transform: translateX(0);
}

.side-drawer-header {
    padding: 22px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.side-drawer-header h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.side-drawer-body {
    flex: 1;
    padding: 28px 24px;
    overflow-y: auto;
}

.side-drawer-body .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.side-drawer-body .form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 14px;
    border-radius: var(--radius-sm);
}

.side-drawer-footer {
    padding: 20px 24px 28px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.side-drawer-footer .btn {
    min-width: 100px;
    border-radius: 999px;
    padding: 11px 24px;
    font-weight: 600;
}

.side-drawer-footer .btn-secondary {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
}

.side-drawer-footer .btn-secondary:hover {
    background: var(--bg-input);
    border-color: var(--text-muted);
}

/* ── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    width: 100%;
    max-width: 520px;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.28s var(--ease) both;
}

.modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 17px;
    font-weight: 700;
}

.modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: var(--radius-xs);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.09);
}

.modal-body {
    padding: 22px;
}

.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: rgba(0, 0, 0, 0.1);
}

/* ── FILTER PANEL ────────────────────────────────────────── */
.filter-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 18px;
    overflow: hidden;
    transition: var(--transition);
}

.filter-header {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s var(--ease);
}

.filter-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.filter-header h4 {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.filter-header h4 i {
    color: var(--accent);
}

.filter-toggle {
    color: var(--text-muted);
    font-size: 12px;
    transition: transform 0.22s var(--ease);
}

.filter-body.show~.filter-toggle,
.filter-panel.open .filter-toggle {
    transform: rotate(180deg);
}

.filter-body {
    padding: 0 20px 20px;
    border-top: 1px solid var(--border-color);
    display: none;
    animation: fadeUp 0.22s var(--ease) both;
}

.filter-body.show {
    display: block;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 16px;
    margin-bottom: 14px;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

/* ── PAGE ACTIONS ────────────────────────────────────────── */
.page-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
}

.page-actions h2 {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--text-primary);
}

.page-actions-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── JOB DETAIL ──────────────────────────────────────────── */
.job-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.job-info-card .playlist-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.playlist-cover {
    width: 48px;
    height: 48px;
    border-radius: 9px;
    object-fit: cover;
}

/* Progress bars */
.progress-item {
    margin-bottom: 14px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 7px;
    color: var(--text-secondary);
    font-weight: 500;
}

.progress-bar {
    height: 6px;
    background: var(--bg-input);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #3d9eff);
    border-radius: var(--radius-pill);
    transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
}

/* Shimmer on progress bars */
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    animation: shimmer 1.8s ease infinite;
}

.date-boxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.date-box {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 11px;
    text-align: center;
}

.date-box label {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 4px;
    font-weight: 600;
}

.date-box span {
    font-size: 12.5px;
    font-weight: 500;
}

/* Gauge chart */
.gauge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
}

.gauge-value {
    font-size: 44px;
    font-weight: 800;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
}

.gauge-stats {
    display: flex;
    gap: 28px;
    margin-top: 14px;
}

.gauge-stat {
    text-align: center;
}

.gauge-stat .value {
    font-size: 19px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.gauge-stat .label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Email sources */
.source-list {
    list-style: none;
}

.source-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid var(--border-color);
}

.source-item:last-child {
    border-bottom: none;
}

.source-platform {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
}

.source-platform i {
    font-size: 17px;
}

.source-count {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.mini-ring {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    border-top-color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 600;
}

/* ── CONFIRM MODAL ───────────────────────────────────────── */
.confirm-modal {
    max-width: 400px;
    text-align: center;
}

.confirm-modal-body {
    padding: 36px 28px 28px;
}

.confirm-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(255, 170, 0, 0.08);
    border: 2px solid rgba(255, 170, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 28px;
    color: var(--warning);
    box-shadow: 0 0 24px rgba(255, 170, 0, 0.12);
}

.confirm-modal h3 {
    font-size: 22px;
    margin-bottom: 8px;
}

.confirm-modal p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 26px;
}

.confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.confirm-cancel {
    color: var(--danger) !important;
    border-color: rgba(255, 61, 113, 0.3) !important;
}

.confirm-cancel:hover {
    background: rgba(255, 61, 113, 0.1) !important;
}

/* ── COLLAPSIBLE ─────────────────────────────────────────── */
.collapsible-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.collapsible-card .card-header:hover {
    background: rgba(255, 255, 255, 0.015);
}

.collapsible-header h3 {
    margin: 0;
    flex: 1;
}

.collapse-icon {
    font-size: 13px;
    transition: transform 0.22s var(--ease);
    color: var(--text-muted);
    flex-shrink: 0;
}

.collapse-icon.collapsed {
    transform: rotate(-90deg);
}

.collapsible-body {
    display: none;
}

.collapsible-body.show {
    display: block;
}

/* ── CSS DONUT CHARTS ────────────────────────────────────── */
.css-donut {
    --pct: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--accent) calc(var(--pct) * 1%), var(--border-color) 0);
    mask: radial-gradient(farthest-side, transparent calc(100% - 16px), #000 calc(100% - 15px));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 16px), #000 calc(100% - 15px));
}

.css-donut-lg {
    max-width: 180px;
    max-height: 180px;
    margin: 0 auto;
}

.css-donut-sm {
    max-width: 100px;
    max-height: 100px;
    margin: 0 auto;
}

#emailDonut.css-donut {
    background: conic-gradient(#a855f7 calc(var(--pct) * 1%), var(--border-color) 0);
}

/* ── CSS BAR CHARTS ──────────────────────────────────────── */
.css-bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6px;
    height: 100%;
    min-height: 200px;
    padding-top: 8px;
}

.css-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    min-width: 0;
}

.css-bar-track {
    flex: 1;
    width: 100%;
    max-width: 28px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.css-bar-fill {
    width: 100%;
    min-height: 4px;
    background: var(--border-light);
    border-radius: 5px 5px 0 0;
    transition: height 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.css-bar-fill.active {
    background: linear-gradient(180deg, var(--info), #2266cc);
}

.css-bar-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 7px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.css-donut-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    height: 100%;
    justify-content: center;
}

.css-donut-chart {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.css-donut-hole {
    position: absolute;
    inset: 22%;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-legend {
    list-style: none;
    width: 100%;
    max-width: 260px;
}

.chart-legend li {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    color: var(--text-secondary);
    padding: 5px 0;
}

.chart-legend li strong {
    margin-left: auto;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 160px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ── ARTIST EXPAND TABLE ─────────────────────────────────── */
.artist-expand-table thead th {
    font-size: 10.5px;
    letter-spacing: 0.7px;
}

.artist-row-cell {
    display: flex;
    align-items: center;
    gap: 11px;
}

.artist-row-cell .artist-cell {
    flex: 1;
    min-width: 0;
}

.artist-row-cell .artist-name {
    font-weight: 600;
}

.expand-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 12px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: var(--radius-xs);
    transition: var(--transition);
}

.expand-toggle:hover {
    color: var(--accent);
    background: var(--accent-dim);
}

.expand-row.expanded {
    background: rgba(255, 255, 255, 0.015);
}

.expand-row.expanded td {
    border-bottom-color: transparent;
}

.primary-email-cell {
    color: var(--text-secondary);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.primary-email-inner {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.email-cell-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-conf-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    font-size: 11px;
    opacity: 0.92;
}

.email-conf-icon.verified,
.email-conf-icon.high {
    color: var(--success);
}

.email-conf-icon.med {
    color: #d4a017;
}

.email-conf-icon.low {
    color: var(--text-muted);
}

.email-conf-icon.risky {
    color: var(--warning);
}

.email-conf-icon.bad {
    color: var(--danger);
}

.trust-btns {
    display: inline-flex;
    gap: 4px;
    vertical-align: middle;
}

.trust-btn {
    width: 22px;
    height: 22px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    font-size: 10px;
    line-height: 1;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.trust-btn:hover {
    background: var(--bg-tertiary);
}

.trust-btn.trust-confirm:hover {
    color: var(--success);
    border-color: var(--success);
}

.trust-btn.trust-reject:hover {
    color: var(--danger);
    border-color: var(--danger);
}

.trust-btns.trust-confirmed .trust-confirm {
    background: rgba(0, 214, 143, 0.15);
    color: var(--success);
    border-color: var(--success);
}

.trust-btns.trust-rejected .trust-reject {
    background: rgba(255, 61, 113, 0.15);
    color: var(--danger);
    border-color: var(--danger);
}

.trust-cell {
    white-space: nowrap;
}

.accuracy-summary {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
}

.accuracy-stat-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
}

.accuracy-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.accuracy-dual-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 120px;
    padding-top: 8px;
}

.accuracy-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    min-width: 0;
}

.accuracy-bar-pair {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
}

.accuracy-bar {
    width: 40%;
    min-height: 4px;
    border-radius: 3px 3px 0 0;
    transition: height 0.3s;
}

.accuracy-bar.recall {
    background: var(--accent);
}

.accuracy-bar.precision {
    background: var(--info);
}

.accuracy-legend {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.accuracy-legend .legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.accuracy-legend .legend-dot.recall {
    background: var(--accent);
}

.accuracy-legend .legend-dot.precision {
    background: var(--info);
}

.accuracy-footnote {
    margin: 12px 0 0;
    font-size: 11px;
    color: var(--text-muted);
}

.artist-detail-panel {
    overflow: visible;
    background: #131323;
    border-top: 1px solid #0c0c17;
    padding: 0;
}

.artist-detail-panel .social-detail-table td:last-child {
    overflow: visible;
    position: relative;
}

.expand-content.show .artist-detail-panel .actions-dropdown {
    z-index: 100;
}

.artist-detail-panel .expand-inner {
    padding: 18px 22px 22px 52px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.artist-detail-panel .social-section h4 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.social-detail-table {
    width: 100%;
    border-collapse: collapse;
}

.social-detail-table th {
    text-align: left;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--text-muted);
    padding: 7px 10px 9px 0;
    border-bottom: 1px solid var(--border-color);
}

.social-detail-table td {
    padding: 10px 10px 10px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.social-detail-table tr:last-child td {
    border-bottom: none;
}

.social-detail-table td:last-child {
    width: 40px;
    text-align: right;
    padding-right: 0;
    overflow: visible;
    position: relative;
}

.social-type-cell {
    display: flex;
    align-items: center;
    gap: 9px;
}

.social-type-cell i {
    font-size: 15px;
    width: 18px;
    text-align: center;
}

.social-type-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-xs);
    transition: var(--transition);
}

.social-type-link:hover {
    background: var(--bg-input);
    transform: scale(1.1);
}

.social-type-link i {
    font-size: 15px;
    width: auto;
}

.social-type-cell span {
    color: var(--text-secondary);
    font-size: 13px;
}

.expand-content {
    display: none;
    background: var(--bg-secondary);
}

.expand-content.show {
    display: table-row;
}

.expand-content>td {
    padding: 0 !important;
    background: var(--bg-primary);
}

.expand-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

/* ── ACTIONS DROPDOWN ────────────────────────────────────── */
.actions-menu {
    position: relative;
    display: block;
    text-align: center;
}

/* Scraped Artists table: the Actions <td> has no width constraint, so on
   wide desktop viewports it stretches far beyond the kebab button. Since
   .actions-dropdown anchors with right:0 to that cell (not the button),
   the menu would open detached from its trigger. Shrinking the column to
   its content and right-aligning it keeps the button and its dropdown
   together regardless of screen width. */
.actions-cell {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

.actions-cell .actions-menu {
    display: inline-flex;
    text-align: left;
}

.actions-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 9px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: var(--transition);
}

.actions-btn:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.actions-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    min-width: 160px;
    box-shadow: var(--shadow-lg);
    z-index: 50;
    display: none;
    overflow: hidden;
    animation: fadeUp 0.15s var(--ease) both;
}

.actions-dropdown.show {
    display: block;
}

.actions-dropdown button,
.actions-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 14px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.14s;
}

.actions-dropdown button:hover,
.actions-dropdown a:hover {
    background: var(--bg-card-hover);
}

.actions-dropdown .danger {
    color: var(--danger);
}

/* ── HEALTH CHECK ────────────────────────────────────────── */
.health-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border-color);
}

.health-item:last-child {
    border-bottom: none;
}

.health-status {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.health-status.ok {
    background: rgba(0, 214, 143, 0.12);
    color: var(--success);
}

.health-status.warning {
    background: rgba(255, 170, 0, 0.12);
    color: var(--warning);
}

.health-status.error {
    background: rgba(255, 61, 113, 0.12);
    color: var(--danger);
}

.health-name {
    flex: 1;
    font-size: 13.5px;
    font-weight: 500;
}

.health-desc {
    font-size: 12.5px;
    color: var(--text-secondary);
}

/* ── SPOTIFY LINKS ───────────────────────────────────────── */
.spotify-link {
    color: var(--spotify);
    font-size: 17px;
    transition: var(--transition);
}

.spotify-link:hover {
    color: #2cec6e;
    filter: drop-shadow(0 0 4px rgba(30, 215, 96, 0.4));
}

.link-icon {
    color: var(--accent);
    font-size: 15px;
}

/* ── SCROLL TO TOP ───────────────────────────────────────── */
.scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 42px;
    height: 42px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    box-shadow: var(--shadow-accent);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 90;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

/* ── SPINNER ─────────────────────────────────────────────── */
.spinner {
    width: 28px;
    height: 28px;
    border: 2.5px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 36px auto;
}

/* Skeleton shimmer */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s ease infinite;
    border-radius: var(--radius-xs);
    height: 14px;
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 23, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: var(--radius);
    backdrop-filter: blur(4px);
}

.empty-state {
    text-align: center;
    padding: 56px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 44px;
    margin-bottom: 14px;
    opacity: 0.35;
    display: block;
}

.empty-state h3 {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 7px;
    font-weight: 600;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ── PAGINATION ──────────────────────────────────────────── */
.pagination {
    padding: 14px 18px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.08);
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.pagination-info {
    font-size: 12.5px;
    color: var(--text-muted);
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

.pagination-controls button {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    font-size: 12.5px;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
    font-weight: 500;
}

.pagination-ellipsis {
    color: var(--text-muted);
    padding: 0 3px;
    user-select: none;
}

.pagination-controls button:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

.pagination-controls button.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    font-weight: 700;
}

.pagination-controls button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ── DEMO BANNER ─────────────────────────────────────────── */
.demo-banner {
    background: linear-gradient(90deg, rgba(11, 133, 87, 0.08), rgba(61, 158, 255, 0.07));
    border: 1px solid rgba(11, 133, 87, 0.18);
    border-radius: var(--radius-sm);
    padding: 9px 14px;
    font-size: 12.5px;
    color: var(--accent);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── SETTINGS PAGE ───────────────────────────────────────── */
.mode-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: border-color 0.2s;
}

.mode-toggle-row:hover {
    border-color: var(--border-light);
}

.mode-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

.mode-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mode-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border-light);
    border-radius: var(--radius-pill);
    transition: background 0.2s var(--ease);
}

.mode-switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.22s var(--ease);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.mode-switch input:checked+.mode-switch-slider {
    background: var(--accent);
}

.mode-switch input:checked+.mode-switch-slider:before {
    transform: translateX(22px);
}

.mode-switch input:disabled+.mode-switch-slider {
    opacity: 0.5;
    cursor: wait;
}

/* Recent activity list */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.activity-dot.success {
    background: var(--success);
    box-shadow: 0 0 8px rgba(0, 214, 143, 0.4);
}

.activity-dot.warning {
    background: var(--warning);
}

.activity-dot.error {
    background: var(--danger);
}

.activity-dot.info {
    background: var(--info);
}

.activity-body {
    flex: 1;
    min-width: 0;
}

.activity-text {
    font-size: 13px;
    line-height: 1.4;
}

.activity-meta {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .job-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
        width: var(--sidebar-expanded);
    }

    .sidebar.mobile-open .nav-item span {
        opacity: 1;
    }

    .sidebar.mobile-open .sidebar-logo span {
        opacity: 1;
    }

    .sidebar.mobile-open .nav-section-label {
        opacity: 1;
    }

    .main-wrapper {
        margin-left: 0 !important;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .charts-grid-2 {
        grid-template-columns: 1fr;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .expand-inner {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 16px;
    }

    .page-actions {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .job-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 30px 22px;
    }

    .modal {
        margin: 12px;
    }

    .page-actions h2 {
        font-size: 18px;
    }
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.tag-chip {
    display: inline-block;
    padding: 2px 8px;
    margin: 2px 4px 2px 0;
    border-radius: var(--radius-pill);
    background: rgba(0, 212, 170, 0.12);
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.tags-cell {
    max-width: 180px;
}

.artist-filter-bar,
.artist-bulk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.artist-filter-bar .form-control-sm {
    max-width: 160px;
}

.artist-filter-bar input.form-control-sm {
    min-width: 140px;
    flex: 1;
    max-width: 220px;
}

.artist-bulk-bar {
    display: none;
    background: rgba(0, 212, 170, 0.06);
}

.artist-bulk-bar.show {
    display: flex;
}

.artist-bulk-bar .form-control-sm {
    max-width: 180px;
}

.msg-link {
    color: var(--success);
    font-size: 16px;
    margin-right: 6px;
}

.msg-link:last-child {
    margin-right: 0;
}

.api-keys-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 20px;
}

@media (max-width: 767px) {
    .api-keys-grid {
        grid-template-columns: 1fr;
    }
}

.api-keys-group-title {
    grid-column: 1 / -1;
    margin: 8px 0 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.api-key-field .form-hint {
    font-size: 11px;
}

.live-progress-panel {
    margin-top: 18px;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 212, 170, 0.22);
    background: rgba(0, 212, 170, 0.05);
}

.live-progress-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.progress-bar-lg {
    height: 10px;
}

.progress-fill-accent {
    background: linear-gradient(90deg, var(--accent), #00f5c4);
}

.sidebar-activity {
    padding: 0 10px 12px;
    display: none;
}

.sidebar.expanded .sidebar-activity,
.sidebar.mobile-open .sidebar-activity {
    display: block;
}

.sidebar-activity-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 8px 8px 6px;
}

.sidebar-activity-list {
    display: grid;
    gap: 4px;
    max-height: 220px;
    overflow: auto;
}

.sidebar-activity-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 8px;
    border-radius: var(--radius-sm);
    color: inherit;
    text-decoration: none;
    font-size: 11px;
    line-height: 1.35;
    border: 1px solid transparent;
}

.sidebar-activity-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-color);
}

.sidebar-activity-item.unread {
    border-color: rgba(0, 212, 170, 0.25);
    background: rgba(0, 212, 170, 0.06);
}

.sidebar-activity-item i {
    color: var(--accent);
    margin-top: 2px;
    width: 14px;
}

.sidebar-activity-item span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.sidebar-activity-item strong {
    font-weight: 600;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-activity-item small {
    color: var(--text-muted);
}

.sidebar-activity-empty,
.sidebar-activity-loading {
    font-size: 11px;
    color: var(--text-muted);
    padding: 8px;
}

.sidebar-activity-link {
    display: block;
    margin-top: 6px;
    padding: 0 8px;
    font-size: 11px;
    color: var(--accent);
    text-decoration: none;
}

.duplicate-group {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 14px;
    background: var(--bg-input);
}

.duplicate-group-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.duplicate-group-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.duplicate-group-actions select {
    min-width: 220px;
}

/* ── REDUCED MOTION ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ══════════════════════════════════════════════════════════
   PROFILES PAGE
   ══════════════════════════════════════════════════════════ */

/* Profiles card grid */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 6px;
}

.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 22px 20px 18px;
    cursor: pointer;
    transition: var(--transition);
    animation: fadeUp 0.35s var(--ease) both;
    position: relative;
    overflow: hidden;
}

.profile-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-dim);
    opacity: 0;
    transition: opacity 0.18s;
}

.profile-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(11, 133, 87, 0.12);
}

.profile-card:hover::after {
    opacity: 1;
}

.profile-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.profile-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #1b8a6f);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 16px rgba(11, 133, 87, 0.3);
}

.profile-card-status {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-status-active {
    background: rgba(11, 133, 87, 0.12);
    color: var(--accent);
    border: 1px solid rgba(11, 133, 87, 0.3);
}

.profile-status-inactive {
    background: rgba(255, 61, 113, 0.08);
    color: var(--danger);
    border: 1px solid rgba(255, 61, 113, 0.2);
}

.profile-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-card-email {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-card-meta {
    display: flex;
    gap: 14px;
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-secondary);
}

.profile-card-meta i {
    color: var(--accent);
    margin-right: 4px;
    font-size: 11px;
}

.profile-empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-muted);
    grid-column: 1/-1;
}

.profile-empty-state i {
    font-size: 40px;
    margin-bottom: 14px;
    display: block;
    opacity: 0.35;
}

.profile-empty-state p {
    font-size: 14px;
    margin-bottom: 18px;
}

/* ── PROFILE DETAIL PANEL (slide-over) ─────────────────── */
.profile-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 149;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s var(--ease), visibility 0.22s;
    backdrop-filter: blur(3px);
}

.profile-panel-overlay.show {
    opacity: 1;
    visibility: visible;
}

.profile-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 100vw;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border-light);
    z-index: 150;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s var(--ease);
    box-shadow: -8px 0 48px rgba(0, 0, 0, 0.45);
}

.profile-panel.show {
    transform: translateX(0);
}

.profile-panel-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 20px 18px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.profile-panel-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #1b8a6f);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(11, 133, 87, 0.35);
}

.profile-panel-title {
    flex: 1;
    min-width: 0;
}

.profile-panel-title h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-panel-title p {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-panel-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    flex-shrink: 0;
}

.profile-panel-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.profile-panel-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.profile-badge-joined {
    font-size: 12px;
    color: var(--text-muted);
}

.profile-badge-joined i {
    margin-right: 4px;
}

.profile-panel-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.profile-panel-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 10px;
    border-right: 1px solid var(--border-color);
    text-align: center;
}

.profile-panel-stat:last-child {
    border-right: none;
}

.profile-panel-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-panel-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
    font-weight: 600;
}

.profile-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 8px;
}

.profile-panel-section {
    padding: 18px 20px 8px;
    border-bottom: 1px solid var(--border-color);
}

.profile-panel-section:last-child {
    border-bottom: none;
}

.profile-panel-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.profile-panel-section-title i {
    margin-right: 6px;
    color: var(--accent);
}

.profile-panel-empty {
    font-size: 13px;
    color: var(--text-muted);
    padding: 8px 0 12px;
    text-align: center;
}

.panel-job-row {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.panel-job-row:last-child {
    border-bottom: none;
}

.panel-job-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
}

.panel-job-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.panel-activity-row {
    display: flex;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border-color);
    align-items: flex-start;
}

.panel-activity-row:last-child {
    border-bottom: none;
}

.panel-activity-dot {
    color: var(--accent);
    font-size: 7px;
    margin-top: 5px;
    flex-shrink: 0;
}

.panel-activity-action {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-activity-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 1px;
}

.panel-activity-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

.profile-panel-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.profile-panel-footer .btn-danger {
    margin-left: auto;
}

/* ── FANCY PRELOADER ──────────────────────────────────────── */
.app-preloader {
    position: fixed;
    inset: 0;
    background: #0c0d0e;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    opacity: 1;
    visibility: visible;
}

.app-preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.preloader-logo {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: logoPulse 2s ease-in-out infinite;
}

.preloader-logo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.preloader-spinner-wrap {
    position: relative;
    width: 50px;
    height: 50px;
}

.preloader-spinner {
    position: absolute;
    inset: 0;
    border: 3px solid rgba(45, 212, 191, 0.1);
    border-top-color: #2dd4bf;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.preloader-pulse {
    position: absolute;
    inset: -6px;
    border: 2px solid rgba(45, 212, 191, 0.4);
    border-radius: 50%;
    animation: ripple 2s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
    opacity: 0;
}

.preloader-text {
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 4px;
    animation: textPulse 1.5s ease-in-out infinite alternate;
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(45, 212, 191, 0));
    }
    50% {
        transform: scale(1.06);
        filter: drop-shadow(0 0 15px rgba(45, 212, 191, 0.4));
    }
}

@keyframes ripple {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes textPulse {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}