/* ============================================================================
 * Bleedpoint dashboard — app.css
 * Phase 8.1
 *
 * Single stylesheet. No external imports (strict CSP forbids them anyway).
 * Self-hosted IBM Plex Sans (4 weights) loaded below. Brand green is
 * #0f6848 to match the marketing site.
 * ========================================================================= */


/* ----- Fonts ----------------------------------------------------------- */

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/ibm-plex-sans-400.woff2') format('woff2');
}
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/ibm-plex-sans-500.woff2') format('woff2');
}
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/ibm-plex-sans-600.woff2') format('woff2');
}
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/ibm-plex-sans-700.woff2') format('woff2');
}
@font-face {
    font-family: 'IBM Plex Serif';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/ibm-plex-serif-600.woff2') format('woff2');
}


/* ----- Reset ----------------------------------------------------------- */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #0e1c1a;
    background: #f6f8f7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--brand-green);
    text-decoration: underline;
}
a:hover {
    text-decoration: none;
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: 0;
    background: none;
    color: inherit;
}
button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

img,
svg {
    display: block;
    max-width: 100%;
}

[hidden] {
    display: none !important;
}


/* ----- Tokens ---------------------------------------------------------- */

:root {
    --brand-green: #0f6848;
    --brand-green-dark: #0a4f37;
    --brand-green-light: #e6f0ec;
    --brand-green-tint: #f3f8f5;
    --ink: #1a1a1a;
    --ink-muted: #5f5e5a;
    --ink-faint: #6b6a64;
    --line: #e8e6df;
    --line-strong: #d3d1c7;
    --bg: #faf9f5;
    --bg-surface: #ffffff;
    --bg-elevated: #ffffff;
    --error: #993c1d;
    --error-bg: #faece7;
    --warn: #b87a00;
    --warn-bg: #fcf3df;
    --shadow-sm: 0 1px 2px rgba(15, 104, 72, 0.06);
    --shadow-md: 0 4px 12px rgba(15, 104, 72, 0.08);
    --shadow-lg: 0 12px 32px rgba(15, 104, 72, 0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --container: 1080px;
}


/* ----- Boot view (loading) ------------------------------------------- */

.boot-view {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
}

.boot-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--line);
    border-top-color: var(--brand-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.boot-message {
    color: var(--ink-muted);
    font-size: 14px;
}


/* ----- Login view ---------------------------------------------------- */

.login-view {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 40px 32px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo-link {
    display: inline-block;
    line-height: 0;
}
.login-logo-link:hover { opacity: 0.8; }

.login-logo {
    height: 36px;
    width: auto;
}

.login-state {
    text-align: center;
}

.login-title {
    font-family: 'IBM Plex Serif', Georgia, serif;
    font-weight: 600;
    font-size: 28px;
    line-height: 1.15;
    color: var(--ink);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.login-subtitle {
    color: var(--ink-muted);
    font-size: 15px;
    margin-bottom: 28px;
}

.login-help {
    margin-top: 24px;
    color: var(--ink-faint);
    font-size: 13px;
}

.login-sent-icon {
    color: var(--brand-green);
    margin: 0 auto 16px;
    width: 48px;
    height: 48px;
}


/* ----- Form fields --------------------------------------------------- */

.field {
    text-align: left;
    margin-bottom: 16px;
}

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 6px;
}

.field-input {
    width: 100%;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    padding: 11px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.field-input:focus {
    outline: 0;
    border-color: var(--brand-green);
    box-shadow: 0 0 0 3px rgba(15, 102, 72, 0.15);
}

.field-error {
    margin-top: 6px;
    font-size: 13px;
    color: var(--error);
}


/* ----- Buttons ------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
    text-decoration: none;
    min-height: 44px;
}

.btn-primary {
    background: var(--brand-green);
    color: #ffffff;
    width: 100%;
}
.btn-primary:hover:not(:disabled) {
    background: var(--brand-green-dark);
}

.btn-secondary {
    background: transparent;
    color: var(--ink);
    border-color: var(--line-strong);
}
.btn-secondary:hover:not(:disabled) {
    border-color: var(--brand-green);
    color: var(--brand-green);
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}


/* ----- Dashboard topbar ---------------------------------------------- */

.topbar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar-logo-link {
    line-height: 0;
    text-decoration: none;
}
.topbar-logo-link:hover { opacity: 0.85; }

.topbar-logo {
    height: 28px;
    width: auto;
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border-radius: var(--radius-md);
}
.nav-toggle:hover {
    background: var(--brand-green-light);
}

.nav-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
}

.nav {
    display: block;
}

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    display: inline-block;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background-color 0.15s, color 0.15s;
}
.nav-link:hover {
    background: var(--brand-green-light);
    color: var(--brand-green);
    text-decoration: none;
}
.nav-link-active {
    color: var(--brand-green);
    background: var(--brand-green-light);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid var(--line);
}

.nav-email {
    font-size: 13px;
    color: var(--ink-faint);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-logout {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-muted);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: background-color 0.15s, color 0.15s;
}
.nav-logout:hover:not(:disabled) {
    background: var(--brand-green-light);
    color: var(--brand-green);
}


/* ----- Dashboard content --------------------------------------------- */

.dashboard-view {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1;
    max-width: var(--container);
    width: 100%;
    margin: 0 auto;
    padding: 32px 24px;
}

.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-family: 'IBM Plex Serif', Georgia, serif;
    font-weight: 600;
    font-size: 28px;
    line-height: 1.2;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--ink-muted);
    font-size: 15px;
}

