/* ==========================================================================
   Auth pages skin — login / signup / forgot / reset / verify / 2FA / account.
   Loaded via {% block head_extra %} AFTER tokens.css, styles(.mobile).css and
   components.css, so equal-specificity rules here win the cascade.

   All colors come from tokens.css. The single deliberate exception is the
   QR backing card (#fff) so the code stays scannable in dark mode.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page shell — center a single card on the page background.
   Desktop <main> is overflow:hidden flex column, so the container is the
   scroller; on mobile it participates in normal flow.
   -------------------------------------------------------------------------- */
.auth-container,
.auth-mobile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    justify-content: safe center;
    gap: 0;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow-y: auto;
    padding: 32px 16px 48px;
    background: var(--bg-page);
    box-sizing: border-box;
}

.mobile-main .auth-container,
.mobile-main .auth-mobile-container {
    min-height: calc(100vh - var(--header-height, 60px));
    min-height: calc(100dvh - var(--header-height, 60px));
    padding: 14px;
}

/* --------------------------------------------------------------------------
   The card
   -------------------------------------------------------------------------- */
.auth-box,
.auth-mobile-box,
.auth-mobile-welcome {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-modal);
    box-shadow: var(--shadow-modal);
    padding: 30px 28px 26px;
    box-sizing: border-box;
    text-align: left;
}

.auth-card--wide {
    max-width: 470px;
}

.auth-mobile-welcome {
    max-width: 440px;
    text-align: center;
}

.mobile-main .auth-box,
.mobile-main .auth-mobile-box,
.mobile-main .auth-mobile-welcome {
    padding: 24px 18px 20px;
}

/* --------------------------------------------------------------------------
   Brand header: logo + title on top
   -------------------------------------------------------------------------- */
.auth-box .auth-logo,
.auth-mobile-box .auth-logo {
    display: block;
    width: 56px;
    height: 56px;
    max-width: 56px;
    max-height: 56px;
    margin: 0 auto 12px;
}

.auth-box h2,
.auth-mobile-box h2 {
    margin: 0 0 18px;
    text-align: center;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.auth-description {
    text-align: center;
    color: var(--ink-secondary);
    font-size: 13.5px;
    line-height: 1.55;
    margin: -8px 0 18px;
}

/* Mobile login brand block */
.auth-mobile-brand {
    text-align: center;
    margin-bottom: 18px;
}

.auth-mobile-brand .auth-logo {
    margin: 0 auto 8px;
}

.auth-mobile-brand h1 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.auth-mobile-brand .tagline {
    margin: 0;
    font-size: 12.5px;
    color: var(--ink-tertiary);
}

/* --------------------------------------------------------------------------
   Form fields — section-label style labels, token inputs
   -------------------------------------------------------------------------- */
.auth-box .form-group,
.auth-mobile-box .form-group {
    margin: 0 0 14px;
    width: 100%;
    box-sizing: border-box;
}

.auth-box .form-group label,
.auth-mobile-box .form-group label {
    display: block;
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-secondary);
    text-align: left;
}

.auth-box input:not([type="checkbox"]):not([type="radio"]),
.auth-mobile-box input:not([type="checkbox"]):not([type="radio"]),
.auth-box select,
.auth-mobile-box select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 15px;
    background: var(--bg-surface);
    color: var(--ink);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-input);
}

/* Keep 16px on real mobile to prevent iOS zoom-on-focus */
.mobile-main .auth-box input:not([type="checkbox"]):not([type="radio"]),
.mobile-main .auth-mobile-box input:not([type="checkbox"]):not([type="radio"]) {
    font-size: 16px;
}

/* --------------------------------------------------------------------------
   Actions — full-width accent submit, stacked links
   -------------------------------------------------------------------------- */
.auth-box .form-actions,
.auth-mobile-box .form-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 100%;
    margin: 18px 0 0;
    padding: 0;
    border: none;
    text-align: center;
}

