/* PetitionIQ Application Styles — Dark Glass Design System */

:root {
    --bg: #06060a;
    --surface: rgba(255,255,255,0.035);
    --sidebar-bg: rgba(10,10,14,0.95);
    --text-primary: #eeeef0;
    --text-secondary: rgba(255,255,255,0.5);
    --accent: #c9a24e;
    --accent-hover: #d4ad4e;
    --accent-light: rgba(201,162,78,0.1);
    --accent-mid: #e8c66a;
    --success: #34d399;
    --border: rgba(255,255,255,0.08);
    --red-600: #f87171;

    --stone-50: rgba(255,255,255,0.02);
    --stone-100: rgba(255,255,255,0.04);
    --stone-200: rgba(255,255,255,0.08);
    --stone-300: rgba(255,255,255,0.12);
    --stone-400: rgba(255,255,255,0.28);
    --stone-500: rgba(255,255,255,0.4);
    --stone-600: rgba(255,255,255,0.5);
    --stone-700: rgba(255,255,255,0.6);
    --stone-800: rgba(255,255,255,0.08);
    --stone-900: #eeeef0;
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, .serif {
    font-family: 'Newsreader', Georgia, serif;
}

/* ===================================================================
   App Layout
   =================================================================== */

.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ===================================================================
   Sidebar
   =================================================================== */

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, rgba(12,12,16,0.98) 0%, rgba(8,8,12,0.99) 100%);
    border-right: 1px solid rgba(255,255,255,0.06);
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

/* Subtle ambient glow in sidebar */
.sidebar::before {
    content: '';
    position: absolute;
    top: -40px;
    left: -40px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(201,162,78,0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.sidebar > * { position: relative; z-index: 1; }

.sidebar-header {
    padding: 28px 22px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-logo-link {
    text-decoration: none;
    color: inherit;
}

.sidebar-header h1 {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.sidebar-header h1 span {
    background: linear-gradient(135deg, var(--accent), var(--accent-mid));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-subtitle {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.3);
    margin-top: 6px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
}

.nav-section-title {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255,255,255,0.25);
    padding: 16px 10px 8px;
    letter-spacing: 0.14em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.06);
}

.case-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.84rem;
    color: rgba(255,255,255,0.45);
    transition: all 0.25s ease;
    border: 1px solid transparent;
    margin-bottom: 2px;
}

.case-item:hover {
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.85);
    border-color: rgba(255,255,255,0.06);
}

.case-item.active {
    background: linear-gradient(135deg, rgba(201,162,78,0.12), rgba(201,162,78,0.04));
    border-color: rgba(201,162,78,0.2);
    color: white;
    box-shadow: 0 0 20px rgba(201,162,78,0.05);
}

.case-item .visa-badge {
    font-size: 0.6rem;
    font-weight: 700;
    background: rgba(201,162,78,0.1);
    border: 1px solid rgba(201,162,78,0.2);
    color: #c9a24e;
    padding: 3px 8px;
    border-radius: 6px;
    flex-shrink: 0;
    letter-spacing: 0.03em;
}

.case-item.active .visa-badge {
    background: rgba(201,162,78,0.15);
    border-color: rgba(201,162,78,0.25);
    color: var(--accent);
}

.btn-new-case {
    margin: 12px 14px;
    padding: 12px;
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    color: rgba(255,255,255,0.35);
    font-family: 'Outfit', sans-serif;
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-new-case:hover {
    border-color: rgba(201,162,78,0.25);
    background: rgba(201,162,78,0.05);
    color: var(--accent);
    box-shadow: 0 0 20px rgba(201,162,78,0.04);
}

/* Sidebar action buttons */
.sidebar-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: calc(100% - 28px);
    margin: 4px 14px;
    padding: 11px 14px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    color: rgba(255,255,255,0.4);
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
}

.sidebar-action-btn:hover {
    border-color: rgba(201,162,78,0.2);
    background: rgba(201,162,78,0.05);
    color: var(--accent);
}

.sidebar-action-btn svg {
    opacity: 0.5;
    flex-shrink: 0;
}

.sidebar-action-btn:hover svg {
    opacity: 1;
    color: var(--accent);
}

