/* One stylesheet for the whole app.
   Built for people who rarely use a computer: large text, large buttons, few choices per screen,
   strong contrast, every action labelled with words as well as an icon.
   Phone: top bar + bottom tab bar. 900px and wider: fixed sidebar. */
:root {
  --bg: #f3f6f5;
  --surface: #ffffff;
  --surface-2: #f8faf9;
  --text: #17201f;
  --muted: #55625f;
  --line: #d9e2df;
  --line-strong: #b9c7c3;
  --primary: #0f766e;
  --primary-dark: #0b5a54;
  --primary-soft: #e2f3f0;
  --ok: #157f3b;
  --ok-soft: #e3f5e9;
  --warn: #8a5300;
  --warn-soft: #fff1d6;
  --bad: #b42318;
  --bad-soft: #fde7e4;
  --info: #1d4f91;
  --info-soft: #e5eefb;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 40, 36, .05), 0 2px 8px rgba(16, 40, 36, .06);
  --shadow-lg: 0 12px 40px rgba(16, 40, 36, .22);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Gujarati", "Nirmala UI", "Shruti", sans-serif;
  --sidebar-w: 248px;
  --bottom-h: 68px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.55 var(--font); }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: 0; line-height: 1.2; }
h2 { font-size: 1.2rem; margin: 0 0 .8rem; }
h3 { font-size: 1.05rem; margin: 0 0 .5rem; }
p { margin: .4rem 0; }
.gu { color: #4a5754; font-weight: 500; font-size: .9em; }
h1 .gu, h2 .gu { font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.hidden, [hidden] { display: none !important; }
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.22em; }
.warn-text { color: var(--warn) !important; font-weight: 600; }

/* ---------- layout shell ---------- */
.main { min-height: 100vh; padding-bottom: calc(var(--bottom-h) + 16px + env(safe-area-inset-bottom)); }
.container { max-width: 1120px; margin: 0 auto; padding: 1rem; }
body.anon .main { padding-bottom: 0; }

.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none !important; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.16); display: grid; place-items: center; }
.brand-mark .ic { width: 24px; height: 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text b { font-size: 1.02rem; }
.brand-text small { opacity: .8; font-size: .85rem; }

/* phone top bar */
.mobile-top { position: sticky; top: 0; z-index: 30; background: var(--primary); color: #fff; padding: .55rem 1rem; box-shadow: var(--shadow); }

/* phone bottom tab bar */
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr);
  background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -2px 12px rgba(0,0,0,.06);
  padding-bottom: env(safe-area-inset-bottom); }
.bottom-bar a, .bottom-bar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--bottom-h); color: var(--muted); background: none; border: 0; font: inherit; font-size: .78rem; font-weight: 600;
  cursor: pointer; text-decoration: none !important; padding: 4px 2px; text-align: center; line-height: 1.15; }
.bottom-bar .ic { width: 26px; height: 26px; }
.bottom-bar .gu { display: block; font-size: .72rem; color: inherit; font-weight: 500; }
.bottom-bar a.active { color: var(--primary); }
.bottom-bar a.active .ic { background: var(--primary-soft); border-radius: 10px; padding: 3px; width: 34px; height: 34px; margin: -4px 0; }

/* phone full menu */
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(10, 25, 22, .45); display: flex; align-items: flex-end; }
.sheet-panel { background: #fff; width: 100%; max-height: 92vh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; font-size: 1.15rem; }
.sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: 1rem; }
.sheet-link { display: flex; align-items: center; gap: .6rem; padding: .85rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); font-weight: 600; text-decoration: none !important; min-height: 60px; background: var(--surface-2); }
.sheet-link .ic { color: var(--primary); width: 26px; height: 26px; }
.sheet-link .gu { display: block; }
.sheet-link .nav-text { line-height: 1.2; }
.sheet-link.active { border-color: var(--primary); background: var(--primary-soft); }