.auth-box .form-actions button,
.auth-mobile-box .form-actions button {
    width: 100%;
    margin: 0;
    padding: 11px 16px;
    font-size: 14.5px;
    font-weight: 600;
    border-radius: var(--radius-btn);
}

.auth-box form + form .form-actions,
.auth-mobile-box form + form .form-actions {
    margin-top: 10px;
}

.auth-box .form-actions .back-link,
.auth-mobile-box .form-actions .back-link {
    margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Secondary links
   -------------------------------------------------------------------------- */
.auth-links a,
.auth-mobile-links a,
.forgot-password-link,
.signup-link,
.back-link,
.link-button {
    color: var(--accent-text) !important;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.auth-links a:hover,
.auth-mobile-links a:hover,
.forgot-password-link:hover,
.signup-link:hover,
.back-link:hover,
.link-button:hover {
    color: var(--accent-hover) !important;
    text-decoration: underline;
}

.auth-box .forgot-password-link,
.auth-mobile-box .forgot-password-link {
    font-size: 12.5px;
    margin-top: 6px;
}

.auth-mobile-form .auth-mobile-links,
.auth-mobile-links {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

/* --------------------------------------------------------------------------
   Passkey login — bordered secondary button with accent icon
   -------------------------------------------------------------------------- */
.passkey-primary {
    gap: 10px;
    margin-bottom: 4px;
}

.passkey-btn--primary {
    background: var(--bg-surface);
    color: var(--ink);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-btn);
    padding: 11px 16px;
    font-size: 14.5px;
    font-weight: 600;
    box-shadow: var(--shadow-card);
}

.passkey-btn--primary:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    color: var(--ink);
}

.passkey-btn--primary:disabled {
    opacity: 0.6;
    cursor: default;
}

.passkey-btn--primary i {
    color: var(--accent-text);
    font-size: 16px;
}

.link-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    margin: 2px auto 0;
}

/* --------------------------------------------------------------------------
   Alerts / field errors — token tints
   -------------------------------------------------------------------------- */
.alert {
    display: block;
    margin: 16px 0 0;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    color: var(--ink-secondary);
}

.alert-error,
.alert-danger {
    background: var(--negative-bg);
    border-color: var(--negative-border);
    color: var(--negative);
}

.alert-success {
    background: var(--positive-bg);
    border-color: color-mix(in oklab, var(--positive) 30%, transparent);
    color: var(--positive);
}

.alert-warning {
    background: var(--warning-bg);
    border-color: color-mix(in oklab, var(--warning) 35%, transparent);
    color: var(--warning);
}

.alert-info {
    background: var(--accent-soft);
    border-color: color-mix(in oklab, var(--accent) 25%, transparent);
    color: var(--accent-text);
}

.error-message {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--negative);
    text-align: left;
}

/* --------------------------------------------------------------------------
   Welcome panel (desktop marketing variant of /auth/login)
   -------------------------------------------------------------------------- */
.auth-mobile-welcome .auth-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 10px;
}

.auth-mobile-welcome h1 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--ink);
}

.auth-mobile-welcome .tagline {
    font-size: 13.5px;
    color: var(--ink-secondary);
    margin: 0 0 22px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 4px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
}

.feature-item i {
    flex: none;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    font-size: 15px;
    color: var(--accent-text);
    background: var(--accent-soft);
    border-radius: 10px;
}

.feature-text h3 {
    margin: 0 0 2px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
}

.feature-text p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--ink-secondary);
}

.auth-links.horizontal {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.auth-links.horizontal .auth-link {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-btn);
    text-align: center;
}

.auth-link:hover {
    transform: none;
    box-shadow: none;
}

.auth-link:first-of-type {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: var(--ink-on-accent) !important;
}

.auth-link:first-of-type:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--ink-on-accent) !important;
}

.auth-link:last-of-type {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    color: var(--ink) !important;
}

