/* ============================================================
   Aircraft Intelligence - TriVector Labs
   Global Stylesheet
   ============================================================ */

:root {
    --tv-navy: #1a1a1a;
    --tv-navy-light: #2a2a2a;
    --tv-blue: #2d68ea;
    --tv-accent: #2d68ea;
    --tv-cyan: #ffb30b;
    --tv-surface: #f0f4f8;
    --tv-card: #ffffff;
    --tv-text: #1e293b;
    --tv-text-muted: #64748b;
    --tv-border: #e2e8f0;
}

html, body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--tv-surface);
    color: var(--tv-text);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* Module Tab Bar */
.module-tab-bar {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--tv-navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 1rem;
    font-family: 'Inter', sans-serif;
}

.module-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.module-tab:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.module-tab.active {
    color: #ffffff;
    border-bottom-color: var(--tv-cyan);
}

.module-tab.disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 40%, #2d68ea 100%);
    padding: 1.5rem 0 2rem;
    color: white;
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

/* Search Box */
.search-container {
    max-width: 560px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 14px;
    padding: 0.35rem 0.35rem 0.35rem 1.2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: box-shadow 0.3s;
}

.search-box:focus-within {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 2px var(--tv-accent);
}

.search-icon {
    color: var(--tv-text-muted);
    font-size: 22px;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--tv-text);
    background: transparent;
    padding: 0.6rem 0.5rem;
    min-width: 0;
}

.search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.search-input:disabled {
    opacity: 0.6;
}

.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, var(--tv-accent), var(--tv-cyan));
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.7rem 1.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-btn:hover:not(:disabled) {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.search-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.search-btn .material-symbols-outlined {
    font-size: 20px;
}

/* Search Mode Toggle */
.search-mode-toggle {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.25rem;
    max-width: 360px;
    margin: 0 auto 0.6rem;
}

.search-mode-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    justify-content: center;
}

.search-mode-btn .material-symbols-outlined {
    font-size: 18px;
}

.search-mode-btn:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
}

.search-mode-btn.active {
    background: rgba(255, 255, 255, 0.18);
    color: white;
    font-weight: 600;
}

/* Search Fields (Year / Make / Model) */
.search-fields {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border-radius: 14px;
    padding: 0.35rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: box-shadow 0.3s;
}

.search-fields:focus-within {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 2px var(--tv-accent);
}

.search-field-year {
    max-width: 120px;
    text-align: center;
    padding-left: 0.75rem !important;
    padding-right: 0.5rem !important;
}

.search-field-make {
    flex: 1.2;
}

.search-field-model {
    flex: 1;
}

/* Select dropdown styling within search-fields */
.search-fields select.search-input {
    appearance: auto;
    cursor: pointer;
    background: transparent;
    color: #1e293b;
}

.search-fields select.search-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #94a3b8;
}

.search-fields select.search-input option {
    background: white;
    color: #1e293b;
}

/* Type search loading indicator */
.type-search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    padding: 0.5rem 0 0;
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Type Analysis Badge */
.type-analysis-badge {
    background: linear-gradient(135deg, var(--tv-accent), var(--tv-cyan));
    color: white;
    padding: 0.3rem 0.85rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Top-Level Mode Toggle (Aircraft / Business) */
.top-mode-toggle {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    max-width: 480px;
    margin: 0 auto 0.75rem;
}

.top-mode-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    justify-content: center;
}

.top-mode-btn .material-symbols-outlined {
    font-size: 20px;
}

.top-mode-btn:hover {
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.06);
}

.top-mode-btn.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--tv-accent);
    color: white;
    font-weight: 600;
}

/* Business Analysis Badge */
.business-analysis-badge {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
    padding: 0.3rem 0.85rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Airport Analysis Badges */
.airport-analysis-badge {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    color: white;
    padding: 0.3rem 0.85rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.cached-badge {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    padding: 0.25rem 0.7rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.kb-grounded-badge {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
    padding: 0.25rem 0.7rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.airport-code-badge {
    background: linear-gradient(135deg, #2d68ea, #1a4fc0);
    color: white;
    padding: 0.3rem 0.85rem;
    border-radius: 8px;
    font-family: 'Inter', monospace;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
}

/* Airport Profile Section */
.airport-profile-section {
    background: var(--tv-card);
    border: 1px solid var(--tv-border);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}

.airport-profile-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    color: #06b6d4;
}

.airport-profile-header h4 {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--tv-text);
}

.airport-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 3rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
    .airport-profile-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .airport-search-results {
        border-radius: 10px;
    }

    .airport-result-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
}

.airport-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.75rem;
}

.airport-detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--tv-text-muted);
}

