/* ── Design tokens ────────────────────────────────────────── */
:root {
    --clr-pass:           #16a34a;
    --clr-warn:           #d97706;
    --clr-fail:           #dc2626;
    --clr-border:         #e5e7eb;
    --clr-bg-secondary:   #f9fafb;
    --clr-text-secondary: #6b7280;
    --clr-accent:         #4f46e5;
    --clr-accent-hover:   #4338ca;
}

/* ── Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 16px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #111827;
    background: #fff;
}

body { margin: 0; }

html { scroll-behavior: smooth; }

a { color: var(--clr-accent); }
a:hover { color: var(--clr-accent-hover); }

/* ── Navbar ────────────────────────────────────────────────── */
.archrb-nav {
    border-bottom: 1px solid var(--clr-border);
    background: #fff;
}

.archrb-nav-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.archrb-logo {
    font-weight: 700;
    font-size: 1.05rem;
    color: #111827;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 7px;
}

.archrb-logo:hover { color: #111827; text-decoration: none; }

/* ── Page container ────────────────────────────────────────── */
.archrb-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn-archrb-primary {
    display: inline-block;
    background: var(--clr-accent);
    color: #fff;
    border: none;
    padding: 9px 20px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}

.btn-archrb-primary:hover { background: var(--clr-accent-hover); color: #fff; text-decoration: none; }

.btn-archrb-secondary {
    display: inline-block;
    background: #fff;
    color: #374151;
    border: 1px solid var(--clr-border);
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}

.btn-archrb-secondary:hover { background: var(--clr-bg-secondary); color: #111827; text-decoration: none; }

.btn-full { width: 100%; text-align: center; }

/* ── Auth card ─────────────────────────────────────────────── */
.auth-card {
    max-width: 420px;
    margin: 48px auto;
    padding: 32px;
    border: 1px solid var(--clr-border);
    border-radius: 10px;
    background: #fff;
}

.auth-card h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 24px;
    color: #111827;
}

/* ── Form elements ─────────────────────────────────────────── */
.field { margin-bottom: 16px; }

.field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: #374151;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="tel"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--clr-border);
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    color: #111827;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
    outline: none;
    border-color: var(--clr-accent);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

.field-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.field-check input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.field-check label { font-size: 0.875rem; color: #374151; margin: 0; cursor: pointer; }

/* ── Alerts ────────────────────────────────────────────────── */
.alert {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.875rem;
}

.alert-danger  { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: #dcfce7; color: #14532d; border: 1px solid #86efac; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* Hide the alert wrapper when there are no errors; show when there are.
   The asp-validation-summary tag helper switches between these two classes
   automatically — both client-side (jQuery Unobtrusive) and server-side. */
.validation-summary-valid   { display: none; }
.validation-summary-errors  { display: block; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }

/* ── Verdict & rating badges ───────────────────────────────── */
.verdict-badge,
.rating-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-pass          { background: #dcfce7; color: var(--clr-pass); }
.badge-warn          { background: #fef3c7; color: var(--clr-warn); }
.badge-fail          { background: #fee2e2; color: var(--clr-fail); }
.badge-grey          { background: #f3f4f6; color: #6b7280; }
.badge-consideration { background: #dbeafe; color: #1d4ed8; }

/* ── Governance decision badges ────────────────────────────── */
.decision-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.decision-badge-approved    { background: #dbeafe; color: #1d4ed8; }
.decision-badge-conditions  { background: #ede9fe; color: #6d28d9; }
.decision-badge-rejected    { background: #f3f4f6; color: #374151; }

/* ── Plan gate ─────────────────────────────────────────────── */
.plan-gate {
    border: 1px dashed var(--clr-border);
    border-radius: 8px;
    padding: 20px 16px;
    background: var(--clr-bg-secondary);
    text-align: center;
    color: var(--clr-text-secondary);
}

.plan-gate-icon { font-size: 1.4rem; margin-bottom: 6px; }
.plan-gate-title { font-weight: 600; color: #374151; margin-bottom: 4px; font-size: 0.9rem; }
.plan-gate-link  { font-size: 0.8rem; color: var(--clr-accent); }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
    text-align: center;
    padding: 80px 0 56px;
}

.hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 16px;
    color: #111827;
}

.hero p {
    font-size: 1.1rem;
    color: var(--clr-text-secondary);
    max-width: 500px;
    margin: 0 auto 36px;
    line-height: 1.6;
}

.hero-cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ── Section ───────────────────────────────────────────────── */
.section { padding: 56px 0; }
.section-alt { background: var(--clr-bg-secondary); }

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 24px;
}

/* ── 3-column feature grid ─────────────────────────────────── */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 640px) {
    .feature-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.9rem; }
}

.feature-card {
    padding: 24px;
    background: #fff;
    border: 1px solid var(--clr-border);
    border-radius: 8px;
}

.feature-card .step-num {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--clr-accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.feature-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 6px;
    color: #111827;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--clr-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ── Auth footer links ─────────────────────────────────────── */
.auth-links {
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--clr-text-secondary);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ── Access denied ─────────────────────────────────────────── */
.error-page {
    max-width: 480px;
    margin: 80px auto;
    text-align: center;
}

.error-page .error-icon { font-size: 3rem; margin-bottom: 16px; }
.error-page h1 { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.error-page p  { color: var(--clr-text-secondary); margin-bottom: 24px; }

/* ── Page header ────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.page-header h1 {
    font-size: 1.45rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.page-header-meta {
    font-size: 0.82rem;
    color: var(--clr-text-secondary);
    margin-top: 3px;
}

/* ── Stat cards ─────────────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

@media (max-width: 640px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }

.stat-card {
    border: 1px solid var(--clr-border);
    border-radius: 8px;
    padding: 16px 18px;
    background: #fff;
}

.stat-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--clr-text-secondary);
    margin-bottom: 6px;
}

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
}

.stat-card-value.stat-pass    { color: var(--clr-pass); }
.stat-card-value.stat-warn    { color: var(--clr-warn); }
.stat-card-value.stat-fail    { color: var(--clr-fail); }

/* ── Review list ────────────────────────────────────────────── */
.review-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.review-list-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.review-list {
    border: 1px solid var(--clr-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}

.review-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--clr-border);
    text-decoration: none;
    color: inherit;
    transition: background 0.12s;
}

.review-row:last-child { border-bottom: none; }
.review-row:hover { background: var(--clr-bg-secondary); text-decoration: none; color: inherit; }

.review-row-icon { font-size: 1.1rem; margin-right: 12px; flex-shrink: 0; }

.review-row-body { flex: 1; min-width: 0; }

.review-row-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.review-row-meta {
    font-size: 0.78rem;
    color: var(--clr-text-secondary);
    margin-top: 2px;
}

.review-row-badge { flex-shrink: 0; margin-left: 14px; display: flex; align-items: center; gap: 4px; }

.review-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--clr-text-secondary);
    font-size: 0.9rem;
}

/* ── Upgrade banner ─────────────────────────────────────────── */
.upgrade-banner {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.upgrade-banner-text { font-size: 0.875rem; color: #92400e; }
.upgrade-banner-text strong { color: #78350f; }

.review-counter-bar {
    font-size: 0.875rem;
    color: var(--clr-text-secondary);
    margin-bottom: 20px;
}

/* ── New review form ────────────────────────────────────────── */
.field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--clr-border);
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    color: #111827;
    resize: vertical;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.field textarea:focus {
    outline: none;
    border-color: var(--clr-accent);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

.upload-zone {
    border: 2px dashed var(--clr-border);
    border-radius: 8px;
    padding: 20px 16px;
    text-align: center;
    background: var(--clr-bg-secondary);
    cursor: pointer;
    transition: border-color 0.15s;
    margin-bottom: 8px;
}

.upload-zone:hover { border-color: var(--clr-accent); }
.upload-zone input[type="file"] { display: none; }
.upload-zone-icon { font-size: 1.3rem; margin-bottom: 4px; color: var(--clr-text-secondary); }
.upload-zone-label { font-size: 0.875rem; color: #374151; font-weight: 500; }
.upload-zone-hint  { font-size: 0.78rem; color: var(--clr-text-secondary); margin-top: 3px; }
.upload-zone-file  { font-size: 0.82rem; color: var(--clr-accent); margin-top: 6px; font-weight: 500; }

.guardrail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

@media (max-width: 640px) { .guardrail-grid { grid-template-columns: 1fr; } }

.guardrail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--clr-border);
    border-radius: 6px;
    background: #fff;
    font-size: 0.875rem;
}

.guardrail-item.guardrail-locked {
    background: var(--clr-bg-secondary);
    color: var(--clr-text-secondary);
}

.guardrail-item input[type="checkbox"] { width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.guardrail-item label { flex: 1; margin: 0; cursor: pointer; }
.guardrail-item.guardrail-locked label { cursor: default; }

/* ── Guardrail tooltip icon ─────────────────────────────────── */
.guardrail-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #9ca3af;
    color: #fff;
    font-size: 0.6rem;
    font-style: normal;
    font-weight: 700;
    cursor: default;
    position: relative;
    margin-left: 4px;
    flex-shrink: 0;
    vertical-align: middle;
    line-height: 1;
}

.guardrail-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.45;
    padding: 7px 10px;
    border-radius: 5px;
    white-space: normal;
    width: 240px;
    text-align: left;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 100;
}

.guardrail-tooltip:hover::after {
    opacity: 1;
}

/* Prevent tooltip clipping on rightmost column in the guardrail grid */
.guardrail-item:nth-child(even) .guardrail-tooltip::after {
    left: auto;
    right: 0;
    transform: none;
}

/* Review disclaimer */
.review-disclaimer {
    font-size: 0.78rem;
    color: var(--clr-text-secondary);
    text-align: center;
    margin: 32px 0 16px;
    padding: 0 8px;
}

/* Standing considerations section */
.standing-considerations {
    background: var(--clr-bg-secondary);
    border: 1px solid var(--clr-border);
    border-radius: 8px;
    padding: 20px 22px;
    margin-top: 28px;
}

.standing-considerations h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 6px;
}

.standing-considerations .standing-intro {
    font-size: 0.82rem;
    color: var(--clr-text-secondary);
    margin: 0 0 16px;
}

.standing-item {
    border-top: 1px solid var(--clr-border);
    padding: 12px 0;
}

.standing-item:first-of-type {
    border-top: none;
    padding-top: 0;
}

.standing-item-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.standing-item-observation {
    font-size: 0.875rem;
    color: #4b5563;
}

.guardrail-pro-badge {
    font-size: 0.65rem;
    font-weight: 700;
    background: #e0e7ff;
    color: #4338ca;
    padding: 1px 6px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.form-actions { display: flex; gap: 10px; margin-top: 24px; }

/* ── Dimension card ─────────────────────────────────────────── */
.dim-card {
    border: 1px solid var(--clr-border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 10px;
    background: #fff;
}

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

.dim-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
}

.dim-finding {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.55;
    margin-bottom: 12px;
}

.risk-list { list-style: none; padding: 0; margin: 0 0 12px; }

.risk-item {
    font-size: 0.82rem;
    color: #374151;
    padding: 3px 0;
    display: flex;
    gap: 6px;
}

.risk-item::before { content: "⚠"; color: var(--clr-warn); flex-shrink: 0; }

/* ── Comment thread ─────────────────────────────────────────── */
.comment-section-title {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--clr-text-secondary);
    margin: 12px 0 6px;
}

.comment {
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.comment:last-of-type { border-bottom: none; }

.comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--clr-text-secondary);
    margin-bottom: 4px;
}

.comment-author { font-weight: 500; color: #374151; }

.comment-body {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.5;
}

.comment.resolved { opacity: 0.55; }
.comment.resolved .comment-body { text-decoration: line-through; }
.comment-resolved-label { font-size: 0.73rem; color: var(--clr-text-secondary); font-style: italic; }

.comment-form {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.comment-form textarea {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--clr-border);
    border-radius: 6px;
    font-size: 0.82rem;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--clr-accent);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

.btn-resolve {
    font-size: 0.75rem;
    padding: 3px 10px;
    border: 1px solid var(--clr-border);
    border-radius: 6px;
    background: #fff;
    color: var(--clr-text-secondary);
    cursor: pointer;
    white-space: nowrap;
}

.btn-resolve:hover { background: var(--clr-bg-secondary); }

/* ── Review detail header ───────────────────────────────────── */
.review-detail-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--clr-border);
}

.review-detail-header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.review-detail-meta {
    font-size: 0.82rem;
    color: var(--clr-text-secondary);
}

.summary-block {
    background: var(--clr-bg-secondary);
    border: 1px solid var(--clr-border);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 20px;
}

.summary-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--clr-text-secondary);
    margin-bottom: 6px;
}

/* ── Decision panel ─────────────────────────────────────────── */
.decision-panel {
    border: 1px solid var(--clr-border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-top: 1.5rem;
    background: #fff;
}

.decision-panel h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 14px;
}

.decision-radio-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

.decision-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
}

.decision-radio input[type="radio"] { width: 16px; height: 16px; cursor: pointer; }

.decision-recorded {
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.decision-approved   { background: #dcfce7; border: 1px solid #bbf7d0; }
.decision-conditions { background: #fef3c7; border: 1px solid #fde68a; }
.decision-rejected   { background: #fee2e2; border: 1px solid #fecaca; }

.decision-recorded-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.decision-meta {
    font-size: 0.78rem;
    color: var(--clr-text-secondary);
    margin-top: 4px;
}

.decision-note {
    font-size: 0.85rem;
    color: #374151;
    margin-top: 6px;
    font-style: italic;
}

/* ── Section actions bar ────────────────────────────────────── */
.actions-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 24px 0;
    padding: 16px 0;
    border-top: 1px solid var(--clr-border);
    border-bottom: 1px solid var(--clr-border);
}

/* ═══════════════════════════════════════════════════════════════
   MODULE 8 — SETTINGS PAGES
   ═══════════════════════════════════════════════════════════════ */

/* ── Settings layout (sidebar + content) ───────────────────── */
.settings-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.settings-nav {
    flex-shrink: 0;
    width: 168px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 4px;
}

.settings-nav-link {
    display: block;
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--clr-text-secondary);
    text-decoration: none;
    transition: background 0.1s, color 0.1s;
}

.settings-nav-link:hover  { background: var(--clr-bg-secondary); color: #111; }
.settings-nav-link.active { background: var(--clr-bg-secondary); color: #111; font-weight: 600; }

.settings-content { flex: 1; min-width: 0; }

/* ── Settings sections ──────────────────────────────────────── */
.settings-section {
    border: 1px solid var(--clr-border);
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 16px;
}

.settings-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--clr-text-secondary);
    margin: 0 0 14px 0;
}

.settings-actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; }

.settings-info-note {
    font-size: 0.82rem;
    color: var(--clr-text-secondary);
    margin-top: 12px;
}

.settings-upgrade-link {
    font-size: 0.8rem;
    margin-left: 8px;
    color: var(--clr-accent);
    text-decoration: none;
}

/* ── Field components (extended for settings) ───────────────── */
.field-static {
    font-size: 0.9rem;
    padding: 8px 0;
    color: #111;
}

.field-hint {
    font-size: 0.8rem;
    color: var(--clr-text-secondary);
    margin-top: 6px;
}

.field-hint-inline {
    font-size: 0.78rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--clr-text-secondary);
}

.field-select {
    width: 100%;
    max-width: 320px;
    padding: 8px 10px;
    border: 1px solid var(--clr-border);
    border-radius: 6px;
    font-size: 0.875rem;
    background: #fff;
}

.field-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--clr-border);
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.field-textarea:focus, .field-select:focus {
    outline: none;
    border-color: var(--clr-accent);
    box-shadow: 0 0 0 2px rgba(99,102,241,0.15);
}

/* ── Radio & checkbox groups ────────────────────────────────── */
.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-label, .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    cursor: pointer;
}