/* ===================================================================
   Main Content
   =================================================================== */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.main-content::before {
    display: none;
}

.main-content > * {
    position: relative;
    z-index: 1;
}

/* ===================================================================
   Top Bar
   =================================================================== */

.top-bar {
    padding: 18px 28px;
    background: rgba(6,6,10,0.6);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-bar h2 {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.top-bar-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.status-badge {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--stone-100);
    color: var(--stone-600);
    font-weight: 500;
}

/* ===================================================================
   Tabs
   =================================================================== */

.tabs {
    display: flex;
    gap: 0;
    background: rgba(6,6,10,0.4);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 0 28px;
}

.tab {
    padding: 12px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--stone-500);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Outfit', sans-serif;
}

.tab:hover {
    color: var(--stone-700);
}

.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
    background: var(--bg);
}

.panel { display: none; }
.panel.active { display: block; }

/* ===================================================================
   Welcome State
   =================================================================== */

.welcome-state {
    text-align: center;
    padding: 48px 20px 60px;
    max-width: 640px;
    margin: 0 auto;
}

.welcome-icon {
    margin-bottom: 24px;
}

.welcome-state h3 {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.welcome-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 40px;
}

.welcome-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
    text-align: left;
}

.welcome-feature {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.feature-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feature-text strong {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.feature-text span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ===================================================================
   Profile Builder
   =================================================================== */

.profile-builder {
    max-width: 720px;
    margin: 0 auto;
}

.profile-progress {
    margin-bottom: 36px;
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 80px;
}

.step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--stone-200);
    color: var(--stone-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.progress-step.active .step-dot {
    background: var(--accent);
    color: white;
}

.progress-step.completed .step-dot {
    background: var(--success);
    color: white;
}

.progress-step span {
    font-size: 0.7rem;
    color: var(--stone-400);
    font-weight: 500;
    transition: color 0.3s;
}

.progress-step.active span {
    color: var(--accent);
    font-weight: 600;
}

.progress-step.completed span {
    color: var(--success);
}

.progress-line {
    flex: 1;
    height: 2px;
    background: var(--stone-200);
    margin: 0 8px;
    margin-bottom: 22px;
    max-width: 80px;
}

.profile-step {
    display: none;
    animation: fadeSlideIn 0.3s ease-out;
}

.profile-step.active {
    display: block;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-title {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.step-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.5;
}

.form-row {
    margin-bottom: 16px;
}

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

.step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Checkbox group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-primary);
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.form-checkbox label {
    margin-bottom: 0;
    font-weight: 400;
    cursor: pointer;
}

/* ===================================================================
   Analysis Screen (Agents Working)
   =================================================================== */

.analysis-screen {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    padding: 40px 0;
}

.analysis-title {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.analysis-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
}

.agent-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.agent-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.4s ease;
    opacity: 0;
    animation: agentCardAppear 0.4s ease-out forwards;
}

.agent-card:nth-child(1) { animation-delay: 0.1s; }
.agent-card:nth-child(2) { animation-delay: 0.2s; }
.agent-card:nth-child(3) { animation-delay: 0.3s; }
.agent-card:nth-child(4) { animation-delay: 0.4s; }
.agent-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes agentCardAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.agent-card.complete {
    border-color: rgba(52,211,153,0.3);
    background: rgba(52,211,153,0.06);
}

.agent-card.complete .agent-status {
    color: var(--success);
    font-weight: 600;
}

.agent-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.agent-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--stone-200);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.agent-card.complete .agent-spinner {
    animation: none;
    border: none;
    background: var(--success);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    position: relative;
}

.agent-card.complete .agent-spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%) rotate(45deg);
    width: 7px;
    height: 12px;
    border-right: 2.5px solid white;
    border-bottom: 2.5px solid white;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.agent-info {
    flex: 1;
}

.agent-visa-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.agent-visa-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.agent-status {
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    min-width: 120px;
    text-align: right;
}

.agent-verdict {
    font-weight: 600;
    font-size: 0.8rem;
}

.agent-verdict.strong-match { color: var(--success); }
.agent-verdict.moderate-match { color: var(--accent-mid); }
.agent-verdict.weak-match { color: var(--red-600); }
.agent-verdict.not-recommended { color: var(--stone-400); }