.airport-detail-value {
    font-size: 0.95rem;
    color: var(--tv-text);
    line-height: 1.4;
}

.airport-detail-multiline {
    white-space: pre-line;
}

.airport-resource-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid var(--tv-border);
}

.airport-resource-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--tv-border);
    color: var(--tv-accent);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.airport-resource-link:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--tv-accent);
    color: var(--tv-accent);
}

.airport-resource-link .material-symbols-outlined {
    font-size: 1rem;
}

/* Business Profile Section */
.business-profile-section {
    background: var(--tv-card);
    border: 1px solid var(--tv-border);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}

.business-profile-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    color: #7c3aed;
}

.business-profile-header h4 {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--tv-text);
}

.business-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 3rem;
}

.business-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.75rem;
}

.business-detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--tv-text-muted);
}

.business-detail-value {
    font-size: 0.95rem;
    color: var(--tv-text);
    line-height: 1.4;
}

.business-detail-value a {
    color: var(--tv-accent);
    text-decoration: none;
    word-break: break-all;
}

.business-detail-value a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .business-profile-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Airport Name Search Results */
.airport-search-results {
    margin-top: 0.75rem;
    background: white;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.airport-search-results-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.airport-search-results-header .material-symbols-outlined {
    font-size: 18px;
}

.airport-search-results-list {
    max-height: 400px;
    overflow-y: auto;
}

.airport-search-result-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    background: white;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
    font-family: 'Inter', sans-serif;
}

.airport-search-result-item:last-child {
    border-bottom: none;
}

.airport-search-result-item:hover {
    background: #f0f9ff;
}

.airport-search-result-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.airport-result-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.2rem;
}

.airport-result-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: #64748b;
}

.airport-result-lid {
    background: linear-gradient(135deg, #2d68ea, #1a4fc0);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-family: 'Inter', monospace;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
}

.airport-result-icao {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-family: 'Inter', monospace;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}

.airport-search-no-results {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fefce8;
    border-radius: 10px;
    font-size: 0.875rem;
    color: #854d0e;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.airport-search-no-results .material-symbols-outlined {
    font-size: 20px;
    color: #ca8a04;
}

/* Analysis Loading Indicator */
.analysis-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 22, 40, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    animation: fadeIn 0.2s ease-out;
}

