/* =========================================================
   Rehoboth Homecare — shared styles (aide app + admin)
   ========================================================= */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  /* brand */
  --brand: #0e6b73;
  --brand-600: #0b5a61;
  --brand-700: #08464c;
  --brand-50: #e8f4f4;
  --brand-100: #cfe8e8;
  /* neutrals */
  --bg: #f3f6f8;
  --card: #ffffff;
  --text: #13212b;
  --text-2: #3d4f5c;
  --muted: #6b7c88;
  --line: #e3e9ee;
  --line-2: #d3dce3;
  /* status */
  --ok: #15803d;      --ok-soft: #e7f6ec;
  --warn: #b45309;    --warn-soft: #fef3e2;
  --bad: #c0262d;     --bad-soft: #fdecec;
  --info: #1d5fa8;    --info-soft: #e8f0fb;
  /* shape */
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 30, 40, .06);
  --shadow: 0 1px 3px rgba(16, 30, 40, .06), 0 6px 16px -6px rgba(16, 30, 40, .10);
  --shadow-lg: 0 20px 50px -12px rgba(16, 30, 40, .30);
  --ring: 0 0 0 3px rgba(14, 107, 115, .22);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; font-weight: 800; }
h2 { font-size: 1.1rem; font-weight: 700; }
h3 { font-size: .98rem; font-weight: 700; }
a { color: var(--brand); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 1rem; }
svg.ic { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.17em; }

