        :root {
            /* TIS Brand Colors */
            --primary: #1B3A6D;
            --primary-light: #264A85;
            --primary-dark: #122647;
            --accent: #C9A227;
            --accent-light: #E0B82E;
            --accent-glow: rgba(201, 162, 39, 0.25);
            --sidebar-width: 260px;
            --header-height: 64px;
            --bg-light: #F8FAFC;
            --bg-card: #FFFFFF;
            --text-primary: #1E293B;
            --text-secondary: #64748B;
            --text-muted: #94A3B8;
            --border: #E2E8F0;
            --border-light: #F1F5F9;
            --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
            --shadow-card-hover: 0 10px 40px -10px rgba(15, 23, 42, 0.12), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
            --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
            --gradient-primary: linear-gradient(135deg, #1B3A6D 0%, #264A85 100%);
            --gradient-accent: linear-gradient(135deg, #C9A227 0%, #E0B82E 100%);
            --border-radius: 12px;
            --border-radius-lg: 16px;
        }
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: var(--bg-light);
            color: #0C203F;
            min-height: 100vh;
        }
        body.with-shell { background: var(--bg-light); }
        h1, h2, h3, h4 { font-family: 'Inter', sans-serif; font-weight: 600; letter-spacing: -0.02em; }
        
        /* Podium Shell Sidebar - Enhanced */
        .podium-sidebar {
            position: fixed;
            left: 0;
            top: 0;
            bottom: 0;
            width: var(--sidebar-width);
            background: var(--gradient-primary);
            color: white;
            z-index: 1000;
            display: flex;
            flex-direction: column;
            box-shadow: 4px 0 24px rgba(27, 58, 109, 0.15);
            transition: var(--transition);
        }
        .sidebar-header {
            padding: 20px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .sidebar-brand {
            font-size: 1.25rem;
            font-weight: 700;
            letter-spacing: -0.02em;
        }
        .sidebar-nav {
            flex: 1;
            padding: 16px 12px;
            overflow-y: auto;
        }
        .nav-section {
            margin-bottom: 24px;
        }
        .nav-section-title {
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: rgba(255,255,255,0.4);
            padding: 0 12px;
            margin-bottom: 8px;
        }
        .nav-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 11px 16px;
            border-radius: 10px;
            color: rgba(255,255,255,0.7);
            text-decoration: none;
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            transition: var(--transition);
            margin-bottom: 2px;
            position: relative;
            overflow: hidden;
        }
        .nav-item::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 3px;
            background: var(--accent);
            border-radius: 0 3px 3px 0;
            transform: scaleY(0);
            transition: transform var(--transition-fast);
        }
        .nav-item:hover {
            background: rgba(255,255,255,0.08);
            color: white;
        }
        .nav-item.active {
            background: linear-gradient(90deg, rgba(201, 162, 39, 0.2) 0%, rgba(201, 162, 39, 0.05) 100%);
            color: white;
        }
        .nav-item.active::before {
            transform: scaleY(1);
        }
        .nav-item svg {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
        }
        .sidebar-footer {
            padding: 16px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }
        .user-menu {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            border-radius: 10px;
            cursor: pointer;
            transition: var(--transition);
        }
        .user-menu:hover {
            background: rgba(255,255,255,0.1);
        }
        .user-avatar {
            width: 38px;
            height: 38px;
            border-radius: 10px;
            background: var(--gradient-accent);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 0.95rem;
            box-shadow: 0 2px 8px rgba(201, 162, 39, 0.25);
        }
        .user-info { flex: 1; min-width: 0; }
        .user-name {
            font-size: 0.9rem;
            font-weight: 600;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .user-role {
            font-size: 0.75rem;
            color: rgba(255,255,255,0.6);
        }
        
        /* Main wrapper when shell is active */
        .podium-main {
            margin-left: var(--sidebar-width);
            min-height: 100vh;
            transition: var(--transition);
        }
        .podium-main .main-container {
            max-width: none;
            padding: 24px 32px;
        }
        
        /* Mobile sidebar */
        .sidebar-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.5);
            z-index: 999;
        }
        .sidebar-overlay.open { display: block; }
        .mobile-menu-btn {
            display: none;
            position: fixed;
            top: 16px;
            left: 16px;
            z-index: 998;
            padding: 10px;
            background: var(--primary);
            border: none;
            border-radius: 8px;
            cursor: pointer;
            color: white;
        }
        .mobile-menu-btn svg { width: 24px; height: 24px; }
        
        @media (max-width: 1024px) {
            .podium-sidebar {
                transform: translateX(-100%);
            }
            .podium-sidebar.open {
                transform: translateX(0);
            }
            .podium-main {
                margin-left: 0;
            }
            .mobile-menu-btn {
                display: block;
            }
            body.with-shell {
                padding-top: 60px;
            }
        }

        .header {
            background: white;
            color: var(--text-primary);
            padding: 18px 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            border-bottom: 1px solid var(--border);
        }
        .header-brand { display: flex; align-items: center; gap: 20px; }
        .header-logo { height: 36px; width: auto; filter: brightness(0); }
        .header h1 { font-size: 1.35rem; font-weight: 700; color: var(--primary); }
        .header-subtitle { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }
        .version-badge { background: #00BFA6; color: white; padding: 4px 10px; border-radius: 12px; font-size: 0.7rem; margin-left: 12px; font-weight: 600; }
        .header-user { display: flex; align-items: center; gap: 15px; }
        .header-user span { font-size: 0.9rem; color: var(--text-secondary); }
        .btn-logout { background: var(--bg-light); border: 1px solid var(--border); color: var(--text-primary); padding: 6px 14px; border-radius: 6px; font-size: 0.8rem; cursor: pointer; transition: all 0.2s; }
        .btn-logout:hover { background: var(--border); }

        /* Tab Navigation */
        .tabs { display: flex; background: white; padding: 0 30px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
        .tab { padding: 14px 24px; color: var(--text-secondary); cursor: pointer; border-bottom: 3px solid transparent; font-weight: 600; transition: all 0.2s; font-size: 0.95rem; }
        .tab:hover { color: var(--text-primary); background: var(--bg-light); }
        .tab.active { color: var(--accent); border-bottom-color: var(--accent); }

        .tab-content { display: none; }
        .tab-content.active { display: block; }

        /* Main container */
        .main-container { max-width: 1200px; margin: 0 auto; padding: 24px; }

        /* Form Sections - Enhanced */
        .form-section { 
            background: white; 
            border-radius: var(--border-radius-lg); 
            box-shadow: var(--shadow-card); 
            border: 1px solid var(--border); 
            padding: 28px; 
            margin-bottom: 24px; 
            transition: box-shadow var(--transition-fast);
        }
        .form-section:hover {
            box-shadow: var(--shadow-card-hover);
        }
        .form-section h2 { 
            font-size: 1.15rem; 
            margin-bottom: 20px; 
            padding-bottom: 12px; 
            border-bottom: 2px solid var(--accent); 
            color: var(--text-primary); 
            letter-spacing: -0.01em;
        }
        .form-section h3 { font-size: 1rem; margin: 20px 0 15px 0; color: var(--primary); }
        .form-section h3:first-of-type { margin-top: 0; }

        .form-group { margin-bottom: 18px; }
        .form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
        .form-group input, .form-group textarea, .form-group select {
            width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px;
            font-size: 0.9rem; font-family: inherit; transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
            background: var(--bg-card);
        }
        .form-group input:focus, .form-group textarea:focus, .form-group select:focus {
            outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(27, 58, 109, 0.12);
        }
        .form-group textarea { min-height: 80px; resize: vertical; }
        .form-group small { display: block; margin-top: 4px; font-size: 0.75rem; color: #718096; }
        .form-group input[readonly] { background: #f1f5f9; color: #64748b; }

        .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
        .form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
        .form-row-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 12px; }
        @media (max-width: 768px) {
            .form-row, .form-row-3, .form-row-4 { grid-template-columns: 1fr; }
        }

        /* Plan Selector Card - Enhanced */
        .plan-selector {
            background: var(--bg-light);
            border: 2px solid var(--border);
            border-radius: var(--border-radius);
            padding: 20px;
            margin-bottom: 18px;
            transition: all var(--transition-fast);
        }
        .plan-selector:hover {
            box-shadow: var(--shadow-card);
        }
        .plan-selector.has-plan {
            border-color: var(--accent);
            background: linear-gradient(135deg, rgba(201, 162, 39, 0.08) 0%, rgba(201, 162, 39, 0.03) 100%);
        }
        .plan-selector-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            gap: 12px;
        }
        .plan-selector-header h4 {
            font-size: 0.95rem;
            color: #13356A;
            margin: 0;
        }
        .plan-selector-header .header-left {
            display: flex;
            align-items: center;
            gap: 15px;
        }
        .plan-selector-header .carrier-change-label {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 0.8rem;
            color: #64748b;
            cursor: pointer;
            font-weight: normal;
        }
        .plan-selector-header .carrier-change-label input {
            width: auto;
            margin: 0;
        }
        .plan-selector-header .badge {
            font-size: 0.75rem;
            padding: 3px 10px;
            border-radius: 12px;
            background: #e2e8f0;
            color: #64748b;
        }
        .plan-selector-header .badge.active {
            background: var(--gradient-accent);
            color: white;
            box-shadow: 0 2px 4px rgba(201, 162, 39, 0.2);
        }
        .terminating-carrier-inline {
            display: none;
            margin-top: 8px;
            padding: 8px 12px;
            background: #fef3c7;
            border-radius: 6px;
            border-left: 3px solid #f59e0b;
        }
        .terminating-carrier-inline.show {
            display: block;
        }
        .terminating-carrier-inline label {
            font-size: 0.8rem;
            color: #92400e;
            font-weight: 600;
        }
        .terminating-carrier-inline input {
            margin-top: 5px;
        }
        .plan-selector select {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            font-size: 0.9rem;
            margin-bottom: 10px;
        }
        .plan-loaded-info {
            background: white;
            padding: 12px;
            border-radius: 6px;
            font-size: 0.85rem;
            color: #4a5568;
            display: none;
        }
        .plan-selector.has-plan .plan-loaded-info {
            display: block;
        }
        .plan-loaded-info .carrier {
            font-weight: 600;
            color: #13356A;
        }
        .plan-actions {
            display: flex;
            gap: 8px;
            margin-top: 10px;
        }

        /* Override Panel */
        .override-panel {
            display: none;
            margin-top: 12px;
            padding-top: 12px;
            border-top: 1px dashed #e2e8f0;
        }
        .override-panel.show {
            display: block;
        }
        .override-toggle {
            font-size: 0.8rem;
            color: #13356A;
            cursor: pointer;
            text-decoration: underline;
        }

        /* Premium Entry */
        .premium-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
            margin-top: 12px;
        }
        .premium-grid > div { text-align: center; }
        .premium-grid label { font-size: 0.75rem; margin-bottom: 4px; display: block; color: #64748b; }
        .premium-grid input { text-align: center; font-size: 0.9rem; padding: 8px; }
        @media (max-width: 600px) { .premium-grid { grid-template-columns: 1fr 1fr; } }

        /* Contribution Grid */
        .contrib-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.9rem;
        }
        .contrib-table th, .contrib-table td {
            padding: 10px;
            border: 1px solid #e2e8f0;
            text-align: center;
        }
        .contrib-table th {
            background: var(--primary);
            color: white;
            font-weight: 600;
        }
        .contrib-table th:first-child {
            text-align: left;
        }
        .contrib-table td:first-child {
            text-align: left;
            font-weight: 600;
            background: #f8fafc;
        }
        .contrib-table input {
            width: 80px;
            text-align: center;
            padding: 6px;
            border: 1px solid #e2e8f0;
            border-radius: 4px;
        }

        /* Commission Split Grid */
        .split-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.85rem;
        }
        .split-table th, .split-table td {
            padding: 8px;
            border: 1px solid #e2e8f0;
            text-align: center;
        }
        .split-table th {
            background: var(--primary);
            color: white;
            font-weight: 600;
            font-size: 0.8rem;
        }
        .split-table td:first-child {
            text-align: left;
            font-weight: 600;
            background: #f8fafc;
        }
        .split-table input {
            width: 55px;
            text-align: center;
            padding: 5px;
            border: 1px solid #e2e8f0;
            border-radius: 4px;
            font-size: 0.85rem;
        }
        .split-total {
            font-weight: 600;
            background: #f0fdf4 !important;
        }

        /* Buttons - Enhanced */
        .btn {
            padding: 11px 20px; border: none; border-radius: 10px; font-weight: 600;
            cursor: pointer; font-size: 0.9rem; transition: all var(--transition-fast); display: inline-flex; align-items: center; gap: 8px;
            position: relative; overflow: hidden; font-family: inherit;
        }
        .btn::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(rgba(255, 255, 255, 0.1), transparent);
            opacity: 0;
            transition: opacity var(--transition-fast);
        }
        .btn:hover::after { opacity: 1; }
        .btn-primary { background: var(--gradient-accent); color: white; box-shadow: 0 2px 8px rgba(201, 162, 39, 0.25); }
        .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(201, 162, 39, 0.35); }
        .btn-success { background: linear-gradient(135deg, #10B981 0%, #34D399 100%); color: white; box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25); }
        .btn-success:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35); }
        .btn-danger { background: linear-gradient(135deg, #EF4444 0%, #F87171 100%); color: white; box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25); }
        .btn-danger:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35); }
        .btn-secondary { background: var(--bg-light); color: var(--text-primary); border: 1.5px solid var(--border); }
        .btn-secondary:hover { background: var(--border); }
        .btn-sm { padding: 7px 14px; font-size: 0.8rem; border-radius: 8px; }
        .btn-lg { padding: 14px 28px; font-size: 1rem; }

        /* Generate Tab Cards - Enhanced */
        .output-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 20px;
        }
        .output-card {
            background: white;
            border-radius: var(--border-radius-lg);
            padding: 28px;
            box-shadow: var(--shadow-card);
            text-align: center;
            border: 2px solid transparent;
            transition: all var(--transition-fast);
        }
        .output-card:hover {
            border-color: var(--accent);
            transform: translateY(-3px);
            box-shadow: var(--shadow-card-hover);
        }
        .output-card .icon {
            font-size: 3rem;
            margin-bottom: 15px;
        }
        .output-card h3 {
            color: #13356A;
            margin-bottom: 10px;
        }
        .output-card p {
            color: #718096;
            font-size: 0.9rem;
            margin-bottom: 20px;
        }

        /* Library Styles */
        .library-section {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.08);
        }
        .library-section h3 {
            margin-bottom: 15px;
            color: #13356A;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .library-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px;
            background: #f8fafc;
            border-radius: 6px;
            margin-bottom: 8px;
        }
        .library-item-name { font-weight: 600; color: #13356A; }
        .library-item-detail { font-size: 0.85rem; color: #718096; }
        .library-item-actions { display: flex; gap: 8px; }
        .library-empty { color: #718096; font-style: italic; padding: 20px; text-align: center; }

        .status { font-size: 0.85rem; padding: 4px 10px; border-radius: 4px; }
        .status.connected { background: #c6f6d5; color: #22543d; }
        .status.error { background: #fed7d7; color: #822727; }

        /* Summary Box */
        .summary-box {
            background: #f0fdf4;
            border: 1px solid #22c55e;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 20px;
        }
        .summary-box h3 {
            color: #16a34a;
            margin-bottom: 15px;
        }
        .summary-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
        }
        .summary-item label {
            font-size: 0.75rem;
            color: #16a34a;
            text-transform: uppercase;
            display: block;
            margin-bottom: 3px;
        }
        .summary-item span {
            font-weight: 600;
            color: #333;
        }

        /* Modal - Enhanced */
        .modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 1000; align-items: center; justify-content: center; padding: 24px; }
        .modal.show { display: flex; animation: modalFadeIn 0.2s ease; }
        @keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
        .modal-content { background: white; border-radius: var(--border-radius-lg); max-width: 600px; width: 100%; max-height: calc(100vh - 48px); overflow: hidden; box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25); animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
        @keyframes modalSlideIn { from { opacity: 0; transform: translateY(-20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
        .modal-header { background: var(--gradient-primary); color: white; padding: 18px 24px; display: flex; justify-content: space-between; align-items: center; }
        .modal-header h3 { font-size: 1.15rem; font-weight: 600; }
        .modal-close { background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; opacity: 0.8; transition: opacity 0.2s; }
        .modal-close:hover { opacity: 1; }
        .modal-body { padding: 24px; overflow-y: auto; max-height: calc(100vh - 200px); }
        .modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 12px; justify-content: flex-end; background: var(--bg-light); }

        /* Logo Upload */
        .logo-upload {
            border: 2px dashed #e2e8f0; border-radius: 8px; padding: 20px;
            text-align: center; cursor: pointer; transition: border-color 0.2s;
        }
        .logo-upload:hover { border-color: #13356A; }
        .logo-upload input { display: none; }
        .logo-upload.has-logo { border-style: solid; border-color: #00BFA6; }
        .logo-preview { max-height: 60px; max-width: 100%; }

        /* Frequency Box */
        .frequency-box {
            background: #fef3c7; padding: 16px; border-radius: 8px; margin-bottom: 20px;
        }
        .frequency-box label { font-weight: 600; display: block; margin-bottom: 6px; color: #92400e; }
        .frequency-box select { max-width: 250px; }
        .frequency-box small { display: block; margin-top: 6px; color: #b45309; }

        /* Medical Plan Tabs */
        .med-plan-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 15px;
        }
        .med-plan-tab {
            padding: 8px 16px;
            background: #e2e8f0;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.85rem;
            font-weight: 600;
            color: #64748b;
            transition: all 0.2s;
        }
        .med-plan-tab.active {
            background: var(--accent);
            color: white;
        }
        .med-plan-tab.disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }
        .med-plan-content {
            display: none;
        }
        .med-plan-content.active {
            display: block;
        }

        /* Dashboard Styles */
        .dashboard { display: block; }
        .dashboard.hidden { display: none; }
        .case-editor { display: none; }
        .case-editor.active { display: block; }

        /* Dashboard Navigation Tabs */
        .dashboard-nav {
            background: white;
            padding: 0 24px;
            border-bottom: 1px solid var(--border);
        }
        .dashboard-tabs {
            max-width: 1400px;
            margin: 0 auto;
            display: flex;
            gap: 4px;
        }
        .dashboard-tab {
            padding: 14px 24px;
            color: var(--text-secondary);
            font-weight: 600;
            cursor: pointer;
            border-bottom: 3px solid transparent;
            transition: all 0.2s;
        }
        .dashboard-tab:hover {
            color: var(--text-primary);
            background: var(--bg-light);
        }
        .dashboard-tab.active {
            color: var(--accent);
            border-bottom-color: var(--accent);
            background: transparent;
        }
        .dashboard-section {
            display: none;
        }
        .dashboard-section.active {
            display: block;
        }

        .dashboard-container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 30px 24px;
        }
        .dashboard-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
        }
        .dashboard-header h2 {
            font-size: 1.6rem;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .dashboard-header h2::before {
            content: '';
            width: 4px;
            height: 28px;
            background: var(--accent);
            border-radius: 2px;
        }

        .dashboard-grid {
            display: grid;
            grid-template-columns: 1fr 380px;
            gap: 24px;
        }
        @media (max-width: 1024px) {
            .dashboard-grid { grid-template-columns: 1fr; }
        }

        .dashboard-stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 16px;
            margin-bottom: 24px;
        }
        @media (max-width: 768px) {
            .dashboard-stats { grid-template-columns: 1fr; }
        }
        .stat-card {
            background: white;
            border-radius: var(--border-radius-lg);
            padding: 22px;
            box-shadow: var(--shadow-card);
            border: 1px solid var(--border);
            display: flex;
            align-items: center;
            gap: 16px;
            transition: all var(--transition-fast);
            position: relative;
            overflow: hidden;
        }
        .stat-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: var(--gradient-accent);
            opacity: 0;
            transition: opacity var(--transition-fast);
        }
        .stat-card:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-card-hover);
        }
        .stat-card:hover::before {
            opacity: 1;
        }
        .stat-icon {
            width: 48px;
            height: 48px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.4rem;
        }
        .stat-icon.total { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); }
        .stat-icon.active { background: linear-gradient(135deg, #fef3c7, #fde68a); }
        .stat-icon.complete { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
        .stat-info { flex: 1; }
        .stat-card .number {
            font-size: 1.75rem;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1;
        }
        .stat-card .label {
            font-size: 0.8rem;
            color: #718096;
            margin-top: 4px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .dashboard-panel {
            background: white;
            border-radius: var(--border-radius-lg);
            box-shadow: var(--shadow-card);
            border: 1px solid var(--border);
            overflow: hidden;
            transition: box-shadow var(--transition-fast);
        }
        .dashboard-panel:hover {
            box-shadow: var(--shadow-card-hover);
        }
        .panel-header {
            padding: 18px 22px;
            border-bottom: 1px solid var(--border-light);
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
        }
        .panel-header h3 {
            font-size: 1rem;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 600;
        }
        .panel-header .icon { font-size: 1.1rem; }
        .panel-body { padding: 0; }

        .cases-list { background: transparent; box-shadow: none; }
        .case-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 14px 20px;
            border-bottom: 1px solid #f1f5f9;
            cursor: pointer;
            transition: all 0.15s;
        }
        .case-item:hover {
            background: linear-gradient(90deg, #f8fafc, transparent);
            padding-left: 24px;
        }
        .case-item:last-child {
            border-bottom: none;
        }
        .case-item-info {
            flex: 1;
        }
        .case-item-name {
            font-weight: 600;
            color: #13356A;
            font-size: 0.95rem;
        }
        .case-item-meta {
            font-size: 0.8rem;
            color: #94a3b8;
            margin-top: 3px;
        }
        .case-item-status {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .status-badge {
            padding: 4px 10px;
            border-radius: 6px;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }
        .status-badge.draft { background: #fef3c7; color: #92400e; }
        .status-badge.plan-design { background: #dbeafe; color: #1e40af; }
        .status-badge.contributions { background: #e0e7ff; color: #4338ca; }
        .status-badge.ready { background: #d1fae5; color: #065f46; }
        .status-badge.complete { background: #10b981; color: white; }
        .status-badge.locked { background: #6b7280; color: white; }

        .empty-state {
            text-align: center;
            padding: 50px 20px;
            color: #94a3b8;
        }
        .empty-state .icon {
            font-size: 3rem;
            margin-bottom: 16px;
            opacity: 0.4;
        }
        .empty-state p {
            margin-bottom: 16px;
            font-size: 0.9rem;
        }

        /* Library Panel on Dashboard */
        .library-panel-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 20px;
            border-bottom: 1px solid #f1f5f9;
            font-size: 0.85rem;
        }
        .library-panel-item:last-child { border-bottom: none; }
        .library-panel-item .name {
            font-weight: 600;
            color: #334155;
        }
        .library-panel-item .carrier {
            color: #94a3b8;
            font-size: 0.8rem;
        }
        .library-panel-item .type-badge {
            background: #f1f5f9;
            color: #64748b;
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 0.7rem;
            text-transform: uppercase;
        }
        .library-panel-footer {
            padding: 12px 20px;
            background: #f8fafc;
            border-top: 1px solid #e2e8f0;
            text-align: center;
        }
        .library-panel-footer a {
            color: #13356A;
            font-size: 0.85rem;
            font-weight: 600;
            text-decoration: none;
        }
        .library-panel-footer a:hover { text-decoration: underline; }

        /* Carrier Cards */
        .carrier-card {
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            padding: 16px;
            margin-bottom: 12px;
            transition: box-shadow 0.2s;
        }
        .carrier-card:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        }
        .carrier-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }
        .carrier-name {
            font-weight: 700;
            color: #13356A;
            font-size: 1.05rem;
        }
        .carrier-doc-count {
            color: #94a3b8;
            font-size: 0.85rem;
        }
        .carrier-docs {
            background: #f8fafc;
            border-radius: 6px;
            padding: 8px;
            margin-bottom: 12px;
        }
        .carrier-doc-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px;
            border-bottom: 1px solid #e2e8f0;
        }
        .carrier-doc-item:last-child {
            border-bottom: none;
        }
        .carrier-doc-item .doc-icon {
            font-size: 1.2rem;
        }
        .carrier-doc-item .doc-name {
            flex: 1;
            font-size: 0.9rem;
            color: #334155;
        }
        .carrier-doc-item .doc-download {
            color: #13356A;
            font-size: 0.85rem;
            text-decoration: none;
        }
        .carrier-doc-item .doc-download:hover {
            text-decoration: underline;
        }
        .carrier-card-actions {
            display: flex;
            gap: 8px;
            justify-content: flex-end;
        }

        /* Temp doc items in modal */
        .temp-doc-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px;
            background: #f8fafc;
            border-radius: 6px;
            margin-bottom: 8px;
        }
        .temp-doc-info {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .temp-doc-info .doc-icon {
            font-size: 1.5rem;
        }
        .temp-doc-info .doc-name {
            font-weight: 600;
            color: #334155;
        }
        .temp-doc-info .doc-filename {
            font-size: 0.8rem;
            color: #94a3b8;
        }

        /* Case Header Bar */
        .case-header-bar {
            background: linear-gradient(90deg, #f0fdf4, #ecfdf5);
            border-bottom: 2px solid #22c55e;
            padding: 14px 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .case-header-bar.locked {
            background: linear-gradient(90deg, #f3f4f6, #f9fafb);
            border-bottom-color: #9ca3af;
        }
        .case-title {
            font-weight: 700;
            color: #13356A;
            font-size: 1.15rem;
        }
        .case-actions {
            display: flex;
            gap: 10px;
            align-items: center;
        }