.analysis-loading-dialog {
    max-width: 460px;
    width: 90%;
    padding: 2.5rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(13, 59, 102, 0.25);
    text-align: center;
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.analysis-loading-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 1.5rem;
    border: 4px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinning {
    animation: spin 1s linear infinite;
}

.analysis-loading-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.analysis-loading-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

.analysis-loading-progress {
    width: 100%;
    max-width: 280px;
    height: 4px;
    margin: 0 auto 1rem;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.analysis-loading-progress-bar {
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    border-radius: 2px;
    animation: indeterminate 1.8s ease-in-out infinite;
}

@keyframes indeterminate {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

.analysis-loading-steps {
    max-width: 360px;
    margin: 0 auto 1.25rem;
    text-align: left;
}

.analysis-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    font-size: 0.85rem;
    color: #94a3b8;
    transition: color 0.3s;
}

.analysis-step.active {
    color: #1e293b;
    font-weight: 500;
}

.analysis-step.completed {
    color: #16a34a;
}

.analysis-step-icon {
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.analysis-step-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.analysis-step-label {
    line-height: 1.3;
}

.analysis-loading-note {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0;
}

/* Agent Failed / Retry */
.agent-failed-message {
    text-align: center;
    padding: 1.5rem 1rem;
    color: #64748b;
}
.agent-failed-message > .material-symbols-outlined {
    font-size: 2rem;
    color: #f59e0b;
    display: block;
    margin-bottom: 0.75rem;
}
.agent-failed-message p {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}
.agent-retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1.25rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.agent-retry-btn:hover { background: #2563eb; }
.agent-retry-btn .material-symbols-outlined { font-size: 1.125rem; }

.agent-retry-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    color: #64748b;
    font-size: 0.875rem;
}
.agent-retry-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Business Name Search Results */
.business-search-results {
    margin-top: 0.75rem;
    background: white;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.business-search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.business-search-results-header .material-symbols-outlined {
    font-size: 18px;
}

.business-search-location-note {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.78rem;
    color: #7c3aed;
    font-weight: 500;
    background: rgba(139, 92, 246, 0.08);
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
}

.try-another-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    color: #64748b;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
}

.try-another-btn:hover {
    background: #f1f5f9;
    color: #475569;
    border-color: #94a3b8;
}

.business-search-results-list {
    max-height: 600px;
    overflow-y: auto;
}

.business-search-group {
    border-bottom: 1px solid #f1f5f9;
}

.business-search-group:last-child {
    border-bottom: none;
}

.business-search-group-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: 0;
    z-index: 1;
}

.business-search-group-badge {
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.5rem;
    border-radius: 5px;
    color: white;
}

.business-search-group-badge.rank-1 {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.business-search-group-badge.rank-2 {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.business-search-group-badge.rank-3 {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

.business-search-group-count {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 400;
}

.business-search-result-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0.85rem 1rem;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    background: white;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
    font-family: 'Inter', sans-serif;
}

.business-search-group .business-search-result-item:last-child {
    border-bottom: none;
}

.business-search-result-item:hover {
    background: #f0f9ff;
}

.business-search-result-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.business-result-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.business-result-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 0.15rem;
}

.business-result-location {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

.business-result-url {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    font-family: 'Inter', monospace;
    font-size: 0.78rem;
    color: #3b82f6;
}

.business-result-description {
    font-size: 0.8rem;
    color: #94a3b8;
    font-style: italic;
    margin-top: 0.15rem;
}

.business-search-no-results {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fefce8;
    border-radius: 10px;
    font-size: 0.875rem;
    color: #854d0e;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.business-search-no-results .material-symbols-outlined {
    font-size: 20px;
    color: #ca8a04;
}

/* Owner Name Search Results */
.owner-search-results {
    margin-top: 0.75rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.06);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
}

.owner-search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #475569;
}

.owner-search-results-list {
    max-height: 600px;
    overflow-y: auto;
}

.owner-search-group {
    border-bottom: 1px solid #e2e8f0;
}

.owner-search-group:last-child {
    border-bottom: none;
}

.owner-search-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.owner-search-group-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #ffffff;
}

.owner-search-group-badge.rank-1 {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.owner-search-group-badge.rank-2 {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.owner-search-group-badge.rank-3 {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

.owner-search-group-count {
    font-size: 0.78rem;
    color: #94a3b8;
}

.owner-search-result-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
    padding: 0.6rem 1rem;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}

.owner-search-result-item:hover {
    background: #f0f9ff;
}

.owner-search-result-item:last-child {
    border-bottom: none;
}

.owner-result-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.owner-result-nnumber {
    font-family: 'Inter', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    color: #0d3b66;
    background: rgba(59, 130, 246, 0.08);
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}

.owner-result-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1e293b;
}

.owner-result-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: #64748b;
    padding-left: 0;
}

.owner-result-location {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

.owner-result-aircraft {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    color: #0891b2;
}

.owner-search-no-results {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fefce8;
    border-radius: 10px;
    font-size: 0.875rem;
    color: #854d0e;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.owner-search-no-results .material-symbols-outlined {
    font-size: 20px;
    color: #ca8a04;
}

/* Accident/Incident History Section */
.accident-history-section {
    background: var(--tv-card);
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-top: 1.5rem;
}

.accident-history-empty {
    border-left-color: #16a34a;
    border-color: #bbf7d0;
}

.accident-history-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    color: #dc2626;
}

.accident-history-empty .accident-history-header {
    color: #16a34a;
}

.accident-history-header h4 {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--tv-text);
}

.accident-count-badge {
    background: #fef2f2;
    color: #dc2626;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    border: 1px solid #fecaca;
    margin-left: auto;
}

.accident-empty-message {
    color: var(--tv-text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.accident-record {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}

.accident-record:last-child {
    margin-bottom: 0;
}

.accident-record-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--tv-text);
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

.accident-record-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.accident-event-type {
    font-weight: 600;
    font-size: 0.75rem;
    color: #991b1b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #fee2e2;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    border: 1px solid #fecaca;
}

.accident-event-date {
    font-size: 0.85rem;
    color: var(--tv-text-muted);
}

.accident-severity {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
}

.accident-severity-fatal { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.accident-severity-serious { background: #fff7ed; color: #c2410c; border: 1px solid #fdba74; }
.accident-severity-minor { background: #fefce8; color: #a16207; border: 1px solid #fde047; }
.accident-severity-none { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }
.accident-severity-unknown { background: #f8fafc; color: #64748b; border: 1px solid #cbd5e1; }

.accident-status-badge {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--tv-text-muted);
    background: #f1f5f9;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    margin-left: auto;
}

.accident-damage {
    font-size: 0.75rem;
    color: var(--tv-text-muted);
    font-style: italic;
}

.accident-record-details {
    margin-bottom: 0.75rem;
}

.accident-detail-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--tv-text-muted);
    margin-bottom: 0.3rem;
}

.accident-detail-row .material-symbols-outlined {
    color: #94a3b8;
}

.accident-narrative {
    font-size: 0.85rem;
    color: var(--tv-text);
    line-height: 1.5;
    margin-top: 0.5rem;
}

.accident-probable-cause {
    font-size: 0.82rem;
    color: var(--tv-text-muted);
    margin-top: 0.4rem;
    padding-left: 0.5rem;
    border-left: 2px solid #fca5a5;
}

.accident-record-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid #fde8e8;
}

.accident-ntsb-id {
    font-size: 0.75rem;
    color: #64748b;
    font-family: monospace;
}

.accident-record-link {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--tv-accent);
    text-decoration: none;
    margin-left: auto;
}

