/* ================================================================
   AI OFFICE — Premium Design System v4.0
   Full Dark Glassmorphism • Neon Accents • Micro-Animations
   ================================================================ */

/* ─── Google Fonts imported in HTML ─────────────────────────────── */
/* Outfit (UI) + JetBrains Mono (code) */

/* ─── Design Tokens ─────────────────────────────────────────────── */
:root {
    /* Backgrounds */
    --bg-root:        #060810;
    --bg-base:        #0a0d1a;
    --bg-surface:     #0f1629;
    --bg-elevated:    #141c35;
    --bg-hover:       #1a2340;

    /* Borders */
    --border-dim:     rgba(255,255,255,0.06);
    --border-soft:    rgba(255,255,255,0.10);
    --border-bright:  rgba(255,255,255,0.18);

    /* Text */
    --text-primary:   #eef2ff;
    --text-secondary: #94a3b8;
    --text-muted:     #64748b;
    --text-dim:       #3b4a6b;

    /* Accent Palette */
    --accent-violet:  #7c3aed;
    --accent-indigo:  #4f46e5;
    --accent-blue:    #2563eb;
    --accent-cyan:    #0891b2;
    --accent-teal:    #0d9488;
    --accent-green:   #059669;
    --accent-lime:    #65a30d;
    --accent-amber:   #d97706;
    --accent-orange:  #ea580c;
    --accent-red:     #dc2626;
    --accent-pink:    #db2777;
    --accent-rose:    #e11d48;

    /* Neon Glow */
    --neon-violet:    #a78bfa;
    --neon-blue:      #60a5fa;
    --neon-cyan:      #22d3ee;
    --neon-green:     #34d399;
    --neon-amber:     #fbbf24;
    --neon-red:       #f87171;
    --neon-pink:      #f472b6;

    /* Gradients */
    --grad-brand:     linear-gradient(135deg, #7c3aed 0%, #2563eb 50%, #0891b2 100%);
    --grad-warm:      linear-gradient(135deg, #7c3aed, #db2777);
    --grad-cool:      linear-gradient(135deg, #0891b2, #4f46e5);
    --grad-success:   linear-gradient(135deg, #059669, #0d9488);
    --grad-danger:    linear-gradient(135deg, #dc2626, #db2777);

    /* Sidebar */
    --sidebar-w:      256px;

    /* Radius */
    --r-sm:   8px;
    --r-md:   12px;
    --r-lg:   16px;
    --r-xl:   20px;
    --r-2xl:  24px;
    --r-full: 9999px;

    /* Shadows */
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
    --shadow-md:  0 8px 24px rgba(0,0,0,0.4);
    --shadow-lg:  0 16px 48px rgba(0,0,0,0.5);
    --shadow-xl:  0 24px 64px rgba(0,0,0,0.6);
    --shadow-neon-violet: 0 0 20px rgba(124,58,237,0.35);
    --shadow-neon-blue:   0 0 20px rgba(37,99,235,0.35);
    --shadow-neon-green:  0 0 20px rgba(5,150,105,0.35);
    --shadow-neon-red:    0 0 20px rgba(220,38,38,0.35);

    /* Transitions */
    --trans-fast:   all 0.15s ease;
    --trans-base:   all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --trans-slow:   all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    background: var(--bg-root);
    color: var(--text-primary);
    display: flex;
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated mesh background on body */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 10% 0%,   rgba(124,58,237,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 90% 100%, rgba(8,145,178,0.10)  0%, transparent 60%),
        radial-gradient(ellipse 50% 60% at 50% 50%,  rgba(37,99,235,0.05)  0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ─── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* ─── Typography ────────────────────────────────────────────────── */
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.3; color: var(--text-primary); }
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
h5 { font-size: 14px; }
p  { color: var(--text-secondary); }
a  { color: var(--neon-cyan); text-decoration: none; transition: var(--trans-fast); }
a:hover { color: var(--neon-violet); }
code, pre { font-family: 'JetBrains Mono', 'Courier New', monospace; font-size: 12px; }

/* ─── SIDEBAR ───────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-dim);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 100;
    overflow: hidden;
}

/* Sidebar glow line */
.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(124,58,237,0.5) 40%, rgba(8,145,178,0.4) 70%, transparent 100%);
}

/* Sidebar header / logo */
.sidebar-header {
    padding: 20px 20px 18px;
    border-bottom: 1px solid var(--border-dim);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    background: var(--grad-brand);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    box-shadow: var(--shadow-neon-violet);
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
}
.sidebar-brand span:first-child {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.3px;
    background: var(--grad-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.sidebar-brand span:last-child {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Nav */
.nav-list {
    list-style: none;
    padding: 12px 10px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    padding: 12px 12px 6px;
    margin-top: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--r-md);
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--trans-base);
    position: relative;
    white-space: nowrap;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--grad-brand);
    border-radius: 0 3px 3px 0;
    transition: height 0.25s ease;
}

.nav-link .nav-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
    transition: var(--trans-base);
}

.nav-link:hover {
    background: rgba(124,58,237,0.1);
    color: var(--text-primary);
}
.nav-link:hover .nav-icon {
    background: rgba(124,58,237,0.2);
    color: var(--neon-violet);
}
.nav-link:hover::before { height: 60%; }

.nav-link.active {
    background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(37,99,235,0.15));
    color: var(--text-primary);
    font-weight: 600;
    border: 1px solid rgba(124,58,237,0.2);
}
.nav-link.active .nav-icon {
    background: var(--grad-brand);
    color: #fff;
    box-shadow: var(--shadow-neon-violet);
}
.nav-link.active::before { height: 65%; }

.nav-badge {
    margin-left: auto;
    background: var(--grad-brand);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--r-full);
}

/* Sidebar footer */
.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--border-dim);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--r-sm);
    background: var(--grad-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
}
.sidebar-user-info span:first-child {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.sidebar-user-info span:last-child {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}
.sidebar-logout {
    width: 32px;
    height: 32px;
    border-radius: var(--r-sm);
    background: rgba(220,38,38,0.1);
    border: 1px solid rgba(220,38,38,0.2);
    color: var(--neon-red);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 13px;
    transition: var(--trans-base);
}
.sidebar-logout:hover { background: rgba(220,38,38,0.25); color: var(--neon-red); }

/* ─── MAIN WRAPPER ─────────────────────────────────────────────── */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* ─── TOP HEADER ───────────────────────────────────────────────── */
.top-header {
    height: 60px;
    background: rgba(10, 13, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-dim);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
    position: relative;
    z-index: 50;
}

.page-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-title strong { color: var(--text-primary); }

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(5,150,105,0.12);
    border: 1px solid rgba(5,150,105,0.25);
    color: var(--neon-green);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: var(--r-full);
}
.header-badge .live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 6px var(--neon-green);
    animation: livePulse 1.8s ease infinite;
}
@keyframes livePulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.8); }
}

