/* ============================================================
   RemindMe — PWA Stylesheet
   Mobile-first, dark theme, Inter font, coral accent
   ============================================================ */

:root {
    --bg:           #0f0f0f;
    --bg-1:         #161616;
    --bg-2:         #1c1c1c;
    --bg-3:         #242424;
    --line:         rgba(255,255,255,0.07);
    --line-strong:  rgba(255,255,255,0.12);
    --text:         #f5f5f5;
    --text-2:       #b5b5b5;
    --text-3:       #7a7a7a;
    --text-4:       #555555;

    --accent:       #f5765f;
    --accent-press: #e16550;
    --accent-soft:  rgba(245,118,95,0.14);

    --danger:       #ff5a4f;
    --danger-soft:  rgba(255,90,79,0.12);

    --radius-card:  16px;
    --radius-sheet: 28px;
    --radius-input: 12px;
    --shadow-lg:    0 30px 60px -20px rgba(0,0,0,0.6), 0 10px 30px -10px rgba(0,0,0,0.5);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    letter-spacing: -0.01em;
    overscroll-behavior: none;
}

/* ============================================================
   APP SHELL
   ============================================================ */
.app {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;         /* dynamic viewport height — correct on mobile */
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 40px 28px;
    background:
        radial-gradient(120% 60% at 50% 0%, rgba(245,118,95,0.10), transparent 60%),
        var(--bg);
    max-width: 480px;
    margin: 0 auto;
}

.login-top {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.login-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 22px;
    border-radius: 22px;
    background: linear-gradient(140deg, var(--accent), #c64b38);
    display: grid;
    place-items: center;
    box-shadow:
        0 20px 40px -12px rgba(245,118,95,0.45),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

.login-logo svg {
    width: 36px;
    height: 36px;
    color: #fff;
}

.login-title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.035em;
}

.login-tag {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--text-3);
    letter-spacing: 0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 24px;
}

.field-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    margin-bottom: 4px;
    font-weight: 500;
}

.login-foot {
    text-align: center;
    font-size: 12px;
    color: var(--text-4);
    margin-top: 4px;
    letter-spacing: 0;
}

/* ============================================================
   INPUTS
   ============================================================ */
.input {
    width: 100%;
    height: 52px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-input);
    padding: 0 16px;
    color: var(--text);
    font: 500 16px/1 'Inter', -apple-system, sans-serif;
    letter-spacing: -0.01em;
    outline: none;
    transition: border-color .15s ease, background .15s ease;
    -webkit-appearance: none;
}

.input::placeholder { color: var(--text-4); font-weight: 400; }
.input:focus        { border-color: var(--accent); background: #1f1614; }
.input.error        { border-color: var(--danger); background: rgba(255,90,79,0.04); }

textarea.input {
    height: auto;
    min-height: 84px;
    padding: 14px 16px;
    resize: none;
    line-height: 1.5;
    font-size: 15px;
    font-weight: 400;
}

.input-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.field-wrap { position: relative; }

.field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.field-icon svg { width: 16px; height: 16px; display: block; }
.input.with-icon { padding-left: 44px; }

/* Password visibility toggle */
.eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: var(--text-3);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 6px;
    transition: color .15s ease;
    -webkit-tap-highlight-color: transparent;
}