.auth-link:last-of-type:hover {
    background: var(--bg-hover);
    border-color: var(--border-strong);
    color: var(--ink) !important;
}

/* --------------------------------------------------------------------------
   2FA setup — numbered steps, white QR card, mono secret
   -------------------------------------------------------------------------- */
.setup-2fa-content {
    font-size: 13.5px;
}

.setup-steps {
    list-style: none;
    counter-reset: setup-step;
    margin: 0 0 18px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.setup-steps li {
    counter-increment: setup-step;
    position: relative;
    margin: 0;
    padding-left: 34px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--ink-secondary);
}

.setup-steps li::before {
    content: counter(setup-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-text);
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 700;
}

/* Deliberately white in BOTH themes so the QR stays scannable. */
.qr-code-container {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: none;
    margin: 0 0 16px;
    padding: 16px;
    text-align: center;
}

.qr-code-container img {
    display: inline-block;
    max-width: 190px;
    height: auto;
}

.manual-entry {
    background: var(--bg-inset);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 12px 14px;
    margin: 0 0 18px;
}

.manual-entry p {
    margin: 0 0 8px;
    font-size: 12.5px;
    color: var(--ink-secondary);
}

.secret-key {
    display: block;
    margin: 0;
    padding: 9px 10px;
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 0.08em;
    text-align: center;
    word-break: break-all;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    color: var(--ink);
    user-select: all;
}

.verify-2fa-form {
    max-width: none;
    margin: 0;
}

/* 6-digit code inputs read in mono */
input#code,
input#disable_2fa_code {
    font-family: var(--font-mono);
    text-align: center;
    letter-spacing: 0.3em;
    font-size: 17px;
}

input#code::placeholder,
input#disable_2fa_code::placeholder {
    letter-spacing: normal;
    font-family: var(--font-ui);
    font-size: 13.5px;
}

/* --------------------------------------------------------------------------
   Account page — section cards
   -------------------------------------------------------------------------- */
.account-container {
    padding: 26px 24px 40px;
    max-width: 1160px;
}

.account-container h1 {
    margin: 0 0 18px;
    padding-bottom: 0;
    border-bottom: none;
    text-align: left;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 0;
    padding-bottom: 16px;
}

/* Profile photo (settings card) */
.profile-avatar-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.profile-avatar {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    flex: none;
    overflow: hidden;
}

.profile-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.profile-avatar-form { min-width: 0; }
.profile-avatar-form input[type="file"] { font-size: 13px; max-width: 100%; }

.profile-avatar-hint {
    font-size: 12px;
    color: var(--ink-tertiary);
    margin: 8px 0 0;
}

.account-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 18px 20px 20px;
    height: fit-content;
}

.account-card h2 {
    margin: 0 0 14px;
    padding-bottom: 0;
    border-bottom: none;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-tertiary);
}

.account-card p {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--ink-secondary);
}

.account-form label {
    display: block;
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-secondary);
}

.account-card input:not([type="checkbox"]):not([type="radio"]),
.account-card select {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    font-size: 14px;
    background: var(--bg-surface);
    color: var(--ink);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-input);
}

.account-card .form-actions {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    margin: 4px 0 0;
    padding: 0;
    border: none;
    text-align: right;
}

.account-card .form-actions .btn-primary,
.account-card .form-actions .btn-danger {
    width: auto;
    margin: 0;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-btn);
}

/* 2FA status banner */
.status-box {
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 14px;
}

.status-box.success {
    background: var(--positive-bg);
    color: var(--positive);
    border: 1px solid color-mix(in oklab, var(--positive) 30%, transparent);
}

/* Pending e-mail change notice */
.pending-email-notice {
    margin-top: 8px;
    padding: 9px 12px;
    background: var(--warning-bg);
    border: 1px solid color-mix(in oklab, var(--warning) 35%, transparent);
    border-radius: 10px;
    color: var(--warning);
    font-size: 12.5px;
    line-height: 1.5;
}

