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

html {
    overflow-x: hidden;
}

/* 🌗 Smooth day/night theme transition — applies to all elements using CSS vars */
body,
.main-content,
.nav-item,
.top-bar,
.top-right-bar,
.signin-card,
.signin-overlay,
.process-btn,
.upload-section,
.card,
.analysis-section,
.profile-card,
.encryption-dialog,
.encryption-option-card,
input,
textarea,
select,
button {
    transition: background-color 0.1s ease, color 0.1s ease, border-color 0.1s ease;
}

/* ── Theme: light (default) ───────────────────────────────────────── */
:root {
    --bg: #F7F7F4;
    --card: #FFFFFF;
    --card-alt: #F5F4F2;
    --upload-card: #F8F6F3;
    --border: #E0E0E0;
    --border-light: #E8E6E2;
    --text: #000000;
    --text-primary: #333333;
    --text-muted: #666666;
    --text-placeholder: #A0A0A0;
    --primary: #0066CC;
    --primary-hover: #0052A3;
    --primary-focus: rgba(0, 102, 204, 0.25);
    --teal: #5A9E7A;
    --green: #5A9E7A;
    --green-bg: #E8F5E9;
    --amber: #5c4a2a;
    --amber-bg: #FDF3DA;
    --nav-bg: transparent;
    --nav-active: #E8E8E8;
    --nav-border: #E0E0E0;
    --tag-bg: #E0DEDB;
    --tag-text: #4A4948;
    --btn-primary-bg: #2C2A27;
    --btn-primary-text: #FFFFFF;
    --btn-primary-hover-bg: #C4C8BE;
    --amount-pill-bg: #EBE8E4;
    --amount-pill-text: #2c2b29;
    --amount: #2c2b29;
    --modal-bg: #F5F5EE;
    --modal-overlay: rgba(0, 0, 0, 0.5);
    --input-bg: #FFFFFF;
    --signin-card: #F8F6F3;

    /* 🪜 Step card accent colors */
    --step-accent-1: #c2705a;       /* terracotta  — intake   */
    --step-accent-1-soft: #f3e0d8;
    --step-accent-2: #7e96aa;       /* dusty blue  — upload   */
    --step-accent-2-soft: #e2eaf0;
    --step-accent-3: #7a9a7e;       /* sage        — analysis */
    --step-accent-3-soft: #e4ede5;
    --step-accent-4: #b8956a;       /* clay        — letter   */
    --step-accent-4-soft: #f0e6d6;


}

/* ── Theme: night (warm dark palette) ─────────────────────────────── */
html[data-theme="night"] {
    --bg: #1A1916;
    --card: #22201E;
    --card-alt: #22201E;
    --upload-card: #2A2825;
    --border: #3A3733;
    --border-light: #2E2C29;
    --text: #E8E4DC;
    --text-primary: #E8E4DC;
    --text-muted: #7A776F;
    --text-placeholder: #7A776F;
    --primary: #5A9E7A;
    --primary-hover: #4a8e6a;
    --primary-focus: rgba(90, 158, 122, 0.35);
    --teal: #5A9E7A;
    --green: #5A9E7A;
    --green-bg: #1C2C22;
    --amber: #e8c547;
    --amber-bg: #3A2E14;
    --nav-bg: transparent;
    --nav-active: #2A2825;
    --nav-border: #3A3733;
    --tag-bg: #2A2825;
    --tag-text: #A8A296;
    --btn-primary-bg: #3A3733;
    --btn-primary-text: #D4CFC7;
    --btn-primary-hover-bg: #4A4743;
    --amount-pill-bg: #2A2825;
    --amount-pill-text: #D4CFC7;
    --amount: #D4CFC7;
    --modal-bg: #22201E;
    --modal-overlay: rgba(0, 0, 0, 0.6);
    --input-bg: #22201E;
    --signin-card: #22201E;

    /* 🪜 Step card accent colors (night) */
    --step-accent-1: #d4886e;
    --step-accent-1-soft: #3a2a24;
    --step-accent-2: #8aa4b6;
    --step-accent-2-soft: #24303a;
    --step-accent-3: #8aaa8e;
    --step-accent-3-soft: #1e2e22;
    --step-accent-4: #c8a57a;
    --step-accent-4-soft: #302818;


}

/* Top right bar: theme toggle + sign-in/auth pills */
.top-right-bar {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78em;
}

.theme-toggle-btn {
    padding: 10px 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1em;
    font-weight: 400;
    color: var(--text-primary);
    background: var(--tag-bg);
    border: 1px solid var(--border);
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Theme toggle: icon container (both icons stacked, one visible per theme) */
.theme-toggle-btn .theme-toggle-icons {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
}

.theme-toggle-btn .theme-toggle-icon {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 100%;
    height: 100%;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

/* Light mode: show sun (current theme); hide moon */
.theme-toggle-btn[data-current-theme="light"] .theme-toggle-icon-moon {
    opacity: 0;
    transform: rotate(30deg) scale(0.6);
    pointer-events: none;
}

.theme-toggle-btn[data-current-theme="light"] .theme-toggle-icon-sun {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* Night mode: show moon (current theme); hide sun */
.theme-toggle-btn[data-current-theme="night"] .theme-toggle-icon-sun {
    opacity: 0;
    transform: rotate(-30deg) scale(0.6);
    pointer-events: none;
}

.theme-toggle-btn[data-current-theme="night"] .theme-toggle-icon-moon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* Click transition: brief “flip” when theme changes */
.theme-toggle-btn.theme-toggle-btn--animating .theme-toggle-icon {
    transition-duration: 0.1s;
}

.theme-toggle-btn.theme-toggle-btn--animating[data-current-theme="light"] .theme-toggle-icon-sun {
    transform: rotate(0) scale(1);
}

.theme-toggle-btn.theme-toggle-btn--animating[data-current-theme="night"] .theme-toggle-icon-moon {
    transform: rotate(0) scale(1);
}

.theme-toggle-btn:hover {
    background: var(--nav-active);
    color: var(--text);
}

.theme-toggle-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-focus);
}

/* Sign In pill — inside .top-right-bar */
.signin-pill {
    padding: 10px 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1em;
    font-weight: 400;
    color: var(--text-primary);
    background: transparent;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.signin-pill:hover {
    background: rgba(0, 102, 204, 0.08);
    color: var(--primary);
}

html[data-theme="night"] .signin-pill:hover {
    background: rgba(90, 158, 122, 0.2);
    color: var(--teal);
}

.signin-pill:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-focus);
}

/* 🔐 Signed-in top right: username + Admin pills */
.top-right-auth {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-right-pill {
    padding: 10px 20px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1em;
    font-weight: 500;
    color: var(--text-primary);
    background: transparent;
    border: 2px solid var(--primary);
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.top-right-pill:hover {
    background: var(--primary);
    color: #fff;
}

.top-right-pill:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-focus);
}

/* 📋 Account dropdown (below top-right username pill) */
.account-dropdown-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: transparent;
    cursor: default;
}

.account-dropdown-card.signin-card {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    padding: 14px;
    font-size: 0.8em;
}

/* Slim dropdown: compact menu at 0.8em base */
.account-dropdown-card .signin-heading {
    font-size: 1em;
    padding-bottom: 7px;
    margin-bottom: 10px;
    border-bottom-width: 1px;
}

.account-dropdown-card .signin-account-card {
    gap: 7px;
    padding: 7px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.account-dropdown-card .signin-account-avatar {
    width: 26px;
    height: 26px;
    font-size: 1em;
}

.account-dropdown-card .signin-account-info {
    gap: 2px;
}

.account-dropdown-card .signin-account-name {
    font-size: 1em;
}

.account-dropdown-card .signin-account-role-pill {
    font-size: 0.85em;
    padding: 1px 5px;
    border-radius: 4px;
}

.account-dropdown-card .signin-nav-list {
    gap: 1px;
    margin-bottom: 10px;
}

.account-dropdown-card .signin-nav-item {
    gap: 6px;
    padding: 6px 8px;
    border-radius: 5px;
    font-size: 1em;
}

.account-dropdown-card .signin-nav-icon {
    width: 1.2em;
    height: 1.2em;
}

.account-dropdown-card .signin-signout-btn {
    padding: 6px 8px;
    font-size: 1em;
}

html[data-theme="night"] .account-dropdown-card.signin-card {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    position: relative;
    font-weight: 400;
    line-height: 1.5;
    overflow-x: hidden;
    color: var(--text-primary);
}

.container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
    transition: max-width 0.4s ease;
    overflow-x: hidden;
}

/* Expand layout when admin view is active */
.container:has(#admin-view.active) {
    max-width: 90vw;
}

/* Login Page Styles */
.login-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: var(--card);
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 48px;
    width: 100%;
    text-align: center;
    box-shadow: none;
    font-family: 'Roboto', 'SF Mono', 'JetBrains Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 0.9em;
    font-weight: 300;
}

.login-header {
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 1.6em;
    font-weight: 400;
    color: var(--text);
    margin: 0 0 12px 0;
    letter-spacing: -0.025em;
    font-family: 'Roboto', 'SF Mono', 'JetBrains Mono', 'Monaco', 'Inconsolata', monospace;
}

.login-header p {
    color: var(--text);
    font-size: 0.85em;
    margin: 0;
    font-weight: 300;
    font-family: 'Roboto', 'SF Mono', 'JetBrains Mono', 'Monaco', 'Inconsolata', monospace;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 0.95em;
    font-family: inherit;
    background: var(--input-bg);
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.login-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--input-bg);
    box-shadow: 0 0 0 3px var(--primary-focus);
}

.login-input::placeholder {
    color: var(--text-placeholder);
}

.login-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 3px;
    font-size: 1em;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.login-btn:active {
    transform: translateY(0);
}

.login-error {
    color: #CC0000;
    font-size: 0.9em;
    margin-top: 10px;
    display: none;
}

.login-error.show {
    display: block;
}

.header {
    text-align: left;
    margin-bottom: 10px;
}

/* Page title H1 — identical across Welcome, Intake Form, Analysis, Saved Results, About & FAQ (and Dispute Letter via .dispute-letter-header h1) */
.header h1 {
    font-size: 1.6em;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.025em;
    line-height: 1.2;
    font-family: 'Lora', serif;
}

/* Navigation Bar Styles */
.nav-container {
    display: flex;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 20px;
    gap: 20px;
    align-items: flex-start;
    transition: max-width 0.4s ease;
}

/* Expand nav container when admin view is active */
.nav-container:has(#admin-view.active) {
    max-width: 90vw;
}

.nav-sidebar {
    width: 200px !important;
    min-width: 200px !important;
    flex-shrink: 0 !important;
    padding: 8px;
    height: fit-content;
    position: sticky;
    top: 0;
    margin-top: 0;
    align-self: flex-start;
    border-right: 1px solid var(--nav-border);
}

/* Content wrapper in flex layout – no horizontal scroll; content fits via min-width: 0 */
.content-wrapper {
    flex: 1;
    min-width: 0;
    overflow-x: hidden;
    position: relative;
}

/* Ensure main-content div aligns with navigation sidebar – no bounding box */
.main-content {
    margin-top: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
    box-shadow: none;
}

/* Ensure the first nav-item (Welcome) aligns with main-content */
.nav-sidebar .nav-item:first-child {
    margin-top: 0;
}

/* Force perfect alignment between navigation sidebar and main-content */
.nav-sidebar {
    align-self: flex-start;
}

/* Ensure content wrapper starts at the same level as navigation sidebar */
.content-wrapper {
    align-self: flex-start;
}

.nav-item {
    display: block;
    padding: 12px 16px;
    margin-bottom: 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9em;
    font-weight: 400;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-item:hover {
    background: var(--nav-active);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--nav-active);
    color: var(--text);
    font-weight: 500;
}

.nav-item.disabled {
    color: var(--text-placeholder);
    cursor: not-allowed;
    pointer-events: none;
}

