/* VisaFlow Pro - Immigration Case Management Styles */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --accent: #3b82f6;
    --accent-light: #f1f5f9;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --canada-red: #ef4444;
    --sidebar-bg: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-active: #3b82f6;
    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --radius: 14px;
    --radius-sm: 10px;
}

[data-theme="dark"] {
    --bg-primary: #18181b;
    --bg-secondary: #27272a;
    --bg-card: #27272a;
    --text-primary: #fafafa;
    --text-secondary: #d4d4d8;
    --text-muted: #71717a;
    --border-color: #3f3f46;
    --accent-light: #3f3f46;
    --sidebar-bg: #09090b;
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg-secondary);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

.logo-icon { font-size: 28px; }

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.nav-section { margin-bottom: 24px; }

.nav-section-title {
    display: block;
    padding: 8px 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--sidebar-text);
    opacity: 0.6;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.nav-item:hover {
    color: var(--sidebar-active);
    background: rgba(255,255,255,0.05);
}

.nav-item.active {
    color: var(--sidebar-active);
    background: rgba(220, 38, 38, 0.3);
    border-right: 3px solid var(--canada-red);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--canada-red);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.user-details { flex: 1; }
.user-name { display: block; color: #fff; font-size: 14px; font-weight: 500; }
.user-role { display: block; color: var(--sidebar-text); font-size: 12px; }

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
}

/* Topbar */
.topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-primary);
}

.search-bar {
    flex: 1;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.search-bar svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
}

.search-bar input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--text-primary);
}

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

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.icon-btn:hover { border-color: var(--accent); }

.icon-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
    fill: none;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pages */
.page {
    display: none;
    padding: 24px;
}

.page.active { display: block; }

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
}

.ircc-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 20px;
    font-size: 13px;
    color: var(--success);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Buttons */
.primary-btn, .secondary-btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.primary-btn {
    background: var(--canada-red);
    color: #fff;
    border: none;
}

