/* Norma — Compliance Assistent
   Design: system fonts, #FFFFFF bg, #111827 text, #2563EB accent, 8pt grid */

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #111827;
    background: #FFFFFF;
}

/* ── Main Layout ──────────────────────────────────────────────── */
.main {
    display: flex;
    height: 100vh;
}

/* ── Left Navigation Panel ───────────────────────────────────── */
.nav-panel {
    width: 260px;
    flex-shrink: 0;
    background: #111827;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    border-right: 3px solid #7ABEF8;
}

#norma-nav:empty {
    background: #111827;
    width: 260px;
    flex-shrink: 0;
    border-right: 3px solid #7ABEF8;
}

.nav-brand {
    padding: 32px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.nav-avatar {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    object-fit: cover;
    margin-bottom: 20px;
    box-shadow: 0 4px 24px rgba(122, 190, 248, 0.35);
    border: 2px solid rgba(122, 190, 248, 0.5);
}

.nav-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.nav-subtitle {
    font-size: 13px;
    color: #9CA3AF;
    line-height: 1.5;
}

/* ── Nav Menu ─────────────────────────────────────────────────── */
.nav-menu {
    flex: 1;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: #9CA3AF;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.nav-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 20px;
    border-radius: 0 3px 3px 0;
    background: #F06000;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
    color: #FFFFFF;
    background: rgba(122, 190, 248, 0.08);
}

.nav-item:hover .nav-icon {
    color: #7ABEF8;
    transform: scale(1.15);
    filter: drop-shadow(0 0 6px rgba(122, 190, 248, 0.4));
}

.nav-item:hover::before {
    transform: translateY(-50%) scaleY(1);
}

.nav-item.active {
    color: #FFFFFF;
    background: rgba(122, 190, 248, 0.12);
}

.nav-item.active::before {
    transform: translateY(-50%) scaleY(1);
    background: #F06000;
}

.nav-item.active .nav-icon {
    color: #7ABEF8;
    filter: drop-shadow(0 0 8px rgba(122, 190, 248, 0.5));
    animation: iconPulse 2s ease-in-out infinite;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #6B7280;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Nav Logout & Footer ─────────────────────────────────────── */
.nav-footer {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-item-logout {
    color: #6B7280;
    font-size: 13px;
}

.nav-item-logout:hover {
    color: #F06000;
    background: rgba(240, 96, 0, 0.08);
}

.nav-item-logout:hover .nav-icon {
    color: #F06000;
    filter: drop-shadow(0 0 6px rgba(240, 96, 0, 0.4));
}

.nav-item-logout:hover::before {
    background: #F06000;
}

.nav-footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 8px 4px;
}

.nav-footer-text {
    font-size: 11px;
    color: #4B5563;
    display: block;
    padding: 4px 14px;
}

/* ── Content Panel ────────────────────────────────────────────── */
.content-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}
/* Sticky header: intro text + input */
.content-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #FFFFFF;
    padding: 24px 24px 0;
    border-bottom: 1px solid #E5E7EB;
    flex-shrink: 0;
}

.content-header-intro {
    font-size: 15px;
    color: #374151;
    margin-bottom: 12px;
    line-height: 1.6;
    max-width: 640px;
}

/* ── Search Input ────────────────────────────────────────────── */
.search-input {
    display: flex;
    gap: 8px;
    padding: 0 0 16px;
    max-width: 640px;
}