.eye-btn:hover { color: var(--text-2); }
.eye-btn svg   { width: 18px; height: 18px; display: block; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    width: 100%;
    height: 52px;
    border-radius: var(--radius-input);
    font: 600 16px/1 'Inter', sans-serif;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: transform .1s ease, opacity .15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:active { transform: scale(0.985); }

.btn-primary  { background: var(--accent); color: #1a0f0c; }
.btn-primary:hover { background: #ff8773; }

.btn-ghost    { background: var(--bg-2); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg-3); }

.btn-danger   { background: var(--danger); color: #fff; }

.btn-text-danger {
    appearance: none;
    background: transparent;
    color: var(--danger);
    border: 0;
    height: 48px;
    font: 600 15px/1 'Inter', sans-serif;
    cursor: pointer;
    width: 100%;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .15s ease;
}

.btn-text-danger:hover { background: var(--danger-soft); }
.btn-text-danger svg   { width: 15px; height: 15px; }

.btn.loading { opacity: 0.6; pointer-events: none; }

/* ============================================================
   ERROR MESSAGE
   ============================================================ */
.err-msg {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--danger);
    font-size: 13px;
    font-weight: 500;
}

.err-msg svg { width: 14px; height: 14px; flex: none; }

/* ============================================================
   LIST HEADER
   ============================================================ */
.list-header {
    padding: 16px 24px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* subtle top gradient */
    background: linear-gradient(to bottom, rgba(245,118,95,0.05), transparent);
}

.list-header-title { display: flex; flex-direction: column; }

.list-greet {
    font-size: 13px;
    color: var(--text-3);
    font-weight: 500;
    letter-spacing: 0;
}

.list-h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-top: 2px;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    color: var(--text-2);
    cursor: pointer;
    transition: color .15s, background .15s;
}

.icon-btn:hover { color: var(--text); background: var(--bg-3); }
.icon-btn svg   { width: 18px; height: 18px; }

/* ============================================================
   FILTER CHIPS
   ============================================================ */
.chips {
    display: flex;
    gap: 8px;
    padding: 0 24px 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.chips::-webkit-scrollbar { display: none; }

.chip {
    flex: none;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    font: 500 13px/1 'Inter', sans-serif;
    color: var(--text-2);
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
    user-select: none;
}

.chip:hover { background: var(--bg-3); }

.chip.active {
    background: var(--text);
    color: #0a0a0a;
    border-color: var(--text);
    font-weight: 600;
}

.chip-count      { color: var(--text-3); margin-left: 6px; font-weight: 500; }
.chip.active .chip-count { color: rgba(0,0,0,0.5); }

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-h {
    padding: 12px 24px 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-3);
    font-weight: 600;
}

/* ============================================================
   REMINDER LIST
   ============================================================ */
.reminders {
    flex: 1;
    overflow-y: auto;
    padding: 0 18px calc(env(safe-area-inset-bottom, 0px) + 148px);
    scrollbar-width: none;
}

.reminders::-webkit-scrollbar { display: none; }

/* ============================================================
   REMINDER CARD
   ============================================================ */
.card {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color .15s ease, transform .1s ease;
    position: relative;
}

.card:hover  { border-color: var(--line-strong); }
.card:active { transform: scale(0.99); }

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

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.015em;
    line-height: 1.3;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-3);
    font-weight: 500;
    letter-spacing: 0;
}

.card-meta svg { width: 12px; height: 12px; flex: none; }

.card-time { display: inline-flex; align-items: center; gap: 4px; }
.card-time.overdue { color: var(--danger); }

.card-badges {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* Completed state */
.card.completed { background: transparent; opacity: 0.5; cursor: pointer; }
.card.completed .card-title { text-decoration: line-through; color: var(--text-3); }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
}

.badge svg     { width: 10px; height: 10px; }

.b-repeat { background: rgba(255,255,255,0.06);color: var(--text-2); }

/* ============================================================
   FAB (Floating Action Button)
   ============================================================ */
.fab {
    position: fixed;
    right: max(20px, calc((100vw - 480px) / 2 + 20px));
    bottom: calc(env(safe-area-inset-bottom, 0px) + 70px);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent);
    color: #1a0f0c;
    border: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow:
        0 18px 36px -8px rgba(245,118,95,0.5),
        0 4px 12px -2px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.25);
    transition: transform .12s ease;
    z-index: 30;
}

.fab:hover  { transform: translateY(-2px); }
.fab:active { transform: scale(0.95); }
.fab svg    { width: 26px; height: 26px; stroke-width: 2.5; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 32px 100px;
}

.empty-art {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 30% 25%, rgba(245,118,95,0.16), transparent 60%),
        var(--bg-2);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    color: var(--accent);
    margin-bottom: 24px;
}

.empty-art svg { width: 42px; height: 42px; }

