/* Finstrata Care — design system */
:root {
  --navy: #0A1630; --navy-2: #12224a; --blue: #3E86B8; --blue-2: #2f6f9c; --sky: #8FBFDB; --amber: #F2A93B; --amber-2: #e0952a; --coral: #F27B5B;
  --green: #1f9d6b; --green-bg: #e6f6ef; --red: #e5484d; --red-bg: #fdecec; --warn: #d98a12; --warn-bg: #fdf3e1; --info: #3E86B8; --info-bg: #e8f2f9; --violet: #7c5cd6; --violet-bg: #f0ebfc;
  --bg: #f4f6fb; --bg-2: #eef2f8; --card: #ffffff; --card-2: #f8fafd; --line: #e4e9f2; --line-2: #d6deea;
  --text: #0f1b33; --text-2: #4b5875; --text-3: #8592ad; --ring: rgba(62, 134, 184, .35);
  --shadow-sm: 0 1px 2px rgba(10, 22, 48, .06), 0 1px 1px rgba(10, 22, 48, .04);
  --shadow: 0 1px 2px rgba(10, 22, 48, .05), 0 6px 18px -6px rgba(10, 22, 48, .12);
  --shadow-lg: 0 2px 6px rgba(10, 22, 48, .06), 0 24px 48px -16px rgba(10, 22, 48, .25);
  --r: 16px; --r-sm: 10px; --r-lg: 22px;
  --font: 'Noto Sans Thai', 'Inter', system-ui, -apple-system, 'Segoe UI', 'Leelawadee UI', Tahoma, sans-serif;
  --sidebar: 264px; --top: 64px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #070d1c; --bg-2: #0b1428; --card: #0f1a33; --card-2: #13203d; --line: #1d2b4a; --line-2: #26375c;
  --text: #e8eefb; --text-2: #a9b6d3; --text-3: #6f7fa3; --ring: rgba(143, 191, 219, .35);
  --green-bg: rgba(31, 157, 107, .16); --red-bg: rgba(229, 72, 77, .16); --warn-bg: rgba(217, 138, 18, .16); --info-bg: rgba(62, 134, 184, .18); --violet-bg: rgba(124, 92, 214, .18);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .5); --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 0; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 700; } h2 { font-size: 20px; font-weight: 700; } h3 { font-size: 16px; font-weight: 650; }
p { margin: 0 0 .6em; }
.num, td.num, .tabular { font-variant-numeric: tabular-nums; }
::selection { background: rgba(242, 169, 59, .35); }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 8px; }