.accident-record-link:hover {
    text-decoration: underline;
    color: #2563eb;
}

@media (max-width: 768px) {
    .accident-history-section {
        padding: 1rem 1.25rem;
    }
    .accident-record-top {
        flex-direction: column;
        align-items: flex-start;
    }
    .accident-status-badge {
        margin-left: 0;
    }
}

/* Usage Indicator */
.usage-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Inter', sans-serif;
}

/* When ChatLayout is nested inside MainLayout, constrain to viewport and hide footer */
.app-layout:has(.chat-layout) {
    height: 100vh;
    overflow: hidden;
}
.app-layout:has(.chat-layout) > .app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}
.app-layout:has(.chat-layout) > .app-footer {
    display: none;
}

/* Suppress focus outline on brand area (Blazor sets focus on first render) */
.app-header h1,
.app-header .brand-logo,
.app-header .brand-subtitle {
    outline: none;
}

/* Header Nav Links - override Bootstrap's default link colors */
.app-header a.nav-link-custom,
.app-header a.nav-link-custom:visited,
.app-header a.nav-link-custom.active {
    color: #ffffff;
}

.app-header a.nav-link-custom:hover,
.app-header a.nav-link-custom:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.app-header .nav-user-name {
    color: rgba(255, 255, 255, 0.9);
}

.app-header .nav-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.35);
}

/* Admin nav link badge */
.app-header a.nav-link-custom.nav-admin {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ffffff;
}

.app-header a.nav-link-custom.nav-admin:hover {
    background: rgba(239, 68, 68, 0.35);
    color: #ffffff;
}

/* Admin sidebar nav links - override Bootstrap's default link colors */
.admin-sidebar a.admin-nav-link,
.admin-sidebar a.admin-nav-link:visited {
    color: #ffffff;
    text-decoration: none;
}

.admin-sidebar a.admin-nav-link:hover,
.admin-sidebar a.admin-nav-link:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.admin-sidebar a.admin-nav-link.active {
    color: #ffffff;
    background: rgba(59, 130, 246, 0.3);
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--tv-card);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--tv-border);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tv-text);
    margin-bottom: 0.25rem;
}

.auth-header p {
    font-size: 0.9rem;
}

.auth-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.auth-card .form-label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--tv-text);
}

