        :root {
            --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            --font-mono: 'JetBrains Mono', monospace;

            /* Canvas & App Shell */
            --bg-canvas: #f1f3f6;
            --bg-shell: #ffffff;
            --border-light: #eaedf2;
            --border-subtle: #f1f3f7;

            /* Text Colors */
            --text-primary: #0f172a;
            --text-secondary: #475569;
            --text-muted: #94a3b8;
            --text-faint: #cbd5e1;

            /* Brand & Accent Colors */
            --primary-black: #0f172a;
            --accent-purple: #7c3aed;
            --accent-purple-light: rgba(124, 58, 237, 0.08);
            --accent-blue: #2563eb;
            --accent-emerald: #10b981;
            --accent-amber: #f59e0b;
            --accent-rose: #f43f5e;

            /* Sidebar */
            --sidebar-width: 230px;
            --sidebar-bg: #fafbfc;
            --sidebar-border: #eaedf2;
            --sidebar-item-hover: #f1f4f8;
            --sidebar-item-active: #ffffff;

            /* Timeline Sizing */
            --header-h1: 52px;
            --header-h2: 56px;
            --row-height: 64px;
            --freeze-width: 260px;
            --day-width: 16px;

            /* Shadows */
            --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
            --shadow-hover: 0 10px 28px -4px rgba(0, 0, 0, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.06);
            --shadow-float: 0 20px 40px -15px rgba(0, 0, 0, 0.08);
        }

        /* Dark Theme Support */
        body.dark-mode {
            --bg-canvas: #090d16;
            --bg-shell: #111827;
            --border-light: #1f293d;
            --border-subtle: #192233;

            --text-primary: #f8fafc;
            --text-secondary: #94a3b8;
            --text-muted: #64748b;
            --text-faint: #334155;

            --primary-black: #f8fafc;
            --sidebar-bg: #0d1321;
            --sidebar-border: #1a2336;
            --sidebar-item-hover: #162032;
            --sidebar-item-active: #1e293b;

            --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
            --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.5);
            --shadow-float: 0 20px 40px rgba(0, 0, 0, 0.6);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: var(--font-sans);
            background-color: var(--bg-canvas);
            color: var(--text-primary);
            height: 100vh;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 14px 18px;
            -webkit-font-smoothing: antialiased;
        }

        /* Main Floating App Shell (Rounded Studio Window) */
        .app-window {
            width: 100%;
            height: 100%;
            max-width: 1920px;
            background: var(--bg-shell);
            border-radius: 20px;
            box-shadow: var(--shadow-float);
            border: 1px solid var(--border-light);
            display: flex;
            overflow: hidden;
            position: relative;
        }

        /* ====================================================
           LEFT SIDEBAR (Studio Navigation)
           ==================================================== */
        .sidebar {
            width: var(--sidebar-width);
            min-width: var(--sidebar-width);
            background: var(--sidebar-bg);
            border-right: 1px solid var(--sidebar-border);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            user-select: none;
            transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s;
            z-index: 20;
        }

        .sidebar.collapsed {
            width: 0px;
            min-width: 0px;
            overflow: hidden;
            border-right: none;
        }

        .sidebar-top {
            padding: 16px 14px;
            overflow-y: auto;
            flex: 1;
        }

        /* Brand / Studio Logo */
        .brand-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 4px 6px 16px 6px;
            border-bottom: 1px solid var(--border-light);
            margin-bottom: 14px;
        }

        .brand-left {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .brand-icon {
            width: 32px;
            height: 32px;
            border-radius: 9px;
            background: linear-gradient(135deg, #7c3aed 0%, #ec4899 50%, #f97316 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 800;
            font-size: 15px;
            box-shadow: 0 4px 10px rgba(124, 58, 237, 0.3);
        }

        .brand-info {
            display: flex;
            flex-direction: column;
        }

        .brand-title {
            font-size: 13.5px;
            font-weight: 700;
            color: var(--text-primary);
            letter-spacing: -0.2px;
            line-height: 1.2;
        }

        .brand-sub {
            font-size: 11px;
            color: var(--text-muted);
            font-weight: 400;
        }

        .btn-collapse-sidebar {
            width: 24px;
            height: 24px;
            border-radius: 6px;
            border: 1px solid transparent;
            background: transparent;
            color: var(--text-muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s;
        }

        .btn-collapse-sidebar:hover {
            background: var(--sidebar-item-hover);
            color: var(--text-primary);
        }

        /* Sidebar Navigation Groups */
        .nav-group-title {
            font-size: 10.5px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            color: var(--text-muted);
            margin: 14px 8px 6px 8px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .nav-list {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 7px 10px;
            border-radius: 9px;
            font-size: 12.5px;
            font-weight: 500;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.15s ease;
            text-decoration: none;
        }

        .nav-item:hover {
            background: var(--sidebar-item-hover);
            color: var(--text-primary);
        }

        .nav-item.active {
            background: var(--sidebar-item-active);
            color: var(--text-primary);
            font-weight: 600;
            box-shadow: 0 1px 4px rgba(0,0,0,0.05);
            border: 1px solid var(--border-light);
        }

        .nav-item svg {
            width: 15px;
            height: 15px;
            stroke-width: 1.9;
            color: var(--text-muted);
            transition: color 0.15s;
        }

        .nav-item.active svg,
        .nav-item:hover svg {
            color: var(--text-primary);
        }

        .nav-badge {
            margin-left: auto;
            font-size: 10px;
            font-weight: 700;
            padding: 1px 6px;
            border-radius: 9999px;
            background: var(--border-light);
            color: var(--text-secondary);
        }

        .nav-badge.alert {
            background: #fef2f2;
            color: #ef4444;
        }

        /* Company Scope Pills in Sidebar */
        .company-pill-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 10px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 500;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.15s;
        }

        .company-pill-item:hover {
            background: var(--sidebar-item-hover);
            color: var(--text-primary);
        }

        .company-dot-indicator {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            flex-shrink: 0;
        }

        /* Sidebar Bottom Profile Card */
        .sidebar-bottom {
            padding: 12px 14px;
            border-top: 1px solid var(--sidebar-border);
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .profile-card {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 6px;
            border-radius: 10px;
            cursor: pointer;
            transition: background 0.15s;
        }

        .profile-card:hover {
            background: var(--sidebar-item-hover);
        }

        .profile-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: linear-gradient(135deg, #3b82f6, #06b6d4);
            color: white;
            font-weight: 700;
            font-size: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 2px solid white;
            box-shadow: 0 2px 6px rgba(0,0,0,0.1);
        }

        .profile-meta {
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .profile-name {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .profile-email {
            font-size: 10.5px;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* ====================================================
           MAIN CONTENT AREA
           ==================================================== */
        .main-stage {
            flex: 1;
            display: flex;
            flex-direction: column;
            height: 100%;
            overflow: hidden;
            background: var(--bg-shell);
            position: relative;
        }

        /* Top Breadcrumb & Actions Bar */
        .stage-topbar {
            height: var(--header-h1);
            min-height: var(--header-h1);
            border-bottom: 1px solid var(--border-light);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px;
            background: var(--bg-shell);
            z-index: 10;
        }

        .topbar-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .btn-toggle-menu {
            width: 28px;
            height: 28px;
            border-radius: 8px;
            border: 1px solid var(--border-light);
            background: var(--bg-shell);
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s;
        }

        .btn-toggle-menu:hover {
            background: var(--border-subtle);
            color: var(--text-primary);
        }

        .breadcrumb {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12.5px;
            color: var(--text-muted);
        }

        .breadcrumb-item {
            color: var(--text-secondary);
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .breadcrumb-item.active {
            color: var(--text-primary);
            font-weight: 600;
        }

        .breadcrumb-sep {
            font-size: 11px;
            color: var(--text-faint);
        }

        .topbar-center {
            flex: 1;
            max-width: 380px;
            margin: 0 16px;
        }

        /* Modern Search Input Pill */
        .search-pill-box {
            display: flex;
            align-items: center;
            gap: 8px;
            background: var(--sidebar-bg);
            border: 1px solid var(--border-light);
            border-radius: 9999px;
            padding: 6px 14px;
            transition: all 0.2s;
        }

        .search-pill-box:focus-within {
            background: #ffffff;
            border-color: var(--accent-purple);
            box-shadow: 0 0 0 3px var(--accent-purple-light);
        }

        body.dark-mode .search-pill-box:focus-within {
            background: var(--bg-shell);
        }

        .search-pill-box svg {
            width: 14px;
            height: 14px;
            color: var(--text-muted);
            flex-shrink: 0;
        }

        .search-pill-box input {
            border: none;
            background: transparent;
            font-size: 12.5px;
            font-family: var(--font-sans);
            color: var(--text-primary);
            width: 100%;
            outline: none;
        }

        .search-pill-box input::placeholder {
            color: var(--text-muted);
        }

        .search-kbd {
            font-size: 10px;
            font-family: var(--font-mono);
            font-weight: 600;
            color: var(--text-muted);
            background: var(--border-light);
            padding: 1px 5px;
            border-radius: 4px;
        }

        .topbar-right {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        /* Action Buttons in Header */
        .btn-clean {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            border-radius: 8px;
            border: 1px solid var(--border-light);
            background: var(--bg-shell);
            color: var(--text-secondary);
            font-size: 12.5px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s;
        }

        .btn-clean:hover {
            background: var(--border-subtle);
            color: var(--text-primary);
        }

        .btn-clean svg {
            width: 14px;
            height: 14px;
        }

        /* Black Pill Primary Button (Create Task) */
        .btn-create-task {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 7px 16px;
            border-radius: 9999px;
            border: none;
            background: #0f172a;
            color: #ffffff;
            font-size: 12.5px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s;
            box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
        }

        body.dark-mode .btn-create-task {
            background: #ffffff;
            color: #0f172a;
        }

        .btn-create-task:hover {
            opacity: 0.92;
            transform: translateY(-1px);
        }

        /* Page Sub-Header (Timeline Title & Segmented Controls) */
        .stage-subbar {
            padding: 14px 22px;
            border-bottom: 1px solid var(--border-light);
            display: flex;
            flex-direction: column;
            gap: 12px;
            background: var(--bg-shell);
            z-index: 9;
        }

        .subbar-row-title {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .page-title-group h1 {
            font-size: 20px;
            font-weight: 700;
            color: var(--text-primary);
            letter-spacing: -0.4px;
        }

        .page-title-group p {
            font-size: 12px;
            color: var(--text-muted);
            margin-top: 2px;
        }

        .subbar-row-controls {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap;
        }

        .controls-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        /* Segmented View Pills (Day / Week / Month / 3M / 6M / Year) */
        .segmented-group {
            display: inline-flex;
            align-items: center;
            background: var(--sidebar-bg);
            border: 1px solid var(--border-light);
            border-radius: 9999px;
            padding: 3px;
        }

        .segmented-btn {
            border: none;
            background: transparent;
            font-size: 11.5px;
            font-weight: 500;
            font-family: var(--font-sans);
            color: var(--text-secondary);
            padding: 4px 11px;
            border-radius: 9999px;
            cursor: pointer;
            transition: all 0.15s;
            user-select: none;
        }

        .segmented-btn:hover {
            color: var(--text-primary);
        }

        .segmented-btn.active {
            background: #ffffff;
            color: var(--text-primary);
            font-weight: 600;
            box-shadow: 0 1px 4px rgba(0,0,0,0.06);
        }

        body.dark-mode .segmented-btn.active {
            background: var(--border-light);
            color: #ffffff;
        }

        /* Date Range Navigator (< 2024 - 2027 >) */
        .date-range-nav {
            display: flex;
            align-items: center;
            gap: 4px;
            background: var(--sidebar-bg);
            border: 1px solid var(--border-light);
            border-radius: 8px;
            padding: 2px 6px;
        }

        .btn-nav-arrow {
            width: 22px;
            height: 22px;
            border-radius: 5px;
            border: none;
            background: transparent;
            color: var(--text-muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s;
        }

        .btn-nav-arrow:hover {
            background: var(--border-light);
            color: var(--text-primary);
        }

        .date-range-label {
            font-size: 11.5px;
            font-weight: 600;
            color: var(--text-primary);
            padding: 0 4px;
            user-select: none;
        }

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

        /* Team Avatar Pile in Header */
        .avatar-pile {
            display: flex;
            align-items: center;
        }

        .pile-avatar {
            width: 26px;
            height: 26px;
            border-radius: 50%;
            border: 2px solid var(--bg-shell);
            margin-left: -6px;
            background-size: cover;
            background-position: center;
            font-size: 10px;
            font-weight: 700;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        .pile-avatar:first-child {
            margin-left: 0;
        }

        .pile-more {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            border: 2px solid var(--bg-shell);
            margin-left: -6px;
            background: var(--border-light);
            color: var(--text-secondary);
            font-size: 10px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Switch Toggle (Show Done) */
        .toggle-switch-label {
            display: flex;
            align-items: center;
            gap: 7px;
            font-size: 11.5px;
            font-weight: 500;
            color: var(--text-secondary);
            cursor: pointer;
            user-select: none;
        }

        .toggle-switch {
            width: 32px;
            height: 18px;
            background: var(--border-light);
            border-radius: 9999px;
            position: relative;
            transition: background 0.2s;
        }

        .toggle-switch.active {
            background: var(--accent-purple);
        }

        .toggle-switch::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: white;
            transition: transform 0.2s;
            box-shadow: 0 1px 3px rgba(0,0,0,0.2);
        }

        .toggle-switch.active::after {
            transform: translateX(14px);
        }

        /* ====================================================
           TIMELINE CANVAS & VIEWPORT
           ==================================================== */
        .timeline-viewport {
            flex: 1;
            overflow-x: auto;
            overflow-y: auto;
            position: relative;
            background: var(--bg-shell);
            user-select: none;
        }

        /* Scrollbar styling - horizontal scroll handled by custom prominent bar */
        .timeline-viewport::-webkit-scrollbar {
            width: 8px;
            height: 0px;
        }

        .timeline-viewport::-webkit-scrollbar-track {
            background: var(--sidebar-bg);
        }

        .timeline-viewport::-webkit-scrollbar-thumb {
            background: var(--border-light);
            border-radius: 4px;
        }

        /* ====================================================
           TIMELINE BOTTOM NAVIGATION & SCRUBBER BAR
           ==================================================== */
        .timeline-bottom-nav {
            height: 38px;
            min-height: 38px;
            background: var(--bg-surface);
            border-top: 1px solid var(--border-light);
            display: flex;
            align-items: center;
            padding: 0 16px;
            gap: 12px;
            z-index: 20;
            user-select: none;
            box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.03);
            flex-shrink: 0;
        }

        .timeline-nav-btn-group {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            flex-shrink: 0;
        }

        .timeline-nav-arrow-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            height: 28px;
            width: 82px;
            min-width: 82px;
            max-width: 82px;
            padding: 0 8px;
            border-radius: 8px;
            border: 1px solid var(--border-light);
            background: var(--bg-shell);
            color: var(--text-primary);
            font-size: 11.5px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s ease;
            flex-shrink: 0;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            white-space: nowrap;
        }

        .timeline-nav-arrow-btn:hover {
            background: var(--accent-purple-light);
            border-color: var(--accent-purple);
            color: var(--accent-purple);
            transform: translateY(-1px);
        }

        .timeline-nav-arrow-btn:active {
            transform: translateY(0);
        }

        .scrubber-track-end-arrow {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            border: 1px solid var(--border-light);
            background: var(--bg-shell);
            color: var(--text-secondary);
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.15s ease;
            flex-shrink: 0;
            line-height: 1;
            padding: 0;
            user-select: none;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
        }

        .scrubber-track-end-arrow:hover {
            background: var(--accent-purple);
            border-color: var(--accent-purple);
            color: #ffffff;
            transform: scale(1.12);
        }

        .scrubber-track-end-arrow:active {
            transform: scale(0.95);
        }

        .timeline-scrubber-wrapper {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 8px;
            height: 100%;
            position: relative;
            padding: 0 4px;
        }

        .timeline-scrubber-track {
            width: 100%;
            height: 12px;
            background: var(--border-light);
            border: 1px solid var(--border-subtle);
            border-radius: 9999px;
            position: relative;
            cursor: pointer;
            transition: background 0.15s ease, height 0.15s ease;
        }

        .timeline-scrubber-track:hover {
            height: 14px;
            background: #cbd5e1;
        }

        body.dark-mode .timeline-scrubber-track {
            background: #1e293b;
            border-color: #334155;
        }

        body.dark-mode .timeline-scrubber-track:hover {
            background: #334155;
        }

        .timeline-scrubber-thumb {
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            min-width: 44px;
            background: #64748b;
            border-radius: 9999px;
            cursor: grab;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
            transition: background 0.15s ease;
            z-index: 2;
        }

        .timeline-scrubber-thumb:hover {
            background: #475569;
        }

        .timeline-scrubber-thumb.dragging {
            background: var(--accent-purple) !important;
            cursor: grabbing !important;
            box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
        }

        body.dark-mode .timeline-scrubber-thumb {
            background: #94a3b8;
        }

        body.dark-mode .timeline-scrubber-thumb:hover {
            background: #cbd5e1;
        }

        .scrubber-thumb-grip {
            width: 12px;
            height: 6px;
            border-top: 1.5px solid rgba(255, 255, 255, 0.7);
            border-bottom: 1.5px solid rgba(255, 255, 255, 0.7);
            pointer-events: none;
        }

        .timeline-scrubber-ticks {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            pointer-events: none;
            overflow: hidden;
            border-radius: 9999px;
        }

        .scrubber-tick {
            position: absolute;
            top: 2px;
            width: 3px;
            height: 8px;
            border-radius: 2px;
            background: #8b5cf6;
            opacity: 0.6;
            transform: translateX(-50%);
        }

        .timeline-nav-status-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 3px 10px;
            background: var(--bg-shell);
            border: 1px solid var(--border-light);
            border-radius: 20px;
            font-size: 11px;
            font-weight: 600;
            color: var(--text-secondary);
            width: 240px;
            min-width: 240px;
            max-width: 240px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            flex-shrink: 0;
            box-sizing: border-box;
        }

        @keyframes obligationGlow {
            0% {
                box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.7);
                transform: scale(1);
            }
            50% {
                box-shadow: 0 0 0 10px rgba(124, 58, 237, 0);
                transform: scale(1.05);
            }
            100% {
                box-shadow: 0 0 0 0 rgba(124, 58, 237, 0);
                transform: scale(1);
            }
        }

        .obligation-jump-highlight {
            animation: obligationGlow 1.4s ease-out !important;
            z-index: 30 !important;
            border-color: var(--accent-purple) !important;
        }

        /* ====================================================
           OBLIGATION HOVER & JUMP FLOATING POPOVER
           ==================================================== */
        .obligation-hover-popover {
            position: fixed;
            z-index: 9999;
            width: 330px;
            max-width: calc(100vw - 28px);
            background: rgba(255, 255, 255, 0.98);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            border-radius: 14px;
            border: 1px solid rgba(226, 232, 240, 0.95);
            box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
            padding: 12px 14px;
            pointer-events: auto;
            opacity: 0;
            transform: translateY(8px) scale(0.96);
            transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
            user-select: text;
        }

        body.dark-mode .obligation-hover-popover {
            background: rgba(30, 41, 59, 0.98);
            border-color: rgba(255, 255, 255, 0.12);
            box-shadow: 0 18px 40px -6px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.06);
        }

        .obligation-hover-popover.active {
            opacity: 1;
            transform: translateY(0) scale(1);
        }

        /* Directional arrow pointer */
        .obligation-hover-popover::after {
            content: '';
            position: absolute;
            width: 10px;
            height: 10px;
            background: #ffffff;
            transform: rotate(45deg);
            pointer-events: none;
        }

        body.dark-mode .obligation-hover-popover::after {
            background: #1e293b;
        }

        .obligation-hover-popover.arrow-bottom::after {
            bottom: -6px;
            left: var(--arrow-left, 50%);
            margin-left: -5px;
            border-right: 1px solid rgba(226, 232, 240, 0.95);
            border-bottom: 1px solid rgba(226, 232, 240, 0.95);
        }

        body.dark-mode .obligation-hover-popover.arrow-bottom::after {
            border-right: 1px solid rgba(255, 255, 255, 0.12);
            border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        }

        .obligation-hover-popover.arrow-top::after {
            top: -6px;
            left: var(--arrow-left, 50%);
            margin-left: -5px;
            border-left: 1px solid rgba(226, 232, 240, 0.95);
            border-top: 1px solid rgba(226, 232, 240, 0.95);
        }

        body.dark-mode .obligation-hover-popover.arrow-top::after {
            border-left: 1px solid rgba(255, 255, 255, 0.12);
            border-top: 1px solid rgba(255, 255, 255, 0.12);
        }

        .popover-inner {
            display: flex;
            flex-direction: column;
            gap: 8px;
            position: relative;
        }

        .popover-close-btn {
            position: absolute;
            top: -4px;
            right: -4px;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            border: none;
            background: transparent;
            color: var(--text-muted);
            font-size: 16px;
            line-height: 1;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s;
        }

        .popover-close-btn:hover {
            background: rgba(0, 0, 0, 0.06);
            color: var(--text-primary);
        }

        body.dark-mode .popover-close-btn:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .popover-top-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding-right: 16px;
        }

        .popover-company-pill {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 3px 8px;
            border-radius: 6px;
            border-left: 3px solid #3b82f6;
            background: rgba(0, 0, 0, 0.03);
            font-size: 11.5px;
            transition: background 0.15s;
        }

        body.dark-mode .popover-company-pill {
            background: rgba(255, 255, 255, 0.06);
        }

        .popover-company-pill:hover {
            background: rgba(0, 0, 0, 0.06);
        }

        body.dark-mode .popover-company-pill:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .popover-company-name {
            font-weight: 700;
            color: var(--text-primary);
        }

        .popover-country-tag {
            font-size: 9.5px;
            font-weight: 600;
            color: var(--text-muted);
            background: rgba(0, 0, 0, 0.06);
            padding: 1px 4px;
            border-radius: 4px;
        }

        body.dark-mode .popover-country-tag {
            background: rgba(255, 255, 255, 0.1);
        }

        .popover-type-badge {
            font-size: 10px;
            font-weight: 700;
            padding: 2px 7px;
            border-radius: 6px;
            display: inline-flex;
            align-items: center;
            gap: 3px;
            flex-shrink: 0;
        }

        .popover-project-box {
            background: rgba(124, 58, 237, 0.04);
            border: 1px solid rgba(124, 58, 237, 0.12);
            border-radius: 8px;
            padding: 6px 9px;
            transition: all 0.15s;
        }

        body.dark-mode .popover-project-box {
            background: rgba(124, 58, 237, 0.1);
            border-color: rgba(124, 58, 237, 0.25);
        }

        .popover-project-box:hover {
            border-color: var(--accent-purple);
            transform: translateY(-1px);
        }

        .popover-project-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 2px;
        }

        .popover-project-label {
            font-size: 9.5px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--accent-purple);
        }

        .popover-call-tag {
            font-size: 10px;
            color: var(--text-muted);
            font-weight: 500;
        }

        .popover-project-title {
            font-size: 12px;
            font-weight: 700;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .popover-ob-header {
            display: flex;
            align-items: flex-start;
            gap: 6px;
            padding: 4px 6px;
            border-radius: 6px;
            transition: background 0.15s;
        }

        .popover-ob-header:hover {
            background: rgba(0, 0, 0, 0.03);
        }

        body.dark-mode .popover-ob-header:hover {
            background: rgba(255, 255, 255, 0.04);
        }

        .popover-code-badge {
            background: #0f172a;
            color: #ffffff;
            font-size: 10.5px;
            font-weight: 800;
            padding: 2px 6px;
            border-radius: 5px;
            flex-shrink: 0;
        }

        body.dark-mode .popover-code-badge {
            background: #38bdf8;
            color: #0f172a;
        }

        .popover-title-text {
            font-size: 12.5px;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1.35;
        }

        .popover-meta-grid {
            display: flex;
            flex-direction: column;
            gap: 4px;
            background: rgba(0, 0, 0, 0.02);
            border-radius: 8px;
            padding: 6px 9px;
            border: 1px solid var(--border-light);
        }

        body.dark-mode .popover-meta-grid {
            background: rgba(255, 255, 255, 0.03);
        }

        .popover-meta-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 11px;
        }

        .popover-meta-key {
            color: var(--text-muted);
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 3px;
        }

        .popover-meta-val {
            color: var(--text-primary);
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .popover-countdown-pill {
            font-size: 9.5px;
            font-weight: 700;
            padding: 1px 5px;
            border-radius: 4px;
        }

        .countdown-normal {
            background: rgba(16, 185, 129, 0.12);
            color: #059669;
        }

        body.dark-mode .countdown-normal {
            background: rgba(16, 185, 129, 0.2);
            color: #34d399;
        }

        .countdown-urgent {
            background: rgba(245, 158, 11, 0.12);
            color: #d97706;
        }

        body.dark-mode .countdown-urgent {
            background: rgba(245, 158, 11, 0.2);
            color: #fbbf24;
        }

        .countdown-passed {
            background: rgba(239, 68, 68, 0.12);
            color: #dc2626;
        }

        body.dark-mode .countdown-passed {
            background: rgba(239, 68, 68, 0.2);
            color: #f87171;
        }

        .popover-status-badge {
            font-size: 9.5px;
            font-weight: 700;
            padding: 1px 6px;
            border-radius: 4px;
        }

        .status-pill-done {
            background: rgba(16, 185, 129, 0.12);
            color: #059669;
        }

        .status-pill-pending {
            background: rgba(59, 130, 246, 0.12);
            color: #2563eb;
        }

        body.dark-mode .status-pill-pending {
            background: rgba(59, 130, 246, 0.2);
            color: #60a5fa;
        }

        .popover-siblings-box {
            background: rgba(59, 130, 246, 0.04);
            border: 1px dashed rgba(59, 130, 246, 0.25);
            border-radius: 8px;
            padding: 6px 8px;
        }

        body.dark-mode .popover-siblings-box {
            background: rgba(59, 130, 246, 0.08);
            border-color: rgba(59, 130, 246, 0.35);
        }

        .popover-siblings-label {
            font-size: 10px;
            font-weight: 700;
            color: var(--accent-blue);
            margin-bottom: 4px;
        }

        .popover-siblings-list {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
        }

        .popover-sibling-pill {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 2px 6px;
            border-radius: 5px;
            background: rgba(0, 0, 0, 0.05);
            font-size: 10px;
            font-weight: 600;
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.15s;
        }

        body.dark-mode .popover-sibling-pill {
            background: rgba(255, 255, 255, 0.08);
        }

        .popover-sibling-pill:hover {
            background: var(--accent-purple-light);
            color: var(--accent-purple);
            transform: translateY(-1px);
        }

        .popover-footer-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding-top: 6px;
            border-top: 1px solid var(--border-light);
        }

        .popover-hint-text {
            font-size: 10px;
            color: var(--text-muted);
            font-style: italic;
        }

        .popover-btn-action {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            background: var(--accent-purple);
            color: #ffffff;
            border: none;
            border-radius: 6px;
            padding: 4px 9px;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s;
        }

        .popover-btn-action:hover {
            background: #6d28d9;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
        }

        .timeline-container {
            position: relative;
            min-width: 100%;
        }

        /* Sticky Header for Timeline */
        .timeline-header-sticky {
            position: sticky;
            top: 0;
            z-index: 15;
            background: var(--bg-shell);
            border-bottom: 1px solid var(--border-light);
        }

        .timeline-header-months {
            display: flex;
            height: 28px;
            border-bottom: 1px solid var(--border-subtle);
        }

        .month-cell {
            padding: 4px 10px;
            font-size: 11.5px;
            font-weight: 700;
            color: var(--text-primary);
            border-right: 1px solid var(--border-subtle);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            display: flex;
            align-items: center;
        }

        .timeline-header-days {
            display: flex;
            height: 32px;
            position: relative;
        }

        .day-cell {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            border-right: 1px solid var(--border-subtle);
            font-size: 10px;
            color: var(--text-muted);
            transition: background 0.15s;
        }

        .day-cell.weekend {
            background: repeating-linear-gradient(
                -45deg,
                rgba(0, 0, 0, 0.015),
                rgba(0, 0, 0, 0.015) 4px,
                transparent 4px,
                transparent 8px
            );
        }

        body.dark-mode .day-cell.weekend {
            background: repeating-linear-gradient(
                -45deg,
                rgba(255, 255, 255, 0.015),
                rgba(255, 255, 255, 0.015) 4px,
                transparent 4px,
                transparent 8px
            );
        }

        .day-letter {
            font-size: 9px;
            font-weight: 600;
            text-transform: uppercase;
        }

        .day-number {
            font-weight: 700;
            font-size: 11px;
            color: var(--text-secondary);
        }

        /* Today Day Header Highlight & Line */
        .day-cell.is-today {
            background: var(--accent-purple-light);
            color: var(--accent-purple);
        }

        .day-cell.is-today .day-number {
            color: var(--accent-purple);
            font-weight: 800;
        }

        /* Purple Today Vertical Line */
        .today-purple-line {
            position: absolute;
            top: 0;
            bottom: 0;
            width: 2px;
            background: var(--accent-purple);
            z-index: 12;
            pointer-events: none;
        }

        .today-badge-top {
            position: absolute;
            top: 2px;
            left: -18px;
            width: 38px;
            text-align: center;
            background: var(--accent-purple);
            color: white;
            font-size: 9px;
            font-weight: 700;
            border-radius: 4px;
            padding: 1px 0;
            box-shadow: 0 2px 6px rgba(124, 58, 237, 0.4);
        }

        /* Freeze Pane Sticky Left Column */
        .freeze-header-cell {
            position: sticky;
            left: 0;
            width: var(--freeze-width);
            min-width: var(--freeze-width);
            background: var(--bg-shell);
            border-right: 1px solid var(--border-light);
            z-index: 16;
            display: flex;
            align-items: center;
            padding: 0 14px;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-muted);
        }

        /* Timeline Rows & Lanes */
        .timeline-body {
            position: relative;
        }

        .tree-row {
            display: flex;
            min-height: var(--row-height);
            border-bottom: 1px solid var(--border-subtle);
            position: relative;
            transition: background 0.15s;
        }

        .tree-row:hover {
            background: rgba(0, 0, 0, 0.01);
        }

        body.dark-mode .tree-row:hover {
            background: rgba(255, 255, 255, 0.015);
        }

        /* Freeze Cell in Rows */
        .freeze-row-cell {
            position: sticky;
            left: 0;
            width: var(--freeze-width);
            min-width: var(--freeze-width);
            background: var(--bg-shell);
            border-right: 1px solid var(--border-light);
            z-index: 14;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 14px;
        }

        .tree-row:hover .freeze-row-cell {
            background: var(--bg-shell);
        }

        .freeze-title-group {
            display: flex;
            align-items: center;
            gap: 8px;
            overflow: hidden;
        }

        .btn-toggle-row {
            width: 18px;
            height: 18px;
            border-radius: 4px;
            border: none;
            background: transparent;
            color: var(--text-muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.2s;
            flex-shrink: 0;
        }

        .btn-toggle-row.collapsed svg {
            transform: rotate(-90deg);
        }

        .row-title-text {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .row-sub-text {
            font-size: 11px;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .row-badge-counter {
            font-size: 10px;
            font-weight: 700;
            padding: 1px 6px;
            border-radius: 9999px;
            background: var(--border-light);
            color: var(--text-secondary);
            flex-shrink: 0;
        }

        /* Timeline Track Area (Where cards float) */
        .track-area {
            position: relative;
            flex: 1;
            height: 100%;
            min-height: var(--row-height);
        }

        /* Background grid columns in track */
        .track-grid-col {
            position: absolute;
            top: 0;
            bottom: 0;
            border-right: 1px solid var(--border-subtle);
            pointer-events: none;
        }

        .track-grid-col.weekend {
            background: repeating-linear-gradient(
                -45deg,
                rgba(0, 0, 0, 0.012),
                rgba(0, 0, 0, 0.012) 4px,
                transparent 4px,
                transparent 8px
            );
        }

        /* ====================================================
           FLOATING TASK CARDS (Studio / Dribbble Signature)
           ==================================================== */
        .task-card-float {
            position: absolute;
            height: 48px;
            background: #ffffff;
            border-radius: 12px;
            box-shadow: var(--shadow-card);
            border: 1px solid rgba(0, 0, 0, 0.05);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 6px 12px 6px 14px;
            cursor: pointer;
            z-index: 5;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            user-select: none;
            overflow: hidden;
        }

        body.dark-mode .task-card-float {
            background: #1e293b;
            border-color: rgba(255, 255, 255, 0.08);
        }

        .task-card-float:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-hover);
            z-index: 10;
        }

        /* Left Accent Colored Bar on Card */
        .card-accent-bar {
            position: absolute;
            left: 0;
            top: 6px;
            bottom: 6px;
            width: 4px;
            border-radius: 0 3px 3px 0;
        }

        .card-content-left {
            display: flex;
            flex-direction: column;
            justify-content: center;
            overflow: hidden;
            margin-right: 10px;
        }

        .card-title {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.3;
        }

        .card-subtitle {
            font-size: 10.5px;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .card-right-tools {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-shrink: 0;
        }

        /* Mini avatar on task card */
        .card-avatar {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: #e2e8f0;
            color: #475569;
            font-size: 9px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1.5px solid #ffffff;
        }

        body.dark-mode .card-avatar {
            border-color: #1e293b;
        }

        .card-menu-btn {
            color: var(--text-muted);
            cursor: pointer;
            padding: 2px;
            border-radius: 4px;
            display: flex;
            align-items: center;
        }

        .card-menu-btn:hover {
            color: var(--text-primary);
        }

        /* ====================================================
           HERO GRADIENT SPAN (e.g. New microdose website)
           ==================================================== */
        .hero-gradient-bar {
            position: absolute;
            height: 44px;
            border-radius: 12px;
            background: linear-gradient(90deg, #6366f1 0%, #ec4899 50%, #f97316 100%);
            box-shadow: 0 4px 18px rgba(99, 102, 241, 0.35);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 6px 14px;
            color: white;
            cursor: pointer;
            z-index: 6;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            user-select: none;
        }

        .hero-gradient-bar:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
        }

        .hero-gradient-title {
            font-size: 13px;
            font-weight: 700;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            letter-spacing: -0.2px;
        }

        .hero-gradient-sub {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.85);
            white-space: nowrap;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        /* ====================================================
           CURVED SVG CONNECTOR LINES (Bezier curves)
           ==================================================== */
        .connections-svg-layer {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 4;
        }

        .connector-curve {
            fill: none;
            stroke: #cbd5e1;
            stroke-width: 1.6;
            stroke-dasharray: 4, 3;
            transition: stroke 0.2s;
        }

        body.dark-mode .connector-curve {
            stroke: #334155;
        }

        .connector-node {
            fill: var(--accent-purple);
        }

        /* ====================================================
           SLIDE-OVER DRAWER (Linear / Relatelwise Details)
           ==================================================== */
        .drawer-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(15, 23, 42, 0.3);
            backdrop-filter: blur(4px);
            z-index: 100;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.25s ease;
        }

        .drawer-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }

        .drawer-panel {
            position: fixed;
            top: 0;
            right: -480px;
            width: 440px;
            max-width: 90vw;
            height: 100vh;
            background: var(--bg-shell);
            box-shadow: -10px 0 35px rgba(0,0,0,0.15);
            z-index: 101;
            display: flex;
            flex-direction: column;
            transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            border-left: 1px solid var(--border-light);
        }

        .drawer-panel.active {
            right: 0;
        }

        .drawer-header {
            padding: 18px 22px;
            border-bottom: 1px solid var(--border-light);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .drawer-title-box {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .drawer-type-tag {
            font-size: 10.5px;
            font-weight: 700;
            text-transform: uppercase;
            padding: 3px 8px;
            border-radius: 6px;
            letter-spacing: 0.4px;
        }

        .drawer-close-btn {
            width: 30px;
            height: 30px;
            border-radius: 8px;
            border: 1px solid var(--border-light);
            background: transparent;
            color: var(--text-muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s;
        }

        .drawer-close-btn:hover {
            background: var(--border-subtle);
            color: var(--text-primary);
        }

        .drawer-body {
            padding: 22px;
            overflow-y: auto;
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 18px;
        }

        .drawer-obligation-title {
            font-size: 17px;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1.35;
        }

        .drawer-meta-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            background: var(--sidebar-bg);
            padding: 14px;
            border-radius: 12px;
            border: 1px solid var(--border-light);
        }

        .meta-field {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .meta-label {
            font-size: 10.5px;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
        }

        .meta-val {
            font-size: 12.5px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .drawer-desc-box {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .drawer-desc-box h4 {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-secondary);
        }

        .drawer-desc-box p {
            font-size: 12.5px;
            color: var(--text-secondary);
            line-height: 1.5;
            background: var(--sidebar-bg);
            padding: 12px;
            border-radius: 10px;
            border: 1px solid var(--border-light);
        }

        .drawer-footer {
            padding: 16px 22px;
            border-top: 1px solid var(--border-light);
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
        }

        /* Toast notification */
        .toast-notify {
            position: fixed;
            bottom: 24px;
            right: 24px;
            background: #0f172a;
            color: white;
            padding: 10px 18px;
            border-radius: 10px;
            font-size: 12.5px;
            font-weight: 500;
            box-shadow: 0 10px 25px rgba(0,0,0,0.2);
            z-index: 200;
            display: flex;
            align-items: center;
            gap: 8px;
            opacity: 0;
            transform: translateY(10px);
            transition: all 0.2s;
            pointer-events: none;
        }

        .toast-notify.active {
            opacity: 1;
            transform: translateY(0);
        }

        .company-pill-item.active {
            background: var(--sidebar-item-active) !important;
            border: 1px solid var(--accent-purple) !important;
            color: var(--text-primary) !important;
            font-weight: 600 !important;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
        }

        .btn-clear-filter {
            background: transparent;
            border: none;
            color: var(--accent-rose);
            font-size: 10.5px;
            font-weight: 600;
            cursor: pointer;
            padding: 1px 5px;
            border-radius: 4px;
            transition: all 0.15s;
        }

        .btn-clear-filter:hover {
            background: #fef2f2;
        }

        .project-quick-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 5px 8px;
            border-radius: 7px;
            font-size: 11.5px;
            font-weight: 500;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.15s;
        }

        .project-quick-item.active {
            background: var(--sidebar-item-active);
            color: var(--text-primary);
            border: 1px solid var(--border-light);
            box-shadow: 0 1px 4px rgba(0,0,0,0.05);
        }
        .project-quick-item:hover {
            background: var(--sidebar-item-hover);
            color: var(--text-primary);
            transform: translateX(2px);
        }

        .project-quick-left {
            display: flex;
            align-items: center;
            gap: 7px;
            overflow: hidden;
        }

        .project-quick-name {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 140px;
        }

        .project-quick-badge {
            font-size: 9.5px;
            font-weight: 700;
            padding: 1px 5px;
            border-radius: 9999px;
            background: var(--border-light);
            color: var(--text-muted);
            flex-shrink: 0;
        }

        @keyframes rowPulse {
            0% { background-color: rgba(124, 58, 237, 0.22); }
            50% { background-color: rgba(124, 58, 237, 0.12); }
            100% { background-color: transparent; }
        }

        .row-highlight-pulse {
            animation: rowPulse 2s ease-out;
        }

        /* Centered Studio Modals */
        .studio-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(15, 23, 42, 0.4);
            backdrop-filter: blur(5px);
            z-index: 150;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
        }

        .studio-modal-overlay.active {
            display: flex !important;
            opacity: 1 !important;
            pointer-events: auto !important;
        }

        .studio-modal-box {
            width: 640px;
            max-width: 92vw;
            max-height: 85vh;
            background: var(--bg-shell);
            border-radius: 16px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            border: 1px solid var(--border-light);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            transform: scale(0.96);
            transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .studio-modal-overlay.active .studio-modal-box {
            transform: scale(1);
        }

        .studio-modal-header {
            padding: 16px 22px;
            border-bottom: 1px solid var(--border-light);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .studio-modal-title {
            font-size: 16px;
            font-weight: 700;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .studio-modal-body {
            padding: 22px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .studio-modal-footer {
            padding: 14px 22px;
            border-top: 1px solid var(--border-light);
            display: flex;
            justify-content: flex-end;
            background: var(--sidebar-bg);
            gap: 10px;
        }

        /* Studio Form Styles for Task Creation */
        /* Language Switcher Button */
        .btn-lang-switch {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 5px 10px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 700;
            border: 1px solid var(--border-light);
            background: var(--bg-surface);
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .btn-lang-switch:hover {
            border-color: var(--accent-purple);
            color: var(--accent-purple);
            transform: scale(1.03);
        }

        /* User Management Tabs & Login Logs Styles */
        .user-tab-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 7px 14px;
            border-radius: 8px;
            border: 1px solid #e2e8f0;
            background: #ffffff;
            color: #475569;
            font-size: 12.5px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        body.dark-mode .user-tab-btn {
            background: #1e293b;
            border-color: #334155;
            color: #cbd5e1;
        }
        .user-tab-btn:hover {
            border-color: #cbd5e1;
            color: #1e293b;
            background: #f8fafc;
        }
        body.dark-mode .user-tab-btn:hover {
            background: #334155;
            color: #ffffff;
        }
        .user-tab-btn.active {
            background: #eff6ff;
            border-color: #93c5fd;
            color: #1d4ed8;
            box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08);
        }
        body.dark-mode .user-tab-btn.active {
            background: #1e3a8a;
            border-color: #3b82f6;
            color: #93c5fd;
        }

        .btn-log-filter {
            padding: 4px 10px;
            border-radius: 6px;
            border: 1px solid #e2e8f0;
            background: #ffffff;
            font-size: 11.5px;
            font-weight: 600;
            color: #64748b;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .btn-log-filter:hover {
            background: #f1f5f9;
            color: #0f172a;
        }
        .btn-log-filter.active {
            background: #0f172a;
            border-color: #0f172a;
            color: #ffffff;
        }
        body.dark-mode .btn-log-filter {
            background: #1e293b;
            border-color: #334155;
            color: #94a3b8;
        }
        body.dark-mode .btn-log-filter.active {
            background: #3b82f6;
            border-color: #3b82f6;
            color: #ffffff;
        }

        .login-log-row {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            padding: 10px 14px;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            margin-bottom: 6px;
            background: #ffffff;
            transition: background 0.15s ease;
        }
        body.dark-mode .login-log-row {
            background: #1e293b;
            border-color: #334155;
        }
        .login-log-row:hover {
            background: #f8fafc;
        }
        body.dark-mode .login-log-row:hover {
            background: #283548;
        }
        .login-log-row.log-failed {
            border-left: 4px solid #ef4444;
        }
        .login-log-row.log-success {
            border-left: 4px solid #10b981;
        }

        /* Agent API Keys tab (users-admin.js) */
        .user-modal-tabs, .user-modal-tabs > div:first-child { flex-wrap: wrap; gap: 8px; }
        .ak-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; margin-bottom: 18px; }
        .ak-card-title, .ak-list-title { font-size: 13px; font-weight: 700; color: #1e293b; }
        .ak-intro { font-size: 12px; color: #64748b; margin: 4px 0 12px; line-height: 1.5; }
        .ak-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
        .ak-span-2 { grid-column: span 2; }
        .ak-label { font-size: 11.5px; font-weight: 600; color: #475569; display: block; margin-bottom: 4px; }
        .ak-input { width: 100%; height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid #cbd5e1; font-size: 13px; background: #fff; color: #0f172a; }
        .ak-static-value { height: 36px; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #475569; }
        .ak-project-option { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #334155; cursor: pointer; }
        .ak-project-all { font-weight: 600; margin-bottom: 6px; }
        .ak-project-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; max-height: 110px; overflow-y: auto; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; margin-bottom: 4px; }
        .ak-project-list.ak-disabled { opacity: 0.5; }
        .ak-muted { font-size: 11.5px; color: #94a3b8; font-weight: 500; }
        .ak-form-footer { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
        .ak-form-error { flex: 1; font-size: 12px; font-weight: 600; color: #dc2626; }
        .ak-form button:disabled, .ak-form input:disabled { cursor: not-allowed; }
        .ak-form .btn-create-task:disabled { opacity: 0.5; transform: none; }
        .ak-list-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
        .ak-small-btn { font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 6px; }
        .ak-placeholder { text-align: center; padding: 24px 16px; color: #94a3b8; font-size: 12.5px; }
        .ak-placeholder-icon { font-size: 26px; display: block; margin-bottom: 6px; }
        .ak-notice { padding: 12px 14px; border-radius: 8px; font-size: 12.5px; line-height: 1.5; }
        .ak-notice-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
        .ak-notice-danger { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
        .ak-notice-detail { font-size: 11.5px; margin-top: 4px; opacity: 0.85; }
        .ak-key-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid #e2e8f0; border-left: 4px solid #10b981; border-radius: 8px; margin-bottom: 6px; background: #fff; }
        .ak-key-row.ak-status-revoked, .ak-key-row.ak-status-expired { border-left-color: #94a3b8; background: #f8fafc; }
        .ak-key-row.ak-status-revoked .ak-key-name { text-decoration: line-through; color: #64748b; }
        .ak-key-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
        .ak-key-name { font-weight: 700; font-size: 13px; color: #0f172a; word-break: break-word; }
        .ak-key-id { font-size: 10.5px; color: #94a3b8; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
        .ak-key-meta { font-size: 11.5px; color: #64748b; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
        .ak-key-meta b { color: #334155; font-weight: 600; }
        .ak-limited b { color: #7c3aed; }
        .ak-expired, .ak-expired b { color: #dc2626; font-weight: 600; }
        .ak-expiring { color: #d97706; font-weight: 600; }
        .ak-badge { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 8px; border: 1px solid transparent; }
        .ak-badge-active { background: #ecfdf5; color: #059669; border-color: #a7f3d0; }
        .ak-badge-revoked { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
        .ak-badge-expired { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
        .ak-badge-scope { background: #eff6ff; color: #2563eb; }
        .ak-revoke-btn { color: #ef4444; border: 1px solid #fecaca; white-space: nowrap; }
        .ak-reveal-overlay { z-index: 170; }
        .ak-reveal-box { width: 720px; max-width: 94vw; }
        .ak-reveal-meta { font-size: 12px; color: #475569; }
        .ak-snippet-block { display: flex; flex-direction: column; gap: 4px; }
        .ak-snippet-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; color: #334155; }
        .ak-snippet { margin: 0; padding: 10px 12px; border-radius: 8px; background: #0f172a; color: #e2e8f0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; user-select: all; }
        body.dark-mode .ak-card, body.dark-mode .ak-key-row.ak-status-revoked, body.dark-mode .ak-key-row.ak-status-expired { background: #0f172a; border-color: #334155; }
        body.dark-mode .ak-key-row, body.dark-mode .ak-project-list, body.dark-mode .ak-input { background: #1e293b; border-color: #334155; color: #e2e8f0; }
        body.dark-mode .ak-card-title, body.dark-mode .ak-list-title, body.dark-mode .ak-key-name, body.dark-mode .ak-snippet-head { color: #f1f5f9; }
        body.dark-mode .ak-label, body.dark-mode .ak-project-option, body.dark-mode .ak-static-value, body.dark-mode .ak-key-meta b, body.dark-mode .ak-reveal-meta { color: #cbd5e1; }
        body.dark-mode .ak-snippet { background: #020617; border: 1px solid #334155; }
        body.dark-mode .ak-key-row.ak-status-active { border-left-color: #10b981; }
        body.dark-mode .ak-limited b { color: #a78bfa; }

        /* Project Contacts Cards */
        .contacts-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 8px;
            margin-top: 8px;
        }

        .contact-card-item {
            background: var(--sidebar-bg);
            border: 1px solid var(--border-light);
            border-radius: 10px;
            padding: 10px 12px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .contact-info-left {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .contact-avatar-pill {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--accent-purple), #ec4899);
            color: white;
            font-weight: 700;
            font-size: 11px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .contact-name {
            font-size: 12px;
            font-weight: 700;
            color: var(--text-primary);
        }

        .contact-role {
            font-size: 10.5px;
            color: var(--text-muted);
            margin-top: 1px;
        }

        .contact-email-btn {
            font-size: 11px;
            color: var(--accent-purple);
            background: var(--accent-purple-light);
            padding: 4px 9px;
            border-radius: 6px;
            text-decoration: none;
            font-weight: 600;
            white-space: nowrap;
            transition: all 0.15s ease;
        }

        .contact-email-btn:hover {
            background: var(--accent-purple);
            color: white;
        }

        /* Two-Stage Upload Governance Section */
        .governance-box {
            background: var(--sidebar-bg);
            border: 1px solid var(--border-light);
            border-radius: 12px;
            padding: 12px 14px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-top: 12px;
        }

        .gov-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            font-size: 11.5px;
        }

        .gov-label-group {
            display: flex;
            align-items: center;
            gap: 6px;
            font-weight: 600;
            color: var(--text-secondary);
        }

        .gov-chip {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 10.5px;
            font-weight: 700;
            padding: 2.5px 8px;
            border-radius: 6px;
            cursor: pointer;
            user-select: none;
            transition: all 0.15s ease;
        }

        .gov-chip.uploaded {
            background: #dcfce7;
            color: #15803d;
            border: 1px solid #86efac;
        }

        .gov-chip.pending {
            background: #fffbeb;
            color: #b45309;
            border: 1px solid #fde68a;
        }

        .gov-chip.not-req {
            background: var(--border-light);
            color: var(--text-muted);
            border: 1px solid transparent;
            cursor: default;
        }

        /* Related Item Chip */
        .related-chip {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 11px;
            font-weight: 600;
            padding: 3px 8px;
            border-radius: 6px;
            background: #f1f5f9;
            color: #334155;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        body.dark-mode .related-chip {
            background: #334155;
            color: #f8fafc;
        }

        .related-chip:hover {
            background: var(--accent-purple-light);
            color: var(--accent-purple);
            transform: scale(1.05);
        }

        /* Floating Save Notice Banner */
        .save-notice-banner {
            position: fixed;
            top: -140px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 2000;
            transition: top 0.35s cubic-bezier(0.16, 1, 0.3, 1);
            max-width: 92vw;
            width: 640px;
            pointer-events: none;
        }

        .save-notice-banner.show {
            top: 24px;
            pointer-events: auto;
        }

        .save-notice-inner {
            background: var(--bg-shell);
            border: 1.5px solid #f59e0b;
            box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25), 0 0 0 4px rgba(245, 158, 11, 0.15);
            border-radius: 14px;
            padding: 12px 18px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
        }

        .save-notice-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .save-notice-icon {
            font-size: 24px;
            flex-shrink: 0;
        }

        .save-notice-title {
            font-size: 13px;
            font-weight: 700;
            color: var(--text-primary);
        }

        .save-notice-desc {
            font-size: 11.5px;
            color: var(--text-secondary);
            margin-top: 2px;
            line-height: 1.35;
        }

        .save-notice-right {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        /* Drawer Inline Meta Select */
        .meta-val-select {
            font-size: 11.5px;
            font-weight: 700;
            padding: 2px 7px;
            border-radius: 6px;
            border: 1px solid var(--border-light);
            background: var(--bg-surface);
            color: var(--text-primary);
            outline: none;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        body.dark-mode .meta-val-select {
            background: #1e293b;
            color: #f8fafc;
            border-color: #334155;
        }

        .meta-val-select:focus {
            border-color: var(--accent-purple);
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .form-label {
            font-size: 11.5px;
            font-weight: 600;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .form-label-req {
            color: #ef4444;
            font-size: 11px;
            margin-left: 3px;
        }

        .form-control {
            width: 100%;
            padding: 8px 12px;
            font-size: 12.5px;
            font-family: var(--font-sans);
            color: var(--text-primary);
            background: var(--bg-surface);
            border: 1px solid var(--border-light);
            border-radius: 8px;
            outline: none;
            box-sizing: border-box;
            transition: all 0.15s ease;
        }

        body.dark-mode .form-control {
            background: #1e293b;
            border-color: #334155;
            color: #f8fafc;
        }

        .form-control:focus {
            border-color: var(--accent-purple);
            box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
        }

        .form-row-2 {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        .form-row-3 {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 12px;
        }


        .stat-grid-3 {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
        }

        .stat-card-mini {
            background: var(--sidebar-bg);
            border: 1px solid var(--border-light);
            border-radius: 10px;
            padding: 12px 14px;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .stat-card-label {
            font-size: 10.5px;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
        }

        .stat-card-value {
            font-size: 22px;
            font-weight: 800;
            color: var(--text-primary);
        }

        .company-share-bar {
            display: flex;
            height: 10px;
            border-radius: 9999px;
            overflow: hidden;
            margin: 6px 0;
            background: var(--border-light);
        }

        .share-segment {
            height: 100%;
            transition: width 0.3s;
        }

        .alert-item-card {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 14px;
            border-radius: 10px;
            border: 1px solid var(--border-light);
            background: var(--bg-shell);
            transition: all 0.15s;
            cursor: pointer;
        }

        .alert-item-card:hover {
            border-color: var(--accent-purple);
            background: var(--sidebar-item-hover);
        }


        /* Drag & Drop Visual Overlay */
        .drag-drop-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(15, 23, 42, 0.7);
            backdrop-filter: blur(8px);
            z-index: 300;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
        }

        .drag-drop-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }

        .drag-drop-box {
            background: var(--bg-shell);
            border: 2px dashed var(--accent-purple);
            border-radius: 20px;
            padding: 40px 60px;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            box-shadow: 0 25px 60px rgba(0,0,0,0.3);
            max-width: 480px;
        }

        .drag-drop-icon {
            font-size: 48px;
            animation: floatBounce 1.5s infinite ease-in-out;
        }

        @keyframes floatBounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-8px); }
        }

        .drag-drop-title {
            font-size: 18px;
            font-weight: 700;
            color: var(--text-primary);
        }

        .drag-drop-sub {
            font-size: 13px;
            color: var(--text-muted);
            line-height: 1.4;
        }


        /* Timeline Empty State */
        .timeline-empty-state {
            position: absolute;
            top: 40px;
            left: var(--freeze-width);
            right: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 40px 20px;
            z-index: 10;
        }

        .empty-state-card {
            background: var(--bg-shell);
            border: 2px dashed var(--border-light);
            border-radius: 20px;
            padding: 48px 56px;
            max-width: 540px;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 14px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
        }

        .empty-state-icon {
            width: 68px;
            height: 68px;
            border-radius: 18px;
            background: var(--accent-purple-light);
            color: var(--accent-purple);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 4px;
        }

        .empty-state-title {
            font-size: 19px;
            font-weight: 700;
            color: var(--text-primary);
        }

        .empty-state-desc {
            font-size: 13px;
            color: var(--text-muted);
            line-height: 1.5;
            max-width: 420px;
        }

        .empty-state-actions {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-top: 8px;
            flex-wrap: wrap;
            justify-content: center;
        }

        .btn-primary-purple {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 9px 20px;
            border-radius: 9999px;
            border: none;
            background: var(--accent-purple);
            color: #ffffff;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
            transition: all 0.15s;
        }

        .btn-primary-purple:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
        }

        .empty-state-hint {
            font-size: 11.5px;
            color: var(--text-muted);
            margin-top: 6px;
        }

        .empty-state-hint code {
            font-family: var(--font-mono);
            background: var(--border-light);
            padding: 2px 6px;
            border-radius: 4px;
            color: var(--text-secondary);
        }


        /* Identity Card Badges & Info Buttons */
        .info-badge-mini {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 15px;
            height: 15px;
            border-radius: 50%;
            font-size: 10px;
            font-weight: 700;
            background: var(--border-light);
            color: var(--text-muted);
            transition: all 0.15s;
            cursor: pointer;
            margin-left: 5px;
        }

        .info-badge-mini:hover {
            background: var(--accent-purple);
            color: white;
            transform: scale(1.15);
        }

        .info-btn-pill {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 17px;
            height: 17px;
            border-radius: 4px;
            font-size: 11px;
            font-weight: 700;
            color: var(--text-muted);
            cursor: pointer;
            transition: all 0.15s;
            margin: 0 4px;
        }

        .info-btn-pill:hover {
            background: var(--accent-purple-light);
            color: var(--accent-purple);
            transform: scale(1.15);
        }

        /* Identity Drawer Components */
        .identity-header-tag {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            padding: 3px 10px;
            border-radius: 9999px;
        }

        .identity-title-lg {
            font-size: 18px;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1.3;
        }

        .identity-subtitle {
            font-size: 12px;
            color: var(--text-muted);
            margin-top: 2px;
        }

        .identity-progress-box {
            background: var(--sidebar-bg);
            border: 1px solid var(--border-light);
            border-radius: 12px;
            padding: 14px 16px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .identity-progress-labels {
            display: flex;
            justify-content: space-between;
            font-size: 11.5px;
            font-weight: 600;
            color: var(--text-secondary);
        }

        .identity-progress-track {
            height: 8px;
            background: var(--border-light);
            border-radius: 9999px;
            overflow: hidden;
            display: flex;
        }

        .identity-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--accent-purple), #ec4899);
            border-radius: 9999px;
            transition: width 0.4s ease;
        }

        .identity-stats-row {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
        }

        .identity-stat-card {
            background: var(--sidebar-bg);
            border: 1px solid var(--border-light);
            border-radius: 10px;
            padding: 10px 12px;
            display: flex;
            flex-direction: column;
            gap: 3px;
        }

        .identity-stat-label {
            font-size: 10px;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
        }

        .identity-stat-num {
            font-size: 18px;
            font-weight: 800;
            color: var(--text-primary);
        }

        .identity-section-title {
            font-size: 11.5px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-secondary);
            margin-top: 4px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .identity-company-item {
            display: flex;
            flex-direction: column;
            gap: 5px;
            background: var(--bg-shell);
            border: 1px solid var(--border-light);
            border-radius: 10px;
            padding: 11px 13px;
            transition: all 0.15s;
            cursor: pointer;
        }

        .identity-company-item:hover {
            border-color: var(--accent-purple);
            background: var(--sidebar-item-hover);
        }

        .identity-upcoming-card {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 9px 12px;
            border-radius: 9px;
            border: 1px solid var(--border-light);
            background: var(--sidebar-bg);
            cursor: pointer;
            transition: all 0.15s;
        }

        .identity-upcoming-card:hover {
            background: var(--bg-shell);
            border-color: var(--accent-purple);
            transform: translateX(2px);
        }

    
        /* ====================================================
           CLOUD & GATEKEEPER EXTENSIONS (Vercel Edition)
           ==================================================== */
        .login-gate-overlay {
            position: fixed;
            inset: 0;
            z-index: 99999;
            background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            backdrop-filter: blur(16px);
        }
        .login-card {
            background: rgba(255, 255, 255, 0.98);
            color: #0f172a;
            border-radius: 20px;
            box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
            width: 100%;
            max-width: 440px;
            padding: 36px 32px;
            text-align: center;
            animation: loginCardPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }
        @keyframes loginCardPop {
            0% { transform: scale(0.92); opacity: 0; }
            100% { transform: scale(1); opacity: 1; }
        }
        .login-logo-box {
            width: 64px;
            height: 64px;
            background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
            border-radius: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 20px;
            box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
            color: #ffffff;
        }
        .login-title {
            font-size: 22px;
            font-weight: 800;
            color: #0f172a;
            margin-bottom: 6px;
            letter-spacing: -0.02em;
        }
        .login-sub {
            font-size: 13px;
            color: #64748b;
            margin-bottom: 24px;
            line-height: 1.5;
        }
        .login-input-group {
            text-align: left;
            margin-bottom: 16px;
        }
        .login-input-group label {
            display: block;
            font-size: 12px;
            font-weight: 600;
            color: #475569;
            margin-bottom: 6px;
        }
        .login-input-group input {
            width: 100%;
            height: 44px;
            padding: 0 14px;
            border-radius: 10px;
            border: 1.5px solid #e2e8f0;
            font-size: 14px;
            color: #0f172a;
            outline: none;
            transition: all 0.2s;
            box-sizing: border-box;
            background: #f8fafc;
        }
        .login-input-group input:focus {
            border-color: #2563eb;
            background: #ffffff;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
        }
        .login-error-box {
            background: #fef2f2;
            border: 1px solid #fecaca;
            color: #ef4444;
            padding: 10px 14px;
            border-radius: 8px;
            font-size: 12.5px;
            font-weight: 500;
            margin-bottom: 16px;
            text-align: left;
        }
        .btn-login-submit {
            width: 100%;
            height: 46px;
            background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
            color: #ffffff;
            border: none;
            border-radius: 10px;
            font-size: 14.5px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        .btn-login-submit:hover {
            filter: brightness(1.08);
            transform: translateY(-1px);
        }
        .login-footer-info {
            margin-top: 22px;
            font-size: 12px;
            color: #94a3b8;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        /* Topbar Cloud Sync Badges & Buttons */
        .cloud-sync-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 11.5px;
            font-weight: 600;
            background: #ecfdf5;
            color: #059669;
            border: 1px solid #a7f3d0;
            white-space: nowrap;
        }
        .cloud-sync-badge.dirty {
            background: #fffbeb;
            color: #d97706;
            border-color: #fde68a;
        }
        .cloud-sync-badge.loading {
            background: #eff6ff;
            color: #2563eb;
            border-color: #bfdbfe;
        }
        .btn-cloud-save {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: #ffffff !important;
            border: none;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
            padding: 5px 12px;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
            transition: all 0.2s;
        }
        .btn-cloud-save:hover {
            transform: translateY(-1px);
            filter: brightness(1.08);
        }
        .btn-cloud-history {
            background: #f1f5f9;
            color: #334155 !important;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
            padding: 5px 10px;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .btn-cloud-history:hover {
            background: #e2e8f0;
        }
        .user-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            color: #1e293b;
        }
        .btn-user-logout {
            color: #ef4444;
            cursor: pointer;
            margin-left: 4px;
            padding: 2px 4px;
            border-radius: 4px;
        }
        .btn-user-logout:hover {
            background: #fee2e2;
        }
        .history-list-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 14px;
            border-radius: 10px;
            border: 1px solid #e2e8f0;
            margin-bottom: 8px;
            background: #ffffff;
            transition: all 0.2s;
        }
        .history-list-item:hover {
            border-color: #3b82f6;
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        }
        .history-list-item.active-version {
            border-color: #10b981;
            background: #f0fdf4;
        }
    
