:root {
  --plum: #2E2328; --plum-2: #3D2F35; --rose: #D5588A; --rose-deep: #B23E6D; --gold: #D6B23A;
  --blush: #FCE4EE; --paper: #FFF7FA; --ink-soft: #6E5A63; --line: #EFD3DF; --ok: #2F7D5B; --bad: #B3261E;
  --display: "Gloock", Georgia, serif; --body: "Figtree", "Noto Sans Ethiopic", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--body); color: var(--plum); background: var(--paper); font-size: 15px; line-height: 1.5; }
:lang(am) body, body:lang(am) { font-size: 15.5px; }
a { color: var(--rose-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--plum); color: var(--blush); padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; }
.side .brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 22px; text-decoration: none; color: inherit; }
.side .brand img { width: 36px; height: 36px; border-radius: 50%; background: var(--blush); }
.side .brand b { font-family: var(--display); font-weight: 400; font-size: 1.15rem; display: block; }
.side .brand small { font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.side nav a { display: block; color: rgba(252,228,238,.8); text-decoration: none; padding: 9px 12px; border-radius: 10px; font-weight: 500; }
.side nav a:hover { background: var(--plum-2); color: #fff; }
.side nav a.on { background: var(--rose); color: #fff; }
.side .soon { display: block; padding: 9px 12px; color: rgba(252,228,238,.35); font-size: .92rem; }
.side .soon i { font-style: normal; font-size: .62rem; font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; border: 1px solid currentColor; border-radius: 6px; padding: 1px 5px; margin-left: 4px; }
.side .foot { margin-top: auto; display: grid; gap: 8px; padding: 0 8px; font-size: .88rem; }
.side .foot a, .side .foot button { color: rgba(252,228,238,.75); background: none; border: 0; font: inherit; cursor: pointer; text-align: left; padding: 0; text-decoration: none; }
.side .foot a:hover, .side .foot button:hover { color: #fff; }
.langs a { margin-right: 10px; } .langs a.on { color: var(--gold); font-weight: 600; }

main.content { padding: 28px clamp(16px, 3vw, 40px) 64px; min-width: 0; }
.head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
h1 { font-family: var(--display); font-weight: 400; font-size: 2rem; line-height: 1.15; }
h2 { font-family: var(--display); font-weight: 400; font-size: 1.3rem; margin-bottom: 12px; }
.muted { color: var(--ink-soft); }
.eyebrow { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--rose-deep); }

.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; background: var(--rose); color: #fff; }
.btn:hover { background: var(--rose-deep); }
.btn.ghost { background: transparent; color: var(--plum); border: 1.5px solid var(--line); }
.btn.ghost:hover { background: var(--blush); }
.btn.small { padding: 6px 12px; font-size: .88rem; }
.btn.danger { background: transparent; color: var(--bad); border: 1.5px solid #F0C9C6; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.grid { display: grid; gap: 16px; }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat b { display: block; font-family: var(--display); font-weight: 400; font-size: 2.2rem; line-height: 1.1; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .72rem; font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 500; padding: 8px 10px; border-bottom: 1.5px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.person { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; font-weight: 600; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--blush); flex: none; }
.avatar.lg { width: 120px; height: 120px; border-radius: 20px; }
.tag { display: inline-block; font-size: .78rem; padding: 2px 9px; border-radius: 999px; background: var(--blush); color: var(--rose-deep); font-weight: 600; }
.tag.left { background: #EEE; color: #666; }

form .fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
form .full { grid-column: 1 / -1; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 5px; }
label small { font-weight: 400; color: var(--ink-soft); }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--plum); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--rose); }
.hint { font-size: .82rem; color: var(--ink-soft); margin-top: 4px; }
.error { font-size: .85rem; color: var(--bad); margin-top: 4px; }
.radio { display: flex; gap: 18px; padding-top: 8px; } .radio label { display: flex; gap: 6px; font-weight: 500; } .radio input { width: auto; }
.actions { display: flex; gap: 10px; margin-top: 22px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; } .filters input, .filters select { width: auto; min-width: 160px; }

.flash { background: #E7F4EE; color: var(--ok); border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; font-weight: 500; }
.alert { background: #FBEAE9; color: var(--bad); border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; } dl.facts dt { color: var(--ink-soft); } dl.facts dd { font-weight: 500; }
.pager { margin-top: 16px; } .pager nav { display: flex; gap: 6px; flex-wrap: wrap; }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-soft); }

.menu-btn { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 16px; }
  .side .brand { padding: 0; } .side nav { display: none; width: 100%; } .side.open nav { display: block; }
  .side .foot { display: none; } .side.open .foot { display: grid; width: 100%; margin-top: 8px; }
  .menu-btn { display: block; margin-left: auto; background: none; border: 1.5px solid rgba(252,228,238,.4); color: var(--blush); border-radius: 8px; padding: 6px 12px; font: inherit; }
  .cols-3, .cols-2, form .fields { grid-template-columns: 1fr; }
}

/* Ethiopian date picker */
.etd { position: relative; }
.etd-field { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; font: inherit; text-align: left; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--plum); cursor: pointer; }
.etd-field:hover, .etd-field[aria-expanded=true] { border-color: var(--rose); }
.etd-field.empty .etd-text { color: var(--ink-soft); }
.etd-field svg { color: var(--rose-deep); flex: none; }
.etd-greg:empty { display: none; }
.etd-pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 320px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: 0 18px 40px -12px rgba(46,35,40,.35); }
.etd-head { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; }
.etd-head select { padding: 6px 8px; border-radius: 8px; }
.etd-month { flex: 1.4; } .etd-year { flex: 1; }
.etd-nav { flex: none; width: 32px; height: 32px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; font-size: 1.2rem; line-height: 1; cursor: pointer; color: var(--plum); }
.etd-nav:hover { background: var(--blush); }
.etd-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.etd-wd { text-align: center; font-size: .72rem; color: var(--ink-soft); font-weight: 600; padding: 4px 0; }
.etd-day { border: 0; background: none; border-radius: 8px; padding: 4px 0 3px; cursor: pointer; font: inherit; color: var(--plum); display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.etd-day b { font-weight: 600; font-size: .95rem; }
.etd-day small { font-size: .62rem; color: var(--ink-soft); font-family: var(--mono); }
.etd-day:hover { background: var(--blush); }
.etd-day.today { box-shadow: inset 0 0 0 1.5px var(--gold); }
.etd-day.sel { background: var(--rose); color: #fff; } .etd-day.sel small { color: rgba(255,255,255,.85); }
.etd-foot { display: flex; gap: 8px; margin-top: 10px; }
.pin { font-family: var(--mono); font-size: 1.6rem; letter-spacing: .3em; font-weight: 500; min-width: 5.5ch; }
.etd-day:disabled { opacity: .28; cursor: default; background: none; }
.etd-field:disabled { background: #FAF5F7; cursor: not-allowed; }
