/* Doctor Data Collection – styles */
:root {
  --ink: #18303A;
  --ink-2: #3D525B;
  --muted: #6B7C83;
  --line: #E1E7E5;
  --surface: #F2F5F3;
  --paper: #FFFFFF;
  --primary: #0B6E69;
  --primary-dark: #08524E;
  --primary-soft: rgba(11, 110, 105, 0.22);
  --saffron: #E3A33B;
  --clay: #C65A3E;
  --mint: #8DC8B4;
  --sky: #6FA8C7;
  --ok-bg: #E3F2EC; --ok-ink: #11634A;
  --warn-bg: #FCF0D9; --warn-ink: #8A5A0B;
  --err-bg: #FBE6E0; --err-ink: #9B3520;
  --info-bg: #E5EFF5; --info-ink: #24546F;
  --radius-lg: 14px;
  --radius: 10px;
  --radius-sm: 6px;
  --head: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --body: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--surface); }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, .h3 { font-family: var(--head); line-height: 1.2; margin: 0 0 .35em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; }
.h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 .75em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.right { text-align: right; }
.code { font-family: var(--head); font-weight: 600; font-size: .92em; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 42px; padding: 0 1.05em; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 600 .95rem/1 var(--head); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #C5D0CC; color: var(--ink); background: #FAFCFB; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-sm { min-height: 34px; padding: 0 .8em; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-danger-ghost { color: var(--err-ink); }
.btn-danger-ghost:hover { background: var(--err-bg); border-color: #EBC2B6; color: var(--err-ink); }
.btn:disabled, .is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; font: 600 .9rem var(--head); color: var(--primary); cursor: pointer; text-decoration: none; }
.link-btn:hover { text-decoration: underline; }

label { display: grid; gap: .35rem; font: 600 .9rem var(--head); color: var(--ink-2); }
input[type=text], input[type=password], input[type=search], input:not([type]), select {
  width: 100%; min-height: 44px; padding: .55rem .8rem; border: 1px solid #CBD5D1; border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink); font: 400 1rem var(--body);
}
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
label small { font: 400 .85rem var(--body); }
.check { display: flex; align-items: center; gap: .6rem; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.pw-field { display: flex; gap: .6rem; align-items: center; }
.stack { display: grid; gap: 1rem; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; margin-top: .5rem; }
form.inline { display: inline; }

/* ---------- Alerts & badges ---------- */
.alert { padding: .75rem 1rem; border-radius: var(--radius-sm); margin: 0 0 1rem; border-left: 4px solid; font-size: .95rem; }
.alert ul { margin: 0; padding-left: 1.1rem; }
.alert-error { background: var(--err-bg); color: var(--err-ink); border-color: var(--clay); }
.alert-success { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--primary); }
.alert-info { background: var(--info-bg); color: var(--info-ink); border-color: var(--sky); }
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font: 700 .75rem/1.5 var(--head); white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge-warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge-off { background: #ECEFEE; color: var(--muted); }

/* ---------- Brand ---------- */
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: inherit; }
.brand-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--primary); color: #fff; font: 800 .95rem var(--head); font-style: italic; letter-spacing: -.02em; flex: none; }
.brand-mark.big { width: 52px; height: 52px; font-size: 1.3rem; border-radius: 13px; }
.brand-text { font: 800 1rem/1.15 var(--head); }
.brand-text small { font-weight: 600; font-size: .78rem; opacity: .7; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-content: center; padding: 1.5rem 1rem; gap: 1rem;
  background: radial-gradient(circle at 15% 10%, rgba(141, 200, 180, .35), transparent 45%), radial-gradient(circle at 90% 90%, rgba(227, 163, 59, .18), transparent 40%), var(--surface); }
.auth-card { width: min(400px, 92vw); background: var(--paper); border-radius: var(--radius-lg); padding: 2rem 1.75rem; border: 1px solid var(--line); box-shadow: 0 18px 40px -24px rgba(24, 48, 58, .35); }
.auth-card.wide { width: min(480px, 92vw); }
.auth-card.is-admin { border-top: 4px solid var(--ink); }
.auth-head { text-align: center; margin-bottom: 1.5rem; }
.auth-head .brand-mark { margin: 0 auto .9rem; }
.auth-head h1 { font-size: 1.5rem; }
.auth-head p { color: var(--muted); margin: 0; }
.auth-alt { text-align: center; margin: 1.25rem 0 0; font-size: .9rem; }
.checklist { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .3rem; font-size: .92rem; }
.checklist .ok { color: var(--ok-ink); }
.checklist .bad { color: var(--err-ink); font-weight: 600; }

