/* ============ account portal ============ */
.acct-body { min-height: 100vh; padding-top: 52px; }
.acct-home { color: var(--gold); text-decoration: none; font-size: 0.82rem; white-space: nowrap; }
.acct-home:hover { color: var(--rose); }

/* auth */
.acct-auth { max-width: 440px; margin: 3rem auto; padding: 0 1.2rem; }
.auth-card { background: rgba(255,255,255,0.55); border: 1px solid var(--line); border-radius: 18px; padding: 1.8rem 1.6rem; box-shadow: 0 24px 60px -30px rgba(60,40,20,0.5); }
.auth-title { font-family: 'Cinzel', serif; text-align: center; color: var(--cream); font-size: 1.5rem; margin: 0.2rem 0 1.2rem; }
.auth-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.2rem; }
.auth-tab { flex: 1; padding: 0.55rem; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--mist); font-family: 'Cinzel', serif; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; transition: all 0.2s ease; }
.auth-tab.active { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); color: #1a120b; border-color: var(--gold); }
.auth-form { display: flex; flex-direction: column; gap: 0.9rem; }
.auth-form label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.82rem; color: var(--mist); }
.auth-form input, .pgrid input, .pgrid select, .pfull input, .pfull textarea, #bookingCard input, #bookingCard select {
  font-family: 'Inter', sans-serif; font-size: 0.95rem; padding: 0.6rem 0.7rem; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.7); color: #2a2015;
}
.auth-form input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,137,68,0.18); }
.auth-note { font-size: 0.82rem; color: var(--mist); line-height: 1.5; margin: 0; }
.auth-status { font-size: 0.82rem; margin: 0.2rem 0 0; min-height: 1em; }
.auth-status.err { color: #c0492f; }
.auth-status.ok { color: var(--sage-deep); }
.auth-status.busy { color: var(--mist); }

/* portal */
.acct-portal { max-width: 760px; margin: 1.5rem auto 4rem; padding: 0 1.1rem; }
.portal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.portal-title { font-family: 'Cinzel', serif; color: var(--cream); font-size: 1.7rem; margin: 0; }
.pcard { background: rgba(255,255,255,0.5); border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem 1.3rem; margin-bottom: 1.1rem; box-shadow: 0 14px 38px -28px rgba(60,40,20,0.45); }
.pcard h2 { font-family: 'Cinzel', serif; color: var(--cream); font-size: 1.1rem; margin: 0 0 0.3rem; }
.pcard-sub { font-size: 0.85rem; color: var(--mist); line-height: 1.5; margin: 0 0 0.9rem; }
.pcard-sub a { color: var(--rose); }
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-bottom: 0.8rem; }
.pgrid label, .pfull { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.8rem; color: var(--mist); }
.pfull { margin-bottom: 0.8rem; }
.pcard .btn { margin-top: 0.4rem; }

/* status chips */
.status-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.schip { font-size: 0.75rem; padding: 0.28rem 0.7rem; border-radius: 99px; border: 1px solid var(--line); }
.schip.on { background: rgba(127,168,120,0.22); border-color: var(--sage); color: var(--sage-deep); font-weight: 600; }
.schip.off { color: var(--mist-soft); }