.empty h2 {
    font-size: 19px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

.empty p {
    font-size: 14px;
    color: var(--text-3);
    margin: 8px 0 0;
    line-height: 1.5;
    max-width: 260px;
    letter-spacing: 0;
}

/* ============================================================
   BOTTOM SHEET
   ============================================================ */
.scrim {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.scrim.visible {
    opacity: 1;
    pointer-events: all;
}

.sheet {
    position: fixed;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    bottom: 0;
    width: 100%;
    max-width: 480px;
    background: var(--bg-1);
    border-top-left-radius: var(--radius-sheet);
    border-top-right-radius: var(--radius-sheet);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    max-height: 92dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform .3s cubic-bezier(0.32,0.72,0,1);
}

.sheet.visible {
    transform: translateX(-50%) translateY(0);
}

.sheet-grip {
    width: 38px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.18);
    margin: 10px auto 4px;
    flex: none;
}

.sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 6px;
    flex: none;
}

.sheet-head h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sheet-close {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    color: var(--text-2);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background .15s;
}

.sheet-close:hover { background: var(--bg-3); }
.sheet-close svg   { width: 14px; height: 14px; }

.sheet-body {
    padding: 8px 20px 4px;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: none;
}

.sheet-body::-webkit-scrollbar { display: none; }

.form-row { margin-bottom: 14px; }

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    margin-bottom: 8px;
}

.form-label .req  { color: var(--accent); margin-left: 2px; }
.form-label .opt  { color: var(--text-4); font-weight: 500; text-transform: none; letter-spacing: 0; }

.sheet-foot {
    padding: 14px 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
    border-top: 1px solid var(--line);
    background: var(--bg-1);
    flex: none;
}

.sheet-foot-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 10px;
}

/* ============================================================
   REPEAT PILLS
   ============================================================ */
.pill {
    padding: 10px 0;
    border-radius: 10px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    font: 500 12px/1 'Inter', sans-serif;
    color: var(--text-2);
    letter-spacing: -0.01em;
    cursor: pointer;
    text-align: center;
    transition: background .15s, border-color .15s, color .15s;
    user-select: none;
}

.pill:hover { background: var(--bg-3); }

.pill.active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

.repeat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.repeat-pills .pill {
    flex: 1 1 calc(20% - 6px);
    min-width: 56px;
}

/* ============================================================
   VAULT TOGGLE
   ============================================================ */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
}

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

.toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.toggle-label svg { width: 15px; height: 15px; flex: none; color: var(--text-2); }

.toggle-desc {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 3px;
    letter-spacing: 0;
    line-height: 1.4;
}

/* iOS-style toggle switch */
.toggle-switch {
    flex: none;
    width: 48px;
    height: 28px;
    border-radius: 999px;
    background: var(--bg-3);
    border: 1.5px solid var(--line-strong);
    cursor: pointer;
    position: relative;
    transition: background .2s ease, border-color .2s ease;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
}

/* The sliding thumb */
.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text-3);
    transition: transform .2s ease, background .2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* ON state */
.toggle-switch[aria-checked="true"] {
    background: var(--accent);
    border-color: var(--accent);
}

.toggle-switch[aria-checked="true"]::after {
    transform: translateX(20px);
    background: #fff;
}

/* ============================================================
   DELETE MODAL
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.modal-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.modal {
    width: 100%;
    max-width: 320px;
    background: var(--bg-2);
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    padding: 24px 22px 18px;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform .2s ease;
}

.modal-overlay.visible .modal { transform: scale(1); }

.modal-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--danger-soft);
    color: var(--danger);
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
}

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

.modal-title {
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.modal-body {
    text-align: center;
    font-size: 14px;
    color: var(--text-3);
    margin: 0 0 18px;
    letter-spacing: 0;
    line-height: 1.5;
}

.modal-body .quote {
    display: block;
    color: var(--text);
    margin-top: 6px;
    font-weight: 600;
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.modal-actions .btn { height: 46px; font-size: 15px; }

/* ============================================================
   LOADING SKELETON
   ============================================================ */
@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.skeleton {
    border-radius: var(--radius-card);
    background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 50%, var(--bg-2) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.4s infinite;
    margin-bottom: 10px;
}