.auth-card .form-control {
    border-radius: 8px;
    border: 1px solid var(--tv-border);
    padding: 0.6rem 0.85rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-card .form-control:focus {
    border-color: var(--tv-accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.auth-card .btn-primary {
    background: linear-gradient(135deg, var(--tv-accent), #2563eb);
    border: none;
    border-radius: 10px;
    padding: 0.7rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.2s;
}

.auth-card .btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--tv-border);
}

.auth-footer p {
    font-size: 0.88rem;
    color: var(--tv-text-muted);
    margin: 0;
}

.auth-footer a {
    color: var(--tv-accent);
    font-weight: 500;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Terms of Use section */
.terms-section {
    border: 1px solid var(--tv-border);
    border-radius: 10px;
    padding: 1.25rem;
    background: rgba(59, 130, 246, 0.02);
}

.terms-content {
    max-height: 220px;
    overflow-y: auto;
    font-size: 0.78rem;
    line-height: 1.55;
    color: #475569;
    padding: 0.75rem;
    background: white;
    border: 1px solid var(--tv-border);
    border-radius: 8px;
}

.terms-content p {
    margin-bottom: 0.5rem;
}

.terms-content ol {
    padding-left: 1.25rem;
    margin-bottom: 0;
}

.terms-content ol li {
    margin-bottom: 0.5rem;
}

.terms-acceptance .form-check-label {
    font-size: 0.82rem;
    line-height: 1.4;
    color: #334155;
}

.terms-signature .form-label {
    font-size: 0.85rem;
    font-weight: 500;
}

.signature-input {
    font-family: 'Dancing Script', 'Brush Script MT', 'Segoe Script', cursive;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
    border-style: dashed !important;
}

.signature-input::placeholder {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    letter-spacing: normal;
}

/* Validation messages */
.validation-message {
    color: #ef4444;
    font-size: 0.82rem;
    margin-top: 0.25rem;
}

/* Results Container */
.results-container {
    padding-top: 1.5rem;
    padding-bottom: 3rem;
}

/* Inline Analysis Notes (collapsible on search screen) */
.analysis-notes-inline {
    margin-top: 0.75rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.analysis-notes-inline details {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.4);
    border-radius: 10px;
    overflow: hidden;
}

.analysis-notes-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    list-style: none;
}

.analysis-notes-toggle::-webkit-details-marker {
    display: none;
}

.analysis-notes-toggle::before {
    content: '▸';
    font-size: 0.75rem;
    transition: transform 0.2s;
}

details[open] > .analysis-notes-toggle::before {
    transform: rotate(90deg);
}

.analysis-notes-toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.analysis-notes-textarea {
    width: 100%;
    padding: 0.6rem 1rem;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    resize: vertical;
    line-height: 1.5;
    box-sizing: border-box;
}

.analysis-notes-textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
}

.analysis-notes-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

.analysis-notes-textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.preview-back-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.type-badge {
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
    color: white;
    padding: 0.25rem 0.7rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

@media (max-width: 768px) {
    .preview-card-body {
        padding: 1rem;
    }

    .preview-actions {
        flex-direction: column;
    }

    .preview-actions .search-btn,
    .preview-actions .preview-back-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Aircraft Header Card */
.aircraft-header-card {
    background: var(--tv-card);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--tv-border);
}

.n-number-badge {
    background: linear-gradient(135deg, var(--tv-navy), var(--tv-blue));
    color: white;
    padding: 0.3rem 0.85rem;
    border-radius: 8px;
    font-family: 'Inter', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.amin-code-badge {
    background: rgba(59, 130, 246, 0.1);
    color: var(--tv-accent);
    padding: 0.3rem 0.75rem;
    border-radius: 8px;
    font-family: 'Inter', monospace;
    font-size: 0.82rem;
    font-weight: 600;
}

.aircraft-name {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tv-text);
    margin: 0.5rem 0 0.75rem;
    letter-spacing: -0.02em;
}

.aircraft-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.aircraft-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--tv-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.aircraft-meta .material-symbols-outlined {
    font-size: 18px;
    color: var(--tv-accent);
}

.analysis-timestamp {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    color: var(--tv-text-muted);
    font-size: 0.8rem;
}

.analysis-timestamp .material-symbols-outlined {
    font-size: 16px;
}

.ai-disclaimer {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(234, 179, 8, 0.08);
    color: #a16207;
    padding: 0.25rem 0.7rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    font-style: italic;
}

.ai-disclaimer .material-symbols-outlined {
    font-size: 15px;
}

/* Tab Navigation */
.analysis-tabs {
    border-bottom: 2px solid var(--tv-border);
    gap: 0;
}

.analysis-tabs .nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.85rem 1.25rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--tv-text-muted);
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    background: none;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 0;
}

.analysis-tabs .nav-link .material-symbols-outlined {
    font-size: 20px;
}

.analysis-tabs .nav-link:hover {
    color: var(--tv-text);
    background: rgba(59, 130, 246, 0.04);
}

.analysis-tabs .nav-link.active {
    color: var(--tv-accent);
    border-bottom-color: var(--tv-accent);
    background: none;
}

/* Tab Content */
.analysis-content {
    padding: 1.5rem 0;
}

/* Analysis Mode Toggle */
.analysis-mode-toggle {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    justify-content: center;
}
.mode-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.mode-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.mode-toggle-btn.active {
    background: rgba(59, 130, 246, 0.3);
    border-color: #3b82f6;
    color: #fff;
}
.mode-toggle-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Analysis Mode Badge */
.analysis-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}
.analysis-mode-badge.mode-standard {
    background: rgba(234, 179, 8, 0.12);
    color: #ca8a04;
}
.analysis-mode-badge.mode-deep {
    background: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
}

/* Upgrade Prompt Card */
.upgrade-prompt-card {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.04), rgba(59, 130, 246, 0.04));
    border: 1px dashed #c4b5fd;
    border-radius: 14px;
    padding: 1.25rem;
}
.upgrade-prompt-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.upgrade-prompt-content > div {
    flex: 1;
    min-width: 200px;
}

/* Analysis Cards */
.analysis-content .row {
    align-items: start;
}

.analysis-card {
    background: var(--tv-card);
    border-radius: 14px;
    border: 1px solid var(--tv-border);
    border-left: 3px solid var(--tv-accent);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s;
}

.analysis-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.analysis-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.25rem;
    background: rgba(59, 130, 246, 0.04);
    border-bottom: 1px solid var(--tv-border);
}

.analysis-card-header .material-symbols-outlined {
    font-size: 22px;
    color: var(--tv-accent);
}