.analysis-footer {
    margin-top: 32px;
}

.analysis-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.analysis-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--stone-300);
    animation: dotPulse 1.4s ease-in-out infinite;
}

.analysis-dots .dot:nth-child(2) { animation-delay: 0.2s; }
.analysis-dots .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

/* ===================================================================
   Results Dashboard
   =================================================================== */

.results-section {
    margin-bottom: 32px;
}

/* Recommended pathway card */
.recommended-card {
    background: var(--surface);
    border: 2px solid var(--accent);
    border-radius: 16px;
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.recommended-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-mid));
}

.recommended-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.recommended-visa-name {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.recommended-score {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.score-big {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--accent);
    line-height: 1;
}

.score-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.recommended-summary {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.recommended-actions {
    display: flex;
    gap: 12px;
}

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

.visa-comparison-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.visa-comparison-card:hover {
    border-color: var(--stone-300);
    box-shadow: 0 4px 12px rgba(28, 25, 23, 0.06);
}

.visa-comparison-card.is-recommended {
    border-color: var(--accent);
}

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

.visa-card-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.visa-card-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.visa-card-score {
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.score-bar {
    height: 8px;
    background: var(--stone-100);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

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

.score-fill.weak { background: var(--red-600); }
.score-fill.moderate { background: var(--accent-mid); }
.score-fill.strong { background: var(--accent); }
.score-fill.very-strong { background: var(--success); }

.visa-card-odds {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.odds-high {
    background: rgba(52,211,153,0.1);
    color: var(--success);
}

.odds-medium {
    background: var(--accent-light);
    color: var(--accent);
}

.odds-low {
    background: rgba(248,113,113,0.08);
    color: var(--red-600);
}

.visa-card-detail {
    margin-bottom: 10px;
}

.visa-card-detail-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.visa-card-detail-list {
    list-style: none;
    padding: 0;
}

.visa-card-detail-list li {
    font-size: 0.8rem;
    color: var(--text-primary);
    padding: 2px 0;
    padding-left: 14px;
    position: relative;
}

.visa-card-detail-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.visa-card-detail-list.strengths li::before {
    background: var(--success);
}

.visa-card-detail-list.gaps li::before {
    background: var(--accent-mid);
}

.visa-card-processing {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.visa-card-action {
    margin-top: 14px;
}

/* Profile summary (collapsible) */
.profile-summary-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.profile-summary-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: background 0.15s;
}

.profile-summary-toggle:hover {
    background: var(--stone-50);
}

.profile-summary-toggle .chevron {
    transition: transform 0.2s;
    color: var(--text-secondary);
}

.profile-summary-toggle.open .chevron {
    transform: rotate(180deg);
}

.profile-summary-body {
    display: none;
    padding: 0 20px 20px;
}

.profile-summary-body.open {
    display: block;
}

.profile-field {
    display: flex;
    padding: 6px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--stone-50);
}

.profile-field-label {
    width: 180px;
    flex-shrink: 0;
    color: var(--text-secondary);
    font-weight: 500;
}

.profile-field-value {
    color: var(--text-primary);
}

/* Overall recommendation */
.overall-recommendation {
    background: var(--accent-light);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 20px;
    font-size: 0.9rem;
    color: var(--accent-hover);
    line-height: 1.6;
}

.overall-recommendation strong {
    display: block;
    margin-bottom: 6px;
    color: var(--accent-hover);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-title {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* ===================================================================
   Assessment Panel (case detail view)
   =================================================================== */

.disclaimer {
    background: rgba(201,162,78,0.06);
    border: 1px solid rgba(201,162,78,0.15);
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.75rem;
    color: rgba(201,162,78,0.8);
    margin-bottom: 16px;
    line-height: 1.5;
}

.criteria-grid {
    display: grid;
    gap: 16px;
}

.criterion-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.criterion-card:hover {
    border-color: var(--stone-300);
    box-shadow: 0 2px 8px rgba(28, 25, 23, 0.04);
}

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

.criterion-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.criterion-score {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
}

.criterion-summary {
    font-size: 0.8rem;
    color: var(--stone-500);
    line-height: 1.5;
}

.criterion-tip {
    margin-top: 6px;
    color: var(--accent);
}

/* Overall score widget */
.overall-score {
    text-align: center;
    padding: 28px;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    font-family: 'Outfit', sans-serif;
}

.score-circle.weak { background: var(--red-600); }
.score-circle.moderate { background: var(--accent-mid); }
.score-circle.strong { background: var(--accent); }
.score-circle.very-strong { background: var(--success); }

.strength-label {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Outfit', sans-serif;
}

/* ===================================================================
   Documents
   =================================================================== */

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

.panel-title {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.doc-list { display: grid; gap: 12px; }

.doc-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.doc-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.08);
}

.doc-info { flex: 1; }
.doc-title { font-weight: 600; font-size: 0.9rem; color: var(--text-primary); }
.doc-meta { font-size: 0.75rem; color: var(--stone-400); margin-top: 2px; }
.doc-actions { display: flex; gap: 8px; }

.doc-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 12px;
}

.doc-viewer-title {
    font-weight: 700;
}

.doc-viewer-actions {
    display: flex;
    gap: 8px;
}

.doc-viewer-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.7;
    max-height: 60vh;
    overflow-y: auto;
}

.empty-state {
    color: var(--text-secondary);
    text-align: center;
    padding: 40px;
}

/* ===================================================================
   Buttons
   =================================================================== */

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Outfit', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 1px 3px rgba(180, 83, 9, 0.2);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 2px 6px rgba(180, 83, 9, 0.25);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--stone-100);
    color: var(--stone-700);
}

.btn-secondary:hover {
    background: var(--stone-200);
}

.btn-sm { padding: 6px 12px; font-size: 0.75rem; }

.btn-lg {
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
}

/* ===================================================================
   Chat
   =================================================================== */

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: calc(100vh - 180px);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.chat-message.user {
    align-self: flex-end;
    background: var(--accent);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.assistant {
    align-self: flex-start;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
    color: var(--text-primary);
}

.chat-disclaimer {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.chat-input-area {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--stone-300);
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    resize: none;
    background: var(--surface);
    color: var(--text-primary);
    transition: border-color 0.15s;
}

.chat-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.1);
}

/* ===================================================================
   Forms
   =================================================================== */

textarea, input[type="text"], input[type="number"], input[type="email"], select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
}