.placeholder {
    background: var(--bg-surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 48px 32px;
    text-align: center;
}

.placeholder p {
    color: var(--ink-muted);
}

.placeholder-meta {
    margin-top: 8px;
    color: var(--ink-faint);
    font-size: 13px;
}


/* ----- Footer -------------------------------------------------------- */

.footer {
    border-top: 1px solid var(--line);
    padding: 20px 24px;
    text-align: center;
}

.footer-text {
    font-size: 12px;
    color: var(--ink-faint);
    margin: 2px 0;
}

.footer-text a {
    color: var(--ink-muted);
    text-decoration: none;
}
.footer-text a:hover {
    color: var(--brand-green);
    text-decoration: underline;
}


/* ----- Toasts -------------------------------------------------------- */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: calc(100vw - 48px);
}

.toast {
    background: var(--bg-surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand-green);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 12px 16px;
    font-size: 14px;
    color: var(--ink);
    max-width: 360px;
    transition: opacity 0.2s, transform 0.2s;
}
.toast-error {
    border-left-color: var(--error);
}
.toast-warn {
    border-left-color: var(--warn);
}
.toast-leave {
    opacity: 0;
    transform: translateX(20px);
}


/* ----- Responsive ---------------------------------------------------- */

@media (max-width: 720px) {
    .topbar-inner {
        padding: 10px 16px;
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: flex;
    }

    .nav {
        display: none;
        flex-basis: 100%;
        order: 3;
    }
    .nav.nav-open {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding-top: 12px;
        margin-top: 12px;
        border-top: 1px solid var(--line);
    }

    .nav-link {
        padding: 12px 12px;
        font-size: 15px;
    }

    .nav-user {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-left: 0;
        padding-left: 12px;
        border-left: 0;
        padding-top: 12px;
        border-top: 1px solid var(--line);
    }

    .content {
        padding: 24px 16px;
    }

    .page-title {
        font-size: 24px;
    }

    .login-card {
        padding: 32px 24px;
    }

    .login-title {
        font-size: 24px;
    }
}

/* ============================================================================
 * Session 8.2 — Reports tab + reusable list/empty/error/skeleton patterns.
 *
 * Pure additions. Nothing pre-8.2 was changed.
 *
 * The status-pill, empty-state, error-state, and skeleton-row rules are
 * intentionally generic so 8.3 (Connections), 8.4 (Billing), and 8.5
 * (Settings) can reuse them without further CSS work (Bundle C).
 * ========================================================================== */

/* ----- Reports list rows ----- */