.analysis-card-header h5 {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    color: var(--tv-text);
}

.analysis-card-body {
    padding: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #334155;
}

/* Markdown content within analysis cards */
.analysis-card-body h1,
.analysis-card-body h2,
.analysis-card-body h3,
.analysis-card-body h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--tv-text);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}
.analysis-card-body h1 { font-size: 1.1rem; }
.analysis-card-body h2 { font-size: 1.05rem; }
.analysis-card-body h3 { font-size: 1rem; }
.analysis-card-body h4 { font-size: 0.95rem; }
.analysis-card-body h1:first-child,
.analysis-card-body h2:first-child,
.analysis-card-body h3:first-child,
.analysis-card-body h4:first-child { margin-top: 0; }

.analysis-card-body p {
    margin-bottom: 0.75rem;
}
.analysis-card-body p:last-child { margin-bottom: 0; }

.analysis-card-body ul,
.analysis-card-body ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}
.analysis-card-body li {
    margin-bottom: 0.35rem;
}

.analysis-card-body strong {
    font-weight: 600;
    color: var(--tv-text);
}

.analysis-card-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.85rem;
}
.analysis-card-body th,
.analysis-card-body td {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    text-align: left;
}
.analysis-card-body th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--tv-text);
}

.analysis-card-body blockquote {
    border-left: 3px solid #3b82f6;
    margin: 0.75rem 0;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    color: #475569;
}

.analysis-card-body hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 1rem 0;
}