textarea:focus, input[type="text"]:focus, input[type="number"]:focus, input[type="email"]:focus, select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(201,162,78,0.1);
    background: rgba(255,255,255,0.06);
}

select option {
    background: #1a1a1f;
    color: #eeeef0;
}

label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--stone-700);
    margin-bottom: 6px;
}

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

/* ===================================================================
   Modal
   =================================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6,6,10,0.7);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: linear-gradient(145deg, rgba(30,30,35,0.95), rgba(20,20,24,0.98));
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.04);
}

.modal h3 {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* ===================================================================
   Scrollbar Styling
   =================================================================== */

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.18);
}

/* ===================================================================
   Responsive
   =================================================================== */

@media (max-width: 768px) {
    .sidebar { width: 240px; }
    .tab-content { padding: 16px; }
    .form-row-2 { grid-template-columns: 1fr; }
    .comparison-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .app-container { flex-direction: column; }
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
    }
    .progress-steps { gap: 0; }
    .progress-step span { font-size: 0.6rem; }
    .step-dot { width: 28px; height: 28px; font-size: 0.75rem; }
}

/* Watch Out Section */
.watch-out-section {
    background: rgba(248,113,113,0.06);
    border: 1px solid rgba(248,113,113,0.15);
    border-left: 4px solid var(--red-600);
    border-radius: 12px;
    padding: 20px 24px;
}

.watch-out-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--red-600);
    margin-bottom: 12px;
}

.watch-out-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.watch-out-list li {
    position: relative;
    padding-left: 20px;
    font-size: 0.875rem;
    color: rgba(248,113,113,0.8);
    line-height: 1.5;
}

.watch-out-list li::before {
    content: '!';
    position: absolute;
    left: 0;
    font-weight: 700;
    color: #dc2626;
}