.radio-label input, .checkbox-label input { cursor: pointer; }

/* ── Onboarding banner ──────────────────────────────────────── */
.onboarding-banner {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    color: #1e40af;
}

.onboarding-banner-icon { font-size: 1.4rem; flex-shrink: 0; }

/* ── Page subheading ─────────────────────────────────────────── */
.page-subheading {
    font-size: 0.875rem;
    color: var(--clr-text-secondary);
    margin: 4px 0 0 0;
}

/* ── Guardrail rows ─────────────────────────────────────────── */
.guardrail-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.guardrail-row {
    border-top: 1px solid var(--clr-border);
    padding: 12px 0;
}
.guardrail-row:first-of-type { border-top: none; }

.guardrail-row-locked { opacity: 0.55; }

.guardrail-row-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.guardrail-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
}

.guardrail-name-inactive {
    text-decoration: line-through;
    color: var(--clr-text-secondary);
}

.guardrail-row-actions { display: flex; gap: 8px; }

.guardrail-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 4px;
    line-height: 1;
}

.guardrail-toggle-on  { color: var(--clr-pass); }
.guardrail-toggle-off { color: #d1d5db; }
.guardrail-toggle:disabled { cursor: not-allowed; }

.btn-guardrail-edit {
    background: none;
    border: 1px solid var(--clr-border);
    border-radius: 5px;
    padding: 3px 10px;
    font-size: 0.78rem;
    cursor: pointer;
    color: var(--clr-text-secondary);
}
.btn-guardrail-edit:hover { border-color: var(--clr-accent); color: var(--clr-accent); }

.guardrail-guidance-preview {
    font-size: 0.8rem;
    color: var(--clr-text-secondary);
    margin-top: 4px;
    margin-left: 28px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.guardrail-edit-form {
    margin-top: 12px;
    margin-left: 28px;
    padding: 16px;
    background: var(--clr-bg-secondary);
    border-radius: 6px;
}

.guardrail-edit-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.btn-sm { padding: 5px 12px; font-size: 0.8rem; }

/* ── Billing page ───────────────────────────────────────────── */
.billing-current-plan {
    background: var(--clr-bg-secondary);
    border-radius: 6px;
    padding: 16px 20px;
}

.billing-plan-name { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }

.billing-usage-label { font-size: 0.85rem; color: var(--clr-text-secondary); margin-bottom: 6px; }

.billing-progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 4px;
}

.billing-progress-fill {
    height: 100%;
    background: var(--clr-accent);
    border-radius: 9999px;
    transition: width 0.3s;
}

.billing-usage-pct { font-size: 0.75rem; color: var(--clr-text-secondary); }

.billing-plan-grid-scroll { /* scroll wrapper retained; no overflow needed at this width */ }

.billing-plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    align-items: stretch;
}