/* Custom popover for Dispute Letter hint (0 issues) — immediate, visible message on hover */
.dispute-letter-hint-popover {
    position: fixed;
    z-index: 10001;
    visibility: hidden;
    opacity: 0;
    padding: 10px 14px;
    background: var(--card, #fff);
    color: var(--text, #222);
    font-size: 0.9rem;
    line-height: 1.4;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border, #ddd);
    pointer-events: none;
    white-space: nowrap;
    max-width: 280px;
    white-space: normal;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.dispute-letter-hint-popover.visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(-100%);
}

.dispute-letter-hint-popover.arrow-bottom::before {
    content: '';
    position: absolute;
    top: auto;
    bottom: -12px;
    left: 50%;
    margin-left: -6px;
    border: 6px solid transparent;
    border-top-color: var(--border, #ddd);
    border-bottom-color: transparent;
}

.dispute-letter-hint-popover.arrow-bottom::after {
    content: '';
    position: absolute;
    top: auto;
    bottom: -10px;
    left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: var(--card, #fff);
}

.nav-item.completed {
    color: var(--green);
}

.nav-item.completed:hover {
    background: var(--green-bg);
    color: var(--green);
}

.content-wrapper {
    flex: 1;
    min-width: 0;
    overflow-x: hidden;
    position: relative;
}

/* main-content is a passthrough wrapper – no box, content flows with page background */
.main-content {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
    box-shadow: none;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    min-width: 0;
    max-width: 100%;
}

/* Increase width of main-content on About page */
#about-view .main-content {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.upload-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 94.62%;
}

#upload-view .header,
#upload-view .main-content,
#upload-view .upload-navigation {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}


.upload-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px 22px;
    background: var(--upload-card);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9em;
    font-weight: 300;
}

.upload-card:hover {
    border-color: var(--primary);
}

.upload-card.dragover {
    border-color: #6A9BD1;
    background: #C4C8BE;
}

.upload-card h3 {
    color: var(--text);
    margin-bottom: 20px;
    font-size: 1.0em;
    font-weight: 400;
    letter-spacing: -0.01em;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.upload-card .upload-card-label {
    color: var(--text-primary);
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Drag and Drop Upload Styles */
.drag-drop-area {
    display: block;
    border: none;
    border-radius: 10px;
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    margin-top: 16px;
    position: relative;
}

.drag-drop-area:hover {
    background: transparent;
}

.drag-drop-area.dragover {
    background: transparent;
}

.upload-icon {
    color: #9A9895;
    margin-bottom: 14px;
    display: flex;
    justify-content: center;
}

.upload-icon .icon-frame {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: #E5E3E0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-icon svg {
    width: 28px;
    height: 28px;
}

.drag-drop-text {
    color: #4A4948;
}

.main-text {
    font-size: 1.05em;
    font-weight: 600;
    margin-bottom: 6px;
    color: #2D2C2C;
}

.sub-text {
    font-size: 0.9em;
    color: #595959;
    margin-bottom: 14px;
}

.file-type-chips {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.file-type-chip {
    background: #E0DEDB;
    color: #4A4948;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 500;
}

.file-info {
    margin-top: 15px;
    padding: 16px 20px;
    background: #f7f6f2;
    border-radius: 10px;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

/* Dark mode: upload section */
html[data-theme="night"] .upload-section .main-text {
    color: #E8E4DC;
}

html[data-theme="night"] .upload-section .file-info {
    background: #1A1916;
}

html[data-theme="night"] .file-name {
    color: #E8E4DC;
}

html[data-theme="night"] .main-content {
    background: #1A1916;
}


html[data-theme="night"] #pdf-view .main-content {
    background: #1A1916;
}

/* 🌙 Admin view: ensure text is visible in night mode */
html[data-theme="night"] #admin-view .main-content {
    color: var(--text);
}
html[data-theme="night"] #admin-view .main-content .MuiTypography-root {
    color: inherit;
}
html[data-theme="night"] #admin-view .main-content .MuiCard-root {
    color: var(--text);
}
html[data-theme="night"] #admin-view .main-content .MuiButton-root {
    color: var(--text);
}
html[data-theme="night"] #admin-view .main-content .MuiFormLabel-root,
html[data-theme="night"] #admin-view .main-content .MuiInputLabel-root {
    color: var(--text-muted);
}
html[data-theme="night"] #admin-view .main-content .MuiOutlinedInput-input,
html[data-theme="night"] #admin-view .main-content .MuiInputBase-input {
    color: var(--text);
}
html[data-theme="night"] #admin-view .main-content .MuiDialogTitle-root,
html[data-theme="night"] #admin-view .main-content .MuiDialogContentText-root {
    color: var(--text);
}
/* MUI dialogs render in a portal; ensure they respect night mode when theme is night */
html[data-theme="night"] .MuiDialog-root .MuiDialog-paper {
    background: var(--modal-bg);
    color: var(--text);
}
html[data-theme="night"] .MuiDialog-root .MuiDialogTitle-root,
html[data-theme="night"] .MuiDialog-root .MuiDialogContentText-root,
html[data-theme="night"] .MuiDialog-root .MuiTypography-root {
    color: inherit;
}

html[data-theme="night"] .dispute-letter-body,
html[data-theme="night"] #pdf-view .dispute-letter-body {
    background: #22201E !important;
    color: #E8E4DC !important;
    border-color: #E8E4DC !important;
}

html[data-theme="night"] .back-to-upload {
    color: #595959;
    border-color: #595959;
}

html[data-theme="night"] .issue-box {
    background: #22201E;
    color: #E8E4DC;
}

html[data-theme="night"] .issue-box * {
    color: #E8E4DC;
}

html[data-theme="night"] #issue-modal .issue-modal-content {
    background: #22201E;
    color: #E8E4DC;
}

html[data-theme="night"] #issue-modal .issue-modal-content * {
    color: #E8E4DC;
}

html[data-theme="night"] #issue-modal .issue-modal-content .issue-amount-badge,
html[data-theme="night"] #issue-modal .issue-modal-content .issue-type-badge {
    color: #A8A296;
}

/* Override library-generated class (e.g. MUI/Emotion) in night mode — do not edit the library */
html[data-theme="night"] .css-elr2b6 {
    color: #E8E4DC;
}

html[data-theme="night"] #issue-modal .issue-modal-body .expanded-section p {
    color: #E8E4DC;
}

html[data-theme="night"] .issue-type-badge {
    background: #2a2825;
    color: #A8A296;
}

html[data-theme="night"] #issue-modal .evidence-list-card {
    background: #2a2825;
}

html[data-theme="night"] .remove-btn {
    background: #2a2825;
    color: #E8E4DC;
}

html[data-theme="night"] .issue-amount-badge {
    background: #22201E;
    color: #A8A296;
}

html[data-theme="night"] #issue-modal .issue-amount-badge {
    background: #22201E;
    color: #A8A296;
}

html[data-theme="night"] #issue-modal .issue-modal-body .issue-type-badge {
    background: #22201E;
    color: #A8A296;
}

html[data-theme="night"] .dispute-letter-subtitle {
    color: #8B8589;
}

html[data-theme="night"] .dispute-letter-header {
    color: #E8E4DC;
}

html[data-theme="night"] .dispute-letter-header h1 {
    color: #E8E4DC;
}

html[data-theme="night"] .dispute-consultation-text h3 {
    color: #D4CFC7;
}

html[data-theme="night"] .dispute-consultation-box {
    background: #4A7C59;
}

html[data-theme="night"] .dispute-consultation-btn {
    background: #316831;
}

html[data-theme="night"] .confirmation-email-display {
    color: #E8E4DC;
}

html[data-theme="night"] .editor-button {
    background: #2A2825;
    border-color: #A8A296;
    color: #E8E4DC;
}

html[data-theme="night"] .editor-button svg {
    color: #E8E4DC;
    fill: none;
}

html[data-theme="night"] .dispute-letter-legal-tooltip,
html[data-theme="night"] .dispute-letter-info-tooltip,
html[data-theme="night"] #dispute-letter-legal-tooltip {
    background: #2A2825 !important;
    color: #A8A296 !important;
}

html[data-theme="night"] .dispute-consultation-desc {
    color: #A8A296;
}

html[data-theme="night"] .intake-banner {
    background: #2A2825;
    border-color: var(--border);
    color: #A8A296;
}

html[data-theme="night"] .intake-validation-error {
    background: #2D1F1F;
    border-color: #5C2B2B;
    border-left-color: #DC2626;
    color: #F0A0A0;
}

html[data-theme="night"] .intake-section {
    background: var(--card);
    border-color: var(--border);
}

html[data-theme="night"] .intake-section h3 {
    color: var(--text);
}

html[data-theme="night"] .intake-description {
    color: var(--text-muted);
}

html[data-theme="night"] .intake-question {
    color: var(--text);
}

html[data-theme="night"] .intake-details label {
    color: var(--text);
}

html[data-theme="night"] .intake-textarea {
    background: var(--input-bg);
    border-color: var(--border);
    color: var(--text);
}

html[data-theme="night"] .intake-input {
    background: var(--input-bg);
    border-color: var(--border);
    color: var(--text);
}

html[data-theme="night"] .analysis-info-tooltip {
    background: #2A2825;
    color: #A8A296;
}

html[data-theme="night"] .analysis-info-tooltip::before {
    border-bottom-color: #2A2825;
}

html[data-theme="night"] .hospital-contact-card-cat {
    color: #A8A296;
}

html[data-theme="night"] .hospital-contact-card-dept {
    color: #E8E4DC;
}

html[data-theme="night"] .hospital-contact-card {
    border-color: #7A776F;
    background: #2A2825;
}

html[data-theme="night"] .hospital-contact-modal-subtitle {
    color: #A8A296;
}

html[data-theme="night"] .hospital-contact-action {
    background: #2A2825;
    color: #E8E4DC;
    border-color: #7A776F;
}

html[data-theme="night"] .hospital-contact-close-btn {
    background: #2A2825;
    color: #A8A296;
}

html[data-theme="night"] .retrieve-saved-card-header {
    border-color: #7A776F;
    color: #E8E4DC;
}

html[data-theme="night"] .retrieve-saved-card-header .retrieve-saved-icon,
html[data-theme="night"] .retrieve-saved-card-header .retrieve-saved-icon svg {
    color: #E8E4DC;
    fill: none;
}

html[data-theme="night"] .retrieve-saved-btn {
    color: #A8A296;
}

html[data-theme="night"] .retrieve-saved-title {
    color: #E8E4DC;
}

html[data-theme="night"] .retrieve-saved-label {
    color: #A8A296;
}

html[data-theme="night"] .nav-item.disabled {
    color: #3A3733;
}

html[data-theme="night"] .dispute-letter-hint-popover {
    background: var(--card);
    color: var(--text);
    border-color: var(--border);
}
html[data-theme="night"] .dispute-letter-hint-popover.arrow-bottom::before {
    border-top-color: var(--border);
}
html[data-theme="night"] .dispute-letter-hint-popover.arrow-bottom::after {
    border-top-color: var(--card);
}

/* Override MUI form label in night mode — do not edit the library */
html[data-theme="night"] .MuiFormLabel-root.MuiFormLabel-colorPrimary {
    color: #A8A296 !important;
}

html[data-theme="night"] .retrieve-saved-card {
    background: #2A2825;
    border-color: #7A776F;
}

html[data-theme="night"] .retrieve-saved-card input[type="email"],
html[data-theme="night"] .retrieve-saved-card input[type="text"] {
    border-color: var(--border);
    background: var(--input-bg);
    color: var(--text);
}

html[data-theme="night"] .retrieve-saved-card input::placeholder {
    color: var(--text-placeholder);
}

html[data-theme="night"] .retrieve-saved-hint {
    color: var(--text-muted);
}

html[data-theme="night"] .status-included {
    color: #4A7C59;
}

html[data-theme="night"] .grouping-select,
html[data-theme="night"] #grouping-select {
    background: #22201E;
    color: #E8E4DC;
    border-color: #A8A296;
}

html[data-theme="night"] .dispute-actions-row button {
    background: #22201E;
    color: #A8A296;
    border-color: #A8A296;
}

.file-info-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.file-info-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #eeeeee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
}