.primary-btn:hover { background: #b91c1c; }

.secondary-btn {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.secondary-btn:hover { border-color: var(--accent); }

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.kpi-icon.cases { background: #dbeafe; }
.kpi-icon.pending { background: #fef3c7; }
.kpi-icon.approved { background: #dcfce7; }
.kpi-icon.revenue { background: #f3e8ff; }

.kpi-change {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.kpi-change.positive { background: #dcfce7; color: #166534; }
.kpi-change.negative { background: #fee2e2; color: #991b1b; }

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    font-family: var(--font-mono);
    margin-bottom: 4px;
}

.kpi-label {
    font-size: 14px;
    color: var(--text-muted);
}

/* Alerts */
.alerts-section {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.alert-card {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.alert-card.urgent { background: #fee2e2; color: #991b1b; }
.alert-card.warning { background: #fef3c7; color: #92400e; }
.alert-card.info { background: #dbeafe; color: #1e40af; }
.alert-card.success { background: #dcfce7; color: #166534; }

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.chart-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border-color);
}

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

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.view-all {
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
}

/* Badges */
.ircc-badge, .ai-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.ircc-badge {
    background: #fef2f2;
    color: var(--canada-red);
}

.ai-badge {
    background: #f3e8ff;
    color: #7c3aed;
}

/* Program Chart */
.program-chart {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.program-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.program-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.program-info { flex: 1; }

.program-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.program-bar {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.program-bar-fill {
    height: 100%;
    border-radius: 3px;
}

.program-count {
    font-family: var(--font-mono);
    font-weight: 600;
}

/* Draws List */
.draws-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.draw-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

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

.draw-program {
    font-size: 14px;
    font-weight: 500;
}

.draw-date {
    font-size: 12px;
    color: var(--text-muted);
}

.draw-score {
    font-size: 20px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--canada-red);
}

/* Deadlines List */
.deadlines-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.deadline-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.deadline-date {
    padding: 8px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    text-align: center;
    min-width: 60px;
}

.deadline-date .day {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-mono);
}

.deadline-date .month {
    font-size: 11px;
    color: var(--text-muted);
}

.deadline-info { flex: 1; }
.deadline-title { font-size: 14px; font-weight: 500; }
.deadline-client { font-size: 12px; color: var(--text-muted); }

.deadline-urgency {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.deadline-urgency.critical { background: #fee2e2; color: #991b1b; }
.deadline-urgency.soon { background: #fef3c7; color: #92400e; }
.deadline-urgency.normal { background: #dcfce7; color: #166534; }

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.activity-icon.submit { background: #dbeafe; }
.activity-icon.approve { background: #dcfce7; }
.activity-icon.document { background: #fef3c7; }
.activity-icon.note { background: #f3e8ff; }

.activity-content { flex: 1; }
.activity-title { font-size: 14px; margin-bottom: 4px; }
.activity-time { font-size: 12px; color: var(--text-muted); }

/* Filters */
.filters-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-search {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
}

.filters-bar select {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
}

/* Cases Grid */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.case-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.case-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.case-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.case-id {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.case-client {
    font-size: 16px;
    font-weight: 600;
    margin-top: 4px;
}

.case-program-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.case-program-badge.express-entry { background: #dbeafe; color: #1e40af; }
.case-program-badge.pnp { background: #dcfce7; color: #166534; }
.case-program-badge.work-permit { background: #fef3c7; color: #92400e; }
.case-program-badge.study-permit { background: #f3e8ff; color: #7c3aed; }
.case-program-badge.family { background: #fce7f3; color: #be185d; }

.case-body {
    padding: 16px;
}

.case-progress {
    margin-bottom: 16px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 8px;
}

.progress-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-fill.preparation { background: var(--warning); }
.progress-fill.submitted { background: var(--info); }
.progress-fill.processing { background: var(--accent); }
.progress-fill.approved { background: var(--success); }

.case-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
}

/* Data Table */
.table-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
}

.data-table td { font-size: 14px; }
.data-table tbody tr:hover { background: var(--bg-secondary); }

/* Status Tags */
.status-tag {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.status-tag.active { background: #dcfce7; color: #166534; }
.status-tag.pending { background: #fef3c7; color: #92400e; }
.status-tag.inactive { background: #f1f5f9; color: #64748b; }
.status-tag.paid { background: #dcfce7; color: #166534; }
.status-tag.overdue { background: #fee2e2; color: #991b1b; }

/* Document Categories */
.doc-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.doc-category {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.doc-category:hover, .doc-category.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Documents Grid */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.document-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.document-card:hover {
    border-color: var(--accent);
}

.doc-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.doc-info { flex: 1; }
.doc-name { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.doc-meta { font-size: 12px; color: var(--text-muted); }

/* EE Stats */
.ee-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.ee-stat {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.ee-stat-value {
    font-size: 32px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--canada-red);
}

.ee-stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* CRS Trend Chart */
.crs-trend-chart {
    height: 200px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 20px 0;
}

.crs-bar {
    flex: 1;
    background: linear-gradient(to top, var(--canada-red), #f87171);
    border-radius: 4px 4px 0 0;
    position: relative;
}

.crs-bar::after {
    content: attr(data-score);
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

/* PNP Grid */
.pnp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.pnp-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.pnp-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.pnp-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.pnp-flag {
    width: 48px;
    height: 32px;
    border-radius: 4px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.pnp-name {
    font-size: 16px;
    font-weight: 600;
}

.pnp-streams {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pnp-stream {
    padding: 4px 10px;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 12px;
}

/* Work Permit Types */
.permit-types {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.permit-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.permit-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.permit-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.permit-desc {
    font-size: 13px;
    color: var(--text-muted);
}

/* LMIA Info */
.lmia-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.lmia-card {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    text-align: center;
}

.lmia-value {
    font-size: 24px;
    font-weight: 700;
    font-family: var(--font-mono);
}

.lmia-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* Study Stats */
.study-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

/* DLI Search */
.dli-search {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border-color);
}

.dli-search h3 { margin-bottom: 16px; }

.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.dli-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dli-item {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.dli-name { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.dli-location { font-size: 12px; color: var(--text-muted); }

/* Family Programs */
.family-programs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.family-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.family-card h4 {
    font-size: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.family-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.family-time {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.family-time strong {
    color: var(--canada-red);
    font-family: var(--font-mono);
}

/* CRS Calculator */
.crs-calculator {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
}

.calc-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.calc-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border-color);
}

.calc-section h3 { margin-bottom: 20px; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

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

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input, .form-group select {
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--canada-red);
}

/* CRS Result */
.crs-result {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border-color);
    position: sticky;
    top: 100px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.score-display {
    text-align: center;
    padding: 32px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.score-value {
    font-size: 64px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--canada-red);
}

.score-label {
    font-size: 14px;
    color: var(--text-muted);
}

.score-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.breakdown-item .points {
    font-weight: 600;
    font-family: var(--font-mono);
}

.score-analysis {
    padding: 16px;
    background: #fef2f2;
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.6;
}

/* Eligibility Tool */
.eligibility-tool {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.eligibility-form {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border-color);
}

.eligibility-form h3 { margin-bottom: 20px; }

.eligibility-results {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border-color);
}

.result-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.result-placeholder span {
    font-size: 48px;
    margin-bottom: 12px;
}

.program-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.program-result {
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.program-result.eligible {
    background: #dcfce7;
    border-color: #86efac;
}

.program-result.maybe {
    background: #fef3c7;
    border-color: #fcd34d;
}

.program-result.ineligible {
    background: #fee2e2;
    border-color: #fca5a5;
}

.result-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.result-name {
    font-size: 14px;
    font-weight: 600;
}

.result-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.result-status.eligible { background: #166534; color: #fff; }
.result-status.maybe { background: #92400e; color: #fff; }
.result-status.ineligible { background: #991b1b; color: #fff; }

.result-details {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Processing Grid */
.processing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.processing-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.processing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.processing-program {
    font-size: 14px;
    font-weight: 600;
}

.processing-time {
    font-size: 24px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--canada-red);
    margin-bottom: 8px;
}

.processing-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.processing-fill {
    height: 100%;
    background: var(--canada-red);
    border-radius: 4px;
}

/* Billing Summary */
.billing-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.billing-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.billing-value {
    font-size: 28px;
    font-weight: 700;
    font-family: var(--font-mono);
    margin-bottom: 4px;
}

.billing-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* Reports Grid */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.report-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.report-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.report-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.report-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.report-info p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 200;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    width: 90%;
    max-width: 480px;
}

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

.modal-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.modal-close svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-muted);
}

.modal-body { padding: 20px; }

.modal-body .form-group { margin-bottom: 16px; }

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--success);
    animation: toastIn 0.3s ease;
}

.toast.error { border-left-color: var(--danger); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid, .dashboard-row { grid-template-columns: 1fr; }
    .crs-calculator, .eligibility-tool { grid-template-columns: 1fr; }
    .crs-result { position: static; }
}

@media (max-width: 640px) {
    .page { padding: 16px; }
    .kpi-grid { grid-template-columns: 1fr; }
    .billing-summary, .ee-stats { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: 1fr; }
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 99;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Family Processing Times */
.family-times {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.time-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.time-program { font-size: 14px; }
.time-duration {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--canada-red);
}

/* Draws Table */
.draws-table-container {
    max-height: 400px;
    overflow-y: auto;
}