/* Accent variations — header background, icon color, and left border */
.accent-red .analysis-card-header { background: rgba(239, 68, 68, 0.06); }
.accent-red .analysis-card-header .material-symbols-outlined { color: #dc2626; }
.analysis-card.accent-red { border-left-color: #dc2626; }

.accent-orange .analysis-card-header { background: rgba(249, 115, 22, 0.06); }
.accent-orange .analysis-card-header .material-symbols-outlined { color: #ea580c; }
.analysis-card.accent-orange { border-left-color: #ea580c; }

.accent-green .analysis-card-header { background: rgba(34, 197, 94, 0.06); }
.accent-green .analysis-card-header .material-symbols-outlined { color: #16a34a; }
.analysis-card.accent-green { border-left-color: #16a34a; }

.accent-blue .analysis-card-header { background: rgba(59, 130, 246, 0.06); }
.accent-blue .analysis-card-header .material-symbols-outlined { color: #2563eb; }
.analysis-card.accent-blue { border-left-color: #2563eb; }

.accent-purple .analysis-card-header { background: rgba(139, 92, 246, 0.06); }
.accent-purple .analysis-card-header .material-symbols-outlined { color: #7c3aed; }
.analysis-card.accent-purple { border-left-color: #7c3aed; }

.accent-teal .analysis-card-header { background: rgba(6, 182, 212, 0.06); }
.accent-teal .analysis-card-header .material-symbols-outlined { color: #0891b2; }
.analysis-card.accent-teal { border-left-color: #0891b2; }

.accent-sky .analysis-card-header { background: rgba(14, 165, 233, 0.06); }
.accent-sky .analysis-card-header .material-symbols-outlined { color: #0284c7; }
.analysis-card.accent-sky { border-left-color: #0284c7; }

/* Detail Cards (FAA Details tab) */
.detail-card {
    background: var(--tv-card);
    border-radius: 14px;
    border: 1px solid var(--tv-border);
    padding: 1.25rem 1.5rem;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.detail-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--tv-text);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--tv-border);
}

.detail-card-title .material-symbols-outlined {
    font-size: 20px;
    color: var(--tv-accent);
}

.detail-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    margin: 0;
}

.detail-list dt {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--tv-text-muted);
    white-space: nowrap;
}

.detail-list dd {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--tv-text);
    margin: 0;
    word-break: break-word;
}

/* Alert styling */
.alert {
    border-radius: 12px;
    border: none;
    font-size: 0.9rem;
}

.alert .material-symbols-outlined {
    font-size: 22px;
}

/* Bootstrap overrides */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--tv-accent);
}

/* Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Blazor error UI */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* Print Results Button */
.print-results-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 1rem;
    border: 1px solid var(--tv-border);
    border-radius: 8px;
    background: var(--tv-card);
    color: var(--tv-text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.print-results-btn:hover {
    background: rgba(59, 130, 246, 0.06);
    border-color: var(--tv-accent);
    color: var(--tv-accent);
}

.print-results-btn .material-symbols-outlined {
    font-size: 18px;
}

.chat-about-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 1rem;
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 8px;
    background: rgba(6, 182, 212, 0.08);
    color: #06b6d4;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.chat-about-btn:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: #06b6d4;
}
.chat-about-btn .material-symbols-outlined {
    font-size: 18px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.4rem;
    }

    .hero-section {
        padding: 1.25rem 0 1.5rem;
    }

    .search-box {
        flex-direction: column;
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .search-icon {
        display: none;
    }

    .search-input {
        width: 100%;
        text-align: center;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
    }

    .search-fields {
        flex-direction: column;
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .search-field-year {
        max-width: 100%;
        width: 100%;
    }

    .search-field-make,
    .search-field-model {
        width: 100%;
    }

    .search-fields select.search-input {
        width: 100%;
    }

    .search-mode-toggle {
        max-width: 100%;
    }

    .top-mode-toggle {
        max-width: 100%;
    }

    .aircraft-header-card {
        padding: 1.25rem;
    }

    .aircraft-name {
        font-size: 1.25rem;
    }

    .aircraft-meta {
        gap: 0.75rem;
    }

    .analysis-tabs .nav-link {
        padding: 0.75rem 0.75rem;
        font-size: 0.82rem;
    }

    .analysis-tabs .nav-link .material-symbols-outlined {
        font-size: 18px;
    }

    .analysis-timestamp {
        justify-content: flex-start;
    }
}

/* ============================================================================
   Chat UI Styles
   ============================================================================ */

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Chat top bar */
.chat-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: white;
    border-bottom: 1px solid var(--tv-border);
    min-height: 56px;
}

.chat-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.chat-topbar-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

.chat-topbar-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-topbar-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--tv-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-topbar-subtitle {
    font-size: 0.72rem;
    color: #94a3b8;
    white-space: nowrap;
}

.chat-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-usage-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--tv-surface);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--tv-text-muted);
    font-weight: 500;
}

/* Messages area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 3px;
}

/* Welcome screen */
.chat-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
    padding: 2rem;
    color: var(--tv-text-muted);
}

.chat-welcome-icon {
    font-size: 3rem;
    color: var(--tv-accent);
    margin-bottom: 1rem;
    opacity: 0.6;
}

.chat-welcome-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.chat-welcome h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--tv-text);
    margin-bottom: 0.5rem;
}

.chat-welcome p {
    max-width: 500px;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.chat-welcome-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    max-width: 600px;
}

.chat-followup-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.chat-suggestion {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--tv-border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--tv-text);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.chat-suggestion:hover {
    border-color: var(--tv-accent);
    background: rgba(59, 130, 246, 0.04);
}

/* Message bubbles */
.chat-message {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    max-width: 85%;
}

.chat-message-user {
    align-self: flex-end;
    flex-direction: row;
}

.chat-message-assistant {
    align-self: flex-start;
}

.chat-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tv-accent), var(--tv-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-message-avatar .material-symbols-outlined {
    font-size: 1rem;
    color: white;
}

.avia-avatar-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.avatar-user {
    background: linear-gradient(135deg, #64748b, #475569);
}

.chat-message-bubble {
    padding: 0.75rem 1rem;
    border-radius: 16px;
    line-height: 1.6;
    font-size: 0.9rem;
}

.bubble-user {
    background: linear-gradient(135deg, var(--tv-accent), #2563eb);
    color: white;
    border-bottom-right-radius: 4px;
}

.bubble-user p {
    margin: 0;
}

.bubble-assistant {
    background: linear-gradient(135deg, #f0f7ff 0%, #f8fafc 100%);
    color: var(--tv-text);
    border: 1px solid rgba(59, 130, 246, 0.08);
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.06);
    position: relative;
}

/* Markdown content in assistant bubbles */
.bubble-assistant h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 0.75rem;
    margin-bottom: 0.35rem;
    color: var(--tv-text);
}

.bubble-assistant h3:first-child {
    margin-top: 0;
}

.bubble-assistant p {
    margin: 0 0 0.5rem;
}

.bubble-assistant p:last-child {
    margin-bottom: 0;
}

.bubble-assistant ul, .bubble-assistant ol {
    margin: 0.25rem 0 0.5rem;
    padding-left: 1.25rem;
}

.bubble-assistant li {
    margin-bottom: 0.2rem;
}

.bubble-assistant strong {
    font-weight: 600;
    color: var(--tv-text);
}

.bubble-assistant code {
    background: var(--tv-surface);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.82rem;
}

/* Per-message PDF download button */
.chat-msg-download-bar {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: flex-end;
}

.chat-msg-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: 1px solid #cbd5e1;
    color: #64748b;
    cursor: pointer;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.chat-msg-download-btn .material-symbols-outlined {
    font-size: 1rem;
}

.chat-msg-download-btn:hover {
    color: var(--tv-accent);
    background: rgba(45, 104, 234, 0.06);
    border-color: var(--tv-accent);
}

/* Tool activity chips */
.chat-tool-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    background: rgba(59, 130, 246, 0.08);
    color: var(--tv-accent);
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.chat-tool-active {
    animation: toolPulse 1.5s ease-in-out infinite;
}

@keyframes toolPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Flight route map in chat bubbles */
.flight-route-map-container {
    height: 500px;
    width: 100%;
    margin-top: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--tv-border);
    position: relative;
    z-index: 0;
}

.flight-route-map-container .leaflet-container {
    height: 100%;
    width: 100%;
    font-family: 'Inter', sans-serif;
}

.flight-route-map-container .leaflet-control-layers {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.flight-route-map-container .leaflet-control-layers-list label {
    margin-bottom: 2px;
}

.flight-route-map-container .leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.flight-route-map-container .leaflet-popup-content {
    margin: 8px 12px;
    font-size: 0.82rem;
    line-height: 1.4;
}

.flight-route-map-container .leaflet-popup-content strong {
    color: var(--tv-accent);
}

.flight-route-marker {
    background: none !important;
    border: none !important;
}

/* Driving route map in chat bubbles */
.driving-route-map-container {
    height: 500px;
    width: 100%;
    margin-top: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--tv-border);
    position: relative;
    z-index: 0;
}

.driving-route-map-container .leaflet-container {
    height: 100%;
    width: 100%;
    font-family: 'Inter', sans-serif;
}

.driving-route-map-container .leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.driving-route-map-container .leaflet-popup-content {
    margin: 8px 12px;
    font-size: 0.82rem;
    line-height: 1.4;
}

.driving-route-marker {
    background: none !important;
    border: none !important;
}

.driving-route-info {
    background: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #1e293b;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    font-family: 'Inter', sans-serif;
}

.flight-route-map-pending {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .flight-route-map-container,
    .driving-route-map-container {
        height: 440px;
    }
}

/* Streaming cursor */
.chat-cursor {
    animation: blink 0.8s step-end infinite;
    color: var(--tv-accent);
    font-weight: 300;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Avia thinking indicator */
.avia-thinking {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0;
}
.avia-thinking-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    animation: aviaBounce 1.4s ease-in-out infinite;
}
.avia-thinking-dot:nth-child(2) { animation-delay: 0.2s; }
.avia-thinking-dot:nth-child(3) { animation-delay: 0.4s; }
.avia-thinking-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-left: 0.25rem;
    font-style: italic;
}
@keyframes aviaBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Input area */
.chat-input-area {
    border-top: 1px solid var(--tv-border);
    background: white;
    padding: 0.75rem 1.5rem 0.5rem;
}

