/* ===== Font ===== */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600&display=swap');

/* ===== Tokens ===== */
:root {
    --maroon: #630031;
    --maroon-dark: #1a0010;
    --orange: #e87722;
    --orange-hover: #d06818;
    --glass-bg: rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-blur: 16px;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.65);
    --radius: 16px;
    --radius-sm: 10px;
}

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

body {
    margin: 0;
    padding: 0;
    font-family: 'Rubik', sans-serif;
    background: linear-gradient(160deg, var(--maroon) 0%, var(--maroon-dark) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* override Bootstrap's dark text resets on our dark background */
#main-container,
#main-container p,
#main-container label,
#main-container span,
#main-container li,
.dash,
.dash p,
.dash label,
.dash span,
.dash li,
.how-it-works,
.how-it-works p,
.how-it-works li,
.about-service,
.about-service p,
.about-service li,
.site-footer,
.site-footer a,
.modal-overlay,
.modal-overlay p,
.modal-overlay li {
    color: var(--text-primary);
}

/* ===== Page wrapper ===== */
#main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ===== Issue link ===== */
.issue-link {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.8rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.issue-link:hover {
    opacity: 1;
}

.issue-link a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.issue-link a:hover {
    color: var(--text-primary);
}

/* ===== Page title (outside card) ===== */
.page-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

.page-title h1 {
    font-size: 2.2rem;
    font-weight: 600;
    margin: 0 0 0.4rem;
    letter-spacing: -0.02em;
}

.page-title .tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

/* ===== Glass card ===== */
.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

/* Legacy .container class — same glass treatment for pages that use it */
.container {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    margin: 0;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

/* ===== Typography ===== */
h1, h2, h3 {
    margin: 0 0 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

h1 { font-size: 1.8rem; }

h2 {
    font-size: 1.25rem;
    font-weight: 500;
}

h3 { font-size: 1.1rem; }

p {
    font-size: 0.95rem;
    margin: 0 0 1.2rem;
    line-height: 1.5;
}

/* ===== Form ===== */
form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
}

form .mb-3 {
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.form-label {
    margin-bottom: 0.2rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

input.form-control[type="email"],
input.form-control[type="text"],
input.form-control[type="password"] {
    font-family: 'Rubik', sans-serif;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    width: 100%;
    height: 3rem;
    margin: 0;
    box-sizing: border-box;
    text-align: center;
    background: #f7f7f8;
    color: #1a1a1a;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group > input.form-control[type="password"],
.input-group > input.form-control[type="text"] {
    width: auto;
}

input.form-control[type="email"]:focus,
input.form-control[type="text"]:focus,
input.form-control[type="password"]:focus {
    outline: none;
    border-color: var(--orange);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(232, 119, 34, 0.15);
}

input::placeholder {
    color: #999;
    transition: opacity 0.2s;
}

input:focus::placeholder {
    opacity: 0;
}

/* ===== Buttons ===== */
button[type="submit"] {
    font-family: 'Rubik', sans-serif;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: var(--orange);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.1s;
    width: 100%;
    max-width: 320px;
    margin: 0.5rem auto 0;
    display: block;
}

button[type="submit"]:hover {
    background: var(--orange-hover);
    box-shadow: 0 4px 16px rgba(232, 119, 34, 0.35);
}

button[type="submit"]:active {
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(232, 119, 34, 0.25);
    background: #c5651a;
}

/* ===== Password toggle ===== */
.input-group {
    width: 100%;
    margin: 0;
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    margin: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    background: #f7f7f8;
    color: #1a1a1a;
    border: 1px solid #ddd;
    border-right: none;
    height: 3rem;
    text-align: center;
}

.input-group .form-control:focus {
    border-color: var(--orange);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(232, 119, 34, 0.15);
}

#toggle-password {
    background: #f7f7f8;
    border: 1px solid #ddd;
    border-left: none;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
    color: #666;
    padding: 0 0.75rem;
    height: auto;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: none;
    margin: 0;
    font-size: inherit;
    font-weight: normal;
    transition: color 0.2s, background 0.2s;
}

#toggle-password:hover {
    background: #eee;
    color: #333;
}

/* ===== Credits / footer ===== */
.site-footer {
    margin-top: auto;
    padding: 1.5rem 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.site-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.site-footer a:hover {
    color: var(--text-primary);
}

/* Legacy #credits (still used inside cards) */
#credits {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

#credits a {
    color: var(--text-secondary);
    text-decoration: none;
}

#credits a:hover {
    color: var(--text-primary);
}

/* ===== Animations ===== */
canvas {
    width: 300px;
    height: 300px;
}

#submit-animation-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 1rem auto;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
    opacity: 0;
    visibility: hidden;
}

.animation.visible {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.animation.hidden {
    opacity: 0;
    visibility: hidden;
}

#status-message {
    text-align: center;
    font-size: 1.1rem;
    margin-top: 1rem;
    z-index: 10;
    position: relative;
    color: var(--text-secondary);
}

.duo-code-display {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(232, 119, 34, 0.35);
    text-align: center;
}

.duo-code-display.hidden {
    display: none;
}

.duo-code-label {
    margin: 0 0 0.35rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.duo-code-value {
    margin: 0;
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: 0.35em;
    color: var(--orange);
}

.duo-code-hint {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.notification-warning {
    margin: 0 0 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-sm);
    background: rgba(232, 119, 34, 0.15);
    border: 1px solid rgba(232, 119, 34, 0.35);
    color: var(--text-primary);
    font-size: 0.85rem;
}

/* ===== Dashboard layout ===== */
.dash {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 1.25rem 1rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sample-banner {
    background: rgba(232, 119, 34, 0.12);
    border: 1px solid rgba(232, 119, 34, 0.3);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    text-align: center;
}

.sample-banner a {
    color: var(--orange);
    font-weight: 600;
}

.reviewer-note {
    max-width: 560px;
    width: 100%;
    margin-bottom: 1rem;
    text-align: left;
    line-height: 1.5;
}

.consent-step-heading {
    font-size: 1.05rem;
    margin: 0 0 0.5rem;
}

.consent-step-intro {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0 0 1rem;
    line-height: 1.55;
}

.notifications-proof {
    margin: 0;
}

.dash-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.25rem 0 0.5rem;
}

.dash-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.dash-title i {
    font-size: 1.2rem;
    opacity: 0.7;
}

.dash-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dash-user {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.dash-user i {
    font-size: 1rem;
}

/* Cards */
.dash-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: left;
}

.dash-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.6rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.dash-card-title i {
    color: var(--orange);
    font-size: 1.1rem;
}

.dash-card-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0 0 0.75rem;
    line-height: 1.45;
}

.dash-card-danger {
    border-color: rgba(255, 107, 107, 0.2);
}

.dash-card-danger .dash-card-title i {
    color: #ff6b6b;
}

/* Overview stat bar — 3 stats in one card */
.dash-overview {
    display: flex;
    align-items: center;
    padding: 0;
}

.dash-overview-stat {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1rem 1.1rem;
    min-width: 0;
}

.dash-overview-divider {
    width: 1px;
    align-self: stretch;
    background: var(--glass-border);
    flex-shrink: 0;
}

.dash-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: rgba(232, 119, 34, 0.12);
    color: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.dash-stat-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.dash-stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.dash-stat-value {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.35;
}

/* Quick links row */
.dash-quicklinks {
    display: flex;
    gap: 0.5rem;
}

.dash-quicklink {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 0.75rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.dash-quicklink:hover {
    background: rgba(232, 119, 34, 0.1);
    border-color: rgba(232, 119, 34, 0.3);
    color: var(--text-primary);
}

.dash-quicklink i {
    font-size: 1.1rem;
    color: var(--orange);
}

@media (max-width: 600px) {
    .dash-quicklinks {
        flex-direction: column;
    }
}

/* Scheduler compact bar */
.dash-scheduler-bar {
    padding: 1rem 1.25rem;
}

.dash-scheduler-bar .dash-card-title {
    margin-bottom: 0.2rem;
}

.dash-scheduler-hint {
    font-size: 0.72rem;
    color: var(--text-secondary);
    opacity: 0.7;
    margin: 0 0 0.75rem;
}

.dash-scheduler-cols {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.dash-scheduler-col {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.dash-scheduler-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 500;
}

.dash-scheduler-value {
    font-size: 0.82rem;
    color: var(--text-primary);
}

/* Dashboard footer */
.dash-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    color: var(--text-secondary);
    opacity: 0.7;
    padding-top: 0.5rem;
    transition: opacity 0.2s;
}

.dash-footer:hover {
    opacity: 1;
}

.dash-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.dash-footer a:hover {
    color: var(--text-primary);
}

/* Mobile: stack overview stats */
@media (max-width: 600px) {
    .dash-overview {
        flex-direction: column;
    }

    .dash-overview-divider {
        width: 100%;
        height: 1px;
        align-self: auto;
    }

    .dash-overview-stat {
        width: 100%;
        padding: 0.85rem 1rem;
    }

    .dash-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .dash-scheduler-cols {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Legacy divider (kept for any remaining uses) */
.section-divider {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 1.5rem 0;
}

/* Status pill badges */
.status-pill {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-pill.active {
    background: rgba(144, 238, 144, 0.15);
    color: #90ee90;
}

.status-pill.inactive {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
}

/* Dashboard card text */
.dash-card p {
    margin: 0 0 0.75rem;
    font-size: 0.92rem;
}

.dash-card p strong {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: block;
    margin-bottom: 0.15rem;
}

/* ===== Cadence controls ===== */
.cadence-description {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.cadence-control {
    text-align: center;
}

.cadence-label {
    font-size: 1.05rem;
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
}

#cadence-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--orange);
    min-width: 2ch;
    display: inline-block;
}

#cadence-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    max-width: 280px;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.15);
    outline: none;
    margin: 0.5rem 0;
    cursor: pointer;
}

#cadence-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--orange);
    border: 2px solid var(--text-primary);
    cursor: pointer;
    transition: transform 0.15s;
}

#cadence-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

#cadence-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--orange);
    border: 2px solid var(--text-primary);
    cursor: pointer;
}

.cadence-range-labels {
    display: flex;
    justify-content: space-between;
    max-width: 280px;
    margin: 0 auto 0.8rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.btn-save-cadence {
    padding: 0.5rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: var(--orange);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s, opacity 0.3s;
    width: auto;
    max-width: none;
}

.btn-save-cadence:hover:not(:disabled) {
    background: var(--orange-hover);
}

.btn-save-cadence:disabled {
    opacity: 0.4;
    cursor: default;
}

.cadence-status {
    font-size: 0.82rem;
    min-height: 1.2em;
    margin-top: 0.4rem;
}

/* ===== Preferred login time ===== */
.dash-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 1.25rem 0;
}

.dash-subsection-title {
    font-size: 1rem;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0 0 0.25rem;
}

.preferred-time-control {
    margin-top: 0.75rem;
}

.preferred-time-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.preferred-select {
    padding: 0.5rem 2rem 0.5rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #f5f5f5;
    font-size: 0.9rem;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.preferred-select--time {
    flex: 1;
    min-width: 0;
}

.preferred-select:focus {
    outline: none;
    border-color: #90caf9;
}

.preferred-select option {
    background: #1e1e2e;
    color: #f5f5f5;
}

.btn-tz-change {
    background: none;
    border: none;
    color: var(--orange);
    font-size: 0.7rem;
    cursor: pointer;
    padding: 0;
    margin-left: 0.4rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.btn-tz-change:hover {
    color: #ffb74d;
}

.tz-edit {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.15rem;
    flex-wrap: wrap;
}

.preferred-select--tz {
    font-size: 0.76rem;
    padding: 0.2rem 1.4rem 0.2rem 0.4rem;
    min-width: 0;
    max-width: 100%;
}

.tz-edit-actions {
    display: flex;
    gap: 0.15rem;
    flex-shrink: 0;
}

.btn-tz-save,
.btn-tz-cancel {
    background: none;
    border: none;
    font-size: 0.7rem;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    white-space: nowrap;
}

.btn-tz-save {
    color: #90ee90;
}

.btn-tz-save:hover {
    background: rgba(144, 238, 144, 0.1);
}

.btn-tz-cancel {
    color: #aaa;
}

.btn-tz-cancel:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* ===== Notification options ===== */
.notification-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.notification-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
}

.notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(232, 119, 34, 0.12);
    font-size: 1.1rem;
    color: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-detail {
    flex: 1;
    min-width: 0;
}

.notification-detail strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0.1rem;
}

.notification-detail span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.btn-calendar {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    background: var(--orange);
    border: none;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-calendar:hover {
    background: var(--orange-hover);
    text-decoration: none;
    color: #fff;
}

.notification-email-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0 0.25rem;
    font-size: 0.82rem;
}

.notification-email-label {
    color: var(--text-secondary);
    font-weight: 500;
    flex-shrink: 0;
}

.notification-email-value {
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-all;
}

.notification-email-input {
    font-family: 'Rubik', sans-serif;
    font-size: 0.82rem;
    padding: 0 0.5rem;
    height: 30px;
    box-sizing: border-box;
    background: #f7f7f8;
    color: #1a1a1a;
    border: 1px solid #ddd;
    border-radius: 6px;
    flex: 1;
    min-width: 0;
    text-align: center;
}

.notification-email-input:focus {
    outline: none;
    border-color: var(--orange);
}

.btn-notif-edit {
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.15rem 0.5rem;
    background: none;
    color: var(--orange);
    border: none;
    cursor: pointer;
    width: auto;
    max-width: none;
    margin: 0;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.btn-notif-edit:hover {
    opacity: 1;
    background: none;
}

.btn-notif-save,
.btn-notif-cancel {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0 0.75rem;
    height: 30px;
    box-sizing: border-box;
    border-radius: 6px;
    cursor: pointer;
    width: auto;
    max-width: none;
    margin: 0;
}

.btn-notif-save {
    background: var(--orange);
    color: #fff;
    border: none;
}

.btn-notif-save:hover {
    background: var(--orange-hover);
}

.btn-notif-cancel {
    background: none;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.btn-notif-cancel:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* ===== SMS toggle switch ===== */
.sms-toggle {
    position: relative;
    flex-shrink: 0;
    width: 42px;
    height: 24px;
    cursor: pointer;
}

.sms-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.sms-toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    transition: background 0.25s;
}

.sms-toggle-slider::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.25s;
}

.sms-toggle input:checked + .sms-toggle-slider {
    background: var(--orange);
}

.sms-toggle input:checked + .sms-toggle-slider::before {
    transform: translateX(18px);
}

/* ===== SMS opt-in panel ===== */
.sms-opt-in-panel {
    margin-top: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
}

.sms-phone-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.sms-phone-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    flex-shrink: 0;
    white-space: nowrap;
}

.sms-phone-input {
    font-family: 'Rubik', sans-serif;
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    flex: 1;
    min-width: 0;
    height: auto;
    text-align: left;
}

.sms-phone-input:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 2px rgba(232, 119, 34, 0.15);
}

.sms-phone-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.sms-consent-text {
    font-size: 0.72rem;
    line-height: 1.5;
    color: var(--text-secondary);
    opacity: 0.85;
    margin: 0 0 0.75rem;
}

.sms-consent-text p {
    margin: 0 0 0.5rem;
}

.consent-details {
    margin: 0.5rem 0 0.6rem 1.2rem;
    padding: 0;
    list-style: disc;
}

.consent-details li {
    margin-bottom: 0.35rem;
}

.consent-fine-print {
    font-size: 0.68rem;
    opacity: 0.6;
    margin: 0.6rem 0 0.7rem !important;
}

.consent-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.consent-sep {
    opacity: 0.4;
}

.privacy-link {
    color: var(--orange);
    text-decoration: underline;
    cursor: pointer;
}

.privacy-link:hover {
    opacity: 1;
}

.dash-card .sms-consent-text strong {
    color: var(--text-primary);
    font-weight: 600;
    display: inline;
    font-size: inherit;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0;
}

.btn-sms-save {
    padding: 0.45rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: var(--orange);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s, opacity 0.3s;
    width: auto;
    max-width: none;
}

.btn-sms-save:hover:not(:disabled) {
    background: var(--orange-hover);
}

.btn-sms-save:disabled {
    opacity: 0.4;
    cursor: default;
}

.notification-hint {
    font-size: 0.72rem;
    color: var(--text-secondary);
    opacity: 0.7;
    margin: 0.25rem 0 0;
    text-align: center;
}

/* ===== Logout button ===== */
.btn-logout {
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.3rem 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    text-decoration: none;
}

/* ===== Scroll hint ===== */
.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    animation: bounce 2s ease infinite;
}

.scroll-hint:hover {
    color: var(--text-primary);
}

.scroll-hint-text {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.03em;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ===== How It Works section ===== */
.how-it-works {
    width: 100%;
    max-width: 800px;
    padding: 2rem 1.5rem 3rem;
    margin: 0 auto;
}

/* Fade-in on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.fade-in.delay-1 { transition-delay: 0.1s; }
.fade-in.delay-2 { transition-delay: 0.25s; }
.fade-in.delay-3 { transition-delay: 0.4s; }
.fade-in.delay-4 { transition-delay: 0.55s; }

.section-heading {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.section-subheading {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0 0 2rem;
}

/* Flow diagram */
.flow-diagram {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 0 0 auto;
    width: 120px;
}

.flow-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.flow-icon.accent {
    background: rgba(232, 119, 34, 0.15);
    border-color: rgba(232, 119, 34, 0.3);
    color: var(--orange);
}

.flow-label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.flow-detail {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.flow-arrow {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    padding-top: 1rem;
    font-size: 1.2rem;
}

/* Info cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.info-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.6rem;
    color: var(--orange);
}

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

.info-card a {
    color: var(--orange);
    text-decoration: none;
}

.info-card a:hover {
    text-decoration: underline;
}

/* ===== About this service ===== */
.about-service {
    width: 100%;
    max-width: 800px;
    padding: 0 1.5rem 3rem;
    margin: 0 auto;
}

.about-service-card {
    text-align: left;
    max-width: 640px;
    margin: 1.25rem auto 0;
}

.about-service-card p {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0 0 1rem;
}

.about-service-card a {
    color: var(--orange);
}

.about-service-note {
    margin-top: 1rem !important;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.business-blurb {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 0 1rem;
}

/* ── Remove Account (swipe + confirm) ── */
.danger-zone h2 {
    color: #ff6b6b;
}

/* swipe slider */
.swipe-track {
    position: relative;
    height: 44px;
    border-radius: 22px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.25);
    margin-top: 0.75rem;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.swipe-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 44px;
    background: rgba(255, 107, 107, 0.15);
    border-radius: 22px;
    transition: width 0.25s ease;
    pointer-events: none;
}

.swipe-thumb {
    position: absolute;
    top: 1px;
    left: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ff6b6b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: left 0.25s ease;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.swipe-thumb:active {
    cursor: grabbing;
}

.swipe-thumb svg {
    color: #fff;
}

.swipe-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 107, 107, 0.6);
    pointer-events: none;
    letter-spacing: 0.02em;
    padding-left: 2rem;
}

.swipe-track.swipe-complete .swipe-label {
    opacity: 0;
    transition: opacity 0.2s;
}

/* confirmation panel */
.delete-confirm {
    margin-top: 0.75rem;
    padding: 1rem;
    background: rgba(255, 107, 107, 0.06);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 10px;
    animation: modalFadeIn 0.2s ease;
}

.delete-confirm p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin: 0 0 0.75rem;
    line-height: 1.5;
}

.delete-confirm-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.btn-delete-confirm {
    background: #ff6b6b;
    color: #fff;
    border: none;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    width: auto;
    max-width: none;
    margin: 0;
    transition: background 0.2s;
}

.btn-delete-confirm:hover {
    background: #ff4c4c;
}

.btn-delete-cancel {
    background: none;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    width: auto;
    max-width: none;
    margin: 0;
    transition: all 0.2s;
}

.btn-delete-cancel:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* ── Privacy Policy Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 16px;
    animation: modalSlideUp 0.25s ease;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(26, 8, 18, 0.98);
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(26, 8, 18, 1);
    border-radius: 16px 16px 0 0;
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: auto;
    max-width: none;
    margin: 0;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
    background: none;
}