/* ─── CONTENT BODY ─────────────────────────────────────────────── */
.content-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    position: relative;
}

/* ─── GRID SYSTEMS ─────────────────────────────────────────────── */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}
.grid-1 { display: block; margin-bottom: 24px; }

/* ─── STAT CARDS ───────────────────────────────────────────────── */
.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-dim);
    border-radius: var(--r-xl);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: var(--trans-base);
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: var(--grad-brand);
    opacity: 0;
    transition: opacity 0.3s;
}
.stat-card:hover { background: var(--bg-elevated); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card:hover::before { opacity: 1; }

.stat-card::after {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 100px; height: 100px;
    border-radius: 50%;
    background: var(--stat-color, rgba(124,58,237,0.08));
    pointer-events: none;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--r-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    background: var(--stat-icon-bg, rgba(124,58,237,0.15));
    color: var(--stat-icon-color, var(--neon-violet));
    box-shadow: 0 0 0 1px var(--border-soft);
    transition: var(--trans-base);
}
.stat-card:hover .stat-icon { transform: scale(1.08) rotate(-4deg); }

.stat-info h3 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-primary);
    line-height: 1;
}
.stat-info p {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ─── PANEL / CARD ─────────────────────────────────────────────── */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-dim);
    border-radius: var(--r-xl);
    padding: 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    transition: var(--trans-base);
}
.card:hover { border-color: var(--border-soft); }