/* Passkey list rows */
.passkey-list {
    gap: 8px;
    margin: 2px 0 14px;
}

.passkey-row {
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
}

.passkey-row-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
}

.passkey-row-meta {
    margin-top: 3px;
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--ink-tertiary);
}

.passkey-row-actions {
    flex: none;
    gap: 4px;
}

.passkey-row-actions .btn-link {
    background: none;
    border: none;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--accent-text);
    cursor: pointer;
}

.passkey-row-actions .btn-link:hover {
    background: var(--bg-hover);
    color: var(--accent-text);
    text-decoration: none;
}

.passkey-row-actions .btn-link.btn-danger {
    background: none;
    color: var(--negative);
    width: auto;
    padding: 5px 8px;
}

.passkey-row-actions .btn-link.btn-danger:hover:not(:disabled) {
    background: var(--negative-bg);
    color: var(--negative);
}

.muted {
    color: var(--ink-tertiary);
    font-size: 12.5px;
}

/* Danger zone */
.account-card.danger-zone {
    background: var(--negative-bg);
    border: 1px solid var(--negative-border);
}

.danger-zone h2 {
    color: var(--negative);
    border-bottom: none;
}

.warning-text {
    color: var(--negative);
    font-size: 13px;
    line-height: 1.5;
}

.danger-zone input:not([type="checkbox"]):not([type="radio"]) {
    background: var(--bg-surface);
}

/* --------------------------------------------------------------------------
   Account page — mobile shell adjustments (full-width cards, 14px gutters)
   -------------------------------------------------------------------------- */
.mobile-main .account-container {
    padding: 14px 14px 32px;
}

.mobile-main .account-container h1 {
    text-align: left;
    font-size: 19px;
    margin-bottom: 14px;
}

.mobile-main .account-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 0;
}

.mobile-main .account-card {
    padding: 16px 14px;
}

.mobile-main .account-card .form-actions .btn-primary,
.mobile-main .account-card .form-actions .btn-danger {
    width: 100%;
    padding: 11px 16px;
    font-size: 14.5px;
}

.mobile-main .account-card input:not([type="checkbox"]):not([type="radio"]),
.mobile-main .account-card select {
    font-size: 16px; /* prevent iOS zoom */
}

/* ==========================================================================
   Desktop landing / auth shell: hero (brand + mini calendar) beside the form
   ========================================================================== */
.auth-shell {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: auto;
    background: var(--bg-page);
}

.auth-hero {
    flex: 1.15;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 48px;
    background:
        radial-gradient(1100px 600px at 20% 0%, var(--accent-soft), transparent 60%),
        var(--bg-page);
    border-right: 1px solid var(--border);
}

.auth-hero-inner { max-width: 560px; }

.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.auth-brand-logo { width: 34px; height: 34px; }

.auth-brand-name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.auth-hero-title {
    margin: 0 0 12px;
    font-size: 40px;
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.auth-hero-sub {
    margin: 0 0 26px;
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--ink-secondary);
    max-width: 40ch;
}

.auth-hero-points {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.auth-hero-points li {
    position: relative;
    padding-left: 22px;
    font-size: 13.5px;
    color: var(--ink-secondary);
}

.auth-hero-points li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 5px;
    width: 8px;
    height: 8px;
    border-radius: 3px;
    background: var(--accent);
}

.auth-hero-points li:nth-child(2)::before { background: var(--positive); }
.auth-hero-points li:nth-child(3)::before { background: var(--cat-adjust); }

/* Mini calendar mock */
.auth-minical {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.auth-minical-head {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid var(--border);
    background: var(--bg-band);
}

.auth-minical-head span {
    padding: 6px 10px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-tertiary);
}

.auth-minical-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.mc-day {
    min-height: 78px;
    padding: 6px 8px 8px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Day header mirrors the real grid: number left, end-of-day balance right */
.mc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 1px;
}