/* ---------------- Top bar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem max(1rem, env(safe-area-inset-left)) .7rem max(1rem, env(safe-area-inset-right));
  background: rgba(255, 255, 255, .88); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line); color: var(--text);
}
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 700; font-size: .98rem; line-height: 1.2; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: .76rem; white-space: nowrap; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), #14919b); color: #fff; box-shadow: var(--shadow-sm);
}
.brand-mark svg { width: 20px; height: 20px; }
.who { margin-left: auto; display: flex; align-items: center; gap: .55rem; font-size: .88rem; font-weight: 600; color: var(--text-2); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--brand-50); color: var(--brand-700); font-weight: 700; font-size: .8rem;
  border: 1px solid var(--brand-100);
}
.topbar button { background: #fff; color: var(--text-2); border: 1px solid var(--line-2); }
.topbar button:hover { background: var(--bg); }
@media (max-width: 520px) { .who-name, .brand small { display: none; } }

/* ---------------- Layout ---------------- */
.container { max-width: 1200px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.narrow { max-width: 600px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.25rem;
}
.card + .card { margin-top: 1rem; }
.card-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .9rem; }
.card-head h2 { margin: 0; }
.card-sub { color: var(--muted); font-size: .86rem; margin: -.55rem 0 1rem; }
.grid { display: grid; gap: 1rem; }
.grid > .card + .card { margin-top: 0; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* step label above aide cards */
.step-label {
  display: flex; align-items: center; gap: .5rem; margin: 1.5rem .25rem .6rem;
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
.step-label .num {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-size: .72rem; letter-spacing: 0;
}

/* ---------------- Forms ---------------- */
label { display: block; font-size: .84rem; font-weight: 600; margin-bottom: .35rem; color: var(--text-2); }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; /* 16px stops iOS zoom */
  padding: .7rem .85rem; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: #fff; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #9aa8b2; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
input:disabled { background: var(--bg); color: var(--muted); }
input[type="checkbox"], input[type="radio"] { width: 1.1rem; height: 1.1rem; padding: 0; accent-color: var(--brand); flex: none; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 2.4rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7c88' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .75rem center;
}
.field + .field { margin-top: 1rem; }
.check {
  display: flex; gap: .65rem; align-items: flex-start; margin: 0; padding: .8rem .9rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fafcfd;
  font-weight: 500; color: var(--text); cursor: pointer;
}
.check input { margin-top: .15rem; }
.check:has(input:checked) { border-color: var(--brand-100); background: var(--brand-50); }

/* ---------------- Buttons ---------------- */
button {
  font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border-radius: var(--radius-sm); padding: .6rem 1.05rem;
  border: 1px solid var(--line-2); background: #fff; color: var(--text);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
button:hover { background: #f5f8fa; }
button:active { transform: translateY(1px); }
button:focus-visible { outline: none; box-shadow: var(--ring); }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
button.primary:hover { background: var(--brand-600); }
button.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
button.danger:hover { background: #a11f25; }
button.link { border: 0; background: none; color: var(--brand); padding: 0; font-weight: 600; }
button.link:hover { text-decoration: underline; background: none; }
button.sm { padding: .38rem .7rem; font-size: .84rem; border-radius: 8px; }
.btn-big { width: 100%; padding: 1rem 1.2rem; font-size: 1.08rem; border-radius: 12px; font-weight: 700; }
.btn-in { background: var(--ok); border-color: var(--ok); color: #fff; box-shadow: 0 6px 16px -6px rgba(21, 128, 61, .55); }
.btn-in:hover { background: #126b33; }
.btn-out { background: var(--bad); border-color: var(--bad); color: #fff; box-shadow: 0 6px 16px -6px rgba(192, 38, 45, .5); }
.btn-out:hover { background: #a11f25; }

/* ---------------- Login ---------------- */
.login-wrap {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 1.25rem;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(14, 107, 115, .16), transparent 60%),
    radial-gradient(700px 400px at 110% 110%, rgba(20, 145, 155, .14), transparent 60%),
    var(--bg);
}
.login-card { width: 100%; max-width: 400px; padding: 2rem 1.75rem; box-shadow: var(--shadow-lg); }
.login-card .logo { text-align: center; margin-bottom: 1.5rem; }
.login-card .logo .brand-mark { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto .9rem; }
.login-card .logo .brand-mark svg { width: 30px; height: 30px; }
.login-card .logo h1 { font-size: 1.35rem; margin-bottom: .2rem; }
.or { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .8rem; margin: 1.1rem 0; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.google-btn { background: #fff; color: var(--text); border: 1px solid var(--line-2); font-weight: 600; }
.google-btn:hover { background: #f7f9fa; }
.login-foot { text-align: center; margin: 1.1rem 0 0; }

/* ---------------- Messages & badges ---------------- */
.msg { padding: .7rem .9rem; border-radius: var(--radius-sm); font-size: .9rem; border: 1px solid transparent; }
.msg.error { background: var(--bad-soft); color: var(--bad); border-color: #f6caca; }
.msg.ok { background: var(--ok-soft); color: var(--ok); border-color: #bfe5cc; }
.msg.info { background: var(--info-soft); color: var(--info); border-color: #c8daf2; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .16rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.high { background: var(--bad-soft); color: var(--bad); }
.badge.med { background: var(--warn-soft); color: var(--warn); }
.badge.low { background: #edf1f4; color: var(--text-2); }
.badge.live { background: var(--ok); color: #fff; }
.badge.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.badges { display: flex; flex-wrap: wrap; gap: .3rem; }

/* ---------------- Aide: start a visit ---------------- */
.today { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: 1rem; }
.today .date { font-weight: 700; font-size: 1.05rem; }
.today .clock { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.hint { display: flex; gap: .55rem; align-items: flex-start; color: var(--muted); font-size: .84rem; margin-bottom: 0; }
.hint svg { color: var(--brand); margin-top: .12rem; }

/* segmented control */
.seg { display: flex; padding: 4px; gap: 4px; background: #eef2f5; border-radius: 12px; }
.seg label {
  flex: 1; margin: 0; text-align: center; padding: .6rem .5rem; cursor: pointer; border-radius: 9px;
  font-weight: 600; font-size: .92rem; color: var(--text-2); transition: background .15s, color .15s, box-shadow .15s;
}
.seg input { display: none; }
.seg label:has(input:checked) { background: #fff; color: var(--brand-700); box-shadow: var(--shadow-sm); }

/* ---------------- Aide: on shift hero ---------------- */
.shift-hero {
  color: #fff; border: 0; overflow: hidden; position: relative;
  background: linear-gradient(140deg, var(--brand-700), var(--brand) 55%, #14919b);
}
.shift-hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255, 255, 255, .07);
}
.shift-hero .badge.live { background: rgba(255, 255, 255, .18); }
.shift-hero .badge.low { background: rgba(255, 255, 255, .14); color: #fff; }
.shift-hero h2 { color: #fff; font-size: 1.3rem; }
.shift-clock { font-size: 3rem; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; margin: .25rem 0; }
.shift-meta { text-align: center; color: rgba(255, 255, 255, .8); font-size: .9rem; }
.shift-hero .msg { position: relative; z-index: 1; }
.shift-hero .msg.ok { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .22); }
.shift-hero .msg.info { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .22); }
.shift-hero .msg.error { background: #fff; }

/* ---------------- Aide: task checklist ---------------- */
.legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .8rem; color: var(--muted); margin-bottom: 1rem; }
.legend b { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 6px; font-size: .72rem; margin-right: .3rem; color: #fff; }
.legend .c { background: var(--ok); } .legend .r { background: var(--bad); } .legend .s { background: var(--warn); }
.task-section { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.task-section + .task-section { margin-top: .55rem; }
.task-section summary {
  cursor: pointer; padding: .8rem .95rem; font-weight: 600; display: flex; align-items: center; gap: .6rem;
  list-style: none; user-select: none;
}
.task-section summary::-webkit-details-marker { display: none; }
.task-section summary::after {
  content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); margin-left: .25rem; transition: transform .2s; flex: none; margin-top: -4px;
}
.task-section[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.task-section[open] summary { border-bottom: 1px solid var(--line); background: #fafcfd; }
.task-section summary .count {
  margin-left: auto; font-size: .74rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px;
  background: #edf1f4; color: var(--muted); font-variant-numeric: tabular-nums;
}
.task-section summary .count:not([data-zero]) { background: var(--brand-50); color: var(--brand-700); }
.care-row { display: flex; align-items: center; gap: .5rem; padding: .6rem .95rem; border-bottom: 1px solid var(--line); background: var(--brand-50); font-size: .84rem; font-weight: 600; color: var(--brand-700); }
.care-row .muted { color: var(--brand-700); }
.task { display: flex; align-items: center; gap: .6rem; padding: .55rem .95rem; border-top: 1px solid var(--line); }
.care-row + .task, .task:first-of-type { border-top: 0; }
.task .name { flex: 1; font-size: .93rem; color: var(--text); }
.codes { display: flex; gap: .3rem; }
.codes button {
  width: 2.5rem; height: 2.3rem; padding: 0; font-size: .85rem; font-weight: 700; border-radius: 9px;
  color: var(--muted); background: #fff; border-color: var(--line-2);
}
.codes button.on[data-code="C"], .codes button.on[data-code="E"] { background: var(--ok); color: #fff; border-color: var(--ok); }
.codes button.on[data-code="R"], .codes button.on[data-code="T"] { background: var(--bad); color: #fff; border-color: var(--bad); }
.codes button.on[data-code="S"], .codes button.on[data-code="L"] { background: var(--warn); color: #fff; border-color: var(--warn); }
.save-pill { font-size: .78rem; font-weight: 600; color: var(--muted); }

/* ---------------- Signatures ---------------- */
.sig-box { border: 1px solid var(--line); border-radius: 12px; padding: .9rem; background: #fafcfd; }
.sig-box + .sig-box { margin-top: .8rem; }
.sig-box .row { margin-bottom: .5rem; }
.sig-box label { margin: 0; }
.sig-pad {
  display: block; width: 100%; height: 160px; background: #fff; touch-action: none; cursor: crosshair;
  border: 2px dashed var(--line-2); border-radius: 10px;
  background-image: linear-gradient(to right, transparent 6%, #dfe6ec 6%, #dfe6ec 94%, transparent 94%);
  background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 75%;
}
.sig-pad.signed { border-style: solid; border-color: var(--ok); }
.sig-img { display: block; max-width: 260px; max-height: 80px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.req { color: var(--bad); font-weight: 700; }

/* ---------------- Aide: this week ---------------- */
.week-total { font-size: 1.4rem; font-weight: 800; color: var(--brand-700); font-variant-numeric: tabular-nums; }
.visit-item { display: flex; align-items: center; gap: .85rem; padding: .75rem 0; border-top: 1px solid var(--line); }
.visit-item:first-child { border-top: 0; }
.visit-item .day {
  width: 3.1rem; flex: none; text-align: center; font-weight: 700; color: var(--brand-700); font-size: .82rem;
  background: var(--brand-50); border-radius: 10px; padding: .35rem 0; text-transform: uppercase; letter-spacing: .03em;
}
.visit-item .day small { display: block; font-weight: 600; color: var(--text-2); font-size: .9rem; text-transform: none; letter-spacing: 0; }

/* ---------------- Admin ---------------- */
.tabs { display: flex; gap: .25rem; padding: 4px; background: #e9eef2; border-radius: 12px; margin-bottom: 1.25rem; overflow-x: auto; width: fit-content; max-width: 100%; }
.tabs button { border: 0; background: none; padding: .55rem 1rem; color: var(--text-2); border-radius: 9px; white-space: nowrap; }
.tabs button:hover { background: rgba(255, 255, 255, .6); }
.tabs button.active { background: #fff; color: var(--brand-700); box-shadow: var(--shadow-sm); }
.stat { padding: 1.1rem 1.2rem; position: relative; }
.stat .v { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.15; }
.stat .l { color: var(--muted); font-size: .84rem; font-weight: 500; margin-top: .15rem; }
.stat.bad .v { color: var(--bad); }
.stat.ok .v { color: var(--ok); }
.table-wrap { overflow-x: auto; margin: 0 -1.25rem -1.25rem; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 1.25rem; }
th:last-child, td:last-child { padding-right: 1.25rem; }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #f8fafb; font-weight: 600; position: sticky; top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f6fafa; }
tr.flagged td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.toolbar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.1rem; }
.toolbar input, .toolbar select { width: auto; min-width: 180px; }
.week-nav { display: flex; align-items: center; gap: .4rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .3rem; box-shadow: var(--shadow-sm); }
.week-nav button { border: 0; }
.week-nav strong { min-width: 13rem; text-align: center; font-size: .92rem; font-variant-numeric: tabular-nums; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(10, 22, 30, .5); backdrop-filter: blur(2px); display: grid; place-items: center; padding: 1rem; z-index: 50; animation: fade .15s; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 720px; max-height: 90vh; overflow: auto; padding: 1.5rem; box-shadow: var(--shadow-lg); animation: rise .18s; }
.modal header { display: flex; align-items: center; gap: .5rem; margin-bottom: 1.1rem; }
.modal header h2 { margin: 0; font-size: 1.15rem; }
.modal header .x { margin-left: auto; border: 0; width: 36px; height: 36px; padding: 0; border-radius: 50%; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
dl.kv { display: grid; grid-template-columns: 11rem 1fr; gap: .55rem 1rem; margin: 0; }
dl.kv dt { color: var(--muted); font-size: .85rem; }
dl.kv dd { margin: 0; }
@media (max-width: 560px) { dl.kv { grid-template-columns: 1fr; gap: .15rem; } dl.kv dd { margin-bottom: .6rem; } }

/* misc */
.toast { position: fixed; bottom: calc(1.25rem + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; padding: .75rem 1.15rem; border-radius: 12px; z-index: 100; box-shadow: var(--shadow-lg); font-weight: 500; font-size: .92rem; animation: rise .2s; }
.spinner { width: 1rem; height: 1rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--muted); padding: 2.25rem 1rem; }
@media (max-width: 520px) {
  .container { padding: 1rem .75rem 3rem; }
  .card { padding: 1.05rem; }
  .table-wrap { margin: 0 -1.05rem -1.05rem; }
  .shift-clock { font-size: 2.6rem; }
}

/* =========================================================
   Front page (sign-in) — header, hero, footer
   ========================================================= */
.landing {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background:
    radial-gradient(1000px 520px at -5% -10%, rgba(14, 107, 115, .18), transparent 60%),
    radial-gradient(800px 480px at 105% 30%, rgba(20, 145, 155, .14), transparent 60%),
    var(--bg);
}
.site-header {
  display: flex; align-items: center; gap: 1rem; width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 1rem 1.25rem;
}
.site-nav { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.nav-pill {
  display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: .88rem; box-shadow: var(--shadow-sm);
}
.nav-pill svg { color: var(--brand); }
.nav-link { white-space: nowrap; padding: .5rem .85rem; border-radius: 999px; color: var(--brand-700); font-weight: 600; font-size: .88rem; }
.nav-pill:hover, .nav-link:hover { text-decoration: none; background: var(--brand-50); }

.landing-main {
  flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 420px); gap: 3.5rem; align-items: center;
}
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.08; letter-spacing: -.03em; margin: .9rem 0 1rem; font-weight: 800; }
.hero .accent { background: linear-gradient(90deg, var(--brand), #14919b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .8rem; border-radius: 999px;
  background: #fff; border: 1px solid var(--brand-100); color: var(--brand-700); font-weight: 600; font-size: .8rem;
}
.eyebrow svg { color: #d9485f; }
.lead { font-size: 1.06rem; color: var(--text-2); max-width: 34rem; margin: 0 0 1.75rem; }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; max-width: 34rem; }
.features li {
  display: flex; gap: .9rem; align-items: flex-start; padding: .95rem 1rem;
  background: rgba(255, 255, 255, .75); border: 1px solid var(--line); border-radius: 14px; backdrop-filter: blur(4px);
}
.features strong { display: block; font-size: .96rem; }
.features small { color: var(--muted); font-size: .86rem; }
.f-ic { width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.f-ic svg { width: 20px; height: 20px; }
.landing .login-card { justify-self: end; max-width: 420px; }

.site-footer { background: var(--brand-700); color: rgba(255, 255, 255, .82); font-size: .9rem; }
.footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 2.25rem 1.25rem 1.5rem;
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem;
}
.site-footer .brand { color: #fff; }
.site-footer .brand-mark { background: rgba(255, 255, 255, .14); box-shadow: none; }
.site-footer h4 { color: #fff; margin: 0 0 .6rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; }
.site-footer p { margin: 0 0 .55rem; }
.site-footer a { color: #fff; }
.site-footer .muted { color: rgba(255, 255, 255, .6); }
.site-footer svg.ic { color: #7fd1d6; }
.footer-brand p { margin-top: .8rem; max-width: 18rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); text-align: center; padding: 1rem; font-size: .8rem; color: rgba(255, 255, 255, .6); }

.app-footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 0 1rem 2rem; }

@media (max-width: 900px) {
  .landing-main { grid-template-columns: 1fr; gap: 2rem; padding-top: .5rem; }
  .landing .login-card { justify-self: stretch; max-width: none; order: -1; }
  .hero { text-align: left; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.25rem; }
}
@media (max-width: 520px) {
  .site-header { padding: .8rem 1rem; }
  .nav-pill span { display: none; }
  .nav-pill { padding: .5rem; }
  .landing-main { padding: .25rem 1rem 2rem; }
  .features li { padding: .8rem; }
}

/* Admin front page — darker "office console" variant */
.landing-admin {
  background:
    radial-gradient(900px 520px at 0% 0%, rgba(20, 145, 155, .35), transparent 60%),
    radial-gradient(700px 500px at 100% 100%, rgba(14, 107, 115, .45), transparent 60%),
    linear-gradient(160deg, #06363b, #0a4a50 55%, #0b3d42);
  color: #fff;
}
.landing-admin .site-header .brand { color: #fff; }
.landing-admin .site-header .brand small { color: rgba(255, 255, 255, .65); }
.landing-admin .brand-mark { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.landing-admin .login-card .brand-mark { background: linear-gradient(135deg, var(--brand), #14919b); box-shadow: var(--shadow-sm); }
.landing-admin .nav-link { color: #fff; display: inline-flex; align-items: center; gap: .4rem; border: 1px solid rgba(255, 255, 255, .25); }
.landing-admin .nav-link:hover { background: rgba(255, 255, 255, .1); }
.landing-admin .eyebrow { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); color: #fff; }
.landing-admin .eyebrow svg { color: #7fd1d6; }
.landing-admin .hero h1 { color: #fff; }
.landing-admin .hero .accent { background: linear-gradient(90deg, #7fe0e5, #b8f0e6); -webkit-background-clip: text; background-clip: text; }
.landing-admin .lead { color: rgba(255, 255, 255, .78); }
.landing-admin .features li { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }
.landing-admin .features strong { color: #fff; }
.landing-admin .features small { color: rgba(255, 255, 255, .68); }
.landing-admin .f-ic { background: rgba(127, 209, 214, .16); color: #7fe0e5; }
.landing-admin .login-card { color: var(--text); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55); }
.landing-admin .site-footer { background: rgba(0, 0, 0, .18); }

/* =========================================================
   Password reset page
   ========================================================= */
.reset-main { flex: 1; display: grid; place-items: center; padding: 1.5rem 1.25rem 3rem; }
.reset-card { max-width: 440px; }
.reset-state { text-align: center; }
.reset-state .field, .reset-state .msg { text-align: left; }
.reset-state h1 { font-size: 1.4rem; margin: 0 0 .4rem; }
.reset-state > p.muted { margin: 0 0 1.25rem; }
.state-icon {
  width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 1rem; display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand);
}
.state-icon svg { width: 28px; height: 28px; }
.state-icon.ok { background: var(--ok-soft); color: var(--ok); }
.state-icon.bad { background: var(--bad-soft); color: var(--bad); }
.state-icon .spinner { width: 1.6rem; height: 1.6rem; }
.reset-note { margin: 1rem 0 0; }
.tips { text-align: left; margin: 0 0 1.25rem; padding-left: 1.2rem; color: var(--text-2); font-size: .9rem; }
.tips li + li { margin-top: .35rem; }
a.btn-link {
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  background: var(--brand); color: #fff; border-radius: 12px;
}
a.btn-link:hover { background: var(--brand-600); text-decoration: none; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 3rem; }
.pw-toggle {
  position: absolute; right: .35rem; top: 50%; transform: translateY(-50%);
  border: 0; background: none; padding: .45rem; color: var(--muted);
}
.pw-toggle:hover { background: var(--bg); }
.pw-meter { height: 5px; border-radius: 99px; background: #e6ecf0; margin: .55rem 0 .35rem; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .2s, background .2s; background: var(--bad); }
.pw-meter span[data-level="2"] { background: var(--warn); }
.pw-meter span[data-level="3"], .pw-meter span[data-level="4"] { background: var(--ok); }
.login-foot a { font-weight: 600; }

/* Set / change password dialog */
.pw-gate { z-index: 80; }
.pw-modal { max-width: 420px; text-align: center; position: relative; padding: 2rem 1.6rem 1.6rem; }
.pw-modal .field, .pw-modal .msg, .pw-modal .pw-meter, .pw-modal #pwNewHint { text-align: left; }
.pw-modal h2 { font-size: 1.3rem; margin-bottom: .35rem; }
.pw-modal > p.muted { margin: 0 0 1.25rem; }
.pw-modal .pw-x { position: absolute; top: .9rem; right: .9rem; border: 0; width: 36px; height: 36px; padding: 0; border-radius: 50%; }
.pw-modal .pw-meter { margin-top: .55rem; }
.pw-modal #pwNewHint { margin-bottom: .9rem; }
.reset-main .login-card { justify-self: center; }
.pw-modal #pwCurWrap .field { margin-bottom: 1rem; }