/* T1442d owner view: phone first (390 px), desktop at 1024+. No web fonts, no CDN. */
:root {
  --bg: #f7f5f1; --surface: #fff; --fg: #1f2328; --muted: #5b6168; --line: #e2dfd8;
  --free: #1e7a46; --free-bg: #ffffff; --taken: #3d434b; --taken-bg: #e9ebee; --off: #8a8f96;
  --accent: #6b4f2a; --soon: #7a6a4f; --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.5 "Segoe UI", "Noto Sans Arabic", "Noto Sans", Tahoma, Arial, sans-serif; }
[lang="ar"] body, body[data-lang="ar"] { font-family: "Segoe UI", "Noto Naskh Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif; }
a { color: var(--accent); }
bdi { unicode-bidi: isolate; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; flex-direction: column; line-height: 1.2; }
.brand .name { font-weight: 700; font-size: 19px; }
.brand .sub { color: var(--muted); font-size: 14px; }
.tools { display: flex; align-items: center; gap: 14px; font-size: 15px; }
.tools form { margin: 0; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }

.tabs { display: flex; gap: 6px; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 2; }
.tabs a { flex: 1; text-align: center; padding: 10px 6px; border-radius: 10px; text-decoration: none; color: var(--fg);
  font-weight: 600; min-height: 44px; }
.tabs a[aria-current="page"] { background: var(--fg); color: #fff; }

.preview { margin: 12px 16px 0; padding: 8px 12px; background: #fff4d6; border: 1px solid #e9cf86; border-radius: 10px; font-size: 14px; }
main { padding: 16px; max-width: 1200px; margin: 0 auto; }
h1.page { font-size: 21px; margin: 4px 0 12px; }
.lead { color: var(--muted); margin: 0 0 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; }
.card h2 { font-size: 17px; margin: 0 0 8px; }
.empty { color: var(--muted); }
.note { color: var(--muted); font-size: 14px; margin: 6px 2px 20px; }

.hero { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.hero .k { color: var(--muted); font-size: 15px; }
.hero .big { grid-row: 2; font-size: 34px; font-weight: 700; line-height: 1.1; }
.hero .upd { grid-row: 1 / span 2; grid-column: 2; align-self: end; color: var(--muted); font-size: 13px; }

.tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.tbl { border-radius: var(--radius); padding: 14px; border: 2px solid var(--line); background: var(--free-bg); min-height: 112px; }
.tbl h3 { margin: 0 0 6px; font-size: 17px; }
.tbl .state { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; font-size: 17px; }
.tbl .dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.tbl .line { margin: 6px 0 0; font-size: 15px; color: var(--fg); }
.k-free { border-color: #cfe5d8; }
.k-free .word { color: var(--free); }
.k-free .dot { border: 3px solid var(--free); }
.k-taken { background: var(--taken-bg); border-color: var(--taken); }
.k-taken .word { color: var(--taken); }
.k-taken .dot { background: var(--taken); }
.k-off { border-style: dashed; border-color: var(--off); background: #f1f1f1; }
.k-off .word { color: var(--off); }
.k-off .dot { border: 3px dashed var(--off); }
.c60 { margin-inline-start: auto; font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: #fff; border: 1.5px solid var(--taken); color: var(--taken); }

.live { color: #a33; font-size: 14px; margin: 0 2px 12px; }
.soon { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.soon h2 { margin: 0; font-size: 16px; font-weight: 600; }
.soon-word { margin: 0; padding: 4px 12px; border-radius: 999px; background: #f2ede4; color: var(--soon); font-weight: 600; white-space: nowrap; }

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; }
.kpi.wide { grid-column: 1 / -1; }
.kpi .k { color: var(--muted); font-size: 14px; }
.kpi .v { font-size: 24px; font-weight: 700; }
.kpi .v-text { font-size: 16px; font-weight: 600; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 14px; margin: 0 0 10px; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: start; color: var(--muted); font-weight: 600; font-size: 13px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
td { padding: 8px 4px; border-bottom: 1px solid #f0ede7; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.still { color: var(--taken); font-weight: 600; }
tr.long td { font-weight: 700; }
td .c60 { margin-inline-start: 6px; }
table.checked th, table.checked td { text-align: center; }

.login { max-width: 380px; margin: 32px auto; }
.login h1 { font-size: 20px; margin: 0 0 12px; }
.login label { display: block; font-weight: 600; margin-bottom: 6px; }
.login input { width: 100%; font: inherit; padding: 12px; border: 1px solid #c9c4ba; border-radius: 10px; margin-bottom: 14px; }
.login button { width: 100%; font: inherit; font-weight: 700; padding: 12px; border: 0; border-radius: 10px; background: var(--fg); color: #fff; min-height: 48px; cursor: pointer; }
.error { color: #a33; font-weight: 600; }
:focus-visible { outline: 3px solid #2b6cb0; outline-offset: 2px; }

@media (min-width: 700px) {
  .tables { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .day-wrap { display: grid; }
}
@media (min-width: 1024px) {
  main { padding: 24px 32px; }
  .tabs { justify-content: center; }
  .tabs a { flex: 0 0 180px; }
  .tables { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tbl { min-height: 140px; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero .big { font-size: 40px; }
  main:has(.day-table) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; align-content: start; }
  main:has(.day-table) > h1, main:has(.day-table) > .kpis, main:has(.day-table) > .soon,
  main:has(.day-table) > .note, main:has(.day-table) > .empty { grid-column: 1 / -1; }
}