.search-input input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s;
}
.search-input input:focus { border-color: #2563EB; box-shadow: 0 0 0 2px rgba(37,99,235,0.15); }

.search-input button {
    padding: 10px 20px;
    background: #2563EB;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
.search-input button:hover { background: #1D4ED8; }
.search-input button:disabled { background: #9CA3AF; cursor: not-allowed; }

.search-input .random-btn {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #F3F4F6;
    color: #6B7280;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}
.search-input .random-btn:hover { background: #E5E7EB; color: #2563EB; border-color: #2563EB; }
.search-input .random-btn svg { width: 18px; height: 18px; }

/* ── Result Area ─────────────────────────────────────────────── */
.result-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* ── Progress Indicator ───────────────────────────────────────── */
.progress {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: #6B7280;
    font-size: 14px;
}
.progress[hidden] { display: none; }

.progress-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #E5E7EB;
    border-top-color: #2563EB;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ── Result ───────────────────────────────────────────────────── */
.result[hidden] { display: none; }

.result-question {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
    max-width: 640px;
    animation: fadeIn 0.2s ease;
}

/* ── Tabs ─────────────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #E5E7EB;
    margin-bottom: 20px;
    max-width: 640px;
}

.tab {
    padding: 8px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.15s;
}
.tab:hover { color: #111827; }
.tab.active {
    color: #2563EB;
    border-bottom-color: #2563EB;
}

/* ── Tab Panels ──────────────────────────────────────────────── */
.tab-panel {
    display: none;
    max-width: 640px;
    animation: fadeIn 0.2s ease;
}
.tab-panel.active { display: block; }

.tab-placeholder {
    color: #9CA3AF;
    font-size: 14px;
    font-style: italic;
}

/* ── Answer Content ──────────────────────────────────────────── */
.answer-content {
    font-size: 13px;
    line-height: 1.7;
    color: #111827;
}

.answer-content h1,
.answer-content h2,
.answer-content h3 {
    font-size: 14px;
    font-weight: 700;
    margin-top: 16px;
    margin-bottom: 4px;
    color: #111827;
}
.answer-content h1:first-child,
.answer-content h2:first-child,
.answer-content h3:first-child { margin-top: 0; }

.answer-content p { margin-bottom: 8px; }
.answer-content ul,
.answer-content ol { margin: 4px 0 8px 20px; }
.answer-content li { margin-bottom: 2px; }
.answer-content strong { font-weight: 600; }

/* Source groups */
.source-group { margin-bottom: 20px; }
.source-group-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6B7280;
    margin-bottom: 8px;
}

.source-item {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: border-color 0.15s;
}
.source-item:hover { border-color: #2563EB; }
.source-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}
.source-item-ref {
    font-size: 11px;
    color: #9CA3AF;
}
.source-item-download {
    color: #2563EB;
    text-decoration: none;
    font-weight: 500;
    margin-left: 6px;
}
.source-item-download:hover { color: #1D4ED8; text-decoration: underline; }
.source-item-content {
    font-size: 13px;
    color: #4B5563;
    margin-top: 6px;
    display: none;
}
.source-item.expanded .source-item-content { display: block; }

/* ── Login Page ──────────────────────────────────────────────── */
.login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #F9FAFB;
}

.login-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 40px 36px 32px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.login-avatar {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.2);
    border: 2px solid rgba(37, 99, 235, 0.3);
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #111827;
}

.login-subtitle {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 28px;
}

.login-form {
    text-align: left;
}

.login-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.login-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s;
    margin-bottom: 12px;
}
.login-input:focus { border-color: #2563EB; box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15); }

.login-btn {
    width: 100%;
    padding: 10px 16px;
    background: #2563EB;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
.login-btn:hover { background: #1D4ED8; }
.login-btn:disabled { background: #9CA3AF; cursor: not-allowed; }

.login-feedback {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}
.login-feedback-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.login-feedback-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

.login-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #9CA3AF;
    font-size: 13px;
}
.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid #E5E7EB;
}
.login-divider span { padding: 0 12px; }

.login-microsoft-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: #FFFFFF;
    color: #374151;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.login-microsoft-btn:hover { background: #F9FAFB; border-color: #9CA3AF; }

.login-footer {
    margin-top: 24px;
    font-size: 11px;
    color: #9CA3AF;
}

/* ── Unauthorized Page ───────────────────────────────────────── */
.unauthorized-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #F9FAFB;
}

.unauthorized-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 40px 36px 32px;
    width: 100%;
    max-width: 440px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.unauthorized-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

.unauthorized-text {
    font-size: 15px;
    color: #4B5563;
    margin-bottom: 8px;
    line-height: 1.6;
}

.unauthorized-text a { color: #2563EB; text-decoration: none; }
.unauthorized-text a:hover { text-decoration: underline; }

.unauthorized-reason {
    margin-top: 16px;
    padding: 10px 14px;
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    font-size: 14px;
}

.unauthorized-back {
    display: inline-block;
    margin-top: 24px;
    padding: 10px 24px;
    background: #2563EB;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
}
.unauthorized-back:hover { background: #1D4ED8; }

/* ── Prompts Management ──────────────────────────────────────────── */
.prompts-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.prompts-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #E5E7EB;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.prompts-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 13px;
    font-weight: 500;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.prompts-tab:hover { color: #111827; }
.prompts-tab.active {
    color: #2563EB;
    border-bottom-color: #2563EB;
}

.prompt-form {
    max-width: 800px;
}

.prompt-field {
    margin-bottom: 16px;
}

.prompt-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.prompt-optional {
    font-weight: 400;
    color: #9CA3AF;
}

.prompt-field input[type="text"],
.prompt-field input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}

.prompt-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 13px;
    font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s;
}

.prompt-field input:focus,
.prompt-field textarea:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.prompt-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.prompt-field-row .prompt-field {
    margin-bottom: 0;
}

.prompt-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
}

.prompt-save-btn {
    padding: 10px 24px;
    background: #2563EB;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
.prompt-save-btn:hover { background: #1D4ED8; }
.prompt-save-btn:disabled { background: #9CA3AF; cursor: not-allowed; }

.prompt-save-status {
    font-size: 13px;
    color: #059669;
}
.prompt-save-status.error {
    color: #991B1B;
}

/* ── X-Ray ───────────────────────────────────────────────────────── */
.xray-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.xray-subtitle { font-size: 13px; color: #6b7280; margin-top: 4px; }
.xray-legend { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.xray-legend-item { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #4B5563; white-space: nowrap; }
.xray-actions { display: flex; align-items: center; gap: 8px; }

.xray-section-select {
    min-width: 240px;
    max-width: 400px;
    padding: 8px 10px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}
.xray-section-select:focus { border-color: #2563EB; box-shadow: 0 0 0 2px rgba(37,99,235,0.15); }

.xray-reindex-btn {
    padding: 8px 20px;
    background: #2563EB;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.xray-reindex-btn:hover { background: #1D4ED8; }
.xray-reindex-btn:disabled { background: #9CA3AF; cursor: not-allowed; }

/* X-Ray Progress */
.xray-progress { padding: 12px 24px; }
.xray-progress-bar { height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; }
.xray-progress-fill { height: 100%; background: #2563EB; transition: width 0.3s; width: 0; }
.xray-progress span { display: block; margin-top: 6px; font-size: 13px; color: #6b7280; }

/* X-Ray Filters */
.xray-filters {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 24px 0;
}
.xray-filter-select {
    padding: 6px 10px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}
.xray-filter-btn {
    padding: 6px 14px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 13px;
    background: #FFFFFF;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
}
.xray-filter-btn:hover { border-color: #2563EB; color: #2563EB; }
.xray-filter-btn.active { background: #2563EB; color: #FFFFFF; border-color: #2563EB; }
.xray-search {
    padding: 6px 10px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    min-width: 180px;
}
.xray-search:focus { border-color: #2563EB; box-shadow: 0 0 0 2px rgba(37,99,235,0.15); }

/* X-Ray Score badges */
.xray-score {
    display: inline-block; min-width: 32px; text-align: center;
    padding: 2px 8px; border-radius: 6px;
    font-weight: 600; font-size: 13px;
}
.xray-score-good { background: #dcfce7; color: #166534; }
.xray-score-warn { background: #fef3c7; color: #92400e; }
.xray-score-bad { background: #fee2e2; color: #991b1b; }
.xray-score-na { background: #f3f4f6; color: #9ca3af; }

/* X-Ray Grid */
.xray-grid { padding: 0 24px 24px; overflow-y: auto; flex: 1; }
.xray-empty { color: #9CA3AF; font-size: 14px; font-style: italic; padding: 24px 0; }
.xray-grid table { width: 100%; border-collapse: collapse; }
.xray-grid th {
    text-align: left; padding: 10px 12px;
    border-bottom: 2px solid #e5e7eb;
    font-size: 12px; font-weight: 600; color: #6b7280;
    cursor: pointer; user-select: none; white-space: nowrap;
}
.xray-grid th:hover { color: #111827; }
.xray-grid td { padding: 10px 12px; border-bottom: 1px solid #f3f4f6; font-size: 13px; }
.xray-grid tr.xray-row:hover { background: #f9fafb; cursor: pointer; }
.xray-grid tr.xray-row-nocontext { color: #9ca3af; }
.xray-grid tr.xray-row-nocontext:hover { background: #f9fafb; cursor: pointer; }
.xray-grid .xray-desc { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* X-Ray Detail */
.xray-detail { padding: 24px; overflow-y: auto; flex: 1; }
.xray-detail-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px;
}
.xray-detail-title { font-size: 18px; font-weight: 700; }
.xray-detail-actions { display: flex; gap: 8px; }
.xray-back-btn {
    padding: 8px 16px;
    background: #F3F4F6;
    color: #374151;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}
.xray-back-btn:hover { background: #E5E7EB; }
.xray-reassess-btn {
    padding: 8px 16px;
    background: #2563EB;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}
.xray-reassess-btn:hover { background: #1D4ED8; }
.xray-reassess-btn:disabled { background: #9CA3AF; cursor: not-allowed; }

.xray-detail-section { margin-bottom: 20px; }
.xray-detail-section-title {
    font-size: 13px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; color: #6b7280; margin-bottom: 8px;
}

.xray-detail-card {
    background: #f9fafb; border-radius: 8px; padding: 16px; margin-bottom: 12px;
    border: 1px solid #e5e7eb;
}
.xray-detail-card-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px;
}
.xray-detail-card-title { font-size: 14px; font-weight: 600; }

.xray-collapsible { cursor: pointer; }
.xray-collapsible-content { display: none; margin-top: 8px; font-size: 13px; color: #4b5563; line-height: 1.6; }
.xray-collapsible.open .xray-collapsible-content { display: block; }
.xray-collapsible-toggle {
    font-size: 12px; color: #2563EB; cursor: pointer; margin-left: 8px;
}

.xray-warning {
    background: #fef3c7; color: #92400e; border: 1px solid #fde68a;
    border-radius: 6px; padding: 6px 10px; font-size: 12px; margin-top: 4px;
}

.xray-context-block {
    background: #f3f4f6; border-radius: 8px; padding: 12px;
    font-size: 12px; font-family: "SF Mono", "Fira Code", monospace;
    line-height: 1.5; max-height: 300px; overflow-y: auto;
    white-space: pre-wrap; word-break: break-word;
}

.xray-assessment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 1200px) { .xray-assessment-grid { grid-template-columns: 1fr; } }

.xray-assessment-card {
    background: #FFFFFF; border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px;
}
.xray-assessment-card .answer-content { font-size: 13px; }

/* X-Ray Detail Tabs */
.xray-detail-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.xray-detail-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.xray-detail-tab:hover { color: #111827; }
.xray-detail-tab.active {
    color: #2563EB;
    border-bottom-color: #2563EB;
}
.xray-detail-tab .xray-tab-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
}
.xray-detail-tab .xray-tab-score-good { background: #dcfce7; color: #166534; }
.xray-detail-tab .xray-tab-score-warn { background: #fef3c7; color: #92400e; }
.xray-detail-tab .xray-tab-score-bad { background: #fee2e2; color: #991b1b; }
.xray-detail-tab .xray-tab-score-na { background: #f3f4f6; color: #9ca3af; }

.xray-detail-tab-panel {
    display: none;
    animation: fadeIn 0.2s ease;
}
.xray-detail-tab-panel.active { display: block; }

.xray-spinner {
    display: inline-block; width: 14px; height: 14px;
    border: 2px solid #E5E7EB; border-top-color: #2563EB;
    border-radius: 50%; animation: spin 0.8s linear infinite;
    margin-left: 8px; vertical-align: middle;
}

/* ── Animations ───────────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes iconPulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(122, 190, 248, 0.5)); }
    50% { filter: drop-shadow(0 0 14px rgba(122, 190, 248, 0.8)); }
}

/* ── RFP ──────────────────────────────────────────────────────── */
.rfp-view { padding: 24px; flex: 1; overflow-y: auto; }
.rfp-section-title { font-size: 16px; font-weight: 700; color: #111827; }
.rfp-subtitle { font-size: 13px; color: #6B7280; margin-top: 4px; }
.rfp-counter { font-size: 14px; color: #6B7280; font-weight: 500; }

/* Upload dropzone */
.rfp-upload-area { max-width: 640px; }
.rfp-upload-dropzone {
    border: 2px dashed #D1D5DB;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #6B7280;
}
.rfp-upload-dropzone:hover,
.rfp-upload-dropzone.dragover {
    border-color: #2563EB;
    background: rgba(37, 99, 235, 0.04);
    color: #2563EB;
}
.rfp-upload-icon { width: 48px; height: 48px; margin-bottom: 12px; color: #9CA3AF; }
.rfp-upload-dropzone:hover .rfp-upload-icon { color: #2563EB; }
.rfp-upload-hint { font-size: 12px; color: #9CA3AF; margin-top: 8px; }

/* Error message */
.rfp-error {
    margin-top: 12px; padding: 10px 14px;
    background: #FEF2F2; color: #991B1B;
    border: 1px solid #FECACA; border-radius: 8px;
    font-size: 14px;
}

/* Buttons */
.rfp-btn-primary {
    padding: 8px 20px; background: #2563EB; color: #FFF;
    border: none; border-radius: 8px; font-size: 14px;
    font-weight: 500; cursor: pointer; transition: background 0.15s;
}
.rfp-btn-primary:hover { background: #1D4ED8; }
.rfp-btn-primary:disabled { background: #9CA3AF; cursor: not-allowed; }

.rfp-btn-secondary {
    padding: 8px 20px; background: #F3F4F6; color: #374151;
    border: 1px solid #D1D5DB; border-radius: 8px; font-size: 14px;
    font-weight: 500; cursor: pointer; transition: all 0.15s;
}
.rfp-btn-secondary:hover { background: #E5E7EB; }

/* Preview */
.rfp-preview-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.rfp-preview-actions { display: flex; gap: 8px; }
.rfp-questions-list { max-width: 640px; }
.rfp-question-item {
    padding: 10px 14px; border: 1px solid #E5E7EB;
    border-radius: 8px; margin-bottom: 6px; font-size: 14px;
    display: flex; gap: 12px; align-items: baseline;
}
.rfp-question-num { color: #9CA3AF; font-weight: 600; min-width: 28px; }

/* Progress */
.rfp-progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.rfp-progress-bar-container { max-width: 640px; margin-bottom: 12px; }
.rfp-progress-bar { height: 8px; background: #E5E7EB; border-radius: 4px; overflow: hidden; }
.rfp-progress-fill { height: 100%; background: #2563EB; transition: width 0.3s; width: 0; }
.rfp-status-text { font-size: 13px; color: #6B7280; }

/* Results table */
.rfp-results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.rfp-results-actions { display: flex; gap: 8px; }
.rfp-results-table-container { overflow-x: auto; }
.rfp-results-table { width: 100%; border-collapse: collapse; }
.rfp-results-table th {
    text-align: left; padding: 10px 12px;
    border-bottom: 2px solid #E5E7EB;
    font-size: 12px; font-weight: 600; color: #6B7280;
}
.rfp-results-table td {
    padding: 12px; border-bottom: 1px solid #F3F4F6;
    font-size: 13px; vertical-align: top;
}
.rfp-results-table tr:hover { background: #F9FAFB; }
.rfp-result-question { font-weight: 500; max-width: 300px; }
.rfp-result-answer { max-width: 500px; line-height: 1.6; }
.rfp-result-status { font-size: 12px; font-weight: 600; }
.rfp-result-status-answered { color: #059669; }
.rfp-result-status-error { color: #991B1B; }
.rfp-result-status-no_answer { color: #D97706; }
.rfp-result-status-pending { color: #9CA3AF; }

/* Expandable row */
.rfp-result-row { cursor: pointer; }
.rfp-result-detail { display: none; }
.rfp-result-detail.open { display: table-row; }
.rfp-result-detail td { padding: 16px 12px; background: #F9FAFB; }
.rfp-result-detail .answer-content { font-size: 13px; line-height: 1.7; }

/* Runs list */
.rfp-runs-list { margin-top: 32px; max-width: 640px; }
.rfp-run-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px; border: 1px solid #E5E7EB;
    border-radius: 8px; margin-bottom: 6px;
    cursor: pointer; transition: border-color 0.15s;
}
.rfp-run-item:hover { border-color: #2563EB; }
.rfp-run-filename { font-size: 14px; font-weight: 500; }
.rfp-run-meta { font-size: 12px; color: #9CA3AF; }
.rfp-run-badge {
    font-size: 11px; font-weight: 600; padding: 2px 8px;
    border-radius: 4px;
}
.rfp-run-badge-completed { background: #DCFCE7; color: #166534; }
.rfp-run-badge-running { background: #DBEAFE; color: #1E40AF; }
.rfp-run-badge-failed { background: #FEE2E2; color: #991B1B; }
.rfp-run-badge-pending { background: #F3F4F6; color: #6B7280; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 900px) {
    .nav-panel {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
        z-index: 200;
        transition: left 0.25s ease;
    }
    .nav-panel.open {
        left: 0;
    }
}
