/* TH Admin · TENA HOLISTIC colours: indigo main, magenta second, logo gradient as a thin accent. */
:root {
  --ink: #1e1b3a; --muted: #5b5878; --ground: #f5f4fb; --card: #ffffff; --line: #e3e0f3;
  --indigo: #4b3fb8; --indigo-deep: #2a2270; --magenta: #b0179b;
  --good-bg: #ddf3e8; --good: #14573b; --warn-bg: #fff1d6; --warn: #7a4a00; --bad-bg: #fde3e9; --bad: #8c1232; --info-bg: #e4e1fa; --info: #3a2fa0;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Ethiopic", "Nyala", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--ground); font-size: 15px; line-height: 1.5; }
a { color: var(--indigo); } a:hover { color: var(--magenta); }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
h1 { font-size: 26px; } h2 { font-size: 18px; margin-bottom: 12px; } h3 { font-size: 15px; margin: 16px 0 6px; }
p { margin: 0 0 12px; }
code { background: var(--info-bg); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
:focus-visible { outline: 3px solid var(--magenta); outline-offset: 2px; }
.sr { position: absolute; left: -9999px; }
.muted { color: var(--muted); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 1 1 230px; max-width: 100%; background: var(--indigo-deep); color: #fff; padding: 22px 14px; display: flex; flex-direction: column; gap: 18px; }
.main { flex: 999 1 560px; min-width: 0; padding: 26px clamp(16px, 3vw, 40px) 48px; display: flex; flex-direction: column; gap: 20px; }
.brand { padding: 0 8px; display: flex; flex-direction: column; gap: 5px; }
.brand-name { font-weight: 700; font-size: 22px; letter-spacing: .02em; } .brand-name.dark { color: var(--indigo-deep); }
.brand-sub { font-size: 12px; color: #cfcbf2; }
.brand-bar { height: 3px; width: 72px; border-radius: 2px; background: linear-gradient(90deg, #00ddff, #7f6ee9, #ff00d4); }
.menu summary { display: none; cursor: pointer; padding: 10px 12px; font-weight: 600; }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.menu a { display: flex; align-items: center; min-height: 42px; padding: 0 12px; border-radius: 8px; color: #fff; text-decoration: none; font-weight: 500; }
.menu a:hover { background: #3a3190; color: #fff; } .menu a.on { background: var(--indigo); }
.menu .sub { margin: 3px 0 6px 12px; padding-left: 8px; border-left: 1px solid #5a50c0; }
.menu .sub a { min-height: 36px; font-size: 14px; font-weight: 400; } .menu .sub a.on { background: #3a3190; font-weight: 600; }
.who { margin-top: auto; padding: 12px; border-radius: 8px; background: #3a3190; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.who span { color: #cfcbf2; } .who .linkbtn { color: #fff; padding: 6px 0 0; }
.top { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between; align-items: flex-end; }
.date { font-size: 13px; color: var(--muted); }
.intro { color: var(--muted); max-width: 75ch; margin: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.tiles.small { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
.tile-l { font-size: 13px; color: var(--muted); } .tile-v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; } .tile-s { font-size: 13px; color: var(--muted); }

.tablewrap { padding: 0; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid #eeecf8; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.r { text-align: right; } .empty { color: var(--muted); text-align: center; padding: 28px; }
.rowact { white-space: nowrap; text-align: right; } .rowact > * { display: inline-block; margin-left: 12px; } .rowact form { display: inline; }

.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pill.good { background: var(--good-bg); color: var(--good); } .pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.info { background: var(--info-bg); color: var(--info); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--indigo); background: var(--indigo); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--indigo-deep); color: #fff; }
.btn.ghost { background: #fff; color: var(--indigo); } .btn.ghost:hover { background: var(--info-bg); color: var(--indigo-deep); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--indigo); text-decoration: underline; cursor: pointer; }
.linkbtn.danger { color: var(--bad); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: auto; } .filter.toolbar { margin-left: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; } .field.wide { grid-column: 1 / -1; }
.field.check { flex-direction: row; align-items: center; gap: 10px; } .field.check input { width: 20px; height: 20px; flex: none; }
label { font-size: 13px; font-weight: 600; } .req { font-weight: 400; color: var(--muted); font-size: 12px; } .hint { font-size: 12px; color: var(--muted); }
input[type=text], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=password], input[type=file], select, textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid #b9b5d6; border-radius: 8px; padding: 9px 10px; min-height: 42px; width: 100%; max-width: 100%; }
textarea { line-height: 1.5; resize: vertical; }
.filter select, .filter input, .short, .payrow select, .payrow input { width: auto; } .short { max-width: 120px; text-align: right; }
.payrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .payrow input { max-width: 150px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.flash { padding: 12px 14px; border-radius: 8px; font-weight: 500; } .flash.ok { background: var(--good-bg); color: var(--good); } .flash.bad { background: var(--bad-bg); color: var(--bad); }
.attn, .tasks, .rules { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.rules { list-style: disc; padding-left: 20px; gap: 6px; } ol.rules { list-style: decimal; }
.attn li, .tasks li { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; } .tasks li { justify-content: space-between; border-bottom: 1px solid #eeecf8; padding-bottom: 8px; }
.tasks li:last-child { border-bottom: 0; padding-bottom: 0; } .tasks form { display: inline; }
.dl { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 6px 16px; margin: 0; } .dl dt { color: var(--muted); font-size: 13px; } .dl dd { margin: 0; }
.prose { max-width: 75ch; white-space: normal; overflow-wrap: anywhere; }
.bars { display: flex; flex-direction: column; gap: 12px; } .bar-h { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.bar-t { height: 10px; border-radius: 5px; background: #eeecf8; } .bar-f { height: 10px; border-radius: 5px; background: var(--indigo); }

.solo { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; }
.login { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; } .login.wide { max-width: 760px; } .login h2 { margin: 12px 0 4px; }

body.print { background: #fff; padding: 16px; }
.sheet { max-width: 800px; margin: 0 auto 32px; padding: 24px; border: 1px solid var(--line); border-radius: 8px; page-break-after: always; }
.sheet header { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--indigo); padding-bottom: 8px; margin-bottom: 16px; font-size: 13px; }
.sheet h1 { font-size: 20px; margin-bottom: 8px; } .sheet table { margin: 12px 0; }

@media (max-width: 720px) {
  .menu summary { display: block; } .who { margin-top: 0; } .filter { margin-left: 0; }
}
@media print {
  .noprint { display: none !important; } body.print { padding: 0; } .sheet { border: 0; margin: 0; padding: 0; }
}
@media (prefers-reduced-motion: no-preference) { .btn, .menu a { transition: background-color .12s; } }