.reports-list {
    list-style: none;
    padding: 0;
    margin: 24px 0 0 0;
    border-top: 1px solid var(--line);
}

.reports-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 16px;
    padding: 16px 4px;
    border-bottom: 1px solid var(--line);
}

.reports-row-primary {
    min-width: 0; /* let truncation happen if labels get long */
}

.reports-row-label {
    color: var(--ink);
    font-weight: 500;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reports-row-date {
    color: var(--ink-muted);
    font-size: 13px;
    margin-top: 2px;
}

.reports-row-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reports-row-findings {
    color: var(--ink-muted);
    font-size: 13px;
    white-space: nowrap;
}

.reports-row-action {
    /* Empty for non-COMPLETE rows; reserves the column so the meta
       column doesn't shift width row-to-row. */
}

@media (max-width: 720px) {
    .reports-row {
        /* Stack on narrow screens. The action column moves below; we
           let the meta column wrap so the pill sits next to the label. */
        grid-template-columns: 1fr auto;
        gap: 8px 12px;
    }
    .reports-row-action {
        grid-column: 1 / -1;
    }
}

/* ----- Status pills (reusable: COMPLETE / RUNNING / PENDING / FAILED) ----- */

.status-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
}

.status-pill-complete {
    background: var(--brand-green-light);
    color: var(--brand-green-dark);
    border-color: var(--brand-green);
}

.status-pill-running {
    background: #fff4d6;
    color: #7a5a00;
    border-color: #e8c869;
}

.status-pill-pending {
    background: #eeeeec;
    color: var(--ink-muted);
    border-color: var(--line-strong);
}

.status-pill-failed {
    background: #fbe6e6;
    color: #8a1f1f;
    border-color: #e0a0a0;
}

.status-pill-unknown {
    background: var(--line);
    color: var(--ink-faint);
    border-color: var(--line-strong);
}

/* ----- Skeleton loading rows (reusable) ----- */

.reports-skeleton {
    margin: 24px 0 0 0;
    border-top: 1px solid var(--line);
}