.file-info-icon svg {
    width: 24px;
    height: 24px;
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    color: #333;
    font-size: 0.95em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 0.85em;
    color: #666;
}

.file-info-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.uploaded-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9em;
    font-weight: 500;
    color: #4A7C59;
}

.uploaded-check {
    font-size: 1em;
    font-weight: 700;
}

.remove-btn {
    background: #D0D0D0;
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease;
}

.remove-btn:hover {
    background: #b8b8b8;
}

.file-error {
    color: #DC3545;
    font-size: 0.9em;
    margin-top: 10px;
    text-align: center;
}

.file-input {
    display: none;
}

.upload-btn {
    background: #6A9BD1;
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s ease;
    margin: 10px 0;
    letter-spacing: -0.01em;
}

.upload-btn:hover {
    background: #0052A3;
    transform: translateY(-1px);
}


.process-btn {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: 1px solid transparent; /* Prevent hover border from shifting height */
    padding: 0 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s ease;
    margin: 20px 0;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
}

.process-btn:hover {
    border: 1px solid var(--btn-primary-bg);
    color: var(--btn-primary-bg);
    background: var(--btn-primary-hover-bg);
    transform: translateY(-1px);
}

.process-btn:disabled {
    background: #B0B0B0;
    cursor: not-allowed;
    transform: none;
}


.results-section {
    margin-top: 30px;
}

.result-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 32px;
    margin: 20px 0;
}

.result-card h4 {
    color: var(--text);
    margin-bottom: 20px;
    font-size: 1.4em;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.json-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 3px;
    padding: 15px;
    font-family: 'Roboto', 'Courier New', monospace;
    font-size: 0.9em;
    max-height: 300px;
    overflow-y: auto;
}

.required-badge {
    background: #FBE4E4;
    color: #BB3A3A;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.optional-badge {
    background: var(--nav-active);
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.summary-display {
    background: #E6F3FF;
    border: 1px solid var(--primary);
    border-radius: 3px;
    padding: 15px;
    margin: 10px 0;
}

.analysis-display {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    font-family: 'Roboto', 'SF Mono', 'JetBrains Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 0.9em;
    font-weight: 300;
}

.analysis-content {
    margin-top: 10px;
}

.analysis-content h5 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 1.0em;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.analysis-text {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 32px;
    font-family: inherit;
    line-height: 1.6;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
    color: var(--text-primary);
}

.analysis-text strong {
    color: #2c3e50;
    font-weight: bold;
}

.analysis-section {
    margin: 25px 0;
    padding: 24px;
    background: var(--card-alt);
    border-radius: 3px;
    border-left: 3px solid var(--primary);
    position: relative;
}

.analysis-section:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--text), transparent);
    border-radius: 1px;
}

.analysis-section:first-child {
    margin-top: 0;
}

.analysis-section:last-child {
    margin-bottom: 0;
}

.analysis-section h5 {
    color: var(--text);
    margin: 0 0 15px 0;
    font-size: 1.3em;
    font-weight: 600;
}

.analysis-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.meta-item {
    font-size: 0.9em;
    color: var(--text-muted);
    background: var(--nav-active);
    padding: 6px 12px;
    border-radius: 16px;
    border: 1px solid var(--border);
    font-weight: 500;
}

/* Issue Box Styles */
.analysis-complete {
    text-align: left;
    margin-bottom: 20px;
    background: transparent;
    padding: 0;
    border: none;
}

.analysis-complete p {
    font-size: 0.9em;
    font-weight: 300;
    color: var(--text-muted);
    margin: 0;
    font-family: 'Roboto', 'SF Mono', 'JetBrains Mono', 'Monaco', 'Inconsolata', monospace;
}

/* Analysis summary line with info tooltip */
.analysis-summary-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.analysis-info-tooltip-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
}

.analysis-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e5e5e5;
    color: #555;
    font-size: 11px;
    font-weight: 600;
    font-style: italic;
    font-family: Georgia, serif;
}

.analysis-info-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(calc(-50% - 19px));
    min-width: 247px;
    max-width: 347px;
    width: max-content;
    padding: 16px 20px;
    background: #f9f9f9;
    color: #222;
    font-size: 0.9em;
    line-height: 1.55;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    z-index: 100;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    white-space: normal;
}

.analysis-info-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 12px;
    border: 7px solid transparent;
    border-bottom-color: #f9f9f9;
}

.analysis-info-tooltip-trigger:hover .analysis-info-tooltip,
.analysis-info-tooltip-trigger:focus .analysis-info-tooltip {
    visibility: visible;
    opacity: 1;
}

.save-for-later-section {
    margin-top: 24px;
    padding: 20px;
    background: var(--card-alt);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.save-for-later-section h3 {
    font-size: 1.1em;
    margin-bottom: 8px;
}

.save-for-later-text {
    font-size: 0.9em;
    color: var(--text-muted);
    margin-bottom: 12px !important;
}

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

.claim-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.claim-form .process-btn {
    align-self: flex-end;
}

.claim-form input[type="email"],
.lookup-form input[type="email"],
.lookup-form input[type="text"] {
    padding: 10px 12px;
    border: 1px solid #D0D0D0;
    border-radius: 6px;
    font-size: 0.95em;
    min-width: 200px;
}

.claim-form input[type="email"] {
    width: 100%;
    box-sizing: border-box;
}

.claim-message, .lookup-message {
    width: 100%;
    font-size: 0.9em;
}

.claim-message.error, .lookup-message.error {
    color: #c62828;
}

.claim-message.success {
    color: #2e7d32;
}

.save-for-later-body-wrapper {
    position: relative;
    min-height: 200px;
    padding: 0 0 20px 0;
}

.save-for-later-panel {
    transition: opacity 0.1s ease;
}

.save-for-later-form-body {
    opacity: 1;
}

.save-for-later-confirmation-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 16px 0;
}

.confirmation-code-label,
.confirmation-email-label {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.confirmation-code-display {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'SF Mono', 'JetBrains Mono', 'Monaco', 'Inconsolata', monospace;
    letter-spacing: 0.3em;
    color: #2e7d32;
    padding: 16px 24px;
    background: rgba(46, 125, 50, 0.1);
    border-radius: 12px;
    border: 2px solid rgba(46, 125, 50, 0.3);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.confirmation-code-display:hover {
    background: rgba(46, 125, 50, 0.15);
}

.confirmation-code-wrapper {
    position: relative;
    display: inline-block;
}

.copy-notification-toast {
    position: absolute;
    left: calc(100% + 16px);
    top: 50%;
    transform: translateY(-50%) translateX(-8px);
    padding: 8px 16px;
    background: #2e7d32;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
    pointer-events: none;
}

.copy-notification-toast.show {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

@media (prefers-reduced-motion: reduce) {
    .view-details-btn,
    .issue-box,
    .copy-notification-toast {
        transition: none;
    }
    .view-details-btn:hover {
        transform: none;
    }
}

.confirmation-email-display {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.confirmation-email-sent {
    font-size: 0.95rem;
    color: #666;
    margin: 8px 0 0 0;
}

.view-saved-results-section h3 {
    font-size: 1.1em;
    margin-bottom: 8px;
}

/* Retrieve saved analysis — compact card (Saved Results page) */
.retrieve-saved-card {
    margin-top: 12px;
    padding: 16px 18px;
    max-width: 520px;
    background: #f7f6f2;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica Neue, Arial, sans-serif;
}

.retrieve-saved-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.retrieve-saved-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #5a5a5a;
}

.retrieve-saved-icon svg {
    display: block;
}

.retrieve-saved-title {
    margin: 0;
    font-size: 0.98em;
    font-weight: 600;
    color: #3d3d3d;
}

.retrieve-saved-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
    margin-bottom: 10px;
}

.retrieve-saved-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.retrieve-saved-label {
    font-size: 0.7em;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5a5a5a;
}

.retrieve-saved-card input[type="email"],
.retrieve-saved-card input[type="text"] {
    padding: 6px 10px;
    font-size: 0.88em;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
    min-width: 0;
}

.retrieve-saved-card input::placeholder {
    color: #999;
    font-style: italic;
}

.retrieve-saved-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.retrieve-saved-hint {
    margin: 0;
    font-size: 0.78em;
    font-style: italic;
    color: #777;
}

.retrieve-saved-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    font-size: 0.85em;
    font-weight: 600;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica Neue, Arial, sans-serif;
    color: #fff;
    background: #4a4a4a;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.retrieve-saved-btn:hover {
    background: #3a3a3a;
}

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

.retrieve-saved-btn-icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.retrieve-saved-btn-icon svg {
    display: block;
}

.retrieve-saved-card .lookup-message {
    margin-top: 10px;
    font-size: 0.82em;
}

@media (max-width: 420px) {
    .retrieve-saved-fields {
        grid-template-columns: 1fr;
    }
}

.lookup-hint {
    font-size: 0.88em;
    color: #666;
    margin-bottom: 12px;
}

.issue-box {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica Neue, Arial, sans-serif;
    font-size: 0.95em;
    font-weight: 400;
}

.hospital-name-style {
    font-weight: bold;
    text-transform: capitalize;
}

.issue-box.high-confidence {
    border-left: 4px solid #8B9B7B;
}

.issue-box.low-confidence {
    border-left: 4px solid #e8b86d;
    background: #F9F8F6;
}

.confidence-indicator {
    margin: 0;
}

.confidence-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: .62em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.high-confidence-badge {
    background: var(--green-bg);
    border: 1px solid #2A4A34;
    color: var(--green);
}

.high-confidence-badge::before {
    content: '•';
    color: var(--green);
    font-weight: bold;
}

.low-confidence-badge {
    background: var(--amber-bg);
    border: 1px solid #3A2E14;
    color: var(--amber);
}

.low-confidence-badge::before {
    content: '•';
    color: var(--amber);
    font-weight: bold;
}

.issue-type-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--tag-bg);
    color: var(--tag-text);
    border: 1px solid var(--border);
}

.overcharge-badge {
    background: #E0DED7;
    color: #4a4844;
    border: 1px solid #d3d0c9;
}

.input-form-badge {
    background: #E0DED7;
    color: #4a4844;
    border: 1px solid #d3d0c9;
}

.issue-type-indicator {
    margin: 8px 0 12px 0;
}

/* .issue-box:hover {
    border-color: #A7C2CC;
} */

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

.issue-title {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--amount-pill-text);
    margin: 0;
    letter-spacing: -0.01em;
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.issue-amount-pill {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--amount-pill-bg);
    border: 1px solid var(--border);
    font-size: 0.95em;
    font-weight: 500;
    color: var(--amount-pill-text);
    flex-shrink: 0;
}

.issue-amount {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    letter-spacing: -0.01em;
}

.issue-description {
    color: var(--tag-text);
    font-size: .86em;
    letter-spacing: 0.02em;
    line-height: 1.5;
    margin-bottom: 16px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica Neue, Arial, sans-serif;
    font-weight: 400;
}

.issue-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 14px;
    margin-top: 4px;
    border-top: 1px solid #E8E6E2;
}

.issue-footer .confidence-indicator {
    flex-shrink: 0;
}

.issue-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.view-details-btn {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--amount-pill-text);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: .78em;
    font-weight: 400;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    letter-spacing: -0.01em;
}

.view-details-btn:hover {
    border-color: var(--primary);
    background: #f5f8fc;
    transform: translateY(-1px);
}

html[data-theme="night"] .view-details-btn:hover {
    background: var(--green-bg);
}

.issue-status {
    font-size: 0.85em;
    font-weight: 400;
    font-family: inherit;
    letter-spacing: -0.01em;
    font-style: italic;
    color: #888888;
}

.status-included {
    color: #2e7d32;
    font-style: normal;
}

.status-not-included {
    color: #888888;
    font-style: italic;
}

/* Modal Styles – entrance/exit via opacity and transform (no display toggle) */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-overlay);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease-out, visibility 0.2s;
}

.modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    background: var(--modal-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.09em;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.modal.show .modal-content {
    opacity: 1;
    transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
    .modal,
    .modal-content {
        transition: none;
    }
}

.modal-header {
    text-align: left;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
}

.modal-header h2 {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.modal-header .issue-amount {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.1em;
    font-weight: 600;
    color: #CC0000;
    margin: 0;
    letter-spacing: -0.01em;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #666;
    padding: 5px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.expanded-section {
    margin-bottom: 15px;
}

.expanded-section h4 {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.85em;
    font-weight: 500;
    color: #000;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.expanded-section p {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    color: #666;
    line-height: 1.4;
    margin: 0;
    font-size: 0.9em;
}

.evidence-item {
    background: #F7F7F7;
    border: 1px solid #E0E0E0;
    border-radius: 3px;
    padding: 12px;
    margin: 8px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    transition: all 0.2s ease;
}

.evidence-list {
    flex: 1;
}

.evidence-list ul {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
}

.evidence-list li {
    margin: 0;
    line-height: 1.3;
    color: var(--text-primary);
    font-size: 0.9em;
}

.evidence-list li strong {
    color: #555;
    font-weight: 600;
}

.evidence-item:hover {
    background: #EBEBEB;
    border-color: #C4C8BE;
}

.notes-section {
    margin-top: 20px;
}

.notes-textarea {
    width: 100%;
    min-height: 80px;
    padding: 16px;
    border: 1px solid #E0E0E0;
    border-radius: 3px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9em;
    font-weight: 400;
    resize: vertical;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
    line-height: 1.5;
    background: white;
    transition: all 0.2s ease;
}

.notes-textarea:focus {
    outline: none;
    border-color: #C4C8BE;
    box-shadow: 0 0 0 2px rgba(196, 200, 190, 0.2);
}

.notes-textarea::placeholder {
    color: #999;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* Notes section textarea — night mode */
html[data-theme="night"] .notes-section .notes-textarea {
    border-color: var(--border);
    background: var(--input-bg);
    color: var(--text);
}

html[data-theme="night"] .notes-section .notes-textarea::placeholder {
    color: var(--text-placeholder);
}

html[data-theme="night"] .notes-section .notes-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-focus);
}

html[data-theme="night"] #issue-modal .issue-modal-body .notes-textarea {
    border-color: var(--border);
    background: var(--input-bg);
    color: var(--text);
}

html[data-theme="night"] #issue-modal .issue-modal-body .notes-textarea::placeholder {
    color: var(--text-placeholder);
}

.notes-help {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.8em;
    color: #999;
    margin-bottom: 15px;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.notes-actions-row {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #E8E6E3;
}

.notes-actions-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.notes-actions-row .notes-help {
    margin-bottom: 0;
    font-style: italic;
    color: #666;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.include-btn {
    background: #2c2a27;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.82em;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
}

.include-btn:hover {
    background: #3d3b38;
    transform: translateY(-1px);
}

.remove-btn {
    background: #F8F8F8;
    color: #444;
    border: 1px solid #DDDDDD;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.82em;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
}

.remove-btn:hover {
    border-color: #CC0000;
    background: #F5F5F5;
    color: #CC0000;
}

/* Issue modal – DM Sans, amount badge, pills, confidence bar */
#issue-modal .issue-modal-content {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    background: #FDFCFB;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    padding: 24px;
    max-width: 900px;
}

#issue-modal .issue-modal-content * {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

#issue-modal .issue-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #E8E6E3;
}

#issue-modal .issue-modal-body {
    display: flex;
    flex-direction: column;
}

#issue-modal .issue-modal-columns {
    display: grid;
    grid-template-columns: 6fr 4fr;
    gap: 24px;
    align-items: stretch;
}

#issue-modal .issue-modal-col {
    min-width: 0;
}

#issue-modal .issue-modal-col-left > *:first-child {
    border-bottom: 1px solid #E8E6E3;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

#issue-modal .issue-modal-col-left {
    padding-right: 16px;
    padding-top: 15px;
    border-right: 1px solid #E8E6E3;
    align-self: stretch;
}

#issue-modal .issue-modal-col-right {
    padding-left: 16px;
    padding-top: 15px;
}

@media (max-width: 640px) {
    #issue-modal .issue-modal-columns {
        grid-template-columns: 1fr;
    }
    #issue-modal .issue-modal-col-left,
    #issue-modal .issue-modal-col-right {
        padding-left: 0;
        padding-right: 0;
        border-right: none;
    }
}

#issue-modal .issue-modal-title {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.1em;
    font-weight: 700;
    color: #2c2b29;
    margin: 0;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

#issue-modal .issue-modal-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

#issue-modal .issue-amount-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.95em;
    font-weight: 600;
    color: #333;
    background: #ECECEC;
    border: 1px solid #E0E0E0;
}

#issue-modal .issue-modal-close {
    position: static;
    top: auto;
    right: auto;
    font-size: 1.4em;
    color: #555;
    padding: 4px 2px;
}

#issue-modal .issue-modal-close:hover {
    color: #222;
}

#issue-modal .issue-modal-body .expanded-section {
    margin-bottom: 16px;
}

#issue-modal .issue-modal-body .expanded-section h4 {
    font-size: 0.7em;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

#issue-modal .issue-modal-body .expanded-section p {
    color: #444;
    font-size: 0.83em;
    line-height: 1.5;
}

#issue-modal .issue-modal-body .issue-type-badge {
    background: #ECECEC;
    color: #444;
    border: 1px solid #DDD;
    font-size: 0.7em;
    padding: 6px 14px;
    border-radius: 999px;
}

#issue-modal .evidence-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#issue-modal .evidence-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

#issue-modal .evidence-list-card {
    background: #F0EFEB;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

#issue-modal .evidence-list-card .evidence-list {
    padding: 0;
}

#issue-modal .evidence-list-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border-bottom: 1px solid #E0DED7;
    background: transparent;
}

#issue-modal .evidence-list-row:last-child {
    border-bottom: none;
}

#issue-modal .evidence-list-left {
    min-width: 0;
    flex: 1;
    display: block;
}

#issue-modal .evidence-list-name {
    display: block;
    font-size: 0.9em;
    font-weight: 500;
    color: #2c3d2c;
    line-height: 1.35;
}

#issue-modal .evidence-list-code {
    display: block;
    font-size: 0.75em;
    font-weight: 400;
    color: #6b6b6b;
    margin-top: 4px;
}

#issue-modal .evidence-list-amount {
    font-size: 0.9em;
    font-weight: 700;
    color: #2c3d2c;
    flex-shrink: 0;
    align-self: flex-start;
}

#issue-modal .evidence-list-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 10px 14px;
    margin-top: 0;
    border-top: 1px solid #E0DED7;
    background: none;
    border-left: none;
    border-right: none;
    border-bottom: none;
    font-size: 0.82em;
    color: #6b6b6b;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

#issue-modal .evidence-list-more:hover {
    color: #2c3d2c;
}

#issue-modal .evidence-chevron {
    display: inline-block;
    transition: transform 0.1s ease;
}

#issue-modal .evidence-list-more.expanded .evidence-chevron {
    transform: rotate(180deg);
}

#issue-modal .evidence-list-collapsible {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#issue-modal .evidence-pill {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.7em;
    color: #333;
    background: #E8E8E8;
    border: 1px solid #DDD;
}

#issue-modal .analysis-score-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

#issue-modal .confidence-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 0;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.78em;
    font-weight: 500;
}

#issue-modal .confidence-badge.confidence-high {
    color: var(--green);
}

#issue-modal .confidence-badge.confidence-low {
    color: var(--amber);
}

#issue-modal .confidence-badge.confidence-none {
    color: #666;
}

#issue-modal .confidence-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

#issue-modal .confidence-badge-dot.confidence-high {
    background: #388E3C;
}

#issue-modal .confidence-badge-dot.confidence-low {
    background: #c9a227;
}

#issue-modal .confidence-badge-dot.confidence-none {
    background: #999;
}

#issue-modal .confidence-bar-wrap {
    flex: 1;
    min-width: 60px;
    max-width: 140px;
    height: 6px;
    background: #E8E8E8;
    border-radius: 999px;
    overflow: hidden;
}

#issue-modal .confidence-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.2s ease;
}

#issue-modal .confidence-bar-fill.confidence-high {
    background: #66BB6A;
}

#issue-modal .confidence-bar-fill.confidence-low {
    background: #c9a227;
}

#issue-modal .confidence-bar-fill.confidence-none {
    background: #999;
}

#issue-modal .issue-modal-body .notes-section h4 {
    font-size: 0.7em;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

#issue-modal .issue-modal-body .notes-section .notes-help,
#issue-modal .issue-modal-body .notes-section .include-btn,
#issue-modal .issue-modal-body .notes-section .remove-btn {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#issue-modal .issue-modal-body .notes-section .notes-actions-row {
    border-top: none;
    margin-top: 12px;
    padding-top: 0;
}

#issue-modal .issue-modal-body .notes-textarea {
    background: #F0EFEC;
    border: 1px solid #E0DED7;
    border-radius: 6px;
    min-height: 100px;
}

#issue-modal .issue-modal-body .notes-textarea::placeholder {
    color: #888;
}

/* Page State Management – crossfade/slide transition without display toggle */
.page-view {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(8px);
    transition: opacity 0.22s ease-out, visibility 0.22s, transform 0.22s ease-out;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 0;
}

.page-view.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .page-view {
        transition: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-item {
        transition: none;
    }
}


.analysis-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #E0E0E0;
}

.analysis-header h1,
.dispute-letter-header h1 {
    font-size: 1.6em;
    font-weight: 400;
    color: #000000;
    margin: 0;
    letter-spacing: -0.025em;
    line-height: 1.2;
    font-family: 'Roboto', 'SF Mono', 'JetBrains Mono', 'Monaco', 'Inconsolata', monospace;
}

.analysis-header p {
    font-size: 1.1em;
    color: #666;
    margin: 0;
}

.back-to-upload {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #000;
    border-width: 1px;
    border: 1px solid #000;
    text-decoration: none;
    font-weight: 400;
    padding: 0 20px;
    border-radius: 3px;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    min-height: 44px;
}


.back-to-upload:hover {
    border-color: #000;
    background: #F5F5F5;
}

.analysis-navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #E0E0E0;
}

/* Normalize button heights/margins inside bottom nav bars */
.analysis-navigation .process-btn,
.analysis-navigation .back-to-upload,
.analysis-navigation .editor-button,
.intake-navigation .process-btn,
.intake-navigation .back-to-upload,
.upload-navigation .process-btn,
.upload-navigation .back-to-upload {
    margin: 0;
}

#analysis-complete-container {
    margin-bottom: 20px;
    margin-top: 0;
}

#analysis-results-container,
#analysis-results-container * {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* Grouping Controls — Save for later + Sort by (match Analysis Complete UI) */
.main-content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

#grouping-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
}

.grouping-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
    background: transparent;
    border-radius: 0;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.grouping-toggle label {
    font-size: 0.9em;
    font-weight: 400;
    color: #666666;
    margin: 0;
}

#grouping-select {
    padding: 10px 14px 10px 14px;
    border: 1px solid #DEDEDE;
    border-radius: 10px;
    background: #FFFFFF;
    font-size: 0.9em;
    font-weight: 400;
    color: #333333;
    cursor: pointer;
    transition: border-color 0.2s ease;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

#grouping-select:focus {
    outline: none;
    border-color: #0066CC;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

/* Save for later — white card style, rounded, light border */
.editor-button {
    padding: 10px 16px;
    border: 1px solid #DEDEDE;
    border-radius: 10px;
    background: #FFFFFF;
    font-size: 0.8em;
    font-weight: 500;
    color: #333333;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.editor-button svg {
    flex-shrink: 0;
    color: #333333;
}

.dispute-btn-save-for-later svg {
    width: 19px;
    height: 19px;
}

.editor-button:hover {
    background: #F7F7F7;
    border-color: #D0D0D0;
    color: #333333;
}