/* ---------- Buttons ---------- */
.btn { --b: var(--card); --c: var(--text); --bd: var(--line-2); display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--bd); background: var(--b); color: var(--c); font: 600 14px/1 var(--font); cursor: pointer; white-space: nowrap; transition: transform .12s, box-shadow .2s, background .2s, border-color .2s; text-decoration: none !important; }
.btn:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled], .btn.loading { opacity: .6; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { --b: linear-gradient(135deg, #F2A93B, #f08f3c); --c: #1a1305; --bd: transparent; background: var(--b); box-shadow: 0 6px 16px -6px rgba(242, 169, 59, .7); }
.btn.primary:hover { box-shadow: 0 10px 22px -8px rgba(242, 169, 59, .85); }
.btn.navy { --b: var(--navy); --c: #fff; --bd: transparent; }
:root[data-theme="dark"] .btn.navy { --b: #1f3566; }
.btn.blue { --b: var(--blue); --c: #fff; --bd: transparent; }
.btn.danger { --b: var(--red); --c: #fff; --bd: transparent; }
.btn.success { --b: var(--green); --c: #fff; --bd: transparent; }
.btn.ghost { --b: transparent; --bd: transparent; }
.btn.ghost:hover { background: var(--bg-2); box-shadow: none; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 10px; }
.btn.lg { height: 50px; padding: 0 22px; font-size: 16px; border-radius: 14px; }
.btn.icon { width: 40px; padding: 0; }
.btn.icon.sm { width: 32px; }
.btn.block { width: 100%; }
.btn.loading::after { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); }
.req::after { content: ' *'; color: var(--red); }
.input, select.input, textarea.input { width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); color: var(--text); font: 15px var(--font);
  transition: border-color .15s, box-shadow .15s, background .15s; outline: none; }
textarea.input { height: auto; min-height: 92px; padding: 11px 14px; resize: vertical; line-height: 1.55; }
.input:hover { border-color: #b9c6db; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--ring); }
.input.err { border-color: var(--red); box-shadow: 0 0 0 4px rgba(229, 72, 77, .15); }
.input.sm { height: 36px; font-size: 14px; border-radius: 10px; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238592ad' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .input { padding-left: 42px; }
.input-wrap > .lead { position: absolute; left: 13px; width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.input-wrap .trail { position: absolute; right: 6px; }
.input-wrap.has-trail .input { padding-right: 48px; }
.eye { width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--text-3); cursor: pointer; display: grid; place-items: center; transition: background .15s, color .15s; }
.eye:hover { background: var(--bg-2); color: var(--text); }
.eye svg { width: 19px; height: 19px; }
.check { display: inline-flex; gap: 9px; align-items: center; cursor: pointer; font-size: 14px; color: var(--text-2); user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g2f { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; } .g3f { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; } .g4f { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 14px; }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3f, .g4f { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .g2f, .g3f { grid-template-columns: 1fr; } .g4f { grid-template-columns: 1fr 1fr; } }
.seg { display: inline-flex; background: var(--bg-2); padding: 4px; border-radius: 12px; gap: 2px; border: 1px solid var(--line); flex-wrap: wrap; }
.seg button, .seg a { border: 0; background: transparent; padding: 7px 13px; border-radius: 9px; font: 600 13px var(--font); color: var(--text-2); cursor: pointer; text-decoration: none; white-space: nowrap; }
.seg .on { background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); font: 600 13px var(--font); color: var(--text-2); cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
:root[data-theme="dark"] .chip.on { background: var(--blue); border-color: var(--blue); }
.opt-list { display: grid; gap: 8px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; transition: all .15s; background: var(--card); }
.opt:hover { border-color: var(--sky); }
.opt input { margin-top: 3px; accent-color: var(--blue); }
.opt.on { border-color: var(--blue); background: var(--info-bg); }
.opt .sc { margin-left: auto; font-weight: 700; color: var(--text-3); font-size: 13px; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.card.pad, .card > .pad { padding: 20px; }
.card-h { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-h h3 { flex: 1; display: flex; align-items: center; gap: 10px; }
.card-h h3 .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--info-bg); color: var(--blue); }
.card-h h3 .ic svg { width: 18px; height: 18px; }
.card-b { padding: 18px 20px; }
.card-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; background: var(--card-2); border-radius: 0 0 var(--r) var(--r); }
.hover-lift { transition: transform .2s, box-shadow .2s, border-color .2s; }
.hover-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }

.stat { padding: 18px 20px; position: relative; overflow: hidden; }
.stat .k { font-size: 13px; color: var(--text-2); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.stat .k .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.stat .k .ic svg { width: 17px; height: 17px; }
.stat .v { font-size: 30px; font-weight: 750; letter-spacing: -.02em; margin-top: 10px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 14px; font-weight: 600; color: var(--text-3); margin-left: 4px; }
.stat .s { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.stat::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--glow, rgba(62, 134, 184, .08)); }
.tone-blue .ic { background: var(--info-bg); color: var(--blue); } .tone-amber .ic { background: var(--warn-bg); color: var(--amber-2); } .tone-green .ic { background: var(--green-bg); color: var(--green); }
.tone-red .ic { background: var(--red-bg); color: var(--red); } .tone-violet .ic { background: var(--violet-bg); color: var(--violet); }
.tone-amber { --glow: rgba(242, 169, 59, .12); } .tone-green { --glow: rgba(31, 157, 107, .1); } .tone-red { --glow: rgba(229, 72, 77, .1); } .tone-violet { --glow: rgba(124, 92, 214, .1); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; background: var(--bg-2); color: var(--text-2); line-height: 1.5; }
.badge.green { background: var(--green-bg); color: var(--green); } .badge.red { background: var(--red-bg); color: var(--red); } .badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.blue { background: var(--info-bg); color: var(--blue); } .badge.violet { background: var(--violet-bg); color: var(--violet); } .badge.navy { background: var(--navy); color: #fff; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.allergy { display: flex; gap: 10px; align-items: center; background: linear-gradient(90deg, var(--red-bg), transparent); border: 1px solid rgba(229, 72, 77, .35); color: var(--red); padding: 10px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; }
.allergy svg { width: 20px; height: 20px; flex: none; }

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 650; color: var(--text-3); text-transform: none; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--card-2); position: sticky; top: 0; white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: var(--card-2); }
.tbl tr.click { cursor: pointer; }
.tbl .num, .tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tfoot td { font-weight: 700; background: var(--card-2); border-top: 1px solid var(--line); }

/* ---------- Avatar ---------- */
.av { --s: 40px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; color: #fff; font-size: calc(var(--s) * .38); background: var(--blue); overflow: hidden; position: relative; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.sq { border-radius: 30%; }
.av.lg { --s: 76px; } .av.xl { --s: 108px; } .av.sm { --s: 30px; } .av.xs { --s: 24px; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who .t { min-width: 0; } .who .n { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .who .m { font-size: 12.5px; color: var(--text-3); }

/* ---------- Utilities ---------- */
.row { display: flex; align-items: center; gap: 12px; } .row.wrap { flex-wrap: wrap; } .row.top { align-items: flex-start; } .row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; } .muted { color: var(--text-3); } .muted2 { color: var(--text-2); } .small { font-size: 13px; } .xs { font-size: 12px; } .b { font-weight: 700; } .center { text-align: center; } .right { text-align: right; }
.mt { margin-top: 16px; } .mt2 { margin-top: 24px; } .mb { margin-bottom: 16px; } .mb2 { margin-bottom: 24px; } .gap-s { gap: 6px; }
.hide { display: none !important; }
.sep { height: 1px; background: var(--line); margin: 16px 0; border: 0; }
.green-t { color: var(--green); } .red-t { color: var(--red); } .warn-t { color: var(--warn); } .blue-t { color: var(--blue); }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 14px; } .kv dt { color: var(--text-3); } .kv dd { margin: 0; font-weight: 550; }
@media (max-width: 560px) { .kv { grid-template-columns: 110px 1fr; } }

/* ---------- Empty / skeleton ---------- */
.empty { text-align: center; padding: 42px 20px; color: var(--text-3); }
.empty .art { width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 26px; display: grid; place-items: center; background: linear-gradient(135deg, var(--info-bg), var(--warn-bg)); color: var(--blue); }
.empty .art svg { width: 38px; height: 38px; }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.skel { background: linear-gradient(90deg, var(--bg-2) 25%, var(--card-2) 37%, var(--bg-2) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 10px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- Toast / Modal ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 300; }
.toast { min-width: 260px; max-width: 420px; background: var(--navy); color: #fff; padding: 13px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: flex-start; font-size: 14px; animation: toastIn .35s cubic-bezier(.2, .9, .3, 1.2); }
.toast.err { background: #a32a2e; } .toast.ok { background: #13734f; }
.toast svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.toast.out { animation: toastOut .25s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }
.modal-bg { position: fixed; inset: 0; background: rgba(7, 13, 28, .5); backdrop-filter: blur(4px); z-index: 200; display: grid; place-items: center; padding: 20px; animation: fade .2s; overflow-y: auto; }
.modal { width: min(560px, 100%); background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); animation: pop .28s cubic-bezier(.2, .9, .3, 1.15); max-height: calc(100vh - 40px); display: flex; flex-direction: column; border: 1px solid var(--line); }
.modal.wide { width: min(820px, 100%); } .modal.xwide { width: min(1040px, 100%); }
.modal-h { padding: 20px 22px 6px; display: flex; gap: 12px; align-items: flex-start; }
.modal-h h2 { flex: 1; font-size: 19px; } .modal-h .sub { font-size: 13px; color: var(--text-3); margin-top: 3px; }
.modal-b { padding: 14px 22px 8px; overflow-y: auto; }
.modal-f { padding: 14px 22px 20px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.closing .modal { animation: popOut .18s forwards; } .closing { animation: fadeOut .2s forwards; }
@keyframes popOut { to { opacity: 0; transform: scale(.97); } } @keyframes fadeOut { to { opacity: 0; } }

/* ---------- Menus ---------- */
.menu { position: absolute; min-width: 220px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 120; animation: pop .18s; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border: 0; background: transparent; border-radius: 9px; color: var(--text); font: 500 14px var(--font); cursor: pointer; text-decoration: none; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--bg-2); }
.menu svg { width: 17px; height: 17px; color: var(--text-3); }
.menu hr { border: 0; height: 1px; background: var(--line); margin: 6px 4px; }
.menu .head { padding: 10px 11px 8px; }

/* ---------- Progress ---------- */
.bar { height: 8px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--blue), var(--sky)); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.bar.amber > i { background: linear-gradient(90deg, var(--amber), #ffc76b); } .bar.green > i { background: linear-gradient(90deg, #1f9d6b, #54d19c); }
.ring { position: relative; display: inline-grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring circle { transition: stroke-dashoffset 1.2s cubic-bezier(.2, .8, .2, 1); }
.ring .lbl { position: absolute; text-align: center; font-weight: 750; font-size: 20px; line-height: 1.1; }
.ring .lbl small { display: block; font-size: 11px; font-weight: 600; color: var(--text-3); }

/* ---------- Animations ---------- */
.fade-in { animation: fadeUp .45s cubic-bezier(.2, .8, .2, 1) both; }
.stagger > * { animation: fadeUp .5s cubic-bezier(.2, .8, .2, 1) both; }
.stagger > *:nth-child(2) { animation-delay: .04s; } .stagger > *:nth-child(3) { animation-delay: .08s; } .stagger > *:nth-child(4) { animation-delay: .12s; }
.stagger > *:nth-child(5) { animation-delay: .16s; } .stagger > *:nth-child(6) { animation-delay: .2s; } .stagger > *:nth-child(7) { animation-delay: .24s; } .stagger > *:nth-child(n+8) { animation-delay: .28s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- Command palette ---------- */
.palette { width: min(640px, 100%); align-self: start; margin-top: 8vh; }
.palette .input-wrap .input { height: 56px; border: 0; border-radius: 0; font-size: 17px; box-shadow: none; background: transparent; }
.palette .res { max-height: 56vh; overflow-y: auto; padding: 6px; border-top: 1px solid var(--line); }
.palette .it { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; color: var(--text); text-decoration: none !important; }
.palette .it.on, .palette .it:hover { background: var(--bg-2); }
.palette .it .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--info-bg); color: var(--blue); flex: none; }
.palette .it .ic svg { width: 17px; height: 17px; }
.palette .grp { font-size: 11.5px; font-weight: 700; color: var(--text-3); padding: 10px 12px 4px; letter-spacing: .04em; }
kbd { font: 600 11px var(--font); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--text-3); }

/* ---------- Charts ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid-l { stroke: var(--line); stroke-dasharray: 3 4; }
.chart text { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart .line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .draw { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 1.6s cubic-bezier(.3, .7, .2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .barr { transform-box: fill-box; transform-origin: bottom; animation: grow .8s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes grow { from { transform: scaleY(0); } }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 11px 14px; font-weight: 600; font-size: 14px; color: var(--text-2); border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; display: flex; gap: 7px; align-items: center; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); border-color: var(--amber); }
.tabs a svg { width: 16px; height: 16px; }
.tabs .cnt { font-size: 11px; background: var(--bg-2); padding: 1px 7px; border-radius: 99px; }

/* ---------- Timeline ---------- */
.tl { position: relative; padding-left: 26px; }
.tl::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.tl .e { position: relative; padding-bottom: 16px; }
.tl .e::before { content: ''; position: absolute; left: -23px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 3px solid var(--blue); }
.tl .e.red::before { border-color: var(--red); } .tl .e.warn::before { border-color: var(--amber); } .tl .e.green::before { border-color: var(--green); }
.tl .t { font-size: 12px; color: var(--text-3); }

/* ---------- Login / auth screens ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--bg); }
.auth-art { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 10% 0%, #1b3a73 0%, transparent 60%), linear-gradient(160deg, #0A1630 0%, #0e2147 55%, #0A1630 100%); color: #fff; padding: 44px 52px; display: flex; flex-direction: column; }
.auth-art .blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: float 16s ease-in-out infinite; }
.auth-art .b1 { width: 420px; height: 420px; background: #3E86B8; top: -120px; right: -80px; }
.auth-art .b2 { width: 360px; height: 360px; background: #F2A93B; bottom: -140px; left: -100px; opacity: .35; animation-delay: -5s; }
.auth-art .b3 { width: 260px; height: 260px; background: #8FBFDB; top: 45%; left: 45%; opacity: .25; animation-delay: -9s; }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(40px, -30px) scale(1.08); } 66% { transform: translate(-30px, 25px) scale(.95); } }
.auth-art .grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 30%, #000 20%, transparent 75%); }
.auth-art > * { position: relative; }
.auth-art .brand img { height: 46px; }
.auth-art .hero { margin-top: auto; margin-bottom: auto; padding: 40px 0; max-width: 520px; }
.auth-art h1 { font-size: 40px; line-height: 1.2; font-weight: 750; letter-spacing: -.02em; }
.auth-art h1 em { font-style: normal; background: linear-gradient(90deg, #F2A93B, #ffd38a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-art .lead { color: #c4d3ee; font-size: 16.5px; margin-top: 14px; }
.auth-art .feats { display: grid; gap: 10px; margin-top: 26px; }
.auth-art .feat { display: flex; gap: 12px; align-items: center; color: #dbe6f8; font-size: 14.5px; }
.auth-art .feat i { width: 30px; height: 30px; border-radius: 9px; background: rgba(255, 255, 255, .1); display: grid; place-items: center; flex: none; border: 1px solid rgba(255, 255, 255, .12); }
.auth-art .feat svg { width: 16px; height: 16px; color: #F2A93B; }
.floaters { position: relative; height: 170px; margin-top: 10px; }
.glass { position: absolute; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(14px); border-radius: 16px; padding: 12px 14px; display: flex; gap: 11px; align-items: center; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .5); animation: bob 6s ease-in-out infinite; font-size: 13.5px; }
.glass .gi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.glass .gi svg { width: 18px; height: 18px; }
.glass small { display: block; color: #a9bddf; font-size: 12px; }
.glass.g1 { left: 0; top: 0; } .glass.g2 { left: 180px; top: 70px; animation-delay: -2s; } .glass.g3 { left: 30px; top: 118px; animation-delay: -4s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.auth-art .foot { color: #8ea3c8; font-size: 12.5px; display: flex; justify-content: space-between; gap: 10px; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; position: relative; }
.auth-card { width: min(430px, 100%); }
.auth-card .top { margin-bottom: 26px; }
.auth-card .pill { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text-2); box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.auth-card .pill img { width: 26px; height: 26px; }
.auth-card h2 { font-size: 28px; font-weight: 750; letter-spacing: -.02em; }
.auth-card .sub { color: var(--text-3); margin-top: 6px; }
.auth-card .form-row { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 20px; }
.link-btn { border: 0; background: none; color: var(--blue); font: 600 14px var(--font); cursor: pointer; padding: 4px 2px; }
.link-btn:hover { text-decoration: underline; }
.caps { display: none; align-items: center; gap: 6px; font-size: 12.5px; color: var(--warn); font-weight: 600; }
.caps.on { display: flex; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; border: 1px solid; }
.alert svg { width: 19px; height: 19px; flex: none; margin-top: 1px; }
.alert.err { background: var(--red-bg); border-color: rgba(229, 72, 77, .3); color: var(--red); }
.alert.ok { background: var(--green-bg); border-color: rgba(31, 157, 107, .3); color: var(--green); }
.alert.info { background: var(--info-bg); border-color: rgba(62, 134, 184, .3); color: var(--blue); }
.alert.warn { background: var(--warn-bg); border-color: rgba(217, 138, 18, .3); color: var(--warn); }
.demo-box { margin-top: 24px; padding: 14px; border-radius: 14px; border: 1px dashed var(--line-2); background: var(--card-2); }
.demo-box .t { font-size: 12.5px; font-weight: 700; color: var(--text-3); margin-bottom: 9px; display: flex; gap: 6px; align-items: center; }
.demo-box .chip { font-size: 12.5px; padding: 6px 11px; }
.panel-swap { position: relative; }
.panel-swap > .pnl { animation: slideIn .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes slideIn { from { opacity: 0; transform: translateX(18px); } }
.success-ico { width: 72px; height: 72px; border-radius: 50%; background: var(--green-bg); color: var(--green); display: grid; place-items: center; margin-bottom: 18px; }
.success-ico svg { width: 36px; height: 36px; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .6s .15s forwards; }
.strength { display: flex; gap: 5px; margin: 8px 0 6px; } .strength i { flex: 1; height: 5px; border-radius: 9px; background: var(--line); transition: background .3s; }
.strength.s1 i:nth-child(-n+1) { background: var(--red); } .strength.s2 i:nth-child(-n+2) { background: var(--amber); } .strength.s3 i:nth-child(-n+3) { background: #9acd32; } .strength.s4 i { background: var(--green); }
.rules { display: grid; gap: 4px; font-size: 12.5px; color: var(--text-3); } .rules .ok { color: var(--green); } .rules span::before { content: '○ '; } .rules .ok::before { content: '✓ '; }
.theme-fab { position: absolute; top: 18px; right: 18px; }
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 26px 24px 30px; }
  .auth-art .hero { padding: 20px 0 0; margin: 0; } .auth-art h1 { font-size: 26px; } .auth-art .lead { font-size: 14.5px; }
  .auth-art .feats, .floaters, .auth-art .foot { display: none; }
  .auth-main { padding: 28px 20px 40px; align-items: start; }
}

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .25s; }
.shell.mini { --sidebar: 76px; }
.side { position: sticky; top: 0; height: 100vh; background: linear-gradient(180deg, #0A1630 0%, #0d1d3f 100%); color: #c9d6ee; display: flex; flex-direction: column; z-index: 50; }
.side .logo { height: var(--top); display: flex; align-items: center; padding: 0 18px; gap: 10px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.side .logo img { height: 34px; }
.side .logo .full { display: block; } .side .logo .mark { display: none; height: 36px; }
.side nav { flex: 1; overflow-y: auto; padding: 12px 10px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.side .grp { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: #6f84ad; padding: 14px 12px 6px; text-transform: uppercase; }
.side a.nv { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 11px; color: #c3d0ea; font-size: 14px; font-weight: 550; text-decoration: none; position: relative; transition: background .15s, color .15s; margin-bottom: 2px; }
.side a.nv svg { width: 19px; height: 19px; flex: none; opacity: .9; }
.side a.nv:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side a.nv.on { background: linear-gradient(90deg, rgba(242, 169, 59, .2), rgba(242, 169, 59, .04)); color: #fff; }
.side a.nv.on::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--amber); }
.side a.nv.on svg { color: var(--amber); opacity: 1; }
.side a.nv .cnt { margin-left: auto; background: var(--amber); color: #1a1305; font-size: 11px; font-weight: 750; min-width: 20px; height: 20px; border-radius: 99px; display: grid; place-items: center; padding: 0 6px; }
.side a.nv .cnt.red { background: var(--red); color: #fff; }
.side .foot { padding: 12px; border-top: 1px solid rgba(255, 255, 255, .06); font-size: 12px; color: #6f84ad; display: flex; align-items: center; gap: 8px; }
.side .foot button { color: #8ea3c8; }
.side .ver { cursor: pointer; border: 0; background: rgba(255, 255, 255, .06); color: #8ea3c8; padding: 4px 9px; border-radius: 8px; font: 600 11.5px var(--font); }
.side .ver:hover { color: #fff; }
.shell.mini .side .lbl, .shell.mini .side .grp, .shell.mini .side .cnt, .shell.mini .side .foot .txt { display: none; }
.shell.mini .side .logo .full { display: none; } .shell.mini .side .logo .mark { display: block; }
.shell.mini .side a.nv { justify-content: center; } .shell.mini .side .logo { justify-content: center; padding: 0; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-3); min-width: 0; }
.crumb b { color: var(--text); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-btn { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); color: var(--text-3); font: 14px var(--font); cursor: pointer; min-width: 240px; transition: border-color .15s, box-shadow .15s; }
.search-btn:hover { border-color: var(--blue); box-shadow: 0 0 0 4px var(--ring); }
.search-btn svg { width: 17px; height: 17px; } .search-btn kbd { margin-left: auto; }
.tb-icon { position: relative; }
.tb-icon .dot { position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; border-radius: 99px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 750; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--bg); }
.userbtn { white-space: nowrap; display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font: 600 13.5px var(--font); color: var(--text); }
.userbtn:hover { box-shadow: var(--shadow); }
.content { padding: 26px 28px 60px; width: 100%; max-width: 1480px; margin: 0 auto; }
.page-h { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-h .t { flex: 1; min-width: 240px; }
.page-h .t p { color: var(--text-3); margin: 4px 0 0; }
.page-h .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.banner { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 14px; margin-bottom: 18px; font-size: 14px; font-weight: 550; }
.banner.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid rgba(217, 138, 18, .25); }
.banner.red { background: var(--red-bg); color: var(--red); border: 1px solid rgba(229, 72, 77, .25); }
.banner svg { width: 20px; height: 20px; flex: none; }
.burger { display: none; }
@media (max-width: 1100px) { .search-btn { min-width: 0; } .search-btn .txt, .search-btn kbd { display: none; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--shadow-lg); }
  .shell.open .side { transform: none; }
  .shell.open::after { content: ''; position: fixed; inset: 0; background: rgba(7, 13, 28, .45); z-index: 45; }
  .burger { display: inline-flex; } .topbar { padding: 0 14px; } .content { padding: 18px 14px 80px; }
  .userbtn .nm { display: none; } .crumb .grp-l { display: none; }
}

/* ---------- Domain widgets ---------- */
.res-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; text-decoration: none !important; color: inherit; }
.res-card .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.bed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.bed { border-radius: 16px; padding: 14px; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; transition: all .18s; position: relative; min-height: 124px; display: flex; flex-direction: column; gap: 8px; }
.bed:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.bed .code { font-weight: 750; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.bed .st { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; margin-left: auto; }
.bed.available { border-style: dashed; border-color: rgba(31, 157, 107, .45); background: linear-gradient(180deg, var(--green-bg), transparent 70%); }
.bed.available .st { background: var(--green-bg); color: var(--green); }
.bed.occupied .st { background: var(--info-bg); color: var(--blue); }
.bed.reserved { border-color: rgba(124, 92, 214, .45); } .bed.reserved .st { background: var(--violet-bg); color: var(--violet); }
.bed.cleaning { border-color: rgba(217, 138, 18, .4); } .bed.cleaning .st { background: var(--warn-bg); color: var(--warn); }
.bed.closed { opacity: .6; } .bed.closed .st { background: var(--bg-2); }
.room-h { display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; }
.room-h h3 { font-size: 15px; }
.floor-h { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.floor-h .ln { flex: 1; height: 1px; background: var(--line); }
.task { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); transition: all .2s; }
.task.done { background: var(--card-2); } .task.done .tt { text-decoration: line-through; color: var(--text-3); }
.task.late { border-color: rgba(229, 72, 77, .4); box-shadow: inset 3px 0 0 var(--red); }
.task .time { font-weight: 750; font-size: 14px; width: 52px; flex: none; font-variant-numeric: tabular-nums; }
.tick { width: 34px; height: 34px; border-radius: 11px; border: 2px solid var(--line-2); background: var(--card); display: grid; place-items: center; cursor: pointer; flex: none; transition: all .2s; color: transparent; }
.tick:hover { border-color: var(--green); }
.tick.on { background: var(--green); border-color: var(--green); color: #fff; animation: popTick .3s; }
.tick.skip { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.tick svg { width: 18px; height: 18px; }
@keyframes popTick { 50% { transform: scale(1.18); } }
.cat { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.cat svg { width: 18px; height: 18px; }
.cat.meal { background: #fff1de; color: #d17b0f; } .cat.hygiene { background: #e5f3fb; color: #2f7bb0; } .cat.skin { background: #fde9ef; color: #c43d6b; } .cat.safety { background: #fdecec; color: #c9383d; }
.cat.exercise { background: #e6f6ef; color: #1f9d6b; } .cat.vitals { background: #f0ebfc; color: #7c5cd6; } .cat.activity { background: #fff6d6; color: #b48a00; } .cat.care { background: var(--bg-2); color: var(--text-2); } .cat.med { background: #e8f2f9; color: #3E86B8; }
:root[data-theme="dark"] .cat { filter: saturate(.9) brightness(.9); background: rgba(255, 255, 255, .06); }
.mar-row { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.mar-row:last-child { border-bottom: 0; }
.mar-row .tm { font-weight: 750; font-variant-numeric: tabular-nums; }
.mar-row .acts { display: flex; gap: 6px; }
.mar-row.given { background: linear-gradient(90deg, var(--green-bg), transparent 40%); }
.mar-row.late .tm { color: var(--red); }
.vital-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.vb { padding: 12px 14px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); }
.vb .l { font-size: 12px; color: var(--text-3); font-weight: 600; }
.vb .x { font-size: 21px; font-weight: 750; font-variant-numeric: tabular-nums; margin-top: 2px; }
.vb .x small { font-size: 12px; color: var(--text-3); font-weight: 600; margin-left: 3px; }
.vb.bad { background: var(--red-bg); border-color: rgba(229, 72, 77, .35); } .vb.bad .x { color: var(--red); }
.hero-res { display: flex; gap: 20px; align-items: center; padding: 22px; position: relative; overflow: hidden; }
.hero-res::before { content: ''; position: absolute; inset: 0; background: radial-gradient(500px 200px at 100% 0%, rgba(242, 169, 59, .14), transparent 70%), radial-gradient(500px 200px at 0% 100%, rgba(62, 134, 184, .1), transparent 70%); pointer-events: none; }
.hero-res > * { position: relative; }
.checklist .it { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); text-decoration: none !important; color: var(--text); }
.checklist .it:last-child { border-bottom: 0; }
.checklist .c { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; }
.checklist .done .c { background: var(--green); border-color: var(--green); color: #fff; }
.checklist .done .tx { color: var(--text-3); text-decoration: line-through; }
.checklist .c svg { width: 14px; height: 14px; }
.att { display: flex; gap: 12px; align-items: center; padding: 11px 13px; border-radius: 12px; margin-bottom: 8px; text-decoration: none !important; color: var(--text); font-size: 14px; font-weight: 550; transition: transform .15s; }
.att:hover { transform: translateX(3px); }
.att svg { width: 18px; height: 18px; flex: none; } .att .go { margin-left: auto; color: var(--text-3); }
.att.danger { background: var(--red-bg); } .att.danger > svg:first-child { color: var(--red); }
.att.warn { background: var(--warn-bg); } .att.warn > svg:first-child { color: var(--warn); }
.att.info { background: var(--info-bg); } .att.info > svg:first-child { color: var(--blue); }
.notif { width: min(400px, calc(100vw - 24px)); right: 0; max-height: 70vh; overflow-y: auto; }
.notif .n { display: flex; gap: 11px; padding: 10px; border-radius: 11px; text-decoration: none !important; color: var(--text); }
.notif .n:hover { background: var(--bg-2); }
.notif .n .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.notif .n .ic svg { width: 17px; height: 17px; }
.notif .danger .ic { background: var(--red-bg); color: var(--red); } .notif .warn .ic { background: var(--warn-bg); color: var(--warn); } .notif .info .ic { background: var(--info-bg); color: var(--blue); }
.chat { display: flex; flex-direction: column; gap: 10px; padding: 16px; overflow-y: auto; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.msg .meta { display: block; font-size: 11px; opacity: .7; margin-top: 4px; }
.msg.them { background: var(--card-2); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 5px; }
.msg.me { background: linear-gradient(135deg, var(--blue), #3576a6); color: #fff; align-self: flex-end; border-bottom-right-radius: 5px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.photo-grid .ph { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--bg-2); position: relative; cursor: zoom-in; }
.photo-grid .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.photo-grid .ph:hover img { transform: scale(1.06); }
.photo-grid .ph .x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; border: 0; cursor: pointer; display: grid; place-items: center; }
.uploader { border: 2px dashed var(--line-2); border-radius: 12px; display: grid; place-items: center; aspect-ratio: 1; cursor: pointer; color: var(--text-3); transition: all .15s; }
.uploader:hover { border-color: var(--blue); color: var(--blue); background: var(--info-bg); }
.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .88); z-index: 400; display: grid; place-items: center; padding: 20px; animation: fade .2s; cursor: zoom-out; }
.lightbox img { max-height: 90vh; border-radius: 12px; box-shadow: var(--shadow-lg); }
.pkg-tag { font-size: 12px; color: var(--text-3); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
@media (max-width: 1180px) { .split { grid-template-columns: minmax(0, 1fr); } }
.sticky-side { position: sticky; top: calc(var(--top) + 18px); }
.qr-box { background: #fff; padding: 12px; border-radius: 14px; display: inline-block; border: 1px solid var(--line); }
.whatsnew .v { border-left: 3px solid var(--amber); padding: 2px 0 2px 14px; margin-bottom: 16px; }
.whatsnew ul { margin: 8px 0 0; padding-left: 18px; color: var(--text-2); font-size: 14px; }
.print-only { display: none; }
@media print { .no-print { display: none !important; } .print-only { display: block; } body { background: #fff; } }
@media (max-width: 620px) { .hide-sm { display: none; } }
.modal.palette { padding: 0; overflow: hidden; }

.stat .k > svg { width: 17px; height: 17px; color: var(--text-3); }
.small svg, .xs svg { width: 15px; height: 15px; vertical-align: -3px; }
.badge svg { width: 13px; height: 13px; }
