/* Hassan Falah brand (Brand Guidelines 2026/01): Forest palette + IBM Plex Sans Arabic, three weights only. */
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap; src: url(/static/fonts/plex-arabic-arabic-400.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 500; font-display: swap; src: url(/static/fonts/plex-arabic-arabic-500.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 700; font-display: swap; src: url(/static/fonts/plex-arabic-arabic-700.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap; src: url(/static/fonts/plex-arabic-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 500; font-display: swap; src: url(/static/fonts/plex-arabic-latin-500.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 700; font-display: swap; src: url(/static/fonts/plex-arabic-latin-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --forest: #12372A;        /* primary: text and logo */
  --forest-2: #0C2A1F;
  --mint: #40B88E;          /* secondary: emphasis only */
  --mint-soft: #E3F3EC;
  --paper: #F4F2EC;         /* warm off-white background */
  --surface: #FFFFFF;
  --text: #12372A;
  --muted: #52675B;
  --line: #DCD9D0;
  --danger: #A8321F;
  --radius: 12px;
  --font: "IBM Plex Sans Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--paper); color: var(--text); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); margin: 0 0 22px; }

/* ---- Login ---- */
.login-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 24px 16px; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 36px 28px 30px; text-align: center; }
.login-card .logo { margin: 0 auto; }
.eyebrow { font-size: 11px; letter-spacing: .28em; color: var(--muted); margin: 14px 0 0; font-weight: 500; }
.login-card h1 { font-size: 22px; font-weight: 700; margin: 6px 0 2px; }
.login-card form { text-align: start; display: grid; gap: 6px; }
.login-card label { font-size: 14px; color: var(--muted); margin-top: 8px; font-weight: 500; }
.login-card input { height: 48px; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; background: var(--paper); }
.login-card input:focus { outline: 2px solid var(--forest); outline-offset: 1px; border-color: transparent; }
.btn-primary { margin-top: 18px; height: 50px; border: 0; border-radius: 10px; background: var(--forest); color: #fff; font-weight: 700; font-size: 17px; cursor: pointer; }
.btn-primary:hover { background: var(--forest-2); }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.error { color: var(--danger); font-size: 14px; margin: 8px 0 0; }
.tagline { margin: 0; color: var(--muted); font-size: 15px; text-align: center; }
.tagline strong { color: var(--forest); font-weight: 700; }
.logo { display: block; }

/* ---- App ---- */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: var(--forest); color: #fff; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-title { font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-title-sub { font-weight: 400; opacity: .8; margin-inline-start: 6px; padding-inline-start: 8px; border-inline-start: 1px solid rgba(255, 255, 255, .3); }
.brand-sub { font-size: 12px; opacity: .7; direction: ltr; text-align: end; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.stat { background: rgba(255, 255, 255, .1); border-radius: 999px; padding: 6px 14px; font-size: 14px; white-space: nowrap; }
.stat strong { color: var(--mint); font-size: 16px; }
.stat-label { opacity: .8; }
.stat-sep { opacity: .6; margin: 0 3px; }
.btn-ghost { background: transparent; border: 1px solid rgba(255, 255, 255, .35); color: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }

.wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 60px; }
.search-box { position: relative; }
.search-box input { width: 100%; height: 60px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 0 52px; font-size: 19px; -webkit-appearance: none; appearance: none; }
.search-box input::placeholder { color: #8A978F; }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-box input:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(18, 55, 42, .1); }
.search-icon { position: absolute; inset-inline-start: 18px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); fill: var(--muted); }
.clear { position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: var(--paper); color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.status { color: var(--muted); font-size: 14px; margin: 12px 4px; min-height: 22px; }
.status.err { color: var(--danger); }

.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: background .15s, border-color .15s; }
.row.done { background: var(--mint-soft); border-color: var(--mint); }
.row-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; }
.row-text { display: grid; gap: 2px; min-width: 0; }
.name { font-size: 18px; font-weight: 700; }
.phone { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: end; justify-self: start; }
.when { font-size: 12px; color: var(--forest); font-weight: 500; }
.when:empty { display: none; }

.check { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; cursor: pointer; padding: 4px; }
.check input { position: absolute; top: 4px; opacity: 0; width: 44px; height: 44px; margin: 0; cursor: pointer; }
.check-ui { width: 44px; height: 44px; border-radius: 10px; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; transition: all .15s; }
.check-ui svg { width: 26px; height: 26px; fill: #fff; opacity: 0; transform: scale(.6); transition: all .15s; }
.check:hover .check-ui { border-color: var(--mint); }
.check input:checked + .check-ui { background: var(--mint); border-color: var(--mint); }
.check input:checked + .check-ui svg { opacity: 1; transform: none; }
.check input:focus-visible + .check-ui { outline: 3px solid var(--forest); outline-offset: 2px; }
.check input:disabled + .check-ui { opacity: .5; }
.check-label { font-size: 12px; color: var(--muted); font-weight: 500; }

@media (max-width: 560px) {
  .brand-title-sub, .stat-label, .brand-sub { display: none; }
  .search-box input { height: 56px; font-size: 18px; }
}