/* Immediate Actions Section */
.actions-section {
    background: rgba(52,211,153,0.06);
    border: 1px solid rgba(52,211,153,0.15);
    border-left: 4px solid var(--success);
    border-radius: 12px;
    padding: 20px 24px;
}

.actions-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--success);
    margin-bottom: 12px;
}

.actions-list {
    padding-left: 20px;
    margin: 0;
    display: grid;
    gap: 8px;
}

.actions-list li {
    font-size: 0.875rem;
    color: rgba(52,211,153,0.8);
    line-height: 1.5;
}

.actions-list li::marker {
    color: var(--success);
    font-weight: 700;
}

/* ===================================================================
   RAG Deep Analysis Section
   =================================================================== */

.rag-trigger {
    text-align: center;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 2px solid var(--accent-light);
}

.rag-trigger-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.rag-section {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 3px solid var(--accent);
}

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

.rag-meta {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light);
    padding: 4px 12px;
    border-radius: 999px;
}

.rag-disclaimer {
    background: rgba(201,162,78,0.06);
    border: 1px solid var(--accent);
    border-left: 4px solid var(--accent-mid);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.78rem;
    color: var(--accent-hover);
    margin-bottom: 20px;
    line-height: 1.6;
}

.rag-disclaimer.legal {
    background: var(--stone-50);
    border-color: var(--stone-300);
    border-left-color: var(--stone-400);
    color: var(--stone-600);
    margin-top: 20px;
    margin-bottom: 0;
}

.rag-criterion-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.rag-criterion-card:hover {
    border-color: var(--stone-300);
    box-shadow: 0 2px 8px rgba(28, 25, 23, 0.04);
}

.rag-criterion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.rag-criterion-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    text-transform: capitalize;
}

.rag-criterion-id {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-family: 'Outfit', sans-serif;
}

.rag-strength-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rag-strength-badge.strong {
    background: rgba(52,211,153,0.1);
    color: var(--success);
}

.rag-strength-badge.moderate {
    background: var(--accent-light);
    color: var(--accent);
}

.rag-strength-badge.weak {
    background: rgba(201,162,78,0.08);
    color: var(--accent-mid);
}

.rag-strength-badge.insufficient {
    background: rgba(248,113,113,0.08);
    color: var(--red-600);
}

.rag-detail {
    margin-bottom: 12px;
}

.rag-detail summary {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--stone-600);
    cursor: pointer;
    padding: 6px 0;
    user-select: none;
}

.rag-detail summary:hover {
    color: var(--accent);
}

.rag-detail p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 8px 0 4px 12px;
    border-left: 2px solid var(--stone-200);
    margin-top: 4px;
}

.rag-patterns {
    background: var(--stone-50);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.rag-patterns-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.rag-patterns p {
    font-size: 0.84rem;
    color: var(--text-primary);
    line-height: 1.65;
}

.rag-evidence {
    background: rgba(52,211,153,0.06);
    border-left: 3px solid var(--success);
    border-radius: 0 8px 8px 0;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.rag-evidence-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--success);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.rag-evidence p {
    font-size: 0.84rem;
    color: var(--text-primary);
    line-height: 1.65;
}

.rag-citations {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.rag-cite-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
    margin-top: 8px;
}

.rag-cite-label:first-child {
    margin-top: 0;
}

.rag-cite-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rag-cite-badge {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 999px;
    display: inline-block;
}

.rag-cite-badge.decision {
    background: var(--stone-100);
    color: var(--stone-700);
    border: 1px solid var(--stone-200);
}

a.rag-cite-link {
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}

a.rag-cite-link:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.rag-cite-badge.authority {
    background: var(--accent-light);
    color: var(--accent-hover);
    border: 1px solid rgba(201,162,78,0.2);
}

.rag-synthesis {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-top: 20px;
}

.rag-synthesis h4 {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.rag-synthesis p {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.7;
}

/* ===================================================================
   Attorney CTA
   =================================================================== */

.attorney-cta {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--stone-50);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    margin-top: 20px;
}

.attorney-cta-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.attorney-cta strong {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.attorney-cta p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 2px 0 0;
}

.attorney-cta .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.attorney-cta-compact {
    margin-top: 0;
    margin-bottom: 8px;
    padding: 10px 16px;
}

.attorney-cta-compact .attorney-cta-icon {
    font-size: 1.2rem;
}

.attorney-cta-compact strong {
    font-size: 0.8rem;
}

.attorney-cta-compact p {
    font-size: 0.72rem;
}

/* ===================================================================
   Evidence Tracker
   =================================================================== */

.evidence-summary-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.evidence-stat {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
}

.evidence-stat.strong {
    background: rgba(52,211,153,0.1);
    color: var(--success);
}

.evidence-stat.moderate {
    background: var(--accent-light);
    color: var(--accent);
}

.evidence-stat.weak {
    background: rgba(248,113,113,0.08);
    color: var(--red-600);
}

.evidence-add-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.evidence-source-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
    margin-bottom: 8px;
}

