/* =====================================================================
   Household Hub — Stylesheet
   ---------------------------------------------------------------------
   What this file does: controls how every page looks — colors, fonts,
   spacing, buttons. This is set up in pure dark mode throughout (a
   true dark background everywhere, not just a toggle option), and
   mobile-first: it's designed to look right on a phone screen first,
   then scales up cleanly on a tablet or desktop.

   Where this goes: inside the "css" folder, at home.gunjanpatel.ca.
   ===================================================================== */

:root {
    /* Pure dark palette used everywhere in the app */
    --bg:            #0b0d10;   /* page background */
    --surface:       #16191d;   /* cards, panels */
    --surface-raised:#1f2328;   /* nav bar, inputs */
    --border:        #2a2f36;
    --text:          #e9edf1;
    --text-muted:    #9aa4af;
    --accent:        #4c9aff;   /* links, primary actions */
    --accent-hover:  #3a86eb;
    --success:       #3ecf8e;
    --success-bg:    #113224;
    --error:         #ff6b6b;
    --error-bg:      #351515;
    --radius:        12px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); text-decoration: none; }
a:hover, a:active { color: var(--accent-hover); text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5em; }

/* ---------------------------------------------------------------------
   Login / reset-password pages
   --------------------------------------------------------------------- */
.auth-page {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.auth-wrap { width: 100%; max-width: 400px; }

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 20px;
}

.auth-title { font-size: 1.5rem; text-align: center; }
.auth-subtitle { text-align: center; color: var(--text-muted); margin-top: 0; margin-bottom: 24px; }
.auth-footnote { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-top: 20px; margin-bottom: 0; }

.auth-form { display: flex; flex-direction: column; gap: 6px; }
.auth-form label { font-size: 0.9rem; color: var(--text-muted); margin-top: 12px; }

/* ---------------------------------------------------------------------
   Form elements — big and thumb-friendly
   --------------------------------------------------------------------- */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 1rem;
    width: 100%;
    min-height: 46px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.btn {
    display: inline-block;
    text-align: center;
    border: none;
    border-radius: 8px;
    padding: 13px 18px;
    font-size: 1rem;
    font-weight: 600;
    min-height: 48px;
    cursor: pointer;
}

.btn-primary { background: var(--accent); color: #06111f; margin-top: 20px; }
.btn-primary:hover { background: var(--accent-hover); }

.alert {
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.92rem;
    margin: 0 0 16px;
}
.alert-error   { background: var(--error-bg);   color: var(--error); }
.alert-success { background: var(--success-bg); color: var(--success); }

/* ---------------------------------------------------------------------
   App shell (header + nav) for pages inside the app
   --------------------------------------------------------------------- */
.app-header {
    background: var(--surface-raised);
    border-bottom: 1px solid var(--border);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}

.app-header .brand { font-weight: 700; font-size: 1.05rem; }
.app-header .greeting { font-size: 0.85rem; color: var(--text-muted); }

.app-main {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px 16px 90px; /* bottom padding clears the fixed nav bar */
}

/* Single-column, thumb-friendly bottom nav — mobile-first pattern */
.app-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface-raised);
    border-top: 1px solid var(--border);
    display: flex;
    overflow-x: auto;
    z-index: 10;
}

.app-nav a {
    flex: 1 0 auto;
    text-align: center;
    padding: 10px 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.app-nav a.active { color: var(--accent); }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 16px;
}

.card h2 { font-size: 1.05rem; }

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

/* Slightly wider layout once there's room, but always single-column
   feeling on the content itself */
@media (min-width: 640px) {
    .app-main { padding-top: 28px; }
}

/* ---------------------------------------------------------------------
   Shared building blocks used across modules (Chores and onward)
   --------------------------------------------------------------------- */

.section-heading {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin: 24px 0 10px;
}
.section-heading:first-of-type { margin-top: 4px; }

/* Small, secondary-style buttons used inline next to list items */
.btn-small {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 0.88rem;
    margin-top: 0;
}
.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger {
    background: transparent;
    color: var(--error);
    border: 1px solid var(--error-bg);
}
.btn-danger:hover { border-color: var(--error); }

/* A form that only exists to submit one button (Done/Skip/Undo/Delete) —
   several sit side by side without looking like a big form */
.inline-form { display: inline-block; margin: 0 8px 0 0; }

/* A normal, stacked form used inside a card (Add Chore, etc.) */
.stacked-form { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.stacked-form label { font-size: 0.9rem; color: var(--text-muted); margin-top: 12px; }

/* Native <details>/<summary> styled to look like a tappable card
   header — no JavaScript needed to expand the "Add" form */
details.card { padding: 0; overflow: hidden; }
details.card summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 18px;
    font-weight: 600;
    color: var(--accent);
}
details.card summary::-webkit-details-marker { display: none; }
details.card[open] summary { border-bottom: 1px solid var(--border); }
details.card form.stacked-form { padding: 4px 18px 18px; margin-top: 0; }

.chore-card { padding: 16px 18px; }
.chore-card.chore-overdue { border-color: var(--error); }
.chore-row { display: flex; justify-content: space-between; gap: 12px; }
.chore-row h2 { font-size: 1rem; margin-bottom: 2px; }
.chore-meta { font-size: 0.82rem; margin: 4px 0 0; }
.chore-actions { margin-top: 12px; }

.tag-done, .tag-skipped, .tag-remind {
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.78rem;
}
.tag-done { background: var(--success-bg); color: var(--success); }
.tag-skipped { background: var(--surface-raised); color: var(--text-muted); }
.tag-remind { background: #3a2a10; color: #ffb454; }

/* ---------------------------------------------------------------------
   Restaurant / Date Idea filter bar and checkboxes
   --------------------------------------------------------------------- */
.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
    padding: 14px 18px;
}
.filter-form label { font-size: 0.82rem; color: var(--text-muted); margin: 0; }
.filter-form select { width: auto; min-height: 40px; padding: 8px 10px; }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    color: var(--text);
    margin-top: 12px;
}
.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-height: 0;
    accent-color: var(--accent);
}

.small-note { font-size: 0.85rem; margin: 8px 0 0; }
.lookup-result { white-space: normal; }

/* ---------------------------------------------------------------------
   Plant Care
   --------------------------------------------------------------------- */
.overdue-text { color: var(--error); }

.overdue-tag { background: var(--error-bg); color: var(--error); margin-left: 6px; }

.edit-details { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.edit-details summary {
    list-style: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.edit-details summary::-webkit-details-marker { display: none; }
.edit-details .stacked-form { margin-top: 10px; }

.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.plain-list li:last-child { border-bottom: none; }
.plain-list li.todo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.plain-list li.todo-row .inline-form { margin: 0; flex-shrink: 0; }