.modal-body {
    padding: 1.25rem 1.5rem 1.5rem;
    font-size: 0.82rem;
    line-height: 1.65;
    color: var(--text-secondary);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.modal-body h3 {
    color: var(--text-primary);
    font-size: 0.9rem;
    margin: 1.2rem 0 0.4rem;
    font-weight: 600;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    margin: 0 0 0.6rem;
}

.modal-body ul {
    margin: 0.3rem 0 0.8rem 1.2rem;
    padding: 0;
}

.modal-body ul li {
    margin-bottom: 0.35rem;
}

.modal-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.modal-updated {
    font-size: 0.72rem;
    opacity: 0.6;
    margin-bottom: 1rem !important;
}

/* Mobile: stack flow vertically */
@media (max-width: 600px) {
    .flow-diagram {
        flex-direction: column;
        align-items: center;
    }

    .flow-arrow {
        transform: rotate(90deg);
        padding-top: 0;
    }

    .flow-step {
        width: auto;
    }

    .modal-content {
        max-height: 90vh;
    }

    .modal-body {
        padding: 1rem;
    }
}

/* ===== Error pages ===== */
.error-card {
    text-align: center;
    padding: 3rem 2rem;
    max-width: 440px;
    margin: 0 auto;
}

.error-card h1 {
    font-size: 5rem;
    font-weight: 700;
    color: var(--orange);
    margin: 0 0 0.5rem;
    line-height: 1;
}

.error-card p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.btn-back {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: var(--orange);
    color: #fff;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-back:hover {
    background: var(--orange-hover);
}

/* ===== SMS Consent Page ===== */
.sms-consent-page {
    text-align: left;
    max-width: 640px;
}

.sms-consent-page h2 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.sms-consent-page h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.sms-consent-page p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.consent-demo {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.consent-demo-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.consent-demo-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--orange);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.consent-demo-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 1rem 1.2rem;
    margin: 0.75rem 0;
}