.evidence-source-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.evidence-source-tab:hover { color: var(--text); }
.evidence-source-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

.evidence-source-panel { display: none; }
.evidence-source-panel.active { display: block; }

.evidence-upload-zone {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--cream);
}

.evidence-upload-zone:hover,
.evidence-upload-zone.dragover {
    border-color: var(--accent);
    background: rgba(201,162,78,0.08);
}

.evidence-upload-icon { font-size: 2rem; margin-bottom: 8px; }
.evidence-upload-text { font-size: 0.9rem; color: var(--text); margin-bottom: 4px; }
.evidence-upload-hint { font-size: 0.75rem; color: var(--text-muted); }
.evidence-file-name {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
}

.evidence-url-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 4px 0 12px;
    line-height: 1.4;
}

.evidence-source-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 4px;
    vertical-align: middle;
}

.evidence-source-badge.upload {
    background: rgba(59,130,246,0.1);
    color: #60a5fa;
}

.evidence-source-badge.url {
    background: rgba(168,130,255,0.1);
    color: #a78bfa;
}

.evidence-source-link {
    display: block;
    font-size: 0.75rem;
    color: var(--accent);
    text-decoration: none;
    margin-top: 2px;
    word-break: break-all;
}

.evidence-source-link:hover { text-decoration: underline; }

.evidence-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.evidence-criterion-group {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.evidence-criterion-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--stone-50);
    border-bottom: 1px solid var(--border);
}

.evidence-criterion-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.evidence-criterion-dot.strong { background: var(--success); }
.evidence-criterion-dot.moderate { background: var(--accent-mid); }
.evidence-criterion-dot.weak { background: var(--red-600); }

.evidence-criterion-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    flex: 1;
}

.evidence-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.evidence-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--stone-100);
}

.evidence-item:last-child {
    border-bottom: none;
}

.evidence-item-main {
    flex: 1;
}

.evidence-item-desc {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.evidence-item-ref {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
    font-style: italic;
}

.evidence-item-notes {
    font-size: 0.78rem;
    color: var(--accent);
    margin-top: 4px;
    padding-left: 10px;
    border-left: 2px solid var(--accent-light);
}

.evidence-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.evidence-strength-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.evidence-strength-badge.strong {
    background: rgba(52,211,153,0.1);
    color: var(--success);
}

.evidence-strength-badge.moderate {
    background: var(--accent-light);
    color: var(--accent);
}

.evidence-strength-badge.weak {
    background: rgba(248,113,113,0.08);
    color: var(--red-600);
}

.evidence-strength-badge.unrated {
    background: var(--stone-100);
    color: var(--stone-500);
}

/* ===================================================================
   Stripe / Accent Button
   =================================================================== */

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-mid));
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.25);
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--accent-hover), var(--accent));
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.3);
}

/* ===================================================================
   RFE Response Module
   =================================================================== */

.rfe-entry {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.rfe-entry p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.rfe-hero {
    text-align: center;
    margin-bottom: 28px;
}

.rfe-hero h3 {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.rfe-hero p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 640px;
    margin: 0 auto;
}

.rfe-deadline-warning {
    background: rgba(248,113,113,0.08);
    border: 1px solid rgba(248,113,113,0.15);
    border-left: 4px solid var(--red-600);
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--red-600);
    margin: 20px 0;
}