/* Subtle glow in top-left corner */
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(124,58,237,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.card-title i {
    width: 30px;
    height: 30px;
    border-radius: var(--r-sm);
    background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(37,99,235,0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--neon-violet);
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: -12px;
    margin-bottom: 18px;
}

/* Divider */
.divider {
    height: 1px;
    background: var(--border-dim);
    margin: 20px 0;
}

/* ─── BUTTONS ──────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--r-md);
    font-family: 'Outfit', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: var(--trans-base);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.2s;
}
.btn:hover::after { background: rgba(255,255,255,0.06); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* Primary */
.btn-primary {
    background: var(--grad-brand);
    color: #fff;
    box-shadow: 0 4px 14px rgba(124,58,237,0.3);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(124,58,237,0.45); transform: translateY(-1px); }

/* Secondary */
.btn-secondary {
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border-soft);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }

/* Danger */
.btn-danger {
    background: linear-gradient(135deg, #dc2626, #db2777);
    color: #fff;
    box-shadow: var(--shadow-neon-red);
}
.btn-danger:hover { box-shadow: 0 6px 20px rgba(220,38,38,0.45); transform: translateY(-1px); }

/* Ghost */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-dim);
}
.btn-ghost:hover { border-color: var(--border-bright); color: var(--text-primary); background: rgba(255,255,255,0.04); }

/* Success */
.btn-success {
    background: var(--grad-success);
    color: #fff;
    box-shadow: var(--shadow-neon-green);
}
.btn-success:hover { box-shadow: 0 6px 20px rgba(5,150,105,0.45); transform: translateY(-1px); }

/* Icon only */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--r-sm);
}

/* Sizes */
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-full { width: 100%; }

/* ─── FORM CONTROLS ────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-group label i { color: var(--neon-violet); font-size: 11px; }

.form-control {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-md);
    padding: 11px 14px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    outline: none;
    transition: var(--trans-fast);
    appearance: none;
    -webkit-appearance: none;
}
.form-control::placeholder { color: var(--text-dim); }
.form-control:focus {
    border-color: var(--accent-violet);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
    background: var(--bg-hover);
}
.form-control:hover:not(:focus) { border-color: var(--border-bright); }

textarea.form-control {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}
textarea.form-mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.7;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

/* Input with prefix icon */
.input-group { position: relative; }
.input-group .input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13px;
    pointer-events: none;
}
.input-group .form-control { padding-left: 36px; }

/* Form hint text */
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }

/* ─── BADGES ───────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--r-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.badge i { font-size: 8px; }

.badge-success, .badge-online, .badge-completed {
    background: rgba(5,150,105,0.15);
    color: var(--neon-green);
    border: 1px solid rgba(5,150,105,0.3);
}
.badge-working, .badge-info {
    background: rgba(37,99,235,0.15);
    color: var(--neon-blue);
    border: 1px solid rgba(37,99,235,0.3);
}
.badge-idle, .badge-secondary {
    background: rgba(100,116,139,0.15);
    color: var(--text-muted);
    border: 1px solid rgba(100,116,139,0.2);
}
.badge-warning {
    background: rgba(217,119,6,0.15);
    color: var(--neon-amber);
    border: 1px solid rgba(217,119,6,0.3);
}
.badge-danger, .badge-error {
    background: rgba(220,38,38,0.15);
    color: var(--neon-red);
    border: 1px solid rgba(220,38,38,0.3);
}
.badge-violet {
    background: rgba(124,58,237,0.15);
    color: var(--neon-violet);
    border: 1px solid rgba(124,58,237,0.3);
}

/* ─── TABLE ────────────────────────────────────────────────────── */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--r-lg);
    border: 1px solid var(--border-dim);
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.table thead tr {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-soft);
}
.table th {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    white-space: nowrap;
}
.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-dim);
    color: var(--text-secondary);
    vertical-align: middle;
}
.table tbody tr { transition: var(--trans-fast); }
.table tbody tr:hover { background: rgba(255,255,255,0.02); }
.table tbody tr:last-child td { border-bottom: none; }
.table td strong { color: var(--text-primary); font-weight: 600; }