.billing-plan-card {
    border: 1px solid var(--clr-border);
    border-radius: 8px;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.billing-plan-featured {
    border-color: var(--clr-accent);
    box-shadow: 0 0 0 1px var(--clr-accent);
}

.billing-plan-current { background: var(--clr-bg-secondary); }

.billing-plan-header { }

.billing-plan-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.billing-plan-price {
    font-size: 1.5rem;
    font-weight: 700;
}

.billing-plan-price span { font-size: 0.85rem; font-weight: 400; color: var(--clr-text-secondary); }

.billing-plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    font-size: 0.78rem;
    color: var(--clr-text-secondary);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.billing-plan-features li {
    overflow-wrap: break-word;
    word-break: normal;
    line-height: 1.4;
}

.billing-plan-features li::before { content: ""; }

/* Neutral info rows (reviews, doc limit, history, seats) */
.billing-plan-features li.feat-neutral {
    color: #374151;
}
.billing-plan-features li.feat-neutral::before {
    content: "";
}

.feat-check { color: var(--clr-pass); font-weight: 600; }
.feat-cross  { color: #9ca3af; font-weight: 400; }

.billing-popular-badge {
    font-size: 0.68rem;
    font-weight: 600;
    background: var(--clr-accent);
    color: #fff;
    padding: 2px 6px;
    border-radius: 9999px;
}

.billing-current-label {
    display: block;
    font-size: 0.78rem;
    color: var(--clr-text-secondary);
    text-align: center;
    padding-top: 4px;
}

/* ── Navbar text link (Pricing) ─────────────────────────────── */
.archrb-nav-text-link {
    font-size: 0.82rem;
    color: var(--clr-text-secondary);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    transition: color 0.15s;
}
.archrb-nav-text-link:hover { color: #111; text-decoration: none; }

/* ── Landing page pricing section ───────────────────────────── */
.pricing-plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 640px) {
    .pricing-plan-grid { grid-template-columns: 1fr; }
}

.pricing-plan-card {
    border: 1px solid var(--clr-border);
    border-radius: 10px;
    padding: 28px 24px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pricing-plan-card .billing-plan-features {
    font-size: 0.875rem;
    gap: 7px;
}

.pricing-cta { margin-top: auto; }

/* ── Alert colours (success) ────────────────────────────────── */
.alert-success {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

/* ── Export page ─────────────────────────────────────────────── */
.export-page {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.export-card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.export-card-header {
    border-bottom: 1px solid var(--clr-border);
    padding-bottom: 1rem;
}

.export-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.export-subtitle {
    font-size: 0.875rem;
    color: var(--clr-text-secondary);
    margin: 0;
}

.export-includes-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--clr-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.5rem;
}

.export-includes-list {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    color: var(--clr-text);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.export-format-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.export-format-group {
    display: flex;
    flex-direction: column;
}

.export-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding-top: 0.5rem;
}

/* ── Processing overlay ─────────────────────────────────────── */
.processing-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.45);
    align-items: center;
    justify-content: center;
}

.processing-overlay.active {
    display: flex;
}

.processing-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    padding: 2.5rem 3rem;
    text-align: center;
    max-width: 360px;
    width: 90%;
}

.processing-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--clr-border);
    border-top-color: var(--clr-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1.25rem;
}

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