.rfe-strategy {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.rfe-strategy h4 {
    font-family: 'Newsreader', Georgia, serif;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.rfe-strategy p {
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.65;
}

.rfe-concerns {
    margin: 20px 0;
}

.rfe-concerns h4 {
    font-family: 'Newsreader', Georgia, serif;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.rfe-concern-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 12px;
    transition: border-color 0.15s;
}

.rfe-concern-card:hover {
    border-color: var(--stone-300);
}

.rfe-concern-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.rfe-severity-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rfe-severity-badge.severity-high {
    background: rgba(248,113,113,0.08);
    color: var(--red-600);
}

.rfe-severity-badge.severity-medium {
    background: var(--accent-light);
    color: var(--accent);
}

.rfe-severity-badge.severity-low {
    background: rgba(52,211,153,0.1);
    color: var(--success);
}

.rfe-criterion-tag {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--stone-100);
    padding: 3px 10px;
    border-radius: 999px;
}

.rfe-concern-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.5;
}

.rfe-concern-response {
    font-size: 0.84rem;
    color: var(--text-primary);
    line-height: 1.6;
    padding: 10px 14px;
    background: var(--stone-50);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    margin-bottom: 10px;
}

.rfe-evidence-checklist {
    font-size: 0.82rem;
    color: var(--text-primary);
}

.rfe-evidence-checklist strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rfe-evidence-checklist ul {
    list-style: none;
    padding: 0;
}

.rfe-evidence-checklist li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 4px;
    line-height: 1.5;
}

.rfe-evidence-checklist li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 7px;
    width: 10px;
    height: 10px;
    border: 2px solid var(--stone-300);
    border-radius: 2px;
}