/* ---------- Admin shell ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: #DCE7E4; padding: 1.4rem 1rem; display: flex; flex-direction: column; gap: 1.75rem; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { color: #fff; padding: 0 .4rem; }
.side-nav { display: grid; gap: .2rem; }
.side-nav a { color: #BFD0CC; text-decoration: none; padding: .6rem .8rem; border-radius: var(--radius-sm); font: 600 .95rem var(--head); }
.side-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-nav a.on { background: rgba(141, 200, 180, .16); color: #fff; box-shadow: inset 3px 0 0 var(--mint); }
.side-foot { margin-top: auto; display: grid; gap: .3rem; padding: .8rem; border-top: 1px solid rgba(255, 255, 255, .1); }
.side-foot .who { font: 600 .9rem var(--head); color: #fff; }
.side-foot .link-btn { color: var(--mint); justify-self: start; }
.main { padding: 2rem clamp(1rem, 3vw, 2.5rem) 3rem; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head p { margin: 0; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem 1.4rem; margin-bottom: 1.25rem; }
.narrow-panel { max-width: 560px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .75rem; }
.back { display: inline-block; margin-bottom: .75rem; font: 600 .9rem var(--head); text-decoration: none; }
.back::before { content: '‹ '; }

/* ---------- Toolbar, tables, pager ---------- */
.toolbar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.25rem; }
.search-row input[type=search] { flex: 1 1 280px; width: auto; }
.search-row select { flex: 0 1 190px; width: auto; }
.search { display: flex; gap: .5rem; flex: 1 1 260px; }
.table-wrap { overflow-x: auto; padding: 0; }
.panel.table-wrap { padding: .25rem 0; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { text-align: left; font: 700 .8rem var(--head); color: var(--muted); padding: .8rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #F8FAF9; }
.table th.right { text-align: right; }
.row-muted td { color: var(--muted); }
.actions { white-space: nowrap; }
.actions .btn + form { margin-left: .3rem; }
.mini-meter { width: 90px; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: .3rem; }
.mini-meter span { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.pager { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; margin-top: -.25rem; }
.pager a, .pager span { min-width: 38px; height: 38px; padding: 0 .7rem; display: inline-grid; place-items: center; border-radius: var(--radius-sm); font: 600 .9rem var(--head); text-decoration: none; border: 1px solid var(--line); background: var(--paper); }
.pager .current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager .disabled { color: #B3BFBB; }
.pager .pager-info { border: 0; background: none; color: var(--muted); font-weight: 500; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--ink-2); }

/* Contact-sheet strip of a doctor's photos */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; width: 128px; padding: 3px; background: var(--ink); border-radius: 5px; flex: none; }
.strip img, .strip-empty { width: 100%; aspect-ratio: var(--photo-ratio, 1); object-fit: cover; border-radius: 2px; }
.strip-primary { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 2px; box-shadow: 0 0 0 2px var(--saffron); display: block; }
.strip-primary:hover { box-shadow: 0 0 0 2px #fff; }
.strip-empty.is-primary { box-shadow: 0 0 0 2px var(--saffron); }
.doc-item { min-width: 0; display: flex; align-items: center; gap: 1rem; padding: .7rem .9rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.doc-item:hover { border-color: var(--mint); }
.strip-empty { display: block; background: repeating-linear-gradient(45deg, #2C4651 0 4px, #24404A 4px 8px); }
.strip-sm { width: 116px; }
.strip a { display: block; }

/* ---------- Dashboard ---------- */
.hero-progress { padding: 1.6rem 1.6rem 1.2rem; }
.hero-figure { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; margin-bottom: .9rem; }
.hero-num { font: 800 clamp(2.6rem, 6vw, 4rem)/1 var(--head); letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.hero-of { font: 600 1.1rem var(--head); color: var(--ink-2); }
.hero-bar { height: 18px; border-radius: 99px; background: repeating-linear-gradient(90deg, var(--line) 0 calc(2% - 2px), #fff calc(2% - 2px) 2%); overflow: hidden; margin-bottom: .6rem; }
.hero-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #14928B); border-radius: 99px; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 1.25rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.stat { padding: 1rem 1.25rem; border-right: 1px solid var(--line); display: grid; gap: .15rem; }
.stat:last-child { border-right: 0; }
.stat-num { font: 800 1.65rem/1.1 var(--head); font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: .88rem; }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
.charts .panel { margin: 0; }
.span-2 { grid-column: 1 / -1; }
.chart-panel p { margin-bottom: .6rem; }
.chart-box { position: relative; height: 260px; }
.chart-box.tall { height: 300px; }
.empty-chart { color: var(--muted); padding: 2rem 0; text-align: center; }

/* ---------- Employee area ---------- */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem clamp(1rem, 3vw, 2rem); background: var(--ink); color: #fff; }
.topbar .brand { color: #fff; }
.topbar-user { display: flex; align-items: center; gap: 1rem; }
.topbar-user .who { font: 600 .9rem var(--head); text-align: right; line-height: 1.2; }
.topbar-user .who small { display: block; opacity: .65; font-weight: 600; }
.topbar .link-btn { color: var(--mint); }
.main.narrow { max-width: 880px; margin: 0 auto; }
.tally { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .25rem 1rem; margin-bottom: 1.25rem; }
.tally h1 { margin: 0; }
.tally p { margin: 0; }
.tally-count { font-family: var(--head); text-align: right; line-height: 1; }
.tally-count strong { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tally-count span { font-size: 1.1rem; font-weight: 700; color: var(--muted); }
.meter { grid-column: 1 / -1; height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: .6rem; }
.meter span { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.doc-link { display: flex; align-items: center; gap: 1rem; flex: 1; min-width: 0; text-decoration: none; color: var(--ink); align-self: stretch; }
.doc-link:hover { color: var(--ink); }
.doc-link:hover .doc-edit { text-decoration: underline; }
.doc-meta { display: flex; flex-direction: column; gap: .1rem; min-width: 0; flex: 1; }
.doc-meta strong { font-family: var(--head); overflow-wrap: anywhere; line-height: 1.25; }
.doc-meta .code { color: var(--ink-2); }
.doc-meta .badge { align-self: flex-start; margin-top: .2rem; }
.doc-edit { font: 700 .9rem var(--head); color: var(--primary); }

/* Photo slots */
.doctor-form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.4rem; }
.photos { border: 0; padding: 0; margin: 1.5rem 0 0; }
.photos legend { font: 800 1.05rem var(--head); padding: 0; margin-bottom: .25rem; }
.hint { color: var(--muted); font-size: .92rem; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; }
.slot { display: grid; gap: .35rem; }
.slot-preview { position: relative; width: 100%; aspect-ratio: var(--slot-ratio, 1); border-radius: var(--radius); border: 2px dashed #B9C7C2; background: #F7FAF9; padding: 0; overflow: hidden; cursor: pointer; display: grid; place-items: center; }
.slot-preview:hover { border-color: var(--primary); background: #EEF6F3; }
.slot-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot-empty-label { font: 700 .9rem var(--head); color: var(--primary); }
.slot-label { font: 700 .85rem var(--head); color: var(--ink-2); }
.slot.is-primary .slot-label { color: var(--warn-ink); }
.slot.is-primary .slot-preview { border-color: var(--saffron); }
.slot-state { position: absolute; top: .4rem; left: .4rem; padding: .1rem .45rem; border-radius: 99px; font: 700 .72rem/1.5 var(--head); background: var(--ok-bg); color: var(--ok-ink); }
.slot-state:empty { display: none; }
.slot.is-new .slot-state { background: var(--warn-bg); color: var(--warn-ink); }
.slot-empty-label::before { content: '+'; display: block; text-align: center; font-size: 1.8rem; font-weight: 500; line-height: 1; margin-bottom: .2rem; }
.slot.is-saved .slot-preview, .slot.is-new .slot-preview { border-style: solid; border-color: var(--line); }
.slot.is-new .slot-preview { border-color: var(--saffron); }
.slot.is-saved .slot-empty-label, .slot.is-new .slot-empty-label { display: none; }
.slot-bar { display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-height: 1.4rem; }
.slot .link-btn { font-size: .85rem; }
.slot .slot-remove-btn { color: var(--err-ink); margin-left: auto; }
.name-field { display: grid; grid-template-columns: 6.5rem 1fr; gap: .6rem; }
input.caps { text-transform: uppercase; }
input.caps::placeholder { text-transform: none; }

/* Doctor card preview (positions measured from assets/card-template.jpg) */
.card-modal-box { display: grid; gap: .75rem; justify-items: center; }
.card-sheet { position: relative; width: min(92vw, calc((100vh - 6rem) * 1802 / 2552)); aspect-ratio: 1802 / 2552; container-type: inline-size; background: #fff; border-radius: 4px; overflow: hidden; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .55); }
.card-template { position: absolute; inset: 0; width: 100%; height: 100%; }
.card-photo { position: absolute; left: 13.43%; top: 6.975%; width: 73.14%; height: 51.84%; border-radius: 5.2% / 5.2%; overflow: hidden; background: #F4F4F7; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.card-name { position: absolute; left: 19.9%; width: 60.2%; bottom: 32.6%; display: flex; align-items: flex-end; justify-content: center; text-align: center; }
.card-name span { font: 800 4.6cqw/1.15 var(--head); color: #2F3D3E; letter-spacing: .01em; overflow-wrap: anywhere; }
.card-close { min-width: 140px; }

/* Crop modal */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(15, 30, 36, .72); display: grid; place-items: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal-box { width: min(720px, 100%); max-height: calc(100vh - 2rem); display: flex; flex-direction: column; background: var(--paper); border-radius: var(--radius-lg); padding: 1rem; gap: .75rem; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head .h3 { margin: 0; }
.crop-area { flex: 1; min-height: 260px; height: min(60vh, 520px); background: #1E2B30; border-radius: var(--radius); overflow: hidden; }
.crop-area img { max-width: 100%; display: block; }
.crop-warn { margin: 0; font-size: .85rem; color: var(--warn-ink); background: var(--warn-bg); padding: .5rem .75rem; border-radius: var(--radius-sm); }
.crop-tools { display: flex; gap: .5rem; flex-wrap: wrap; }
.crop-tools .btn-primary { margin-left: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .75rem 1rem; }
  .sidebar .brand-text small { display: none; }
  .side-nav { display: flex; overflow-x: auto; order: 3; width: 100%; }
  .side-nav a { white-space: nowrap; }
  .side-nav a.on { box-shadow: inset 0 -3px 0 var(--mint); }
  .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; grid-auto-flow: column; align-items: center; gap: .8rem; }
  .charts { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .main { padding: 1.25rem .9rem 2.5rem; }
  .topbar-user .who { display: none; }
  .doc-item { gap: .75rem; padding: .6rem; }
  .name-field { grid-template-columns: 5.5rem 1fr; }
  .strip { width: 96px; }
  .doc-edit { display: none; }
  .slots { grid-template-columns: 1fr 1fr; }
  .crop-tools .btn { flex: 1; padding: 0 .5rem; }
  .crop-tools .btn-primary { flex-basis: 100%; margin: 0; }
  .doctor-form { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Photo preview before saving */
.view-box { width: min(560px, 100%); }
.view-area { display: grid; place-items: center; background: #1E2B30; border-radius: var(--radius); padding: .5rem; min-height: 0; flex: 1; overflow: hidden; }
.view-area img { max-width: 100%; max-height: calc(100vh - 15rem); width: auto; height: auto; border-radius: 4px; box-shadow: 0 6px 24px rgba(0, 0, 0, .4); }
.view-note { margin: 0; }
.slot-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-main { position: absolute; top: .4rem; right: .4rem; padding: .1rem .5rem; border-radius: 99px; font: 800 .72rem/1.5 var(--head); background: var(--saffron); color: #3B2A06; }
.slot .slot-view-btn { color: var(--primary); }
.doctor-form .name-field { max-width: 640px; }
.note { margin: 0; padding: .7rem .9rem; background: var(--info-bg); color: var(--info-ink); border-radius: var(--radius-sm); font-size: .95rem; }
.nowrap { white-space: nowrap; }

/* Employee upload */
.head-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.import-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1.25rem; align-items: start; }
.import-grid .panel { margin: 0; }
.sample-table { font-size: .88rem; margin-bottom: .75rem; }
.sample-table td, .sample-table th { padding: .45rem .7rem; }
.tips { margin: .5rem 0 0; padding-left: 1.1rem; color: var(--ink-2); font-size: .92rem; display: grid; gap: .35rem; }
input[type=file] { font: 400 .95rem var(--body); padding: .5rem; border: 1px dashed #B9C7C2; border-radius: var(--radius-sm); background: #F7FAF9; }
@media (max-width: 900px) { .import-grid { grid-template-columns: 1fr; } }
.cell-name { min-width: 150px; }

/* =====================================================================
   Sign-in pages
   ===================================================================== */
.login-main { min-height: 100vh; }
.login { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }

/* Brand panel */
.login-art { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2rem; padding: clamp(1.75rem, 4vw, 3.25rem); color: #E6F1EE;
  background:
    radial-gradient(circle at 85% 12%, rgba(141, 200, 180, .32), transparent 38%),
    radial-gradient(circle at 8% 92%, rgba(11, 110, 105, .55), transparent 45%),
    linear-gradient(155deg, #10252D 0%, #143A40 55%, #0B524E 100%); }
.login-art::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px); background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%); }
.login-art--admin { background:
    radial-gradient(circle at 85% 12%, rgba(227, 163, 59, .26), transparent 38%),
    radial-gradient(circle at 8% 92%, rgba(198, 90, 62, .32), transparent 45%),
    linear-gradient(155deg, #12191F 0%, #1D2B33 55%, #2A2420 100%); }
.login-art > * { position: relative; }
.login-brand { display: flex; align-items: center; gap: .7rem; color: #fff; }
.login-brand .brand-text small { color: var(--saffron); opacity: 1; }
.login-art--admin .brand-mark { background: var(--saffron); color: #2A1C04; }
.login-pitch { max-width: 30rem; }
.login-pitch h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); font-weight: 800; line-height: 1.1; letter-spacing: -.025em; color: #fff; margin-bottom: .6rem; }
.login-pitch p { color: #B9D2CC; font-size: 1.05rem; margin: 0; }
.login-art--admin .login-pitch p { color: #CFC5B8; }

/* The stack of printed photo cards */
.photo-stack { position: relative; flex: 1; min-height: 250px; max-height: 360px; margin: .5rem 0; }
.ps-card { position: absolute; margin: 0; width: clamp(120px, 15vw, 172px); padding: 8px 8px 0; background: #FDFCF9; border-radius: 6px;
  box-shadow: 0 22px 40px -14px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .25); animation: ps-in .9s cubic-bezier(.2, .8, .2, 1) both; }
.ps-photo { aspect-ratio: 6 / 8.5; border-radius: 3px; overflow: hidden; }
.ps-photo svg { width: 100%; height: 100%; display: block; }
.ps-card figcaption { font: 700 .62rem/1 var(--head); letter-spacing: .08em; text-transform: uppercase; color: #5D6B70; padding: .6rem 0 .65rem; text-align: center; }
.ps-1 { left: 4%; top: 12%; --r: -9deg; transform: rotate(var(--r)); animation-delay: .05s; }
.ps-2 { left: 52%; top: 4%; --r: 8deg; transform: rotate(var(--r)); animation-delay: .15s; }
.ps-3 { left: 26%; top: 20%; --r: -1.5deg; transform: rotate(var(--r)); animation-delay: .3s; z-index: 2; }
.ps-badge { position: absolute; top: 14px; right: 14px; padding: .12rem .5rem; border-radius: 99px; background: var(--saffron); color: #3B2A06; font: 800 .65rem/1.5 var(--head); }
.login-art--admin .ps-3 { box-shadow: 0 0 0 3px var(--saffron), 0 22px 40px -14px rgba(0, 0, 0, .6); }
@keyframes ps-in { from { opacity: 0; transform: translateY(26px) rotate(0deg); } to { opacity: 1; transform: translateY(0) rotate(var(--r)); } }

.login-points { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; max-width: 30rem; }
.login-points li { display: flex; align-items: center; gap: .85rem; color: #D4E5E1; font-size: .98rem; }
.login-points span { flex: none; min-width: 3.4rem; padding: .3rem .55rem; border-radius: 8px; text-align: center; font: 800 .82rem var(--head);
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: #fff; }
.login-art--admin .login-points li { color: #E2DACF; }
.login-art--admin .login-points span { color: var(--saffron); }

/* Form panel */
.login-panel { display: grid; place-items: center; padding: clamp(1.75rem, 5vw, 4rem) 1.25rem; background: var(--paper); }
.login-box { width: min(400px, 100%); animation: fade-up .6s ease both .1s; }
.login-eyebrow { display: inline-block; margin: 0 0 .9rem; padding: .25rem .7rem; border-radius: 99px; background: var(--ok-bg); color: var(--primary); font: 800 .75rem var(--head); letter-spacing: .08em; text-transform: uppercase; }
.is-admin .login-eyebrow { background: var(--warn-bg); color: var(--warn-ink); }
.login-box h1 { font-size: clamp(1.8rem, 3vw, 2.3rem); letter-spacing: -.025em; margin-bottom: .35rem; }
.login-sub { color: var(--muted); margin-bottom: 1.75rem; }
.login-form { display: grid; gap: 1.15rem; }
.field { display: grid; gap: .4rem; }
.field > label { font: 700 .88rem var(--head); color: var(--ink-2); }
.field-box { position: relative; display: flex; align-items: center; }
.field-box input { min-height: 52px; padding-left: 2.85rem; border-radius: var(--radius); border-color: #D3DCD8; background: #F8FAF9; font-size: 1.02rem; transition: border-color .15s, box-shadow .15s, background .15s; }
.field-box input:hover { border-color: #B9C7C2; }
.field-box input:focus { background: #fff; }
.field-box input::placeholder { color: #9AA8A5; }
.field-icon { position: absolute; left: .95rem; width: 20px; height: 20px; color: #8A9A97; pointer-events: none; transition: color .15s; }
.field-box:focus-within .field-icon { color: var(--primary); }
.field-box input[type=password], .field-box input[data-pw] { padding-right: 4.2rem; }
#password { padding-right: 4.2rem; }
.pw-toggle { position: absolute; right: .45rem; height: 38px; padding: 0 .75rem; border: 0; border-radius: 8px; background: transparent; color: var(--primary); font: 700 .85rem var(--head); cursor: pointer; }
.pw-toggle:hover { background: var(--ok-bg); }
.caps-note { margin: 0; font-size: .85rem; color: var(--warn-ink); }
.btn-login { min-height: 54px; margin-top: .35rem; border-radius: var(--radius); font-size: 1.02rem; justify-content: space-between; padding: 0 1.3rem;
  background: linear-gradient(135deg, var(--primary) 0%, #0E8580 100%); border: 0; box-shadow: 0 12px 24px -12px rgba(11, 110, 105, .75); transition: transform .15s, box-shadow .15s; }
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 16px 28px -12px rgba(11, 110, 105, .85); background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); }
.is-admin .btn-login { background: linear-gradient(135deg, #1B2A34 0%, #2C4250 100%); box-shadow: 0 12px 24px -12px rgba(24, 48, 58, .8); }
.is-admin .btn-login:hover { background: linear-gradient(135deg, #121D24 0%, #1B2A34 100%); }
.is-admin .field-box input:focus { border-color: var(--saffron); box-shadow: 0 0 0 3px rgba(227, 163, 59, .25); }
.is-admin .field-box:focus-within .field-icon, .is-admin .pw-toggle { color: #9A6510; }
.is-admin .pw-toggle:hover { background: var(--warn-bg); }
.login-help { margin: 1.25rem 0 0; color: var(--muted); font-size: .92rem; }
.login-switch { margin: 1.75rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.login-switch a { font-weight: 700; }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-art { gap: 1.1rem; padding: 1.25rem 1.25rem 1.5rem; }
  .login-pitch h2 { font-size: 1.45rem; }
  .login-pitch p { display: none; }
  .login-points { display: none; }
  .photo-stack { min-height: 0; height: 178px; flex: none; margin: 0 0 .25rem; }
  .ps-card { width: 100px; padding: 5px 5px 0; }
  .ps-card figcaption { font-size: .55rem; padding: .45rem 0 .5rem; }
  .ps-1 { left: calc(50% - 145px); top: 14px; }
  .ps-2 { left: calc(50% + 42px); top: 4px; }
  .ps-3 { left: calc(50% - 50px); top: 18px; }
  .ps-badge { top: 10px; right: 10px; font-size: .58rem; }
  .login-panel { place-items: start center; padding-top: 1.5rem; }
  .login-sub { margin-bottom: 1.25rem; }
}
@media (max-width: 360px) { .ps-1 { left: calc(50% - 135px); } .ps-2 { left: calc(50% + 34px); } }

/* Image logo in place of the Rx mark */
.brand-mark.has-logo { width: auto; height: 40px; padding: 4px 7px; background: #fff; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.brand-mark.has-logo img { height: 32px; width: auto; max-width: 120px; object-fit: contain; display: block; }
.brand-mark.has-logo.big { height: 64px; padding: 6px 10px; box-shadow: 0 0 0 1px var(--line); }
.brand-mark.has-logo.big img { height: 52px; max-width: 160px; }
.login-art--admin .brand-mark.has-logo { background: #fff; }
