@font-face { font-family: 'Tajawal'; font-weight: 400; src: url('./fonts/taj-400-arabic.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Tajawal'; font-weight: 400; src: url('./fonts/taj-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF; }
@font-face { font-family: 'Tajawal'; font-weight: 500; src: url('./fonts/taj-500-arabic.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Tajawal'; font-weight: 500; src: url('./fonts/taj-500-latin.woff2') format('woff2'); unicode-range: U+0000-00FF; }
@font-face { font-family: 'Tajawal'; font-weight: 700; src: url('./fonts/taj-700-arabic.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Tajawal'; font-weight: 700; src: url('./fonts/taj-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF; }
@font-face { font-family: 'Tajawal'; font-weight: 800; src: url('./fonts/taj-800-arabic.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Tajawal'; font-weight: 800; src: url('./fonts/taj-800-latin.woff2') format('woff2'); unicode-range: U+0000-00FF; }

:root {
  --navy: #102a44;
  --blue: #2f6fed;
  --turq: #0fb5a3;
  --page: #f3f7fc;
  --card: #ffffff;
  --ink: #1c2b3a;
  --ink-2: #5b6b7c;
  --line: #e2e8f0;
  --danger: #c0392b;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Tajawal', system-ui, sans-serif;
  background: var(--page);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}
#app { max-width: 1080px; margin: 0 auto; padding: 16px; }

.hero {
  background: linear-gradient(135deg, var(--navy), var(--turq));
  color: #fff;
  border-radius: 18px;
  padding: 22px 20px;
  margin-bottom: 14px;
}
.hero h1 { margin: 0 0 4px; font-size: 24px; font-weight: 800; }
.hero p { margin: 0; opacity: 0.9; }

.tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  background: #fff; border-radius: 999px; padding: 5px;
  box-shadow: 0 1px 3px rgb(16 42 68 / 0.08);
  margin-bottom: 16px;
}
.tabs button {
  border: 0; background: transparent; font-family: inherit; font-size: 14px; font-weight: 700;
  color: var(--ink-2); padding: 9px 16px; border-radius: 999px; cursor: pointer;
}
.tabs button.active { background: var(--navy); color: #fff; }

.group { margin-bottom: 20px; }
.group-label { color: var(--turq); font-size: 13px; font-weight: 700; }
.group h2 { margin: 2px 0 10px; font-size: 19px; font-weight: 800; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat {
  background: var(--card); border-radius: 14px; padding: 14px;
  box-shadow: 0 1px 3px rgb(16 42 68 / 0.08);
}
.stat b { display: block; font-size: 24px; font-weight: 800; color: var(--navy); }
.stat span { font-size: 12.5px; color: var(--ink-2); }

.card {
  background: var(--card); border-radius: 14px; padding: 14px;
  box-shadow: 0 1px 3px rgb(16 42 68 / 0.08);
  margin-bottom: 10px;
}

.bar-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.bar-row .bar-label { flex: 0 0 110px; font-size: 13px; }
.bar-track { flex: 1; background: var(--page); border-radius: 999px; height: 18px; overflow: hidden; }
.bar-fill { background: linear-gradient(90deg, var(--blue), var(--turq)); height: 100%; border-radius: 999px; min-width: 2px; }
.bar-val { flex: 0 0 36px; text-align: left; font-weight: 700; font-size: 13px; }

input[type="text"], input[type="password"], input[type="number"], textarea, select {
  width: 100%; font-family: inherit; font-size: 15px;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); margin-bottom: 8px;
}
label.f-label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 8px 0 4px; }

.btn {
  display: inline-block; border: 0; font-family: inherit; font-size: 15px; font-weight: 700;
  background: var(--blue); color: #fff; border-radius: 12px; padding: 11px 20px;
  cursor: pointer; text-decoration: none; text-align: center;
}
.btn.turq { background: var(--turq); }
.btn.ghost { background: var(--page); color: var(--ink); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.small { padding: 8px 14px; font-size: 13.5px; }

.row-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--card); border: 0; border-radius: 14px; padding: 13px 14px;
  box-shadow: 0 1px 3px rgb(16 42 68 / 0.08);
  margin-bottom: 8px; cursor: pointer; text-align: start; font-family: inherit;
}
.row-item .num { color: var(--ink-2); font-size: 12px; flex: none; }
.row-item .main { flex: 1; min-width: 0; }
.row-item .name { font-weight: 700; display: block; }
.row-item .detail { font-size: 12.5px; color: var(--ink-2); }
.chip {
  flex: none; font-size: 12px; font-weight: 700; padding: 6px 12px;
  border-radius: 999px; border: 0; background: var(--page); color: var(--ink-2); white-space: nowrap;
}
.chip.set { background: #e3edfd; color: var(--blue); }
.chip[data-status="قيد التنفيذ"] { background: #e3edfd; color: var(--blue); }
.chip[data-status="مكتملة"] { background: #dcf5f1; color: var(--turq); }
button.chip { cursor: pointer; font-family: inherit; }
button.chip:disabled { cursor: default; opacity: 0.6; }

.task {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: 14px; padding: 13px 14px;
  box-shadow: 0 1px 3px rgb(16 42 68 / 0.08); margin-bottom: 8px;
}
.task .main { flex: 1; min-width: 0; }
.task .name { font-weight: 700; display: block; }
.task .detail { font-size: 12.5px; color: var(--ink-2); }
.task .btns { display: flex; gap: 6px; flex: none; }
.task-call { background: var(--turq); color: #fff; border: 0; border-radius: 12px; font-family: inherit; font-weight: 700; font-size: 14px; padding: 10px 16px; cursor: pointer; }
.task-result { background: var(--page); color: var(--ink); border: 0; border-radius: 12px; font-family: inherit; font-weight: 700; font-size: 14px; padding: 10px 16px; cursor: pointer; }
.task-result.done { background: #dcf5f1; color: var(--turq); }

dialog.sheet {
  border: 0; border-radius: 18px; padding: 18px; width: min(440px, 92vw);
  font-family: inherit; box-shadow: 0 12px 40px rgb(16 42 68 / 0.25);
}
dialog.sheet::backdrop { background: rgb(16 42 68 / 0.4); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sheet-head strong { font-size: 17px; font-weight: 800; }
.x-btn { border: 0; background: var(--page); border-radius: 8px; width: 32px; height: 32px; font-size: 15px; cursor: pointer; }
.contact-opt {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: 14px; background: var(--page); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); margin-bottom: 8px; min-height: 48px;
}
.contact-opt:hover { background: #e9f2fd; }
.contact-opt.disabled { opacity: 0.65; cursor: not-allowed; }
.contact-opt.disabled:hover { background: var(--page); }
.contact-opt .ico { font-size: 22px; flex: none; }
.contact-opt .cmain b { display: block; font-weight: 700; }
.contact-opt .cmain small { font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }

.note { font-size: 12.5px; color: var(--ink-2); }
.warn-box { background: #fdf3e7; border-inline-start: 4px solid #e6a23c; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-size: 13.5px; }
.info-box { background: #e9f2fd; border-inline-start: 4px solid var(--blue); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-size: 13.5px; }

.login-wrap { max-width: 400px; margin: 8vh auto; }
.login-wrap .hero { text-align: center; }
.err { color: var(--danger); font-size: 13px; margin: 6px 0; }
.ok-msg { color: var(--turq); font-size: 13px; margin: 6px 0; font-weight: 700; }

.intg { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.intg .st { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.intg .st.off { background: var(--page); color: var(--ink-2); }
.intg .st.on { background: #dcf5f1; color: var(--turq); }

@media (max-width: 600px) {
  .hero h1 { font-size: 20px; }
  .task { flex-wrap: wrap; }
  .task .btns { width: 100%; }
  .task .btns > * { flex: 1; }
}