.editor-button:focus {
    outline: none;
    border-color: #0066CC;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

/* Grouped Issue Display */
.issue-group {
    margin-bottom: 24px;
}

.issue-group-header {
    background: #F8F9FA;
    border: 1px solid #E0E0E0;
    border-radius: 8px 8px 0 0;
    padding: 12px 16px;
    margin-bottom: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.issue-group-content {
    background: white;
    border: 1px solid #E0E0E0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 16px;
}

.issue-group-content .issue-box {
    margin-bottom: 16px;
    border-radius: 8px;
}

.issue-group-content .issue-box:last-child {
    margin-bottom: 0;
}

/* Type-specific group styling */
.issue-group.type-overcharge .issue-group-header {
    background: #E3F2FD;
    color: #1976D2;
    border-color: #BBDEFB;
}

.issue-group.type-input_form .issue-group-header {
    background: #F3E5F5;
    color: #7B1FA2;
    border-color: #E1BEE7;
}

/* Confidence-specific group styling */
.issue-group.confidence-high .issue-group-header {
    background: #E8F5E8;
    color: #2E7D32;
    border-color: #C8E6C9;
}

.issue-group.confidence-low .issue-group-header {
    background: #FFF3E0;
    color: #F57C00;
    border-color: #FFE0B2;
}

#pdf-header-container {
    margin-bottom: 20px;
    margin-top: 0;
}

/* Dispute letter page — top section (title, subtitle, consultation box, actions) */
.dispute-letter-top {
    margin-bottom: 24px;
}

.dispute-letter-header {
    margin-bottom: 20px;
}

.dispute-letter-subtitle-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.dispute-letter-subtitle {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: #333;
    margin: 0;
}

.dispute-letter-info-tooltip-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
}

.dispute-letter-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e5e5e5;
    color: #555;
    font-size: 12px;
    font-weight: 600;
    font-style: italic;
    font-family: Georgia, serif;
}

.dispute-letter-info-tooltip {
    visibility: hidden;
    opacity: 0;
    position: fixed;
    top: 0;
    left: 0;
    min-width: 240px;
    max-width: 352px;
    width: max-content;
    padding: 19px 20px 24px;
    background: #f5f4f0;
    color: #222;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.75em;
    font-weight: 400;
    line-height: 1.5;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    z-index: 100;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    white-space: normal;
    text-align: left;
    box-sizing: border-box;
    display: block;
    max-height: 60vh;
    overflow-y: auto;
    overflow-wrap: anywhere;
}

.dispute-letter-info-tooltip p {
    margin: 0 0 10px 0;
}

.dispute-letter-info-tooltip p:last-child {
    margin-bottom: 0;
}

.dispute-letter-info-tooltip-trigger:hover .dispute-letter-info-tooltip,
.dispute-letter-info-tooltip-trigger:focus .dispute-letter-info-tooltip {
    visibility: visible;
    opacity: 1;
}

/* Consultation CTA box — light green */
.dispute-consultation-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    background: #E8F5E9;
    border: 1px solid #A7D9A4;
    border-radius: 10px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.85rem;
}

.dispute-consultation-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.dispute-consultation-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: #5a9e5a;
}

.dispute-consultation-text h3 {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    margin: 0 0 2px 0;
}

.dispute-consultation-desc {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: #4a7c4a;
    margin: 0;
}

.dispute-consultation-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    background: #468246;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s ease;
}

.dispute-consultation-btn:hover {
    background: #3a6b3a;
}

.dispute-consultation-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(70, 130, 70, 0.4);
}

/* Actions row: Edit, Contact Hospital, Download PDF, Copy */
.dispute-actions-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.dispute-actions-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.dispute-actions-buttons .dispute-btn-secondary {
    white-space: nowrap;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .dispute-actions-buttons {
        gap: 6px;
    }

    .dispute-actions-buttons .dispute-btn-secondary {
        padding: 6px 10px;
        font-size: 0.82rem;
    }

    .dispute-actions-buttons .dispute-btn-secondary span {
        display: none;
    }
}

@media (max-width: 480px) {
    .dispute-actions-buttons {
        gap: 4px;
    }

    .dispute-actions-buttons .dispute-btn-secondary {
        padding: 6px 8px;
    }
}

.dispute-btn-secondary {
    padding: 8px 16px;
    border: 1px solid #666;
    border-radius: 8px;
    background: #f5f5f5;
    color: #333;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.dispute-btn-secondary:hover:not(:disabled) {
    border-color: #333;
    background: #eee;
}

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

.dispute-btn-primary {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: #333;
    color: #fff;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease;
}

.dispute-btn-primary:hover {
    background: #222;
}

#pdf-view .main-content {
    background: #F8F8F5;
}

#pdf-view {
    overflow: visible;
}

#pdf-preview-container {
    display: block;
    margin-top: 0;
}

.dispute-letter-body {
    display: block;
    background: #fff;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    padding: 20px;
    font-family: 'Roboto', Georgia, 'Times New Roman', Times, serif;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    color: #333;
    margin: 0;
    min-height: 120px;
}

.pdf-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #E0E0E0;
}

.pdf-actions {
    display: flex;
    gap: 15px;
}

.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #C4C8BE;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ── Analyzing state (progress card after clicking Analyze) ─────────── */
.analyzing-state {
    display: none;
    flex-direction: column;
    gap: 1.25rem;
    animation: analyzingFadeUp 0.5s ease forwards;
}

.analyzing-state.visible {
    display: flex;
}

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

.analyzing-file-summary {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.summary-file {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 0.7rem 1rem;
    opacity: 0.85;
}

.summary-file-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: var(--tag-bg);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
}

.summary-file-info {
    flex: 1;
    min-width: 0;
}

.summary-file-name {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.summary-file-size {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.summary-file-status {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 500;
}

.summary-file-status.status-done {
    color: var(--green);
}

/* Progress card */
.progress-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Hero icon: one frame visible per active step (replaces orbital spinner) */
.hero-icon {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-frame {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.85) translateY(6px);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s linear 0.4s;
    pointer-events: none;
}

.hero-frame .hero-svg {
    color: var(--text);
}

.hero-frame.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.hero-frame.active .hero-svg {
    color: var(--text);
}

.hero-frame.exiting {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.85) translateY(6px);
    transition: none;
}


/* Done state: show active frame in green when all complete */
.hero-icon.hero-all-done .hero-frame.active .hero-svg {
    color: var(--green);
}

.progress-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    text-align: center;
}

.progress-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.progress-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 340px;
    margin: 0;
}

/* Progress steps */
.progress-steps {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.2s;
}

.progress-step:last-child {
    border-bottom: none;
}

.progress-step.step-done {
    background: var(--green-bg);
}

.progress-step.step-active {
    background: var(--bg);
}

.progress-step.step-pending {
    background: var(--card);
}

.step-indicator {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 700;
}

.step-done .step-indicator {
    background: var(--green-bg);
    border: 1.5px solid var(--green);
    color: var(--green);
}

.step-active .step-indicator {
    background: var(--tag-bg);
    border: 1.5px solid var(--border);
    color: var(--text);
}

.step-pending .step-indicator {
    background: var(--card);
    border: 1.5px solid var(--border-light);
    color: var(--text-muted);
}

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

.spinner-tiny {
    width: 10px;
    height: 10px;
    border: 1.5px solid var(--border);
    border-top-color: var(--text-muted);
    border-radius: 50%;
    animation: stepSpin 0.7s linear infinite;
}

.step-label {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 500;
}

.step-done .step-label {
    color: var(--green);
}

.step-active .step-label {
    color: var(--text);
}

.step-pending .step-label {
    color: var(--text-muted);
}

.step-tag {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
}

.step-tag.tag-done {
    background: var(--green-bg);
    border: 1px solid var(--green);
    color: var(--green);
}

.step-tag.tag-active {
    background: var(--tag-bg);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.step-tag.tag-pending {
    background: var(--card);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
}

/* Progress bar */
.progress-bar-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-bar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.progress-bar-track {
    width: 100%;
    height: 3px;
    background: var(--border-light);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--amount);
    border-radius: 999px;
    width: 0%;
    transition: width 0.3s ease;
}

.patience-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.patience-note svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 3px;
    margin: 10px 0;
    border-left: 4px solid #c62828;
}

.success-message {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 15px;
    border-radius: 3px;
    margin: 10px 0;
    border-left: 4px solid #2e7d32;
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-sidebar {
        width: 100%;
        position: static;
        border-right: none;
        border-bottom: 1px solid #E0E0E0;
        padding-bottom: 12px;
        margin-bottom: 4px;
    }
    
    .content-wrapper {
        order: 1;
    }
    
    .nav-item {
        display: inline-block;
        margin-right: 10px;
        margin-bottom: 5px;
        padding: 8px 12px;
        font-size: 0.8em;
    }
    
    .upload-section {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 20px;
    }
}

/* Additional styles for inline style extraction */
.intake-description {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 400;
}

/* Light brown banner for intake form note */
.intake-banner {
    background: #F7F2ED;
    border: 1px solid #DDD4C4;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 16px;
    font-size: 0.95em;
    line-height: 1.5;
    color: #5C5346;
}

/* 🚨 Error banner for intake validation failures */
.intake-validation-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-left: 4px solid #DC2626;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 16px;
    font-size: 0.95em;
    line-height: 1.5;
    color: #991B1B;
}

.intake-validation-error-message {
    margin: 0;
    font-weight: 500;
}

.intake-validation-error-list {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.intake-validation-error-list li {
    margin-bottom: 4px;
}

.intake-section {
    background: #F5F5EE;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
}

.intake-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.intake-question {
    font-weight: 500;
    margin-bottom: 10px;
    color: #34495e;
    line-height: 1.4;
}

.intake-options {
    font-weight: 400;
    display: flex;
    gap: 20px;
    margin-left: 20px;
}

.intake-option {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.intake-option input {
    margin-right: 8px;
}

.intake-details {
    display: none;
    margin-top: 10px;
    margin-left: 20px;
}

.intake-details label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #34495e;
}

.intake-textarea {
    width: 100%;
    max-width: 500px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
}

.intake-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}


.about-section {
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

/* Increase width of sections on About page */
#about-view .about-section,
#about-view .faq-section {
    max-width: 1000px;
}