.processing-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem;
}

.processing-subtitle {
    font-size: 0.875rem;
    color: var(--clr-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ── Processing overlay — error state ───────────────────────── */
.processing-error-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fee2e2;
    color: #dc2626;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 52px;
    text-align: center;
    margin: 0 auto 1.25rem;
}

.processing-title-error {
    font-size: 1.1rem;
    font-weight: 600;
    color: #dc2626;
    margin: 0 0 0.5rem;
}

.processing-dismiss {
    margin-top: 1.25rem;
    padding: 0.45rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--clr-border);
    border-radius: 6px;
    background: #fff;
    color: #374151;
    cursor: pointer;
}

.processing-dismiss:hover {
    background: var(--clr-bg-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   MODULE 11 — FEEDBACK FAB + MODAL
   ═══════════════════════════════════════════════════════════════ */

/* ── Floating action button ─────────────────────────────────── */
.feedback-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--clr-accent);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.1s;
}

.feedback-fab:hover {
    background: var(--clr-accent-hover);
    transform: scale(1.06);
}

/* ── Modal backdrop ─────────────────────────────────────────── */
.feedback-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.4);
    align-items: center;
    justify-content: center;
}

/* ── Modal card ─────────────────────────────────────────────── */
.feedback-modal-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 420px;
    padding: 1.75rem;
}

