@font-face { font-family: "Cairo"; font-weight: 400; font-display: swap; src: url("/static/fonts/cairo-arabic-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Cairo"; font-weight: 700; font-display: swap; src: url("/static/fonts/cairo-arabic-700-normal.woff2") format("woff2"); }
:root { --brand: #1f6f5f; --primary: #1f6f5f; --primary-soft: #e4f1ed; --bg: #f4f6f5; --surface: #fff; --text: #1d2725; --muted: #64716e;
  --border: #dfe5e3; --danger: #b3261e; --danger-soft: #fbeae9; --warning: #8a5a00; --warning-soft: #fff4dc; }
@media (prefers-color-scheme: dark) {
  :root { --primary: #5fbfa8; --primary-soft: #183630; --bg: #111716; --surface: #1a2220; --text: #e6ecea; --muted: #9aa8a4;
    --border: #2b3633; --danger: #ff8a80; --danger-soft: #3a1d1b; --warning: #f2c14e; --warning-soft: #33280f; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Cairo", system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.6; }
a { color: var(--primary); }
.top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem;
  padding-top: max(.7rem, env(safe-area-inset-top)); background: var(--brand); color: #fff; }
.top .brand { display: flex; align-items: center; gap: .5rem; flex: 1; font-weight: 700; font-size: 1.1rem; min-width: 0; }
.top .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top img { width: 30px; height: 30px; border-radius: 8px; background: #fff; }
.top .back { color: #fff; text-decoration: none; font-size: 1.5rem; padding: 0 .3rem; }
.top .link { background: none; border: 0; color: #fff; font: inherit; cursor: pointer; padding: .2rem .4rem; }
main { max-width: 640px; margin: 0 auto; padding: 1rem; padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
.card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem; margin-bottom: 1rem; color: inherit; text-decoration: none; }
h1 { font-size: 1.3rem; margin: 0 0 .3rem; } h2 { font-size: 1.1rem; margin: 0 0 .7rem; } h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.hello { font-weight: 700; margin: 0 0 .7rem; }
label { display: block; font-weight: 700; margin: .8rem 0 .3rem; }
input { width: 100%; font: inherit; font-size: 1.1rem; padding: .7rem .8rem; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); }
input:focus { outline: 2px solid var(--primary); border-color: transparent; }
.btn { display: block; width: 100%; margin-top: 1.2rem; padding: .8rem; border: 0; border-radius: 10px; background: var(--brand); color: #fff; font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer; }
.alert { background: var(--danger-soft); color: var(--danger); border-radius: 10px; padding: .7rem .8rem; margin: .6rem 0; }
.child-head { display: flex; gap: .8rem; align-items: center; }
.child-head h2 { margin: 0; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: 1.3rem; flex: none; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: .5rem; margin-top: .8rem; }
.stat { background: var(--bg); border-radius: 10px; padding: .5rem; text-align: center; }
.stat b { display: block; font-size: 1.15rem; } .stat span { font-size: .8rem; color: var(--muted); }
.stat.warn { background: var(--warning-soft); } .stat.warn b { color: var(--warning); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; } .list li > div { width: 100%; }
.tag { font-size: .85rem; padding: 0 .5rem; border-radius: 99px; background: var(--primary-soft); color: var(--primary); }
.tag-absent, .tag-fail { background: var(--danger-soft); color: var(--danger); }
.tag-late, .tag-second_round, .tag-left_early { background: var(--warning-soft); color: var(--warning); }
table { width: 100%; border-collapse: collapse; margin-top: .5rem; font-size: .95rem; }
th, td { padding: .45rem .3rem; border-bottom: 1px solid var(--border); text-align: right; }
thead th { color: var(--muted); font-weight: 400; font-size: .85rem; }
tr.fail td, tr.fail th { color: var(--danger); }
.kv th { width: 45%; font-weight: 400; color: var(--muted); }
details { border-bottom: 1px solid var(--border); padding: .5rem 0; } details:last-child { border-bottom: 0; }
summary { cursor: pointer; }
.empty { text-align: center; color: var(--muted); }
.secret { word-break: break-all; }
.row-actions { display: flex; gap: 1rem; width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; font-size: .9rem; cursor: pointer; text-decoration: underline; }
.pre { white-space: pre-line; margin: .4rem 0; }
.tag-muted { background: var(--bg); color: var(--muted); }
.list li.past { opacity: .65; }
.newsline { margin-top: .7rem; padding: .45rem .6rem; border-radius: 10px; background: var(--primary-soft); font-size: .9rem; }