.skeleton-row {
    height: 56px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(
        90deg,
        var(--bg-surface) 0%,
        var(--brand-green-tint) 50%,
        var(--bg-surface) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* Respect users who set prefers-reduced-motion -- swap the animation
   for a static low-contrast placeholder so we don't trigger vestibular
   sensitivities. The skeleton's purpose is "something is loading",
   which a flat tinted bar still conveys. */
@media (prefers-reduced-motion: reduce) {
    .skeleton-row {
        animation: none;
        background: var(--brand-green-tint);
    }
}

/* ----- Empty state (reusable) ----- */

.empty-state {
    margin: 32px 0 0 0;
    padding: 32px 24px;
    text-align: center;
    border: 1px dashed var(--line-strong);
    border-radius: 12px;
    background: var(--bg-surface);
}

.empty-title {
    margin: 0 0 8px 0;
    color: var(--ink);
    font-weight: 500;
    font-size: 16px;
}

.empty-body {
    margin: 0;
    color: var(--ink-muted);
    font-size: 14px;
    line-height: 1.5;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

/* ----- Error state (reusable — Bundle C, used 8.3/8.4/8.5 too) ----- */

.error-state {
    margin: 32px 0 0 0;
    padding: 24px;
    border: 1px solid #e0a0a0;
    border-left: 4px solid #c84141;
    border-radius: 8px;
    background: #fdf5f5;
}

.error-title {
    margin: 0 0 8px 0;
    color: #8a1f1f;
    font-weight: 500;
    font-size: 15px;
}

.error-body {
    margin: 0 0 16px 0;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.5;
}

.error-state .btn {
    margin: 0;
}

/* ----- Small button variant (used by per-row Download) ----- */

.btn-small {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 6px;
}

/* ============================================================================
 * Session 8.3 -- Connections tab additions.
 *
 * Pure additions. The connections list rows reuse .reports-list /
 * .reports-row from 8.2 (grid layout is identical; same status-pill
 * primitive). New here:
 *   * .info-notice            -- persistent banner stressing disconnect
 *                                semantics
 *   * .status-pill-connected, .status-pill-disconnected -- two new pill
 *                                states for the connection list
 *   * .modal + .modal-*       -- shared confirmation dialog (reusable
 *                                in 8.4/8.5)
 *   * .connections-add        -- "Connect another" button wrap
 *   * .btn-danger             -- destructive action variant
 * ========================================================================== */

/* ----- Info notice (persistent banner) ----- */

.info-notice {
    margin: 24px 0 0 0;
    padding: 14px 18px;
    border: 1px solid var(--brand-green);
    border-left: 4px solid var(--brand-green);
    border-radius: 8px;
    background: var(--brand-green-tint);
}

.info-notice-body {
    margin: 0;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.55;
}

.info-notice-body a {
    color: var(--brand-green-dark);
    text-decoration: underline;
}

/* ----- New status pills for Connections list ----- */

.status-pill-connected {
    background: var(--brand-green-light);
    color: var(--brand-green-dark);
    border-color: var(--brand-green);
}

.status-pill-disconnected {
    background: #eeeeec;
    color: var(--ink-muted);
    border-color: var(--line-strong);
}

/* ----- Connect-another footer ----- */

.connections-add {
    margin: 20px 0 0 0;
    padding: 16px 0 0 0;
    border-top: 1px dashed var(--line);
    text-align: center;
}

/* ----- Danger button variant (destructive actions) ----- */

.btn-danger {
    color: #8a1f1f;
    border-color: #e0a0a0;
    background: var(--bg-surface);
}

.btn-danger:hover,
.btn-danger:focus {
    background: #fdf5f5;
    border-color: #c84141;
    color: #6a1818;
}

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

/* ----- Modal (confirmation dialog) ----- */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 18, 0.55);
    /* Backdrop is also a click target -- clicking it closes the modal
       via the data-modal-close handler. */
    cursor: pointer;
}

.modal-dialog {
    position: relative;
    z-index: 1;
    background: var(--bg-surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
    max-width: 520px;
    width: 100%;
    padding: 28px;
}

.modal-title {
    margin: 0 0 12px 0;
    color: var(--ink);
    font-size: 20px;
    font-weight: 500;
}

.modal-body {
    color: var(--ink);
    font-size: 14px;
    line-height: 1.55;
}

.modal-body p {
    margin: 0 0 12px 0;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-body a {
    color: var(--brand-green-dark);
    text-decoration: underline;
}

.modal-callout {
    margin-top: 8px;
    padding: 12px 14px;
    background: #fff4d6;
    border: 1px solid #e8c869;
    border-left: 3px solid #b88e1d;
    border-radius: 6px;
    color: #4a3a00;
}

.modal-callout strong {
    color: #6a5400;
}

.modal-actions {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

@media (max-width: 480px) {
    .modal-dialog {
        padding: 20px;
    }
    .modal-actions {
        flex-direction: column-reverse;
    }
    .modal-actions .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .modal-backdrop {
        /* No animation in either case -- keeping this rule as a
           placeholder if we later add a fade-in. */
    }
}

/* ============================================================================
 * Phase 8.5 -- Settings tab
 *
 * Patterns introduced here:
 *   * .card                    -- shared content surface (bg + radius + shadow)
 *   * .settings-card           -- vertical spacing rhythm between Settings sections
 *   * .settings-section-title  -- per-section heading inside a settings-card
 *   * .settings-info-list      -- dl/dt/dd layout for read-only attributes
 *   * .settings-section-note   -- secondary copy (e.g., "contact support to change")
 *   * .settings-error-text     -- inline error message body
 *   * .danger-zone             -- destructive-action card with red accent
 *   * .danger-zone-description -- copy explaining the consequences
 *   * .modal-typed-input       -- text input injected into the confirm modal
 *                                 for type-the-phrase confirmation
 *   * .modal-list              -- styled bulleted list inside modal bodies
 * ============================================================================ */

/* Shared content surface utility. Used by the Settings cards and available
   to future tabs that want the same elevated-panel look. */
.card {
    background: var(--bg-surface);
    border: 1px solid #e5e2dc;
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: 0 1px 2px rgba(20, 20, 20, 0.04);
}

/* Settings page lays out multiple cards vertically with consistent gap. */
.settings-card {
    margin-bottom: 16px;
}

.settings-card:last-child {
    margin-bottom: 0;
}

.settings-section-title {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
}

/* dl/dt/dd layout for read-only attribute lists (e.g., the email row). */
.settings-info-list {
    margin: 0;
    display: grid;
    grid-template-columns: 120px 1fr;
    row-gap: 8px;
    column-gap: 16px;
    font-size: 14px;
    line-height: 1.55;
}

.settings-info-list dt {
    color: var(--ink-muted);
    font-weight: 500;
}

.settings-info-list dd {
    margin: 0;
    color: var(--ink);
    word-break: break-word;
}

/* Subdued helper text below a section's main content. */
.settings-section-note {
    margin: 12px 0 0 0;
    font-size: 13px;
    color: var(--ink-muted);
    line-height: 1.55;
}

.settings-section-note a {
    color: var(--brand-green-dark);
    text-decoration: underline;
}

.settings-error-text {
    margin: 0;
    color: #8a1f1f;
    font-size: 14px;
    line-height: 1.55;
}

/* ----- Danger zone (account deletion) ----- */

/* Red left-border accent + faint red tint to visually separate from normal
   settings cards. The .btn-danger inside continues to use its existing
   shared style. */
.danger-zone {
    border-color: #e0a0a0;
    border-left: 3px solid #c84141;
    background: #fdf5f5;
}

.danger-zone .settings-section-title {
    color: #6a1818;
}

.danger-zone-description {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink);
}

.danger-zone-description:last-of-type {
    margin-bottom: 16px;
}

/* ----- Confirm-modal additions (used by settings.js delete flow) ----- */

/* Typed-confirmation input injected by settings.js into the modal body
   when requireTypedConfirmation is set. The confirm button stays disabled
   until the input's value matches the required phrase exactly. */
.modal-typed-input {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ink);
    background: var(--bg-surface);
    border: 1px solid #d4d0c8;
    border-radius: var(--radius-md);
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.modal-typed-input:focus {
    outline: none;
    border-color: #c84141;
    box-shadow: 0 0 0 3px rgba(200, 65, 65, 0.15);
}

/* Bulleted list inside modal bodies (used to enumerate deletion consequences). */
.modal-list {
    margin: 0 0 12px 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink);
}

.modal-list li {
    margin-bottom: 4px;
}

.modal-list li:last-child {
    margin-bottom: 0;
}


/* ============================================================ */
/* Phase 9.4 fix2 — Reports tab action toolbar + moved cooldown */
/* ============================================================ */

/* Page header variant that hosts an action toolbar on the right.
   The default .page-header is a vertical stack (title + subtitle);
   this variant flexes so the toolbar sits to the right of the
   title block. Wraps on narrow viewports so mobile keeps the
   layout usable. */
.page-header-with-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.page-header-with-actions .page-header-text {
    flex: 1 1 auto;
    min-width: 0;
}

.page-header-with-actions .page-header-text .page-title {
    margin-bottom: 4px;
}

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

@media (max-width: 480px) {
    .page-header-with-actions {
        align-items: stretch;
    }
    .page-header-actions {
        width: 100%;
    }
    .page-header-actions .btn {
        flex: 1 1 auto;
    }
}

/* Cooldown banner (moved here from billing; class name unchanged
   for backward compatibility -- pre-9.4-fix2 stylesheets that
   targeted .billing-cooldown will keep working). Warning-tinted
   pill with the countdown inline. */
.billing-cooldown {
    background: var(--brand-green-tint);
    border: 1px solid var(--brand-green-light);
    border-radius: var(--radius-md, 6px);
    padding: 12px 16px;
    margin-bottom: 16px;
    color: var(--ink);
    font-size: 14px;
}

.billing-cooldown p {
    margin: 0;
}