.feedback-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1.25rem;
}

.feedback-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--clr-text-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}

.feedback-modal-close:hover { color: #111827; background: var(--clr-bg-secondary); }

.feedback-category-group {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.35rem;
}

.feedback-cat-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.feedback-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* ═══════════════════════════════════════════════════════════════
   MODULE 12 — ADMIN AREA
   ═══════════════════════════════════════════════════════════════ */

/* ── Admin top nav ──────────────────────────────────────────── */
.admin-nav {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--clr-border);
    padding-bottom: 4px;
    flex-wrap: wrap;
}

.admin-nav-link {
    padding: 6px 14px;
    font-size: 0.875rem;
    text-decoration: none;
    color: var(--clr-text-secondary);
    border-radius: 6px;
    transition: background 0.1s, color 0.1s;
}

.admin-nav-link:hover  { color: #111827; background: var(--clr-bg-secondary); text-decoration: none; }
.admin-nav-link.active { color: var(--clr-accent); background: #ede9fe; font-weight: 600; }

/* ── Summary cards grid ─────────────────────────────────────── */
.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.admin-summary-card {
    display: block;
    border: 1px solid var(--clr-border);
    border-radius: 8px;
    padding: 18px 20px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s;
}

.admin-summary-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
}

.admin-summary-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.admin-summary-label {
    font-size: 0.78rem;
    color: var(--clr-text-secondary);
    margin-top: 6px;
    line-height: 1.4;
}

/* Coloured card variants */
.admin-card-warn                        { border-color: #fde68a; background: #fffbeb; }
.admin-card-warn .admin-summary-value   { color: var(--clr-warn); }
.admin-card-info                        { border-color: #bfdbfe; background: #eff6ff; }
.admin-card-info .admin-summary-value   { color: #1d4ed8; }

/* ── Aggregate stats bar ─────────────────────────────────────── */
.admin-stats-bar {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    padding: 12px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--clr-border);
}

.admin-stat { font-size: 0.875rem; color: #374151; }
.admin-stat strong { font-weight: 600; }

/* ── Filter bar ─────────────────────────────────────────────── */
.admin-filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.admin-filter-bar label          { font-size: 0.875rem; color: #374151; display: flex; align-items: center; gap: 6px; }
.admin-filter-bar select,
.admin-filter-bar input[type=text] {
    font-size: 0.875rem;
    padding: 5px 10px;
    border: 1px solid var(--clr-border);
    border-radius: 6px;
    background: #fff;
}

/* ── Data table ─────────────────────────────────────────────── */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table th {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 2px solid var(--clr-border);
    color: var(--clr-text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.admin-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--clr-border);
    vertical-align: top;
}

.admin-table tbody tr:hover { background: var(--clr-bg-secondary); }

.admin-table .mono {
    font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
    font-size: 0.8rem;
}

/* Stack trace block inside <details> */
.stack-trace {
    font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
    font-size: 0.75rem;
    white-space: pre-wrap;
    word-break: break-all;
    background: var(--clr-bg-secondary);
    border-radius: 4px;
    padding: 10px;
    margin-top: 6px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--clr-border);
    color: #374151;
}

/* ── Status badges ───────────────────────────────────────────── */
.admin-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.admin-badge-success { background: #dcfce7; color: var(--clr-pass); }
.admin-badge-fail    { background: #fee2e2; color: var(--clr-fail); }
.admin-badge-unread  { background: #dbeafe; color: #1d4ed8; }
.admin-badge-read    { background: var(--clr-bg-secondary); color: var(--clr-text-secondary); }

/* ── Pagination ──────────────────────────────────────────────── */
.admin-pagination {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 16px;
    font-size: 0.875rem;
}

/* ── Acceptance cross-tab table ─────────────────────────────── */
.acceptance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    margin-top: 16px;
}

.acceptance-table th,
.acceptance-table td {
    padding: 10px 16px;
    border: 1px solid var(--clr-border);
    text-align: center;
}

.acceptance-table th {
    background: var(--clr-bg-secondary);
    font-weight: 600;
    font-size: 0.82rem;
}

.acceptance-table td:first-child { text-align: left; }
.acceptance-table tfoot td       { background: var(--clr-bg-secondary); font-weight: 600; }

/* Highlight cells where human decision diverges from the verdict */
.acceptance-cell-highlight { background: #fffbeb; }

/* ── Registration — account type selector ──────────────────── */
.reg-account-type-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reg-account-type-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--clr-border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s;
}

.reg-account-type-label:has(input:checked) {
    border-color: var(--clr-accent);
    background: #f5f3ff;
}

.reg-account-type-label input[type="radio"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.reg-account-type-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reg-account-type-hint {
    font-size: 0.8rem;
    color: var(--clr-text-secondary);
}

/* ── Registration — join-existing-org prompt ───────────────── */
.reg-join-prompt {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: center;
}

.reg-join-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.reg-join-title {
    font-weight: 600;
    font-size: 1rem;
    margin: 0 0 6px;
}

.reg-join-body {
    font-size: 0.875rem;
    color: #1e40af;
    margin: 0;
}

.reg-join-actions {
    margin-top: 16px;
}

/* ── Pending verification / approval holding page ──────────── */
.pending-card {
    text-align: center;
}

.pending-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.pending-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 12px;
}

.pending-body {
    font-size: 0.9rem;
    color: var(--clr-text-secondary);
    margin: 0 0 12px;
    line-height: 1.6;
}

/* ── Success alert ─────────────────────────────────────────── */
.alert-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 6px;
    color: #15803d;
    padding: 10px 14px;
    font-size: 0.875rem;
}

/* ── Solution Provider: client selector on New Review ───────── */
.client-guardrail-hint {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    color: #1d4ed8;
    font-size: 0.82rem;
    padding: 8px 12px;
    margin-bottom: 18px;
}

/* ── Dashboard: client filter ────────────────────────────────── */
.review-list-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.review-list-header-left h2 { margin: 0; }

.client-filter-form { display: flex; align-items: center; }

.client-filter-select {
    padding: 5px 10px;
    border: 1px solid var(--clr-border);
    border-radius: 6px;
    font-size: 0.82rem;
    background: #fff;
    color: #111827;
    cursor: pointer;
}

.client-filter-select:focus {
    outline: none;
    border-color: var(--clr-accent);
    box-shadow: 0 0 0 2px rgba(99,102,241,0.15);
}

/* ── Settings: client management page — table expansion ─────── */
.client-panel-row { background: var(--clr-bg-secondary); }

.client-panel-cell {
    padding: 20px 24px;
    border-top: none;
}

.client-panel-content { /* shown/hidden by JS */ }

/* ── Settings: client management page (legacy card layout) ──── */
.client-item {
    border: 1px solid var(--clr-border);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.client-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--clr-bg-secondary);
    border-bottom: 1px solid var(--clr-border);
}

.client-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #111827;
}

.client-item-meta {
    font-size: 0.8rem;
    color: var(--clr-text-secondary);
}

.client-section {
    border-bottom: 1px solid var(--clr-border);
}

.client-section:last-of-type { border-bottom: none; }

.client-section-title {
    padding: 12px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    user-select: none;
    list-style: none;
}

.client-section-title::-webkit-details-marker { display: none; }

.client-section-title::before {
    content: '▶';
    display: inline-block;
    margin-right: 8px;
    font-size: 0.65rem;
    color: var(--clr-text-secondary);
    transition: transform 0.15s;
}

details[open] > .client-section-title::before { transform: rotate(90deg); }

.client-section-form {
    padding: 16px 20px 20px;
    border-top: 1px solid var(--clr-border);
}

.client-item-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--clr-border);
    background: #fff9f9;
}

/* Danger button */
.btn-archrb-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: #fff;
    color: var(--clr-fail);
    border: 1px solid var(--clr-fail);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.btn-archrb-danger:hover {
    background: #fef2f2;
    color: var(--clr-fail);
}

/* ── Expiry banner ───────────────────────────────────────────── */
.expiry-banner {
    background: #fef3c7;
    border-bottom: 1px solid #d97706;
    color: #92400e;
    padding: 10px 24px;
    font-size: 0.875rem;
    text-align: center;
}
.expiry-banner a { color: #92400e; font-weight: 600; text-decoration: underline; }

/* ── Dev environment banner ──────────────────────────────────── */
.dev-env-banner {
    background: #1e3a5f;
    color: #93c5fd;
    border-bottom: 2px solid #2563eb;
    padding: 6px 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.03em;
}

/* ── Billing info message (non-error) ────────────────────────── */
.billing-info-message {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 0.875rem;
    margin-bottom: 16px;
}

/* ── Security page ───────────────────────────────────────────── */
.security-page {
    max-width: 680px;
    margin: 48px auto 64px;
}

.security-headline {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.5;
    border-left: 4px solid var(--clr-accent);
    padding: 16px 20px;
    background: #f5f3ff;
    border-radius: 0 8px 8px 0;
    margin-bottom: 40px;
}

.security-section {
    margin-bottom: 36px;
}

.security-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--clr-text-secondary);
    margin-bottom: 12px;
}