.about-text {
    font-size: 1.0em;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 24px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.about-text:last-child {
    margin-bottom: 0;
}

.faq-section {
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: left;
    max-width: 800px;
    margin: 32px auto 0;
}

/* 📑 FAQ tab bar — horizontal tab navigation for FAQ sections */
.faq-tab-bar {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.faq-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 12px 16px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.95em;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.faq-tab:hover {
    color: var(--text);
}

.faq-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.faq-title {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 24px;
    font-family: 'Lora', serif;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 0;
}

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

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 16px 0;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.0em;
    font-weight: 500;
    color: var(--text);
    transition: color 0.2s ease;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-icon {
    font-size: 1.5em;
    font-weight: 300;
    color: var(--text-muted);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-question.active .faq-icon {
    transform: rotate(45deg);
    color: var(--primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 0;
}

.faq-answer.active {
    max-height: 3000px;
    padding: 0 0 24px 0;
}

.faq-answer-inner {
    padding: 0 0 24px 0;
}

/* Framer Motion–driven FAQ dropdown (About React app): let motion control height */
#about-view .about-app-content .faq-answer {
    max-height: none;
    transition: none;
}

.faq-answer p {
    font-size: 1.0em;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text);
    margin: 0;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.faq-answer p b,
.faq-answer p strong,
.faq-answer b,
.faq-answer strong {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* 🌙 Night mode: about + FAQ sections (about-app-content) */
html[data-theme="night"] .about-section.about-app-content,
html[data-theme="night"] .faq-section.about-app-content {
    background: var(--card-alt);
    border-color: var(--border);
}

html[data-theme="night"] .faq-section .faq-question:hover {
    color: var(--primary);
}

html[data-theme="night"] .faq-section .faq-icon {
    color: var(--text-muted);
}

html[data-theme="night"] .faq-section .faq-question.active .faq-icon {
    color: var(--primary);
}

html[data-theme="night"] .faq-tab {
    color: var(--text-muted);
}

html[data-theme="night"] .faq-tab:hover {
    color: var(--text);
}

html[data-theme="night"] .faq-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* 📱 Mobile: smaller tab padding for narrow viewports */
@media (max-width: 480px) {
    .faq-tab {
        padding: 10px 12px;
        font-size: 0.88em;
    }
}

.welcome-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.welcome-flag-text {
    width: 100%;
    margin: 0.5rem 0 1rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.welcome-header .welcome-trust {
    width: 100%;
    margin: 0;
    padding: 0;
}

.welcome-button {
    width: auto;
    margin: 2rem auto 0;
    min-height: unset;
    display: block;
    padding: 10px 24px;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
}

.welcome-button:hover {
    background: var(--text);
    color: var(--bg);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transform: none;
}

/* ── 🪜 Welcome step cards ────────────────────────────────────────── */

.welcome-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.welcome-step-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 24px 20px;
    cursor: default;
}

.welcome-step-label {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}

.welcome-step-card--1 .welcome-step-label { color: var(--step-accent-1); }
.welcome-step-card--2 .welcome-step-label { color: var(--step-accent-2); }
.welcome-step-card--3 .welcome-step-label { color: var(--step-accent-3); }
.welcome-step-card--4 .welcome-step-label { color: var(--step-accent-4); }

.welcome-step-title {
    font-family: 'Lora', serif;
    font-size: 19px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.welcome-step-desc {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 18px;
}

.welcome-step-sketch {
    width: 100%;
    aspect-ratio: 5 / 3.2;
    background: var(--card-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.welcome-step-sketch svg {
    width: 100%;
    height: 100%;
}

/* ── 🛡️ Trust badges ──────────────────────────────────────────────── */

.welcome-trust {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 840px;
    margin: 0 auto;
    padding: 0 24px;
}

.welcome-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.welcome-trust-badge svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* 📱 Responsive: stack to single column on narrow viewports */
@media (max-width: 680px) {
    .welcome-steps {
        grid-template-columns: 1fr;
    }
}

.upload-spacer {
    margin-bottom: 20px;
}

.upload-file-display {
    flex: 1;
    padding: 16px 20px;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    background: white;
    color: #333333;
    font-size: 0.95em;
    font-weight: 400;
}

.upload-file-display:focus {
    outline: none;
    border-color: #0066CC;
}

.upload-file-display:blur {
    border-color: #E0E0E0;
}

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

.upload-label {
    color: #8B8589;
    font-size: 1.1em;
    font-weight: 300;
}

.upload-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.upload-process-btn {
    width: auto;
    margin: 0;
}

.upload-spacer-empty {
    margin-bottom: 20px;
}

.intake-form-container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    min-width: 0;
}

#intake-form-container {
    min-width: 0;
    max-width: 100%;
}

.intake-question-container {
    margin-bottom: 25px;
}

.intake-input {
    width: auto;
    max-width: 100%;
    padding: 12px 16px;
    border: 1px solid #E0E0E0;
    border-radius: 4px;
    font-size: 0.95em;
    font-family: inherit;
    background: white;
    color: #333;
    transition: all 0.2s ease;
    min-width: 200px;
}

.intake-input[list] {
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-clip: padding-box;
}

.intake-input[list]::-webkit-calendar-picker-indicator,
.intake-input[list]::-webkit-list-button,
.intake-input[list]::-webkit-dropdown-arrow {
    display: none !important;
    -webkit-appearance: none !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

.intake-input[list]::-moz-list-bullet {
    display: none !important;
}

.intake-input:focus {
    outline: none;
    border-color: #0066CC;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.intake-input::placeholder {
    color: #A0A0A0;
}

.copy-btn {
    width: auto;
    margin: 0;
    background: #666666;
}

/* Hospital Contact Modal */
.hospital-contact-modal-content {
    max-width: 420px;
    width: 90%;
    padding: 14px 16px 16px;
    font-size: 0.9em;
}

.hospital-contact-modal-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #E0E0D8;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.hospital-contact-modal-title {
    font-size: 1.05em;
    font-weight: 700;
    color: #3B3B3B;
    margin: 0;
    letter-spacing: -0.02em;
}

.hospital-contact-modal-subtitle {
    font-size: 0.85em;
    font-weight: 400;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0;
}

.hospital-contact-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hospital-contact-form .editor-field label {
    display: block;
}

.hospital-contact-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hospital-contact-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: #EBEBE5;
    border: 1px solid #E0E0D8;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.hospital-contact-card-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.hospital-contact-card-dept {
    font-size: 0.9em;
    font-weight: 600;
    color: #3B3B3B;
}

.hospital-contact-card-cat {
    font-size: 0.75em;
    font-weight: 400;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.hospital-contact-card-right {
    flex-shrink: 0;
}

.hospital-contact-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.85em;
    font-weight: 600;
    color: #3B3B3B;
    background: #F5F5EE;
    border: 1px solid #D0D0C8;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
}

.hospital-contact-action:hover {
    background: #EBEBE5;
    border-color: #c0c0b8;
}

.hospital-contact-action-text {
    cursor: default;
    font-weight: 500;
}

.hospital-contact-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #E8E8E0;
}

.hospital-contact-disclaimer {
    font-size: 0.8em;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
}

.hospital-contact-close-btn {
    align-self: flex-end;
    padding: 6px 14px;
    font-size: 0.85em;
    font-weight: 500;
    color: #3B3B3B;
    background: #F5F5EE;
    border: 1px solid #D0D0C8;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
}

.hospital-contact-close-btn:hover {
    background: #EBEBE5;
    border-color: #c0c0b8;
}

.hospital-contact-message {
    font-size: 0.9em;
    color: #6c757d;
    margin: 0 0 10px 0;
}

#hospital-contact-modal .modal-close {
    top: 10px;
    right: 12px;
    font-size: 1.25em;
    color: #3B3B3B;
}

/* Dispute Letter Editor Modal (modeled after design reference) */
#dispute-letter-editor-modal .modal-content {
    max-width: 608px;
    padding: 18px 20px 16px 20px;
}

#dispute-letter-editor-modal .modal-header {
    border-bottom: 1px solid #E0E0D8;
    margin-bottom: 14px;
    padding-bottom: 14px;
}

#dispute-letter-editor-modal .modal-header h2 {
    font-size: 1.1em;
    font-weight: 600;
    letter-spacing: -0.02em;
}

#dispute-letter-editor-modal .modal-close {
    top: 14px;
    right: 16px;
    color: #3B3B3B;
}

.dispute-letter-editor-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dle-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dle-section-title {
    font-size: 0.65em;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: #9A9A9A;
}

.dle-divider {
    height: 1px;
    width: 100%;
    background: #E0E0D8;
    margin: 4px 0;
}

.dle-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 11px;
}

.dle-grid--2 {
    grid-template-columns: 1fr 1fr;
}

.dle-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dle-field--full {
    grid-column: 1 / -1;
}

.dle-field label {
    font-size: 0.65em;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #7D7D7D;
}

.dle-field input,
.dle-field textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #DEDED5;
    border-radius: 7px;
    background: #EDEDE4;
    color: #2C2A27;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.85em;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.dle-field input::placeholder,
.dle-field textarea::placeholder {
    color: #9C9C9C;
}

.dle-field input:focus,
.dle-field textarea:focus {
    outline: none;
    border-color: rgba(44, 42, 39, 0.55);
    box-shadow: 0 0 0 3px rgba(44, 42, 39, 0.08);
    background: #F1F1E9;
}

.dle-field textarea {
    resize: vertical;
    min-height: 77px;
}

.dle-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}

.dle-btn {
    min-height: 31px;
    padding: 0 15px;
    border-radius: 8px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.dle-btn:active {
    transform: translateY(1px);
}

.dle-btn--primary {
    background: #2C2A27;
    color: #FFFFFF;
    border: 1px solid #2C2A27;
}

.dle-btn--primary:hover {
    background: #1F1E1C;
    border-color: #1F1E1C;
}

.dle-btn--secondary {
    background: #E6E4DD;
    color: #2C2A27;
    border: 1px solid #D7D4CC;
}

.dle-btn--secondary:hover {
    background: #DEDCD4;
    border-color: #CFCBC2;
}

/* Dispute letter editor modal — night mode (inputs and labels) */
html[data-theme="night"] #dispute-letter-editor-modal .modal-content {
    background: var(--modal-bg);
}

html[data-theme="night"] #dispute-letter-editor-modal .modal-header {
    border-bottom-color: var(--border);
}

html[data-theme="night"] #dispute-letter-editor-modal .modal-header h2 {
    color: var(--text);
}

html[data-theme="night"] #dispute-letter-editor-modal .modal-close {
    color: var(--text);
}

html[data-theme="night"] #dispute-letter-editor-modal .dle-section-title {
    color: #A8A296;
}

html[data-theme="night"] #dispute-letter-editor-modal .dle-divider {
    background: var(--border);
}

html[data-theme="night"] #dispute-letter-editor-modal .dle-field label {
    color: var(--text-muted);
}

html[data-theme="night"] #dispute-letter-editor-modal .dle-field input,
html[data-theme="night"] #dispute-letter-editor-modal .dle-field textarea {
    border-color: var(--border);
    background: var(--input-bg);
    color: var(--text);
}

html[data-theme="night"] #dispute-letter-editor-modal .dle-field input::placeholder,
html[data-theme="night"] #dispute-letter-editor-modal .dle-field textarea::placeholder {
    color: var(--text-placeholder);
}

html[data-theme="night"] #dispute-letter-editor-modal .dle-field input:focus,
html[data-theme="night"] #dispute-letter-editor-modal .dle-field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-focus);
    background: var(--input-bg);
}

html[data-theme="night"] #dispute-letter-editor-modal .dle-btn--primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border-color: var(--border);
}

html[data-theme="night"] #dispute-letter-editor-modal .dle-btn--primary:hover {
    background: var(--btn-primary-hover-bg);
    border-color: var(--btn-primary-hover-bg);
}

html[data-theme="night"] #dispute-letter-editor-modal .dle-btn--secondary {
    background: var(--tag-bg);
    color: var(--btn-primary-text);
    border-color: var(--border);
}

html[data-theme="night"] #dispute-letter-editor-modal .dle-btn--secondary:hover {
    background: var(--nav-active);
    border-color: var(--border);
}

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

/* Top actions (Edit + PDF actions) styling */
.top-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.top-actions-buttons button {
    padding: 6px 12px;
    border: 1px solid black;
    border-radius: 4px;
    background: #C4C8BE;
    font-size: 0.9em;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s ease;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Ensure the Download / Copy buttons align icon + text */
.pdf-actions .process-btn,
.pdf-actions .copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.top-actions-buttons button:hover {
    border-color: #0066CC;
}

.top-actions-buttons button:focus {
    outline: none;
    border-color: #0066CC;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

/* ── Sign-In Modal ─────────────────────────────────────────────── */
.signin-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'DM Sans', sans-serif;
}

.signin-card {
    background: var(--signin-card);
    border-radius: 12px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    font-family: 'DM Sans', sans-serif;
}

.signin-close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #333;
    line-height: 1;
    padding: 4px;
}

.signin-heading {
    margin-bottom: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    padding-bottom: 12px;
    border-bottom: 1px solid #DDDDDD;
    margin-bottom: 16px;
}

.signin-user-info {
    padding: 12px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    margin-bottom: 12px;
}

.signin-user-name {
    font-size: 0.9rem;
    margin-bottom: 4px;
    font-weight: 500;
}

.signin-user-role {
    font-size: 0.8rem;
    color: #666;
}

/* Account card (signed-in): avatar + name + role pill */
.signin-account-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    margin-bottom: 16px;
}

.signin-account-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #C4B8A8;
    color: #5C5349;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.signin-account-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.signin-account-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.signin-account-role-pill {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #5C5349;
    background: #EDEAE6;
    padding: 2px 8px;
    border-radius: 6px;
    align-self: flex-start;
}

/* Nav list: Account Settings, Saved Results (icon + text) */
.signin-nav-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 16px;
}

.signin-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 400;
    color: #1a1a1a;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    text-align: left;
    transition: background 0.2s ease;
}

.signin-nav-item:hover {
    background: rgba(0, 0, 0, 0.06);
}