/* sidebar (computer) */
.sidebar { display: none; }
@media (min-width: 900px) {
  .mobile-top, .bottom-bar { display: none; }
  .main { padding-bottom: 2rem; }
  body.authed .main { margin-left: var(--sidebar-w); }
  .container { padding: 1.5rem 2rem; }
  .sidebar { display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; width: var(--sidebar-w); z-index: 30;
    background: linear-gradient(180deg, #0f766e 0%, #0b5a54 100%); color: #fff; padding: 1rem .75rem; overflow-y: auto; }
  .sidebar .brand { padding: .25rem .4rem 1rem; border-bottom: 1px solid rgba(255,255,255,.15); margin-bottom: .75rem; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
  .side-nav a { display: flex; align-items: center; gap: .7rem; color: #fff; padding: .6rem .7rem; border-radius: 10px; font-weight: 600; text-decoration: none !important; line-height: 1.2; }
  .side-nav a .ic { width: 22px; height: 22px; opacity: .9; }
  .side-nav a .gu { display: block; color: rgba(255,255,255,.75); font-size: .8rem; font-weight: 500; }
  .side-nav a:hover { background: rgba(255,255,255,.12); }
  .side-nav a.active { background: #fff; color: var(--primary-dark); box-shadow: var(--shadow); }
  .side-nav a.active .gu { color: var(--muted); }
  .side-nav a.minor { font-weight: 500; font-size: .93rem; padding: .45rem .7rem; }
  .side-nav a.minor .gu { display: none; }
  .side-sep { height: 1px; background: rgba(255,255,255,.15); margin: .6rem .4rem; }
  .side-foot { border-top: 1px solid rgba(255,255,255,.15); padding-top: .75rem; margin-top: .75rem; }
  .side-foot .lang-switch { color: #fff; }
  .side-foot .lang-switch button { color: #fff; border-color: rgba(255,255,255,.35); }
  .side-foot .lang-switch button.on { background: #fff; color: var(--primary-dark); }
  .side-logout { width: 100%; display: flex; align-items: center; gap: .5rem; background: none; border: 0; color: #fff; font: inherit; padding: .55rem .7rem; border-radius: 10px; cursor: pointer; }
  .side-logout:hover { background: rgba(255,255,255,.12); }
  .side-logout small { opacity: .75; }
}

/* language switch */
.lang-switch { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: .25rem 0 .75rem; }
.lang-switch button { font: inherit; font-size: .85rem; padding: .35rem .6rem; border-radius: 999px; border: 1px solid var(--line-strong); background: none; color: var(--text); cursor: pointer; min-height: 36px; }
.lang-switch button.on { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- page header ---------- */
.back-link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; margin: 0 0 .5rem; padding: .35rem .1rem; font-size: 1rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin: .25rem 0 1.1rem; }
.page-title { display: flex; align-items: center; gap: .75rem; }
.title-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.title-icon .ic { width: 26px; height: 26px; }
.page-head .sub { color: var(--muted); margin: .15rem 0 0; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 599px) { .page-head .actions { width: 100%; } .page-head .actions > .btn, .page-head .actions > form { flex: 1 1 auto; } }

/* ---------- cards, grids ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem; margin-bottom: 1rem; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .8rem; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.stack > * + * { margin-top: .6rem; }
@media (min-width: 700px) {
  .grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-2 { grid-column: span 2; }
  .span-all { grid-column: 1 / -1; }
}
@media (min-width: 1100px) { .grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- home tiles ---------- */
.tiles { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1.25rem; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; padding: 1rem; min-height: 132px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); text-decoration: none !important;
  transition: transform .08s ease, box-shadow .15s ease; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(16,40,36,.12); }
.tile:active { transform: translateY(0); }
.tile-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; }
.tile-icon .ic { width: 30px; height: 30px; }
.tile-text { display: flex; flex-direction: column; line-height: 1.25; }
.tile-text b { font-size: 1.08rem; }
.tile-text .gu { font-size: .95rem; margin-top: 2px; }
.tile-text small { color: var(--muted); margin-top: 4px; font-size: .82rem; }
.tile-teal .tile-icon { background: #dff3ef; color: #0f766e; }
.tile-blue .tile-icon { background: #e3ecfb; color: #1d4f91; }
.tile-amber .tile-icon { background: #fdf0d5; color: #a15c00; }
.tile-rose .tile-icon { background: #fce5e8; color: #b4233f; }
.tile-violet .tile-icon { background: #efe7fb; color: #6234b5; }
.tile-green .tile-icon { background: #e1f5e6; color: #15803d; }
.tile-slate .tile-icon { background: #e9eeee; color: #3d4a48; }

/* ---------- big search on home ---------- */
.home-search { position: relative; margin-bottom: 1rem; }
.home-search .search-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.home-search input { padding-left: 46px !important; font-size: 1.1rem !important; min-height: 58px !important; border-radius: var(--radius) !important; box-shadow: var(--shadow); }

/* ---------- stat tiles ---------- */
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow); }
.stat .label { color: var(--muted); font-size: .9rem; font-weight: 600; }
.stat .value { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat .sub { color: var(--muted); font-size: .85rem; }
.stat.ok .value { color: var(--ok); }
.stat.warn .value { color: var(--warn); }
.stat.bad .value { color: var(--bad); }

/* ---------- forms ---------- */
.form-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid .full { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field .lbl { font-weight: 700; font-size: 1rem; }
.req { color: var(--bad); }
.help { color: var(--muted); font-size: .88rem; }
.help.words { color: var(--primary-dark); font-weight: 600; min-height: 0; }
input[type=text], input[type=search], input[type=tel], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=time], input[type=file], select, textarea {
  font: inherit; font-size: 1.05rem; color: var(--text); background: #fff; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: .7rem .8rem; width: 100%; min-height: 52px; }
input[type=file] { padding: .55rem; min-height: 0; }
textarea { min-height: 90px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.4rem; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(15,118,110,.25); border-color: var(--primary); }
input.touched:invalid, select.touched:invalid, textarea.touched:invalid { border-color: var(--bad); background: #fffafa; }
.money-input { position: relative; display: block; }
.money-input .prefix { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--muted); }
.money-input input { padding-left: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: center; gap: .6rem; padding: .45rem .2rem; cursor: pointer; min-height: 44px; }
.check input { width: 24px; height: 24px; accent-color: var(--primary); flex: none; }
.checks { display: grid; gap: .1rem 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.form-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.form-actions .btn-primary { min-width: 180px; }
@media (max-width: 599px) {
  .form-actions { position: sticky; bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(243,246,245,0), var(--bg) 30%);
    padding: 1rem 0 .5rem; margin-left: -.1rem; margin-right: -.1rem; z-index: 5; }
  .form-actions { flex-wrap: nowrap; }
  .form-actions .btn { flex: 1 1 0; min-width: 0; padding-left: .5rem; padding-right: .5rem; }
  .form-actions .btn-primary { flex: 2 1 0; min-width: 0; }
}
.inline-form { display: inline; margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-bottom: 1rem; }
.filters .field { min-width: 150px; flex: 1 1 160px; }
.filters .btn { min-height: 52px; }
.more-details { border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: .2rem .9rem; background: var(--surface-2); }
.more-details > summary { cursor: pointer; font-weight: 700; color: var(--primary-dark); padding: .7rem 0; list-style: none; }
.more-details > summary::before { content: "+ "; }
.more-details[open] > summary::before { content: "− "; }
.more-details > .form-grid { padding-bottom: .9rem; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font: inherit; font-weight: 700; font-size: 1rem;
  border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong); background: #fff; color: var(--text); padding: .6rem 1.05rem;
  min-height: 50px; cursor: pointer; text-decoration: none !important; line-height: 1.2; text-align: center; }
.btn:hover { background: #eef3f2; }
.btn .gu { font-weight: 600; color: inherit; opacity: .85; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { color: var(--bad); border-color: #efb8b1; background: #fff; }
.btn-danger:hover { background: var(--bad-soft); }
.btn-wa { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.btn-wa:hover { background: #178045; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--primary-dark); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-sm { min-height: 40px; padding: .35rem .75rem; font-size: .92rem; }
.btn-lg { min-height: 58px; font-size: 1.08rem; padding: .75rem 1.3rem; }
.btn-block { width: 100%; }
.btn:disabled, .btn.is-busy { opacity: .6; cursor: progress; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .82rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
tbody tr:hover { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tfoot td { font-weight: 800; border-top: 2px solid var(--line-strong); }
/* Tables marked .stack-mobile turn each row into a card on phones; give each td a data-label. */
@media (max-width: 699px) {
  table.stack-mobile thead { display: none; }
  table.stack-mobile tr { display: block; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .7rem; padding: .5rem .8rem; background: #fff; box-shadow: var(--shadow); }
  table.stack-mobile td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border: 0; padding: .4rem 0; text-align: right; }
  table.stack-mobile td::before { content: attr(data-label); color: var(--muted); font-size: .88rem; text-align: left; font-weight: 600; }
  table.stack-mobile td:first-child { font-size: 1.05rem; font-weight: 700; }
  table.stack-mobile tfoot tr { box-shadow: none; }
}

/* ---------- lists, badges, flashes ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: .75rem 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: .75rem; align-items: center; flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }
.badge { display: inline-flex; align-items: center; gap: .25rem; font-size: .82rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; background: #eaefee; color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--primary-soft); color: var(--primary-dark); }
.flash { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1.5px solid; font-weight: 600; font-size: 1.02rem; box-shadow: var(--shadow); }
.flash .ic { width: 24px; height: 24px; margin-top: 1px; }
.flash.ok { background: var(--ok-soft); border-color: #a9dcb9; color: #0f5a2a; }
.flash.bad { background: var(--bad-soft); border-color: #f0b6ae; color: #8a1a12; }
.flash.warn { background: var(--warn-soft); border-color: #efcf8f; color: #6b4000; }
.flash.info { background: var(--info-soft); border-color: #bcd0f0; color: var(--info); }
.flash form { display: inline; }
.empty { color: var(--muted); text-align: center; padding: 1.75rem .75rem; }
.empty .ic { width: 36px; height: 36px; opacity: .55; }
.empty p { margin: .5rem 0 0; font-size: 1.02rem; }
.empty-actions { margin-top: .9rem; display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.1rem; margin: 0; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; }
.tabs { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1.5px solid var(--line); margin-bottom: 1rem; }
.tabs a { padding: .6rem .9rem; border-radius: 10px 10px 0 0; color: var(--muted); font-weight: 600; }
.tabs a.active { color: var(--primary-dark); border-bottom: 3px solid var(--primary); }

/* ---------- patient picker ---------- */
.picker { position: relative; }
.picker-search { position: relative; }
.picker-search .search-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.picker-search input { padding-left: 42px; }
.picker-results { position: absolute; z-index: 35; top: 100%; left: 0; right: 0; background: #fff; border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-height: 360px; overflow-y: auto; margin-top: 4px; }
.picker-results button, .picker-results a { display: flex; flex-direction: column; width: 100%; text-align: left; background: none; border: 0;
  padding: .75rem .9rem; font: inherit; cursor: pointer; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none !important; }
.picker-results button b { font-size: 1.05rem; }
.picker-results button small { color: var(--muted); }
.picker-results button:hover, .picker-results button.focus { background: var(--primary-soft); }
.picker-results a { color: var(--primary-dark); font-weight: 700; flex-direction: row; gap: .4rem; align-items: center; }
.picker-results .none { padding: .8rem .9rem; color: var(--muted); }
.picker-chosen { display: flex; align-items: center; gap: .75rem; padding: .6rem .7rem; border: 2px solid var(--ok); background: var(--ok-soft); border-radius: var(--radius-sm); }
.picker-chosen .avatar { width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--ok); display: grid; place-items: center; flex: none; }
.picker-chosen .who { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.picker-chosen .who b { font-size: 1.08rem; }
.picker-chosen .who small { color: var(--muted); }

/* ---------- thumbnails ---------- */
.thumbs { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.thumb { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; font-size: .88rem; }
.thumb img { width: 100%; height: 130px; object-fit: cover; display: block; background: #eef1f2; }
.thumb .meta { padding: .45rem .55rem; }
.thumb .fileicon { height: 130px; display: flex; align-items: center; justify-content: center; font-size: 2rem; background: #eef1f2; color: var(--muted); }

/* ---------- confirm dialog ---------- */
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(10, 25, 22, .5); display: grid; place-items: center; padding: 1rem; }
.modal-box { background: #fff; border-radius: 18px; max-width: 460px; width: 100%; padding: 1.4rem; box-shadow: var(--shadow-lg); text-align: center; }
.modal-icon { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto .6rem; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); }
.modal-icon .ic { width: 32px; height: 32px; }
.modal.danger .modal-icon { background: var(--bad-soft); color: var(--bad); }
.modal.danger [data-confirm-yes] { background: var(--bad); border-color: var(--bad); }
#confirm-text { font-size: 1.15rem; font-weight: 700; white-space: pre-line; margin: .3rem 0 1.2rem; }
.modal-actions { display: grid; gap: .6rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 420px) { .modal-actions { grid-template-columns: 1fr; } }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: radial-gradient(circle at 20% 10%, #d8f0eb 0, transparent 45%), radial-gradient(circle at 90% 90%, #e3ecfb 0, transparent 40%); }
.login-card { width: 100%; max-width: 420px; padding: 1.6rem; }
.login-logo { width: 72px; height: 72px; border-radius: 22px; background: var(--primary); color: #fff; display: grid; place-items: center; margin: 0 auto .8rem; box-shadow: var(--shadow); }
.login-logo .ic { width: 42px; height: 42px; }
.login-card h1 { text-align: center; color: var(--primary-dark); }

/* ---------- print ---------- */
.print-only { display: none; }
@media print {
  body { background: #fff; font-size: 12pt; }
  .sidebar, .mobile-top, .bottom-bar, .sheet, .modal, .no-print, .form-actions, .btn, .flash, .back-link { display: none !important; }
  body.authed .main { margin-left: 0; padding: 0; }
  .print-only { display: block; }
  .container { max-width: none; padding: 0; }
  .card { box-shadow: none; border: 0; padding: 0; }
  a { color: inherit; }
}