/* ─── PROGRESS BARS ────────────────────────────────────────────── */
.progress {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: var(--r-full);
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    border-radius: var(--r-full);
    background: var(--grad-brand);
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}
.progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.25) 50%, transparent 100%);
    animation: progressShimmer 2s infinite;
}
@keyframes progressShimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.progress-bar.success  { background: var(--grad-success); }
.progress-bar.warning  { background: linear-gradient(90deg, var(--accent-amber), var(--accent-orange)); }
.progress-bar.danger   { background: var(--grad-danger); }

/* ─── VIRTUAL OFFICE CANVAS ────────────────────────────────────── */
.office-viewport {
    position: relative;
    width: 100%;
    height: 580px;
    background: var(--bg-base);
    border-radius: var(--r-xl);
    overflow: hidden;
    border: 1px solid var(--border-dim);
    box-shadow: var(--shadow-lg);
}
#officeCanvas { width: 100%; height: 100%; display: block; }
#office3dContainer { width: 100%; height: 100%; display: none; }

.view-toggle-bar {
    position: absolute;
    top: 14px; right: 14px;
    z-index: 10;
    display: flex;
    gap: 6px;
    background: rgba(10, 13, 26, 0.85);
    backdrop-filter: blur(10px);
    padding: 4px;
    border-radius: var(--r-md);
    border: 1px solid var(--border-soft);
}
.toggle-btn {
    padding: 7px 16px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 600;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: var(--trans-fast);
    font-family: 'Outfit', sans-serif;
}
.toggle-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.toggle-btn.active { background: var(--grad-brand); color: #fff; box-shadow: 0 2px 8px rgba(124,58,237,0.4); }

/* ─── TOAST NOTIFICATIONS ──────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 360px;
}

.toast-message {
    pointer-events: auto;
    background: rgba(9, 12, 24, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-primary);
    border: 1px solid var(--border-soft);
    border-left: 4px solid var(--neon-green);
    border-radius: var(--r-md);
    padding: 14px 18px;
    font-size: 13.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-xl);
    animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast-message.toast-error  { border-left-color: var(--neon-red); }
.toast-message.toast-warn   { border-left-color: var(--neon-amber); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(80px) scale(0.92); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* ─── AGENT CARDS (Agents Page) ────────────────────────────────── */
.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
}

.agent-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-dim);
    border-radius: var(--r-xl);
    overflow: hidden;
    transition: var(--trans-slow);
    position: relative;
}
.agent-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-soft);
    box-shadow: var(--shadow-lg);
}

/* ─── TASK CARDS ───────────────────────────────────────────────── */
.task-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-dim);
    border-radius: var(--r-lg);
    padding: 18px;
    margin-bottom: 14px;
    transition: var(--trans-base);
    position: relative;
    overflow: hidden;
}
.task-card:hover { border-color: var(--border-soft); }
.task-card.active { border-left: 3px solid var(--accent-indigo); }
.task-card.completed { border-left: 3px solid var(--accent-teal); }

/* Task result pre */
.task-result-box {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-dim);
    border-radius: var(--r-md);
    padding: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.7;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 12px;
}

/* Timeline / Steps */
.step-timeline {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 0;
    margin-top: 14px;
    border-left: 2px solid rgba(124,58,237,0.3);
    padding-left: 16px;
}
.step-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--text-secondary);
    gap: 10px;
}
.step-item strong { color: var(--text-primary); }

/* ─── LOG LEVEL COLORS ─────────────────────────────────────────── */
.log-success td:first-child { border-left: 3px solid var(--accent-green); }
.log-error   td:first-child { border-left: 3px solid var(--accent-red); }
.log-info    td:first-child { border-left: 3px solid var(--accent-blue); }
.log-warning td:first-child { border-left: 3px solid var(--accent-amber); }

/* ─── CODE BLOCKS ──────────────────────────────────────────────── */
.code-block {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-dim);
    border-radius: var(--r-md);
    padding: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.8;
    color: #a5b4fc;
    overflow-x: auto;
    white-space: pre;
}