.signin-nav-icon {
    flex-shrink: 0;
    color: #666;
}

.signin-nav-item:hover .signin-nav-icon {
    color: #333;
}

/* Sign Out — destructive link style */
.signin-signout-btn {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 500;
    color: #dc2626;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: background 0.2s ease, color 0.2s ease;
}

.signin-signout-btn:hover {
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
}

.signin-full-width {
    width: 100%;
    padding: 12px 16px;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
}

/* Primary passkey button — dark charcoal, white text + icon */
.signin-passkey-btn {
    width: 100%;
    margin-bottom: 16px;
    background: #333333 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.signin-passkey-btn:hover:not(:disabled) {
    background: #444 !important;
    color: #fff !important;
}

.signin-passkey-btn .signin-btn-icon {
    color: #fff;
    flex-shrink: 0;
}

/* Divider with "or register" pill */
.signin-divider {
    text-align: center;
    color: #666;
    font-size: 0.8rem;
    font-weight: 400;
    margin: 20px 0;
    position: relative;
    background: #F8F6F3;
    padding: 0 12px;
    z-index: 1;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
}

.signin-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #DDDDDD;
    z-index: -1;
}

/* Section title above registration form */
.signin-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
    margin-top: 4px;
}

.signin-field {
    margin-bottom: 14px;
}

.signin-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.signin-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #DDDDDD;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'DM Sans', sans-serif;
    background: #fff;
    color: #1a1a1a;
}

.signin-input::placeholder {
    color: #999;
}

/* Register with Passkey — light beige, dark text + border */
.signin-register-btn {
    width: 100%;
    padding: 12px 16px;
    margin-top: 8px;
    margin-bottom: 0;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    background: #F8F6F3;
    color: #333;
    border: 1px solid #DDDDDD;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, border-color 0.2s;
}

.signin-register-btn:hover:not(:disabled) {
    background: #EDEAE6;
    border-color: #ccc;
}

.signin-register-btn .signin-btn-icon.signin-register-icon {
    color: #333;
}

.signin-status {
    margin-top: 12px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
}

.signin-status-error {
    background: #fef2f2;
    color: #dc2626;
}

.signin-status-success {
    background: #f0fdf4;
    color: #16a34a;
}

.signin-status-info {
    background: #eff6ff;
    color: #2563eb;
}

.signin-link-btn {
    background: none;
    border: none;
    color: #0066CC;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 8px;
    text-decoration: underline;
    font-family: 'DM Sans', sans-serif;
}

.signin-link-btn:hover {
    color: #004499;
}

/* 🎚️ Underline Auth Mode Tabs (Passkey | Email) */
.auth-mode-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    position: relative;
}

.auth-mode-highlight {
    display: none;
}

.auth-mode-tab {
    position: relative;
    flex: 0 0 auto;
    padding: 10px 16px 12px;
    margin-bottom: -1px;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 400;
    color: #666;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    border-bottom: 2px solid transparent;
    transition: color 0.1s ease;
}

/* Sliding underline is the motion.span; keep border transparent on tab */
.auth-mode-tab.active {
    font-weight: 700;
    color: #1a1a1a;
    border-bottom-color: transparent;
}

/* 🎯 CSS-based underline — replaces framer-motion layoutId to avoid nested AnimatePresence blocking modal exit */
.auth-mode-tab::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: #1a1a1a;
    border-radius: 1px;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.auth-mode-tab.active::after {
    transform: scaleX(1);
}

.auth-mode-tab:hover:not(.active) {
    color: #333;
}

/* Sign-in card night mode — match app buttons and font coloring */
html[data-theme="night"] .signin-card {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

html[data-theme="night"] .signin-close-btn {
    color: var(--text);
}

html[data-theme="night"] .signin-heading {
    color: var(--text);
    border-bottom-color: var(--border);
}

html[data-theme="night"] .signin-user-info {
    background: rgba(255, 255, 255, 0.06);
}

html[data-theme="night"] .signin-user-name {
    color: var(--text);
}

html[data-theme="night"] .signin-user-role {
    color: var(--text-muted);
}

html[data-theme="night"] .signin-account-card {
    background: rgba(255, 255, 255, 0.06);
}

html[data-theme="night"] .signin-account-avatar {
    background: var(--tag-bg);
    color: var(--text-muted);
}

html[data-theme="night"] .signin-account-name {
    color: var(--text);
}

html[data-theme="night"] .signin-account-role-pill {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.1);
}

html[data-theme="night"] .signin-nav-item {
    color: var(--text);
}

html[data-theme="night"] .signin-nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="night"] .signin-nav-icon {
    color: var(--text-muted);
}

html[data-theme="night"] .signin-nav-item:hover .signin-nav-icon {
    color: var(--text);
}

html[data-theme="night"] .signin-signout-btn {
    color: #f87171;
}

html[data-theme="night"] .signin-signout-btn:hover {
    background: rgba(248, 113, 113, 0.15);
    color: #fca5a5;
}

html[data-theme="night"] .signin-passkey-btn {
    background: var(--btn-primary-bg) !important;
    color: var(--btn-primary-text) !important;
    border: 1px solid var(--border) !important;
}

html[data-theme="night"] .signin-passkey-btn:hover:not(:disabled) {
    background: var(--btn-primary-hover-bg) !important;
    color: var(--btn-primary-text) !important;
}

html[data-theme="night"] .signin-passkey-btn .signin-btn-icon {
    color: var(--btn-primary-text);
}

html[data-theme="night"] .signin-divider {
    color: var(--text-muted);
    background: var(--signin-card);
}

html[data-theme="night"] .signin-divider::before {
    background: var(--border);
}

html[data-theme="night"] .signin-section-title {
    color: var(--text-muted);
}

html[data-theme="night"] .signin-label {
    color: var(--text-muted);
}

html[data-theme="night"] .signin-input {
    border-color: var(--border);
    background: var(--input-bg);
    color: var(--text);
}

html[data-theme="night"] .signin-input::placeholder {
    color: var(--text-placeholder);
}

html[data-theme="night"] .signin-register-btn {
    background: var(--tag-bg);
    color: var(--btn-primary-text);
    border-color: var(--border);
}

html[data-theme="night"] .signin-register-btn:hover:not(:disabled) {
    background: var(--nav-active);
    border-color: var(--border);
}

html[data-theme="night"] .signin-register-btn .signin-btn-icon.signin-register-icon {
    color: var(--btn-primary-text);
}

html[data-theme="night"] .signin-status-error {
    background: rgba(220, 38, 38, 0.15);
    color: #fca5a5;
}

html[data-theme="night"] .signin-status-success {
    background: rgba(22, 163, 74, 0.15);
    color: #86efac;
}

html[data-theme="night"] .signin-status-info {
    background: rgba(37, 99, 235, 0.15);
    color: #93c5fd;
}

html[data-theme="night"] .signin-link-btn {
    color: var(--primary);
}

html[data-theme="night"] .signin-link-btn:hover {
    color: var(--primary-hover);
}

html[data-theme="night"] .auth-mode-tab {
    color: var(--text-muted);
}

html[data-theme="night"] .auth-mode-tab.active {
    color: var(--text);
    border-bottom-color: transparent;
}

html[data-theme="night"] .auth-mode-tab::after {
    background: var(--primary);
}

html[data-theme="night"] .auth-mode-tab:hover:not(.active) {
    color: var(--text);
}

html[data-theme="night"] .otp-input-cell {
    border-color: var(--border);
    background: var(--input-bg);
    color: var(--text);
}

html[data-theme="night"] .otp-input-cell:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-focus);
}

/* Panel wrapper — fixed height so tab switch doesn’t resize the card */
.signin-panel-wrapper {
    position: relative;
    min-height: 420px;
}

.signin-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

/* 🔢 OTP Input */
.otp-input-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 16px 0;
}

.otp-input-cell {
    width: 42px;
    height: 48px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.2s;
}

.otp-input-cell:focus {
    outline: none;
    border-color: #0066CC;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

/* 👤 Profile Page */
.profile-section {
    background: #fff;
    border: 1px solid #E0E0E0;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
}

.profile-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-section-title svg {
    flex-shrink: 0;
}

.profile-status-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.profile-warning-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.profile-warning-row svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #0066CC;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
}

.profile-meta {
    font-size: 0.875rem;
    color: #666;
}

.profile-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.profile-badge-passkey {
    background: #dbeafe;
    color: #1e40af;
}

.profile-badge-email {
    background: #fef3c7;
    color: #92400e;
}

.profile-badge-both {
    background: #d1fae5;
    color: #065f46;
}

.profile-badge-success {
    background: #d1fae5;
    color: #065f46;
    margin-left: 8px;
}

.profile-badge-muted {
    background: #f3f4f6;
    color: #6b7280;
    margin-left: 8px;
}

.profile-credential-quota {
    font-size: 0.85rem;
    color: #6b7280;
    text-align: center;
    padding: 4px 0;
}

.passkey-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.passkey-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.passkey-info {
    font-size: 0.875rem;
}

.passkey-label {
    font-weight: 500;
}

.passkey-detail {
    color: #666;
    font-size: 0.8rem;
}

.profile-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #E0E0E0;
    background: #fff;
    cursor: pointer;
    transition: background 0.15s;
}

.profile-btn:hover {
    background: #f3f4f6;
}

.profile-btn-primary {
    background: #0066CC;
    color: #fff;
    border-color: #0066CC;
}

.profile-btn-primary:hover {
    background: #0052a3;
}

.profile-btn-danger {
    color: #dc2626;
    border-color: #fecaca;
}

.profile-btn-danger:hover {
    background: #fef2f2;
}

.profile-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.encryption-status {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.encryption-method-card {
    flex: 1;
    min-width: 140px;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.encryption-method-card.active {
    border-color: #0066CC;
    background: #eff6ff;
}

.encryption-method-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.encryption-method-icon svg {
    display: block;
}

.encryption-method-label {
    font-size: 0.8rem;
    font-weight: 500;
}

.encryption-method-sublabel {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 2px;
}

/* 🔐 Encryption Setup Dialog */
.encryption-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}

/* 🔑 Passkey manager sub-dialog — stacks above EncryptionSetupDialog (z-index 1100) */
.passkey-manager-overlay {
    z-index: 1200;
}

.encryption-dialog {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    max-width: 560px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
}

.encryption-option-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.encryption-option-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.encryption-option-card:hover {
    border-color: #0066CC;
    background: #f8faff;
}

.encryption-option-icon {
    font-size: 1.5rem;
    min-width: 32px;
    text-align: center;
}

.encryption-option-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.encryption-option-desc {
    font-size: 0.85rem;
    color: #666;
}

/* 🔘 Managed card variant — badge + dedicated action button */
.encryption-option-card-managed {
    cursor: default;
    align-items: center;
}

.encryption-option-card-managed:hover {
    border-color: #e5e7eb;
    background: transparent;
}

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

/* 📧 Email hint text for empty state */
.profile-email-hint {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 12px;
}

/* 🎨 Emoji Picker */
.emoji-picker-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
    margin: 12px 0;
}

.emoji-picker-cell {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s;
    background: #fff;
}

.emoji-picker-cell:hover {
    border-color: #0066CC;
    transform: scale(1.05);
}

.emoji-selection-display {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 8px 0;
    min-height: 42px;
}

.emoji-selection-slot {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    transition: transform 0.2s ease-out, opacity 0.15s ease-out;
}

.emoji-selection-slot.filled {
    border-style: solid;
    border-color: #0066CC;
    background: #eff6ff;
    cursor: pointer;
}

.emoji-selection-slot.shifting {
    animation: emoji-shift-left 0.2s ease-out;
}

@keyframes emoji-shift-left {
    from { transform: translateX(100%); opacity: 0.7; }
    to { transform: translateX(0); opacity: 1; }
}

.emoji-stepper-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    background: #f9fafb;
    transition: border-color 0.15s, transform 0.1s, background 0.15s;
    padding: 0;
    line-height: 1;
}

.emoji-stepper-btn:hover:not(:disabled) {
    border-color: #0066CC;
    background: #eff6ff;
    transform: scale(1.1);
}