.security-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.security-list li {
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.6;
    padding: 8px 0 8px 20px;
    position: relative;
    border-bottom: 1px solid var(--clr-border);
}

.security-list li:first-child { border-top: 1px solid var(--clr-border); }

.security-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--clr-accent);
    font-weight: 700;
    font-size: 0.8rem;
}

.security-contact {
    font-size: 0.9rem;
    color: var(--clr-text-secondary);
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--clr-border);
}

.security-contact a {
    color: var(--clr-accent);
    text-decoration: none;
}

.security-contact a:hover { text-decoration: underline; }

/* ── Landing page footer ─────────────────────────────────────── */
.landing-footer {
    margin: 0 -24px;
    padding: 20px 24px;
    border-top: 1px solid var(--clr-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--clr-text-secondary);
}

.landing-footer a {
    color: var(--clr-text-secondary);
    text-decoration: none;
}

.landing-footer a:hover {
    color: var(--clr-accent);
    text-decoration: underline;
}

.landing-footer-sep {
    color: var(--clr-border);
    user-select: none;
}

/* ── Admin: plan override select ─────────────────────────────── */
.admin-plan-select {
    padding: 4px 8px;
    border: 1px solid var(--clr-border);
    border-radius: 4px;
    font-size: 0.82rem;
    background: #fff;
    color: #111827;
}