.skeleton-card { height: 88px; }

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast {
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 72px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-3);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    white-space: nowrap;
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
    max-width: calc(100vw - 40px);
}

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

.toast.success { border-color: rgba(100,220,100,0.3); color: #7ddf7d; }
.toast.error   { border-color: rgba(255,90,79,0.3);   color: var(--danger); }

/* ============================================================
   VAULT — PIN SCREEN
   ============================================================ */
.pin-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 32px 80px;
    text-align: center;
}

.pin-art {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 30% 25%, rgba(245,118,95,0.16), transparent 60%),
        var(--bg-2);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    color: var(--accent);
    margin-bottom: 20px;
}

.pin-art svg { width: 36px; height: 36px; }

.pin-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: 0;
}

.pin-sub {
    font-size: 14px;
    color: var(--text-3);
    margin: 6px 0 0;
    letter-spacing: 0;
    line-height: 1.5;
}

.pin-boxes {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.pin-box {
    width: 64px;
    height: 72px;
    border-radius: 16px;
    background: var(--bg-2);
    border: 1.5px solid var(--line);
    font: 700 28px/1 'Inter', sans-serif;
    color: var(--text);
    text-align: center;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .15s ease, background .15s ease;
    caret-color: transparent;
    -webkit-text-security: disc;
}

.pin-box:focus {
    border-color: var(--accent);
    background: #1f1614;
}

.pin-error {
    margin-top: 18px;
    font-size: 13px;
    color: var(--danger);
    font-weight: 500;
    letter-spacing: 0;
}

/* Shake animation — plays when wrong PIN entered */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-10px); }
    40%       { transform: translateX(10px); }
    60%       { transform: translateX(-7px); }
    80%       { transform: translateX(7px); }
}

.shake { animation: shake .4s ease; }

/* ============================================================
   RESPONSIVE — desktop centers the narrow column
   ============================================================ */
@media (min-width: 480px) {
    body {
        background:
            radial-gradient(1200px 600px at 20% -10%, rgba(245,118,95,0.05), transparent 60%),
            #0a0a0a;
    }

}

/* ============================================================
   TAB BAR (bottom navigation)
   ============================================================ */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    display: flex;
    background: rgba(15,15,15,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 30;
}

.tab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 0 12px;
    background: transparent;
    border: 0;
    color: var(--text-3);
    font: 500 10px/1 'Inter', sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: color .15s ease;
    -webkit-tap-highlight-color: transparent;
}

.tab-btn svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.8;
    transition: color .15s ease;
}

.tab-btn.active  { color: var(--accent); }
.tab-btn:active  { opacity: 0.7; }

.tab-bar.hidden  { display: none; }

/* PIN screen — cancel button */
.pin-cancel-btn {
    margin-top: 22px;
    background: transparent;
    border: 0;
    color: var(--text-3);
    font: 500 14px/1 'Inter', sans-serif;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 10px;
    letter-spacing: 0;
    transition: color .15s ease, background .15s ease;
    -webkit-tap-highlight-color: transparent;
}

.pin-cancel-btn:hover  { color: var(--text-2); background: var(--bg-2); }

/* ============================================================
   INLINE STYLE REPLACEMENTS
   All styles below were previously inline on HTML elements.
   Centralised here to eliminate 'unsafe-inline' from style-src CSP.
   ============================================================ */

/* Header action button group — Home and Vault */
.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Vault loading skeleton */
#vault-loading { padding: 16px; flex: 1; }

/* Reminders screen — layout properties persist when JS shows it */
#reminders-screen { flex: 1; flex-direction: column; }

/* Login — password input right padding (room for eye button) */
#password { padding-right: 44px; }

/* Login — unlock button top spacing */
#login-btn { margin-top: 4px; }

/* Error / validation message top spacing */
#f-title-err,
#f-dt-err,
#err-msg { margin-top: 8px; }

/* Initial hidden states — JS always sets an explicit display value to show/hide these */
#pin-screen,
#reminders-screen,
#pin-error,
#f-title-err,
#f-dt-err,
#repeat-until-row,
#delete-row,
#err-msg { display: none; }