.consent-demo-box p {
    margin: 0.3rem 0;
}

.consent-demo-box ul {
    margin: 0.4rem 0;
    padding-left: 1.2rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.consent-details-list {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.8;
    padding-left: 1.2rem;
}

.consent-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.consent-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(232, 119, 34, 0.12);
    color: var(--orange);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

.consent-link:hover {
    background: rgba(232, 119, 34, 0.22);
}

/* ===== Public SMS opt-in page ===== */
.sms-opt-in-page {
    text-align: left;
    max-width: 560px;
    width: 100%;
}

.business-info h2,
.sms-sample-message h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    color: var(--text-primary);
}

.business-info-list {
    margin: 0 0 1.5rem;
    display: grid;
    gap: 0.5rem;
}

.business-info-list div {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 0.5rem;
    font-size: 0.88rem;
}

.business-info-list dt {
    margin: 0;
    color: var(--text-secondary);
    font-weight: 500;
}

.business-info-list dd {
    margin: 0;
    color: var(--text-primary);
}

.business-info-list a {
    color: var(--orange);
}

.sms-opt-in-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sms-opt-in-form.hidden {
    display: none;
}

.form-field label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
}

.form-field .required {
    color: var(--orange);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"] {
    width: 100%;
    font-family: 'Rubik', sans-serif;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.form-field input:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 2px rgba(232, 119, 34, 0.15);
}

.sms-consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.sms-consent-checkbox input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    accent-color: var(--orange);
}

.sms-consent-checkbox-text strong {
    color: var(--text-primary);
}

.sms-legal-links {
    margin: 0;
    font-size: 0.85rem;
}

.sms-legal-links a {
    color: var(--orange);
    font-weight: 500;
}

.btn-sms-optin-submit {
    align-self: flex-start;
    font-family: 'Rubik', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--orange);
    color: #fff;
    cursor: pointer;
}

.btn-sms-optin-submit:hover {
    background: var(--orange-hover);
}

.sms-opt-in-success {
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: rgba(144, 238, 144, 0.12);
    border: 1px solid rgba(144, 238, 144, 0.35);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.sms-opt-in-success.hidden {
    display: none;
}

.sms-opt-in-success a {
    color: var(--orange);
}

.sms-sample-message {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sample-msg-text {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-style: italic;
}