.emoji-stepper-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* 🎨 EmojiPicker layout — instruction, hint, stepper row, actions */
.emoji-picker-mismatch {
    margin-bottom: 12px;
}

.emoji-picker-instruction {
    font-weight: 500;
    margin-bottom: 8px;
}

.emoji-picker-hint {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
}

.emoji-stepper-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.emoji-stepper-label {
    font-weight: 600;
    font-size: 0.95rem;
    min-width: 80px;
    text-align: center;
}

.emoji-picker-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 12px;
}

/* ── Admin Portal ──────────────────────────────────────────────── */
.admin-card {
    max-width: 440px;
    width: 100%;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #E0E0E0;
}

.admin-card-content {
    padding: 40px;
}

.admin-heading {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.admin-user-info {
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 16px;
}

.admin-user-name {
    font-weight: 500;
}

.admin-user-role {
    font-size: 0.875rem;
    color: #666;
}

.admin-notice {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 16px;
}

.admin-notice--warning {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.82rem;
    color: #6d4c00;
    line-height: 1.5;
}

/* 🌙 Night mode: admin view card and text (styles.css admin block) */
html[data-theme="night"] #admin-view .admin-card,
html[data-theme="night"] #admin-view .admin-dashboard-tab .admin-card {
    background: var(--card);
    border-color: var(--border);
}
html[data-theme="night"] #admin-view .admin-card-content {
    color: var(--text);
}
html[data-theme="night"] #admin-view .admin-heading {
    color: var(--text);
}
html[data-theme="night"] #admin-view .admin-user-info {
    background: var(--tag-bg);
}
html[data-theme="night"] #admin-view .admin-user-name {
    color: var(--text);
}
html[data-theme="night"] #admin-view .admin-user-role,
html[data-theme="night"] #admin-view .admin-notice {
    color: var(--text-muted);
}
html[data-theme="night"] #admin-view .admin-notice--warning {
    background: var(--amber-bg);
    border-color: var(--amber);
    color: var(--amber);
}


/* ── Profile: encryption banner (0-method users) ──────────────────── */

.profile-encryption-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff3e0;
    border: 1px solid #ffcc80;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.profile-encryption-banner p {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: #6d4c00;
}

.profile-encryption-banner strong {
    font-size: 0.95rem;
    color: #e65100;
}

.profile-encryption-banner-btn {
    flex-shrink: 0;
    padding: 8px 20px;
    background: #e65100;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.profile-encryption-banner-btn:hover {
    background: #bf360c;
}

.profile-inline-icon {
    vertical-align: middle;
    margin-right: 6px;
}

/* ── Profile: encryption nudge banner (below-minimum users) ──────── */

.profile-encryption-nudge-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fffbeb;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.profile-encryption-nudge-banner p {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: #92400e;
}

.profile-encryption-nudge-banner strong {
    font-size: 0.95rem;
    color: #b45309;
}

.profile-encryption-nudge-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.profile-encryption-nudge-dismiss {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: #92400e;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 4px;
}

.profile-encryption-nudge-dismiss:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* ── Profile: email display ───────────────────────────────────────── */

.profile-email-address {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 4px;
    word-break: break-all;
}

.profile-email-status {
    font-size: 0.9rem;
}

.profile-email-empty {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.profile-email-hint {
    font-size: 0.82rem;
    color: #666;
    margin-top: 6px;
}

/* ── Profile: email confirm row ───────────────────────────────────── */

.email-confirm-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.email-confirm-row .signin-input {
    flex: 1;
}

/* ── Profile: email identity verification steps ──────────────────── */

.email-verify-identity {
    padding: 12px 0;
}

.email-verify-message {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

/* ── Profile: compact buttons on encryption cards ─────────────────── */

.profile-btn-sm {
    margin-left: 12px;
    font-size: 0.85rem;
    padding: 4px 12px;
}

/* ── Encryption dialog: processing state ──────────────────────────── */

.encryption-dialog-processing {
    text-align: center;
    padding: 32px;
}

.encryption-dialog-processing-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.encryption-dialog-processing-text {
    font-weight: 500;
}

/* ── Encryption dialog: common heading/description spacing ────────── */

.encryption-dialog h2 {
    margin-bottom: 8px;
}

.encryption-dialog-desc {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.encryption-dialog-error {
    margin-bottom: 16px;
}

.encryption-dialog-close-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
}

.encryption-dialog-skip-btn {
    display: block;
    width: 100%;
    text-align: center;
}

.encryption-dialog-back-btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 8px;
}

.encryption-dialog-otp-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}

.encryption-dialog-otp-input {
    flex: 1;
    max-width: 160px;
}

/* 🔐 Encryption dialog — night mode (warm dark palette) */
html[data-theme="night"] .encryption-dialog-overlay {
    background: var(--modal-overlay);
}

html[data-theme="night"] .encryption-dialog {
    background: var(--modal-bg);
    color: var(--text);
}

html[data-theme="night"] .encryption-option-card {
    border-color: var(--border);
    background: var(--card);
}

html[data-theme="night"] .encryption-option-card:hover {
    border-color: var(--primary);
    background: var(--green-bg);
}

html[data-theme="night"] .encryption-option-card-managed:hover {
    border-color: var(--border);
    background: var(--card);
}

html[data-theme="night"] .profile-email-hint {
    color: var(--text-muted);
}

html[data-theme="night"] .encryption-option-title {
    color: var(--text);
}

html[data-theme="night"] .encryption-option-desc {
    color: var(--text-muted);
}

html[data-theme="night"] .emoji-picker-cell {
    background: var(--card);
    border-color: var(--border);
}

html[data-theme="night"] .emoji-picker-cell:hover {
    border-color: var(--primary);
}

html[data-theme="night"] .emoji-selection-slot {
    border-color: var(--border);
    background: var(--upload-card);
}

html[data-theme="night"] .emoji-selection-slot.filled {
    border-color: var(--primary);
    background: var(--green-bg);
}

html[data-theme="night"] .emoji-stepper-btn {
    border-color: var(--border);
    background: var(--upload-card);
}

html[data-theme="night"] .emoji-stepper-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background: var(--green-bg);
}

html[data-theme="night"] .emoji-picker-instruction {
    color: var(--text);
}

html[data-theme="night"] .emoji-picker-hint {
    color: var(--text-muted);
}

html[data-theme="night"] .emoji-stepper-label {
    color: var(--text);
}

html[data-theme="night"] .encryption-dialog-processing-text {
    color: var(--text);
}

html[data-theme="night"] .encryption-dialog h2 {
    color: var(--text);
}

html[data-theme="night"] .encryption-dialog-desc {
    color: var(--text-muted);
}

html[data-theme="night"] .encryption-dialog .signin-status-error {
    background: rgba(220, 38, 38, 0.15);
    color: #fca5a5;
}

html[data-theme="night"] .encryption-dialog .profile-btn {
    background: var(--card);
    border-color: var(--border);
    color: var(--text);
}

html[data-theme="night"] .encryption-dialog .profile-btn:hover {
    background: var(--nav-active);
}

html[data-theme="night"] .encryption-dialog .profile-btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

html[data-theme="night"] .encryption-dialog .profile-btn-primary:hover {
    background: var(--primary-hover);
}

html[data-theme="night"] .encryption-dialog .signin-link-btn {
    color: var(--primary);
}

html[data-theme="night"] .encryption-dialog .signin-link-btn:hover {
    color: var(--primary-hover);
}

html[data-theme="night"] .encryption-dialog .signin-input,
html[data-theme="night"] .encryption-dialog-otp-row .signin-input {
    border-color: var(--border);
    background: var(--input-bg);
    color: var(--text);
}

html[data-theme="night"] .encryption-dialog .signin-input::placeholder {
    color: var(--text-placeholder);
}

/* ── Profile: encryption card button group ────────────────────────── */

.encryption-card-actions {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    justify-content: center;
}

.encryption-card-btn {
    font-size: 0.75rem;
    padding: 2px 8px;
}

.profile-section-actions {
    margin-top: 12px;
}

/* 👤 Profile page — night mode (warm dark palette, consistent with rest of app) */
html[data-theme="night"] #profile-view .intake-description {
    color: var(--text-muted);
}

html[data-theme="night"] #profile-view .main-content {
    background: var(--bg);
}

html[data-theme="night"] .profile-section {
    background: var(--card);
    border-color: var(--border);
}

html[data-theme="night"] .profile-section-title {
    color: var(--text);
}

html[data-theme="night"] .profile-avatar {
    background: var(--primary);
    color: #fff;
}

html[data-theme="night"] .profile-meta {
    color: var(--text-muted);
}

html[data-theme="night"] .profile-badge-passkey {
    background: var(--green-bg);
    color: var(--teal);
}

html[data-theme="night"] .profile-badge-email {
    background: var(--amber-bg);
    color: var(--amber);
}

html[data-theme="night"] .profile-badge-both {
    background: var(--green-bg);
    color: var(--teal);
}

html[data-theme="night"] .profile-badge-success {
    background: var(--green-bg);
    color: var(--teal);
}

html[data-theme="night"] .profile-badge-muted {
    background: var(--upload-card);
    color: var(--text-muted);
}

html[data-theme="night"] .profile-credential-quota {
    color: var(--text-muted);
}

html[data-theme="night"] .passkey-item {
    background: var(--upload-card);
    border-color: var(--border);
}

html[data-theme="night"] .passkey-label {
    color: var(--text);
}

html[data-theme="night"] .passkey-detail {
    color: var(--text-muted);
}

html[data-theme="night"] .profile-btn {
    background: var(--card);
    border-color: var(--border);
    color: var(--text);
}

html[data-theme="night"] .profile-btn:hover {
    background: var(--nav-active);
}

html[data-theme="night"] .profile-btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

html[data-theme="night"] .profile-btn-primary:hover {
    background: var(--primary-hover);
}

html[data-theme="night"] .profile-btn-danger {
    color: #fca5a5;
    border-color: rgba(220, 38, 38, 0.4);
}

html[data-theme="night"] .profile-btn-danger:hover {
    background: rgba(220, 38, 38, 0.2);
}

html[data-theme="night"] .encryption-method-card {
    background: var(--card);
    border-color: var(--border);
}

html[data-theme="night"] .encryption-method-card.active {
    border-color: var(--primary);
    background: var(--green-bg);
}

html[data-theme="night"] .encryption-method-label {
    color: var(--text);
}

html[data-theme="night"] .encryption-method-sublabel {
    color: var(--text-muted);
}

html[data-theme="night"] .profile-encryption-banner {
    background: var(--amber-bg);
    border-color: rgba(232, 197, 71, 0.4);
}

html[data-theme="night"] .profile-encryption-banner p {
    color: var(--amber);
}

html[data-theme="night"] .profile-encryption-banner strong {
    color: var(--amber);
}

html[data-theme="night"] .profile-encryption-banner-btn {
    background: var(--primary);
    color: #fff;
}

html[data-theme="night"] .profile-encryption-banner-btn:hover {
    background: var(--primary-hover);
}

html[data-theme="night"] .profile-encryption-nudge-banner {
    background: var(--amber-bg);
    border-color: rgba(232, 197, 71, 0.4);
}

html[data-theme="night"] .profile-encryption-nudge-banner p {
    color: var(--amber);
}

html[data-theme="night"] .profile-encryption-nudge-banner strong {
    color: var(--amber);
}

html[data-theme="night"] .profile-encryption-nudge-dismiss {
    color: var(--amber);
}

html[data-theme="night"] .profile-encryption-nudge-dismiss:hover {
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="night"] .profile-email-address {
    color: var(--text);
}

html[data-theme="night"] .profile-email-empty {
    color: var(--text-muted);
}

html[data-theme="night"] .email-verify-message {
    color: var(--text-muted);
}

html[data-theme="night"] #profile-page-container .profile-section > p {
    color: var(--text-muted);
}

html[data-theme="night"] .profile-section .signin-status-warning {
    background: rgba(232, 197, 71, 0.15);
    color: var(--amber);
}