/* availability grid */
.brush-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.9rem; }
.brush { border: 1px solid var(--line); background: rgba(255,255,255,0.6); border-radius: 99px; padding: 0.4rem 0.85rem; font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: transform 0.12s ease; }
.brush::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 0.4rem; vertical-align: -1px; }
.brush-best::before { background: #4e9a5c; }
.brush-maybe::before { background: #d4a85e; }
.brush-unsure::before { background: #8892a6; }
.brush-never::before { background: #c0705f; }
.brush-erase::before { background: transparent; border: 1px solid var(--line); }
.brush.active { transform: scale(1.04); box-shadow: 0 4px 14px -6px rgba(184,137,68,0.7); border-color: var(--gold); }
.grid-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 0.3rem; }
.avail-grid { display: grid; gap: 3px; min-width: 320px; user-select: none; touch-action: pan-x; }
.gcorner { }
.ghead { text-align: center; font-family: 'Cinzel', serif; font-size: 0.68rem; color: var(--mist); padding-bottom: 0.2rem; }
.ghour { font-size: 0.62rem; color: var(--mist-soft); display: flex; align-items: center; justify-content: flex-end; padding-right: 0.35rem; }
.gcell { height: 22px; border-radius: 4px; background: rgba(120,100,70,0.10); border: 1px solid rgba(120,100,70,0.14); cursor: pointer; }
.gcell:hover { border-color: var(--gold); }
.g-best { background: #4e9a5c; border-color: #3f7f4b; }
.g-maybe { background: #d4a85e; border-color: #b88944; }
.g-unsure { background: #8892a6; border-color: #6e778a; }
.g-never { background: #c0705f; border-color: #a2584a; }
.grid-actions { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin-top: 0.9rem; }
.grid-actions .btn { margin-top: 0; }

/* bookings */
#bookingCard.locked { opacity: 0.62; }
#bookingCard.locked .pgrid, #bookingCard.locked .pfull, #bookingCard.locked #bkSubmit { pointer-events: none; }
.booking-list { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.bkrow { display: flex; justify-content: space-between; gap: 0.8rem; align-items: flex-start; padding: 0.7rem 0.85rem; border-radius: 10px; background: rgba(255,255,255,0.55); border: 1px solid var(--line); font-size: 0.88rem; }
.bkrow .bknote { color: var(--mist); font-size: 0.8rem; }
.bkstatus { font-size: 0.75rem; white-space: nowrap; font-weight: 600; }
.st-pending { color: var(--gold); }
.st-approved { color: var(--sage-deep); }
.st-declined { color: #c0492f; }
.st-cancelled { color: var(--mist-soft); }
.bk-cancel { background: none; border: none; color: var(--mist-soft); font-size: 0.72rem; cursor: pointer; text-decoration: underline; margin-left: 0.3rem; }
.bkrow.bk-approved { border-color: var(--sage); }
.bkrow.bk-declined, .bkrow.bk-cancelled { opacity: 0.72; }

@media (max-width: 520px) {
  .pgrid { grid-template-columns: 1fr; }
  .gcell { height: 26px; }
  .portal-title { font-size: 1.4rem; }
}

/* ghost button on the light parchment portal must be readable */
.acct-body .btn-ghost { color: var(--cream); border-color: var(--gold); background: rgba(255,255,255,0.45); }
.acct-body .btn-ghost:hover { color: var(--rose); border-color: var(--rose); }

/* [hidden] must win over the flex/grid display above (UA hidden rule loses to class display) */
.auth-form[hidden], .acct-auth[hidden], .acct-portal[hidden], .pgrid[hidden], [hidden] { display: none !important; }

/* clickable grid headers (fill whole column/row) */
.ghead, .ghour { cursor: pointer; border-radius: 4px; transition: background 0.15s ease, color 0.15s ease; }
.ghead:hover, .ghour:hover { background: rgba(184,137,68,0.22); color: var(--gold); }

/* booking: length hint + availability-aware time chips */
.bk-endhint { font-size: 0.8rem; color: var(--mist); margin: 0.1rem 0 0.6rem; }
.bk-avail { margin: 0 0 0.8rem; }
.bk-avail-lbl { font-size: 0.8rem; color: var(--mist); }
.bk-avail-none { font-size: 0.8rem; color: var(--mist-soft); }
.bk-slot { display: inline-block; margin: 0.35rem 0.35rem 0 0; padding: 0.35rem 0.7rem; border-radius: 99px; border: 1px solid var(--line); background: rgba(255,255,255,0.6); font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.bk-slot.best { border-color: #4e9a5c; color: #3f7f4b; }
.bk-slot.maybe { border-color: #b88944; color: #9a6f2e; }
.bk-slot:hover { background: rgba(184,137,68,0.14); }

/* confirmed-booking banner */
.confirm-banner { background: linear-gradient(180deg, rgba(127,168,120,0.28), rgba(127,168,120,0.14)); border: 1px solid var(--sage); border-radius: 14px; padding: 0.9rem 1.1rem; margin-bottom: 1.1rem; color: var(--sage-deep); font-size: 0.95rem; }
.confirm-banner strong { color: var(--sage-deep); }

/* your money */
.earn-total { font-size: 0.95rem; color: var(--mist); margin: 0 0 0.8rem; }
.earn-total strong { font-family: 'Cinzel', serif; color: var(--rose); font-size: 1.25rem; }
.earn-left { color: var(--mist-soft); font-size: 0.82rem; }
.earn-list { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.6rem; }
.earn-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.7rem; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,0.5); font-size: 0.86rem; }
.earn-row.done { border-color: var(--sage); }
.earn-pill { flex-shrink: 0; font-family: 'Cinzel', serif; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; padding: 0.22rem 0.55rem; border-radius: 99px; background: rgba(127,168,120,0.25); color: var(--sage-deep); }
.earn-pill.open { background: rgba(184,137,68,0.2); color: var(--gold); }
.earn-lbl { flex: 1; color: var(--cream); }
.earn-amt { color: var(--mist); font-size: 0.8rem; white-space: nowrap; }
.earn-amt b { color: var(--rose); letter-spacing: 0.06em; }
.earn-quest { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--line-soft); }
.earn-quest h4 { font-family: 'Cinzel', serif; font-size: 0.98rem; color: var(--cream); margin: 0 0 0.3rem; }
.earn-quest h4 strong { color: var(--rose); }
.earn-quest .ft-opt-sub { font-size: 0.82rem; color: var(--mist); margin: 0 0 0.7rem; line-height: 1.45; }
.earn-quest .ft-file, .earn-quest .btn { margin-top: 0.4rem; }
.earn-quest .btn { width: 100%; }
.earn-quest .ft-preview img, .earn-quest .ft-preview video { max-width: 160px; border-radius: 8px; margin: 0.5rem 0; }