.rfe-outline {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.rfe-outline h4 {
    font-family: 'Newsreader', Georgia, serif;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.rfe-outline-content {
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.65;
}

.rfe-actions {
    background: rgba(52,211,153,0.06);
    border: 1px solid rgba(52,211,153,0.15);
    border-left: 4px solid var(--success);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.rfe-actions h4 {
    font-weight: 600;
    font-size: 1rem;
    color: var(--success);
    margin-bottom: 12px;
}

.rfe-actions ol {
    padding-left: 20px;
}

.rfe-actions li {
    font-size: 0.88rem;
    color: rgba(52,211,153,0.8);
    line-height: 1.6;
    margin-bottom: 6px;
}

.rfe-draft-cta {
    text-align: center;
    margin: 28px 0;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.rfe-full-response {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-top: 20px;
}

.rfe-full-response h4 {
    font-family: 'Newsreader', Georgia, serif;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.rfe-response-content {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
}

/* ===================================================================
   Pre-Submit Consistency Audit
   =================================================================== */

.audit-trigger {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid var(--stone-100);
}

.audit-trigger-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.audit-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 3px solid var(--accent-mid);
}

.audit-score-section {
    display: flex;
    align-items: center;
    gap: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 20px;
}

.audit-score-gauge {
    text-align: center;
    flex-shrink: 0;
}

.audit-score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 6px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    margin: 0 auto 8px;
}

.audit-score-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 6px;
}

.audit-ready-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.audit-ready-badge.audit-ready {
    background: rgba(52,211,153,0.1);
    color: var(--success);
}

.audit-ready-badge.audit-not-ready {
    background: rgba(248,113,113,0.08);
    color: var(--red-600);
}

.audit-score-summary {
    flex: 1;
}

.audit-score-summary p {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.audit-counts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.audit-count-critical {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(248,113,113,0.08);
    color: var(--red-600);
}

.audit-count-warning {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-light);
    color: var(--accent);
}

.audit-count-clear {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(52,211,153,0.1);
    color: var(--success);
}

.audit-flags {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.audit-flag-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    border-left: 4px solid var(--stone-300);
}

.audit-flag-card.flag-critical {
    border-left-color: var(--red-600);
}

.audit-flag-card.flag-warning {
    border-left-color: var(--accent-mid);
}

.audit-flag-card.flag-info {
    border-left-color: var(--stone-400);
}

.audit-flag-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.audit-flag-severity {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.audit-flag-severity.flag-critical {
    background: rgba(248,113,113,0.08);
    color: var(--red-600);
}

.audit-flag-severity.flag-warning {
    background: var(--accent-light);
    color: var(--accent);
}

.audit-flag-severity.flag-info {
    background: var(--stone-100);
    color: var(--stone-600);
}

.audit-flag-category {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--stone-100);
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: capitalize;
}

.audit-flag-description {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.5;
}

.audit-flag-details {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.audit-flag-risk {
    margin-bottom: 6px;
}

.audit-flag-fix {
    color: var(--success);
}

/* ===================================================================
   Immigration Climate
   =================================================================== */

.climate-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    border-left: 5px solid var(--stone-300);
}

.climate-card.climate-favorable { border-left-color: var(--success); }
.climate-card.climate-moderate { border-left-color: var(--accent); }
.climate-card.climate-challenging { border-left-color: var(--accent-mid); }
.climate-card.climate-difficult { border-left-color: var(--red-600); }

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

.climate-card-title {
    font-family: 'Newsreader', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.climate-sentiment-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.climate-sentiment-badge.climate-favorable { background: rgba(52,211,153,0.1); color: var(--success); }
.climate-sentiment-badge.climate-moderate { background: var(--accent-light); color: var(--accent); }
.climate-sentiment-badge.climate-challenging { background: rgba(201,162,78,0.08); color: #92400e; }
.climate-sentiment-badge.climate-difficult { background: rgba(248,113,113,0.08); color: var(--red-600); }

.climate-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.climate-metric {
    text-align: center;
    padding: 12px 8px;
    background: var(--stone-50);
    border-radius: 10px;
}

.climate-metric-value {
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
}

.climate-metric-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.climate-trend-up { color: var(--success); font-size: 0.95rem; font-weight: 700; }
.climate-trend-down { color: var(--red-600); font-size: 0.95rem; font-weight: 700; }
.climate-trend-stable { color: var(--text-secondary); font-size: 0.95rem; font-weight: 700; }

.climate-admin-section {
    margin-bottom: 16px;
}

.climate-admin-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.climate-admin-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.climate-admin-row {
    display: grid;
    grid-template-columns: 140px 1fr 50px;
    align-items: center;
    gap: 10px;
}

.climate-admin-label {
    font-size: 0.78rem;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.climate-admin-bar-track {
    height: 18px;
    background: var(--stone-100);
    border-radius: 999px;
    overflow: hidden;
}

.climate-admin-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s ease;
}

.climate-admin-bar.bar-dem { background: #60a5fa; }
.climate-admin-bar.bar-rep { background: #f87171; }

.climate-admin-value {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
}

.climate-detail-toggle {
    margin-top: 4px;
}

.climate-detail-toggle summary {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    padding: 8px 0;
}

.climate-detail-toggle summary:hover {
    color: var(--accent-hover);
}

.climate-history-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 100px;
    padding: 12px 0;
}

.climate-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.climate-bar-col.current-admin .climate-bar-fill {
    background: var(--accent);
}

.climate-bar-fill {
    width: 100%;
    background: var(--stone-300);
    border-radius: 3px 3px 0 0;
    min-height: 3px;
    transition: height 0.4s ease;
}

.climate-bar-label {
    font-size: 0.6rem;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 500;
    flex-shrink: 0;
}

.climate-events {
    margin-top: 14px;
}

.climate-events-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.climate-event {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    padding: 4px 0;
    border-bottom: 1px solid var(--stone-100);
}

.climate-event:last-child {
    border-bottom: none;
}

.climate-event-fy {
    font-weight: 700;
    color: var(--accent);
    margin-right: 6px;
}

.climate-disclaimer {
    font-size: 0.72rem;
    color: var(--stone-400);
    margin-top: 14px;
    line-height: 1.5;
    font-style: italic;
}

@media (max-width: 600px) {
    .climate-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    .climate-admin-row {
        grid-template-columns: 100px 1fr 40px;
    }
}

/* Feedback modal */
.feedback-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.feedback-stars {
    display: flex;
    gap: 4px;
    font-size: 1.8rem;
    cursor: pointer;
}

.fb-star {
    color: rgba(255,255,255,0.15);
    transition: color 0.15s;
}

.fb-star.active {
    color: var(--accent);
}

.fb-star:hover {
    color: var(--accent-mid);
}
