/* =====================================================================
   D'Kayu Homestay v2 — HCI update (loaded after style.css + b3.css)
   Logo, booking, help, my booking, admin lists, login, errors, caretaker.
   ===================================================================== */

/* Fraunces Bold for the logo. Put fraunces-700.woff2 in assets/fonts/ to use it;
   until then the browser falls back to Georgia Bold. */
@font-face {
  font-family: "Fraunces";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: local("Fraunces Bold"), local("Fraunces-Bold"), url("../fonts/fraunces-700.woff2") format("woff2");
}

/* ---------- Global consistency pass ---------- */
:focus-visible { outline: 3px solid var(--berry); outline-offset: 2px; }
.btn-sm { min-height: 40px; }
.btn { min-height: 44px; }
.btn.btn-sm { min-height: 40px; }
.icon-btn { min-width: 36px; min-height: 36px; }
.btn.is-busy { opacity: .7; cursor: progress; }
.field-err { display: block; color: var(--berry-d); font-weight: 600; font-size: .8rem; margin-top: .15rem; }
.field-err[hidden] { display: none; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--berry) !important; box-shadow: 0 0 0 3px rgba(200, 69, 58, .14) !important; }
input.is-valid { border-color: var(--tea) !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B8F5A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; background-size: 16px; padding-right: 2.2rem; }
.field-msg { display: block; font-size: .8rem; font-weight: 600; min-height: 1em; }
.field-msg.is-ok { color: var(--pine); }
.field-msg.is-bad { color: var(--berry-d); }
.link-sm { font-size: .85rem; font-weight: 600; text-decoration: none; }
.card-flush { padding: 0; overflow: hidden; }
.pad { padding: 1.25rem; }