/* ── Admin: deactivated org row ──────────────────────────────── */
.org-row-deactivated td { opacity: 0.5; }
.org-row-deactivated td:last-child { opacity: 1; }  /* keep action buttons fully visible */

/* ── Admin: deactivated/suspended badge ──────────────────────── */
.admin-badge-deactivated {
    background: #e5e7eb;
    color: #6b7280;
}

/* ── Admin: feedback row expansion ─────────────────────────────── */
.fb-data-row { cursor: pointer; }
.fb-panel-row { background: var(--clr-bg-secondary); }
.fb-detail-panel { padding: 16px 20px; }
.fb-detail-body {
    font-size: 0.9rem;
    color: #111827;
    white-space: pre-wrap;
    line-height: 1.6;
    margin-bottom: 14px;
}
.fb-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    font-size: 0.8rem;
    color: var(--clr-text-secondary);
}

/* ── Admin: email outbox detail panel ───────────────────────────── */
.outbox-row:hover td { background: var(--clr-bg-secondary); }
.outbox-detail-panel {
    padding: 14px 18px;
    background: #f9fafb;
    border-top: 1px solid var(--clr-border);
    border-bottom: 1px solid var(--clr-border);
}
.outbox-detail-error {
    margin-bottom: 10px;
    padding: 8px 12px;
    background: #fee2e2;
    border-left: 3px solid var(--clr-fail);
    border-radius: 4px;
    font-size: 0.82rem;
    color: #991b1b;
}
.outbox-detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--clr-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}
.outbox-detail-body {
    max-height: 320px;
    overflow-y: auto;
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--clr-border);
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 0.8rem;
    line-height: 1.5;
}