/* ─── INFO BOX ─────────────────────────────────────────────────── */
.info-box {
    background: rgba(37,99,235,0.08);
    border: 1px solid rgba(37,99,235,0.2);
    border-radius: var(--r-md);
    padding: 14px 16px;
    font-size: 13px;
    color: var(--neon-blue);
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 16px;
}
.info-box.success { background: rgba(5,150,105,0.08); border-color: rgba(5,150,105,0.2); color: var(--neon-green); }
.info-box.warning { background: rgba(217,119,6,0.08); border-color: rgba(217,119,6,0.2); color: var(--neon-amber); }
.info-box.danger  { background: rgba(220,38,38,0.08); border-color: rgba(220,38,38,0.2); color: var(--neon-red); }

/* ─── SECTION HEADER ───────────────────────────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 14px;
}
.section-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--grad-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title i {
    -webkit-text-fill-color: initial;
    background: none;
    color: var(--neon-violet);
}
.section-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Stat pills row */
.stat-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.stat-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-full);
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: var(--trans-fast);
}
.stat-pill:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.stat-pill .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
}
.dot-green  { background: var(--neon-green); box-shadow: 0 0 6px var(--neon-green); animation: livePulse 2s infinite; }
.dot-blue   { background: var(--neon-blue);  animation: none; }
.dot-gray   { background: var(--text-dim);   animation: none; }
.dot-violet { background: var(--neon-violet); animation: none; }

/* ─── INSTAGRAM / SOCIAL CARDS ─────────────────────────────────── */
.social-stat {
    background: var(--bg-elevated);
    border: 1px solid var(--border-dim);
    border-radius: var(--r-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

/* ─── EMPTY STATE ──────────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
    gap: 12px;
}
.empty-state i {
    font-size: 48px;
    opacity: 0.25;
}
.empty-state h4 { font-size: 16px; color: var(--text-secondary); }
.empty-state p  { font-size: 13px; max-width: 340px; }

/* ─── SPINNER ──────────────────────────────────────────────────── */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: var(--neon-violet);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── MODAL ────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.2s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.modal-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-2xl);
    padding: 32px;
    max-width: 560px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-30px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 32px; height: 32px;
    border-radius: var(--r-sm);
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-dim);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: var(--trans-fast);
}
.modal-close:hover { background: rgba(220,38,38,0.15); color: var(--neon-red); }

/* ─── UTILITIES ────────────────────────────────────────────────── */
.text-gradient {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.text-muted   { color: var(--text-muted) !important; }
.text-success { color: var(--neon-green) !important; }
.text-danger  { color: var(--neon-red) !important; }
.text-info    { color: var(--neon-blue) !important; }
.text-warning { color: var(--neon-amber) !important; }
.text-violet  { color: var(--neon-violet) !important; }

.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }

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

/* ─── TASK RESULT BOX ──────────────────────────────────────────── */
#taskResultBox .card {
    border-color: rgba(5,150,105,0.3);
    background: rgba(5,150,105,0.05);
}

/* ─── AUTH PAGE ────────────────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-root);
    padding: 20px;
}
.auth-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--r-2xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
    text-align: center;
}
.auth-logo {
    width: 64px; height: 64px;
    background: var(--grad-brand);
    border-radius: var(--r-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-neon-violet);
}
.auth-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
}
.auth-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* ─── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .sidebar { width: 72px; }
    .sidebar-brand, .nav-link span:not(.nav-icon), .nav-badge, .sidebar-user-info, .sidebar-footer .sidebar-user span { display: none; }
    .nav-link { justify-content: center; padding: 10px; }
    .nav-link .nav-icon { margin: 0; }
    .sidebar-header { padding: 16px; justify-content: center; }
    .sidebar-logo { margin: 0; }
    .sidebar-footer { justify-content: center; padding: 14px 0; }
    .nav-section-label { display: none; }
    .sidebar-user { justify-content: center; }
}

@media (max-width: 768px) {
    .content-body { padding: 16px; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .agents-grid { grid-template-columns: 1fr; }
    .top-header { padding: 0 16px; }
    .card { padding: 18px; }
}

@media (max-width: 480px) {
    .grid-4 { grid-template-columns: 1fr; }
    .stat-pills { gap: 6px; }
    .stat-pill { font-size: 11px; padding: 5px 10px; }
}