/* ---------- Logo: one line, bold serif ---------- */
.brand { gap: .55rem; }
.brand-name {
  font-family: "Fraunces", Georgia, "Times New Roman", serif; font-weight: 700;
  font-size: 1.2rem; letter-spacing: -.01em; line-height: 1; color: var(--pine); white-space: nowrap;
}
.brand-light .brand-name, .ct-top .brand-name { color: #fff; }
.side-brand strong.brand-name { font-size: 1.08rem; color: #fff; }
@media (max-width: 420px) { .brand-name { font-size: 1.05rem; } .site-header .brand img { width: 30px; height: 30px; } }

/* ---------- Compact page headers (Book, Help, My Booking) ---------- */
.page-head-book, .page-head-help { padding-bottom: var(--s3); }
.page-head-book .lead { font-size: 1rem; }
.page-head h1 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }

/* =====================================================================
   BOOKING
   ===================================================================== */
.book-section { padding-bottom: var(--sec); }
.steps-bar { position: sticky; top: 68px; z-index: 30; margin: 0 0 var(--s3); padding: .5rem 0; background: rgba(244, 241, 234, .95); backdrop-filter: blur(8px); }
.steps-bar ol { list-style: none; margin: 0; padding: 0; display: flex; gap: .4rem; }
.steps-bar li { flex: 1; }
.steps-bar a { display: flex; align-items: center; gap: .5rem; min-height: 44px; padding: .4rem .75rem; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--muted); text-decoration: none; font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps-bar a span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--sand); color: var(--muted); font-size: .78rem; flex: none; }
.steps-bar a[aria-current="step"] { border-color: var(--pine); color: var(--pine); background: #F6F9F3; }
.steps-bar a[aria-current="step"] span { background: var(--pine); color: #fff; }
.steps-bar a.is-done span { background: var(--tea); color: #fff; }
@media (max-width: 560px) { .steps-bar a { justify-content: center; padding: .4rem; font-size: .8rem; } }

.err-summary ul { margin: .35rem 0 0; padding-left: 1.1rem; }
.err-summary a { color: var(--berry-d); font-weight: 600; }
.err-summary:focus { outline: 3px solid var(--berry); outline-offset: 2px; }

.book-steps { gap: 1rem; }
.book-step { padding: 1.1rem 1.2rem; gap: .8rem; scroll-margin-top: 130px; }
.book-step legend { font-size: 1.18rem; margin-bottom: 0; }
.step-no { width: 28px; height: 28px; }

/* Calendar: shorter cells, clear states */
.cal { padding: .75rem .85rem; }
.cal-head { margin-bottom: .25rem; }
.cal-nav { width: 40px; height: 40px; display: grid; place-items: center; }
.cal-titles { font-size: 1rem; }
.cal-months { gap: 1.25rem; }
.cal-grid { gap: 2px; }
.cal-dow { padding-bottom: .15rem; font-size: .7rem; }
.cal-day {
  aspect-ratio: auto; height: 42px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  font-size: .9rem; line-height: 1.05; padding: 0;
}
.cal-day[aria-disabled="true"] { cursor: not-allowed; }
.cal-day.is-taken { text-decoration: none; }
.cal-day.is-taken span { text-decoration: line-through; }
.cal-day.is-checkout-ok { background: repeating-linear-gradient(135deg, #F7ECEA 0 5px, #F1DCD8 5px 10px); cursor: pointer; color: var(--ink); }
.cal-day.is-checkout-ok span { text-decoration: none; }
.cal-day.is-end .cal-n, .cal-n { font-size: .6rem; font-weight: 600; opacity: .9; letter-spacing: .02em; }
.cal-day:focus-visible { outline: 3px solid var(--berry); outline-offset: 1px; z-index: 1; }
.cal-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; margin-top: .5rem; }
.cal-hint { margin: 0; min-height: 1.3em; }
.cal-legend { margin: 0; gap: .8rem; }
.dates-row { align-items: start; }

.stepper-field { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .88rem; color: var(--pine); }
.stepper { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--paper); }
.stepper input { border: 0 !important; text-align: center; width: 100%; min-width: 0; font: 600 1rem var(--sans); -moz-appearance: textfield; border-radius: 0; box-shadow: none !important; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step-btn { width: 44px; flex: none; border: 0; background: var(--mist); color: var(--pine); font-size: 1.25rem; font-weight: 700; cursor: pointer; }
.step-btn:hover:not(:disabled) { background: var(--tea-l); }
.step-btn:disabled { color: #C2BBAE; cursor: not-allowed; }
.stepper-field .hint { font-weight: 400; }

.option-card .oc-body { padding: .9rem 1rem .9rem 2.9rem; gap: .45rem; }
.oc-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.oc-badge { font-style: normal; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--pine); background: var(--tea-l); border-radius: 999px; padding: .15rem .5rem; }
.oc-rows { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.oc-rows > span { display: flex; flex-direction: column; background: var(--mist); border-radius: 8px; padding: .4rem .6rem; }
.oc-rows small { font-size: .72rem; color: var(--muted); }
.oc-rows b { font-family: var(--serif); font-weight: 500; font-size: 1.08rem; color: var(--pine); }
.oc-note { display: flex; gap: .35rem; align-items: center; color: var(--muted); font-size: .8rem; }
.option-card input:checked + .oc-body .oc-rows > span { background: #fff; }

.summary-photo { aspect-ratio: 16 / 7; }
.summary-body { gap: .5rem; padding: 1.1rem; }
.sum-guests { display: flex; align-items: center; gap: .35rem; color: var(--muted); margin: 0; }
.summary-body .muted.small { display: flex; align-items: center; gap: .3rem; margin: 0; }
.trust-list { list-style: none; margin: .25rem 0 0; padding: 0; display: grid; gap: .3rem; font-size: .8rem; color: var(--muted); }
.trust-list li { display: flex; gap: .4rem; align-items: flex-start; }
.trust-list .ic { color: var(--tea); margin-top: .1rem; }

.book-mbar { display: none; }
@media (max-width: 899px) {
  .book-mbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; justify-content: space-between; align-items: center; gap: 1rem;
    padding: .65rem 1.1rem calc(.65rem + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(31,58,46,.1);
  }
  .book-mbar > div { display: flex; flex-direction: column; line-height: 1.15; }
  .book-mbar strong { font-family: var(--serif); font-size: 1.2rem; color: var(--pine); }
  .book-mbar small { color: var(--muted); font-size: .8rem; }
  .book-summary { order: 2; }
  .steps-bar { top: 68px; }
}
@media (min-width: 900px) {
  .book-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; }
  .book-summary { top: 130px; }
}

/* =====================================================================
   HELP
   ===================================================================== */
.faq-search { display: flex; align-items: center; gap: .5rem; max-width: 560px; margin-top: var(--s3); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 0 1rem; box-shadow: var(--shadow-sm); color: var(--muted); }
.faq-search[hidden] { display: none; }
.faq-search input { flex: 1; border: 0; background: none; padding: .8rem 0; font: 400 1rem var(--sans); outline: none; min-width: 0; }
.faq-search:focus-within { border-color: var(--pine); box-shadow: 0 0 0 3px rgba(107,143,90,.22); }

.quick-grid { display: grid; gap: .6rem; grid-template-columns: repeat(2, 1fr); }
.quick-card { display: flex; align-items: center; gap: .65rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .65rem .75rem; min-width: 0; }
.quick-card > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.quick-card small { color: var(--muted); font-size: .76rem; }
.quick-card strong { color: var(--pine); font-size: .95rem; }
@media (min-width: 760px) { .quick-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .quick-grid { grid-template-columns: repeat(6, 1fr); } }

.help-layout { display: grid; gap: var(--s5); align-items: start; }
.faq-wrap .chips { margin-bottom: var(--s3); }
.faq-group { margin-bottom: var(--s4); }
.faq-group[hidden] { display: none; }
.faq-group-title { display: flex; align-items: center; gap: .5rem; font: 700 .8rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--timber); margin: 0 0 .5rem; }
.faq-item { margin-bottom: .45rem; }
.faq-item[hidden] { display: none; }
.faq-item summary { align-items: center; padding: .75rem 1rem; min-height: 52px; }
.faq-item summary .fi { width: 32px; height: 32px; border-radius: 8px; background: var(--tea-l); color: var(--pine); display: grid; place-items: center; flex: none; }
.faq-item summary .fq { flex: 1; }
.faq-item summary::after { margin-left: auto; }
.faq-item p { padding: 0 1rem 1rem 3.6rem; color: var(--ink); max-width: none; }
.faq-item[open] { border-color: #C8D6BF; box-shadow: var(--shadow-sm); }
.faq-empty { background: var(--paper); border: 1px dashed var(--line); border-radius: var(--r); padding: 1.1rem; display: grid; gap: .6rem; justify-items: start; }
.faq-empty[hidden] { display: none; }
.privacy-line { margin-top: var(--s4); border-top: 1px solid var(--line); padding-top: .75rem; }
.privacy-line summary { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: .9rem; }
.contact-card2 { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.2rem; display: grid; gap: .65rem; box-shadow: var(--shadow-sm); }
.contact-card2 h2 { margin: 0; }
.contact-card2 > p { margin: -.3rem 0 .2rem; }
.cc-addr { display: flex; gap: .65rem; align-items: flex-start; border-top: 1px solid var(--line-2); padding-top: .8rem; margin-top: .2rem; }
.cc-addr > span:last-child { display: flex; flex-direction: column; gap: .15rem; font-size: .88rem; }
.cc-addr small { color: var(--muted); }
@media (min-width: 900px) {
  .help-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 2.5rem; }
  .help-side { position: sticky; top: 88px; }
}

/* =====================================================================
   MY BOOKING
   ===================================================================== */
.lookup-wrap { align-items: start; gap: var(--s4); }
.lookup-card2 { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.3rem; display: grid; gap: .9rem; box-shadow: var(--shadow-sm); }
.lookup-card2 .lead { margin: 0; font-size: 1rem; }
.lookup-card2 label { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .88rem; color: var(--pine); }
.input-icon { position: relative; display: block; }
.input-icon .ic { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon input { padding-left: 2.5rem !important; width: 100%; font: 400 1rem var(--sans); padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); min-height: 44px; }
#mb-code { letter-spacing: .12em; font-weight: 700; text-transform: uppercase; }
.can-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.can-list li { display: flex; align-items: center; gap: .7rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6rem .75rem; font-size: .93rem; }
@media (min-width: 900px) { .lookup-wrap { grid-template-columns: 440px 1fr; } }

.mb-section .pass-wrap { display: grid; gap: 1rem; }
.mb-section .pass-wrap > * { margin: 0; }
.next-box { box-shadow: var(--shadow-sm); }
.next-label { display: flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--timber); margin: 0 0 .25rem; }
.next-ok .next-label { color: var(--pine); }
.next-when { display: flex; align-items: center; gap: .35rem; font-weight: 600; margin-bottom: .35rem; }
.next-box h2 { display: flex; align-items: center; gap: .4rem; }
.copy-row { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.copy-row .lock-code { margin: .25rem 0; }
.copy-btn { display: inline-flex; align-items: center; gap: .3rem; min-height: 32px; padding: .25rem .65rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.12); color: #fff; font: 600 .78rem var(--sans); cursor: pointer; }
.copy-btn:hover { background: rgba(255,255,255,.22); }
.is-copied { background: var(--tea) !important; border-color: var(--tea) !important; color: #fff !important; }
.pass-head .copy-row { gap: .5rem; }
.pass-code { margin: 0; }
.cancel-note.is-late { color: var(--berry-d); }
.mb-section .h5 { display: flex; align-items: center; gap: .35rem; }

@media print {
  @page { size: A4; margin: 14mm; }
  body.site { background: #fff !important; }
  .site-header, .site-footer, .mobile-book-bar, .pass-foot, .no-print, .copy-btn, .copy-row .btn, .pass-alert, .next-box .btn, .skip-link { display: none !important; }
  .frame { box-shadow: none !important; max-width: none; background: #fff; }
  .section, .mb-section { padding: 0 !important; }
  .pass, .next-box { box-shadow: none !important; break-inside: avoid; border-color: #999; }
  .pass-head { background: #fff !important; color: #000 !important; border-bottom: 2px solid #000; }
  .pass-code, .pass-dates, .pass-head .eyebrow { color: #000 !important; }
  .timeline { padding-top: .5rem; }
}

/* =====================================================================
   ADMIN: Items, Users, Activity, Password
   ===================================================================== */
.mini-stats { display: flex; flex-wrap: wrap; gap: .5rem; }
.mini-stats a { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: .35rem .85rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); text-decoration: none; font-size: .88rem; font-weight: 600; }
.mini-stats a b { color: var(--pine); }
.mini-stats a.is-active { border-color: var(--pine); box-shadow: 0 0 0 2px rgba(31,58,46,.12); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.st-ok { background: var(--tea); }
.dot.st-warn { background: #D9A23A; }
.dot.st-off { background: #B8B0A2; }
.filters .search { min-height: 40px; }
.filters .search input { min-width: 180px; }

.split-panel { display: grid; gap: 1.25rem; align-items: start; }
@media (min-width: 1100px) { .split-panel.has-panel { grid-template-columns: minmax(0, 1fr) 380px; } .side-panel { position: sticky; top: 88px; } }
.side-panel .card-head { margin-bottom: .75rem; }
.side-panel .form-grid { grid-template-columns: 1fr 1fr; }
.item-list { list-style: none; margin: 0; padding: 0; }
.item-list li { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line-2); }
.item-list li:last-child { border-bottom: 0; }
.item-list li:hover { background: #FCFBF8; }
.item-list li.is-hidden { opacity: .6; }
.item-list li.is-editing { background: var(--tea-l); }
.item-list .inline-status { margin-left: auto; }
@media (max-width: 639px) { .item-list li { flex-wrap: wrap; } .item-list .inline-status { margin-left: 52px; } }

.user-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.user-card { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r); padding: 1.1rem; box-shadow: var(--shadow-sm); display: grid; gap: .8rem; align-content: start; }
.user-card.is-hidden { opacity: .65; }
.uc-top { display: flex; align-items: center; gap: .7rem; }
.uc-name { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.uc-name strong { font-size: .98rem; }
.uc-name small { color: var(--muted); }
.uc-name .tag { font-style: normal; font-size: .68rem; margin-left: .25rem; }
.role-chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; white-space: nowrap; }
.role-admin { background: #E7EAF3; color: #3D4A73; }
.role-owner { background: var(--tea-l); color: var(--pine); }
.role-caretaker { background: var(--timber-l); color: #6A4529; }
.uc-meta { margin: 0; display: grid; gap: .3rem; font-size: .86rem; }
.uc-meta div { display: flex; justify-content: space-between; gap: .75rem; }
.uc-meta dt { display: flex; align-items: center; gap: .3rem; color: var(--muted); }
.uc-meta dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .3rem; }
.status-dot.on { background: var(--tea); }
.status-dot.off { background: #B8B0A2; }
.uc-actions { display: flex; flex-wrap: wrap; gap: .4rem; border-top: 1px solid var(--line-2); padding-top: .75rem; }
.uc-actions form { margin: 0; }
.btn-danger-text { color: var(--berry-d); }
.temp-box { display: flex; gap: .85rem; align-items: flex-start; background: var(--tea-l); border: 1px solid #BFD0B4; border-radius: var(--r); padding: 1rem 1.1rem; }
.temp-box p { margin: 0 0 .4rem; }
.temp-pw { font-size: 1.15rem; letter-spacing: .06em; padding: .35rem .75rem; background: #fff; border: 1px solid #BFD0B4; border-radius: 8px; user-select: all; }
.role-pick { border: 0; padding: 0; margin: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.role-pick legend { font-weight: 600; font-size: .88rem; color: var(--pine); margin-bottom: .4rem; padding: 0; }
.role-opt input { position: absolute; opacity: 0; }
.role-opt span { display: grid; gap: .15rem; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); padding: .7rem .8rem; cursor: pointer; color: var(--pine); font-weight: 400; }
.role-opt span small { color: var(--muted); font-size: .76rem; }
.role-opt input:checked + span { border-color: var(--pine); background: var(--tea-l); }
.role-opt input:focus-visible + span { outline: 3px solid var(--berry); outline-offset: 2px; }

.filter-card { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; padding: 1rem 1.1rem; }
.filter-card label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .82rem; color: var(--pine); }
.filter-card select, .filter-card input { font: 400 .93rem var(--sans); padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); min-height: 40px; }
.log-day { padding: .9rem 1.1rem; }
.log-date { font: 700 .78rem var(--sans) !important; letter-spacing: .1em; text-transform: uppercase; color: var(--timber) !important; margin: 0 0 .5rem; }
.log-list { list-style: none; margin: 0; padding: 0; }
.log-list li { display: flex; align-items: flex-start; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--line-2); }
.log-list li:last-child { border-bottom: 0; }
.log-ic { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.lg-booking { background: var(--tea-l); color: var(--pine); }
.lg-payment { background: #FDF0DC; color: #9A5B12; }
.lg-content { background: #E7EAF3; color: #3D4A73; }
.lg-account { background: var(--timber-l); color: #6A4529; }
.lg-security { background: var(--sand); color: var(--muted); }
.log-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; font-size: .92rem; }
.log-detail { color: var(--muted); overflow-wrap: anywhere; }
.log-meta { display: flex; flex-direction: column; align-items: flex-end; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.log-meta time { font-weight: 700; color: var(--ink); }

.pw-card { max-width: 520px; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 3rem !important; font: 400 1rem var(--sans); padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); min-height: 44px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; color: var(--muted); border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.pw-toggle:hover, .pw-toggle.is-on { color: var(--pine); background: var(--mist); }
.pw-meter { display: grid; gap: .5rem; margin-top: -.4rem; }
.pw-bar { height: 6px; background: var(--sand); border-radius: 999px; overflow: hidden; }
.pw-bar span { display: block; height: 100%; width: 0; background: var(--berry); border-radius: 999px; transition: width .25s, background .25s; }
.pw-meter[data-score="3"] .pw-bar span { background: #D9A23A; }
.pw-meter[data-score="4"] .pw-bar span, .pw-meter[data-score="5"] .pw-bar span { background: var(--tea); }
.pw-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; font-size: .82rem; color: var(--muted); }
.pw-rules li { display: flex; align-items: center; gap: .4rem; }
.pw-rules li .ic { color: #C2BBAE; }
.pw-rules li.is-ok { color: var(--pine); }
.pw-rules li.is-ok .ic { color: var(--tea); }

/* =====================================================================
   LOGIN + ERROR PAGES
   ===================================================================== */
.auth-card .brand { margin-bottom: .25rem; }
.auth-card .brand .brand-name { font-size: 1.25rem; }
.login-card h1 { margin-top: 1rem; }
.login-card .alert { display: flex; gap: .5rem; align-items: flex-start; }
.login-card .input-icon input { font-size: 1rem; }
.login-card label { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .88rem; color: var(--pine); }
.err-card { text-align: center; display: grid; justify-items: center; gap: .5rem; }
.err-card .brand { margin-bottom: .75rem; }
.err-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--tea-l); color: var(--pine); }
.err-code { margin: 0; font: 700 .8rem var(--sans); letter-spacing: .2em; color: var(--timber); }
.err-card h1 { margin: 0; font-size: 1.6rem; }
.err-card p { margin: 0; }
.err-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .75rem; }

/* =====================================================================
   CARETAKER (phone-first)
   ===================================================================== */
.ct-top { position: sticky; top: 0; z-index: 10; }
.ct-main { padding: 1rem 1rem 1.5rem; }
.ct-date { margin: 0; color: var(--muted); font-size: .88rem; }
.ct-hello { font: 650 1.45rem var(--sans); margin: 0 0 .9rem; color: var(--pine); }
.ct-card { padding: 1.1rem; margin-bottom: .9rem; border-radius: var(--r-lg); }
.ct-label { display: flex; align-items: center; gap: .4rem; margin: 0 0 .3rem; font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--timber); }
.ct-big { font: 700 1.5rem var(--sans); color: var(--pine); margin: 0; }
.ct-sub { margin: .1rem 0 0; color: var(--muted); }
.ct-main-card.is-today { border-color: var(--berry); box-shadow: 0 0 0 3px var(--berry-l); }
.ct-main-card .btn { margin-top: .9rem; min-height: 54px; }
.ct-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: .9rem; }
.ct-tile { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r); padding: .9rem; display: grid; gap: .1rem; box-shadow: var(--shadow-sm); }
.ct-tile strong { font-size: 1.6rem; color: var(--pine); line-height: 1.1; }
.ct-tile small { color: var(--muted); }
.ct-tile-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--tea-l); color: var(--pine); display: grid; place-items: center; margin-bottom: .3rem; }
.ct-tile.is-warn .ct-tile-ic { background: #FDF0DC; color: #9A5B12; }
.ct-list { list-style: none; margin: .25rem 0 0; padding: 0; display: grid; gap: .55rem; }
.ct-list li { display: flex; gap: .75rem; align-items: center; }
.ct-list li > span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.ct-list small { color: var(--muted); }
.ct-foot { flex-wrap: wrap; gap: .6rem; border-top: 1px solid var(--line); }
.ct-who { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); }
.ct-foot-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.ct-foot-actions form { margin: 0; }

/* ---------- Dark mode for new admin pieces ---------- */
@media (prefers-color-scheme: dark) {
  .admin .item-list li, .admin .log-list li, .admin .uc-actions { border-color: #2D3832; }
  .admin .item-list li:hover { background: #18201C; }
  .admin .user-card, .admin .mini-stats a, .admin .filter-card select, .admin .filter-card input, .admin .pw-wrap input { background: #1C2420; border-color: #2D3832; color: #E6E3DC; }
  .admin .temp-box { background: #22302A; border-color: #2D3832; }
  .admin .temp-pw { background: #141A17; color: #E6E3DC; }
  .admin .role-opt span { border-color: #2D3832; color: #DCE6D6; }
  .admin .role-opt input:checked + span, .admin .item-list li.is-editing { background: #22302A; }
  .admin .uc-name strong, .admin .log-meta time, .admin .mini-stats a b { color: #EEF3EA; }
}