.auth-minical-grid .mc-day:nth-child(4n) { border-right: none; }
.auth-minical-grid .mc-day:nth-child(n+5) { border-bottom: none; }

.mc-day.mc-today { outline: 2px solid var(--accent); outline-offset: -2px; }

.mc-num {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink);
    min-width: 18px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.mc-today .mc-num {
    background: var(--accent);
    color: var(--ink-on-accent);
}

.mc-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
}

.mc-chip b {
    margin-left: auto;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 10.5px;
    color: var(--ink-secondary);
}

.mc-chip b.mc-pos { color: var(--positive); }

.mc-glyph { flex: none; }
.mc-c-income    { color: var(--cat-income); }
.mc-c-housing   { color: var(--cat-housing); }
.mc-c-food      { color: var(--cat-food); }
.mc-c-subs      { color: var(--cat-subs); }
.mc-c-transport { color: var(--cat-transport); }
.mc-c-utilities { color: var(--cat-utilities); }

.mc-bal {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    color: color-mix(in oklab, var(--positive) 60%, var(--ink-secondary));
}

.mc-bal.mc-adj { color: var(--cat-adjust); }

/* Right panel holding the auth card */
.auth-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    overflow-y: auto;
}

.auth-panel .auth-mobile-box { margin: 0; }

.auth-panel-note {
    margin-top: 14px;
    text-align: center;
    font-size: 12px;
    color: var(--ink-tertiary);
}

@media (max-width: 980px) {
    .auth-hero { display: none; }
}

/* Mobile teaser: the mini calendar below the auth card */
.auth-mobile-teaser {
    width: 100%;
    max-width: 420px;
    margin: 20px auto 8px;
}

.auth-teaser-caption {
    margin: 0 0 10px;
    text-align: center;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--ink-tertiary);
}

/* Narrow screens: 3 calendar columns (drop the 4th so cells breathe) */
@media (max-width: 480px) {
    .auth-minical-head,
    .auth-minical-grid { grid-template-columns: repeat(3, 1fr); }
    .auth-minical-head span:nth-child(4),
    .auth-minical-grid .mc-day:nth-child(4n) { display: none; }
    .auth-minical-grid .mc-day:nth-child(4n+3) { border-right: none; }
}

/* Mobile landing theme: same gradient + brand/headline treatment as the
   desktop hero, compacted above the card */
.auth-mobile-container--landing {
    background:
        radial-gradient(700px 420px at 50% -5%, var(--accent-soft), transparent 65%),
        var(--bg-page);
}

.auth-mobile-hero {
    width: 100%;
    max-width: 420px;
    margin: 4px auto 16px;
}

.auth-mobile-hero .auth-brand { margin-bottom: 12px; }

.auth-hero-title--sm {
    font-size: 26px;
    margin-bottom: 0;
}

/* Mobile-authentic teaser: week strip + agenda rows (mirrors the app) */
.auth-minical-m {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mcm-strip {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.mcm-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 7px 2px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    border-radius: 12px;
}

.mcm-chip i {
    font-style: normal;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-tertiary);
}

.mcm-chip b { font-size: 13px; font-weight: 600; color: var(--ink); }

.mcm-chip em {
    font-style: normal;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 600;
    color: color-mix(in oklab, var(--positive) 60%, var(--ink-secondary));
}

.mcm-chip em.mcm-adj { color: var(--cat-adjust); }

.mcm-chip.mcm-selected {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.mcm-row {
    display: flex;
    align-items: center;
    gap: 11px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 13px;
}

.mcm-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    background: color-mix(in oklab, currentColor 20%, transparent);
}

.mcm-rowtext {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.mcm-desc { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.mcm-sub  { font-size: 11px; color: var(--ink-tertiary); }

.mcm-amt {
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-secondary);
}

.mcm-amt.mcm-pos { color: var(--positive); }