.chat-limit-alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #92400e;
    margin-bottom: 0.5rem;
}

.chat-limit-alert a {
    color: var(--tv-accent);
    font-weight: 600;
}

.chat-input-bar {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    background: var(--tv-surface);
    border-radius: 14px;
    padding: 0.5rem;
    border: 1px solid var(--tv-border);
    transition: border-color 0.2s;
}

.chat-input-bar:focus-within {
    border-color: var(--tv-accent);
}

.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: none;
    outline: none;
    font-family: 'Inter', sans-serif;
    max-height: 120px;
    color: var(--tv-text);
}

.chat-input::placeholder {
    color: var(--tv-text-muted);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--tv-accent), var(--tv-cyan));
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s, transform 0.1s;
}

.chat-send-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: scale(1.05);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-send-btn .material-symbols-outlined {
    font-size: 1.2rem;
}

.chat-input-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
    color: var(--tv-text-muted);
}

.chat-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem 0.15rem;
    font-size: 0.65rem;
    color: #94a3b8;
    line-height: 1.35;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    margin-top: 0.15rem;
}

/* Chat responsive */
@media (max-width: 768px) {
    .chat-messages {
        padding: 1rem;
    }

    .chat-message {
        max-width: 95%;
    }

    .chat-input-area {
        padding: 0.5rem 1rem;
    }

    .chat-welcome-suggestions {
        flex-direction: column;
    }
}

/* ============================================================
   AviAMS Sidebar Navigation (global — scoped CSS doesn't reach NavLink)
   ============================================================ */

.ams-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none !important;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.15s;
}

.ams-nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1);
}

.ams-nav-link.active {
    color: #ffffff !important;
    background: rgba(59, 130, 246, 0.25);
}

.ams-nav-link .material-symbols-outlined {
    font-size: 18px;
    opacity: 0.85;
}

.ams-nav-link.active .material-symbols-outlined {
    opacity: 1;
}

.ams-nav-section-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.6rem 0.2rem;
}

.ams-sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0.25rem 0.75rem;
}
