/* ===== Home build — styles ===== */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/cairo-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-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: 'Cairo';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/cairo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* هوية دافية: طوب، رمل، خشب، أخضر غامق */
  --brand: #1f4636;
  --brand-2: #2c5f4a;
  --brand-3: #4f7f68;
  --brand-tint: #eef2ea;
  --gold: #a97c34;
  --gold-tint: #f7efe0;
  --clay: #b4522f;
  --sand: #f8f3ea;
  --ink: #2a2119;
  --ink-2: #4a3f33;
  --muted: #7c6c58;
  --line: #e7dcc9;
  --bg: #f8f3ea;
  --card: #fffdf8;
  --ok: #3f7d5a;
  --warn: #a4632a;
  --danger: #a33a26;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px rgba(74, 56, 30, 0.06);
  --shadow: 0 1px 2px rgba(74, 56, 30, 0.06), 0 14px 34px -22px rgba(74, 56, 30, 0.45);
  --font: 'Cairo', 'Segoe UI', 'Tahoma', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-2); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; }
p { margin: 0; }
::selection { background: #cfe3dd; }

.app-shell { min-height: 100vh; padding-bottom: 88px; }
.boot { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 70vh; gap: 8px; }
.boot-mark { font-weight: 700; font-size: 22px; color: var(--brand); letter-spacing: 0.02em; }
.boot-line { color: var(--muted); font-size: 13px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--brand); font-weight: 700; font-size: 17px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(150deg, var(--brand-2), var(--brand));
  display: grid; place-items: center; color: #fff; flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.brand small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 14px; border-radius: 11px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font-weight: 600; font-size: 13.5px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.06s;
  white-space: nowrap;
}
.btn:hover { background: #fafcfb; border-color: #d3dcd8; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: #eef2f0; }
.btn-icon { width: 40px; padding: 0; }
.btn-danger { color: var(--danger); border-color: #f0d5d2; background: #fdf3f2; }
.btn-sm { height: 34px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn-block { width: 100%; }

/* ---------- layout ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 22px 18px 40px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 12px; }
.section-title h2 { font-size: 16.5px; }
.section-title span { color: var(--muted); font-size: 12.5px; }
.section-title .spacer { margin-inline-start: auto; }

/* ---------- landing ---------- */
.landing-hero {
  padding: 46px 0 26px; text-align: center;
  background:
    radial-gradient(1100px 340px at 50% -140px, #e7f0ec 0%, rgba(244, 247, 245, 0) 70%);
}
.landing-hero h1 { font-size: clamp(26px, 4.6vw, 40px); color: var(--brand); letter-spacing: -0.02em; }
.landing-hero p { margin: 12px auto 0; max-width: 620px; color: var(--ink-2); font-size: 15.5px; }
.landing-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 22px; align-items: start; margin-top: 30px; }
.create-card { padding: 22px; }
.create-card h2 { font-size: 17px; margin-bottom: 4px; }
.create-card .hint { color: var(--muted); font-size: 12.5px; margin-bottom: 16px; }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px;
  background: #fff; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand-3); box-shadow: 0 0 0 3px rgba(47, 138, 123, 0.14);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feature-list { display: grid; gap: 12px; }
.feature { display: flex; gap: 12px; padding: 16px; align-items: flex-start; }
.feature .ic {
  width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto;
  background: var(--brand-tint); color: var(--brand); display: grid; place-items: center;
}
.feature h3 { font-size: 14.5px; margin-bottom: 2px; }
.feature p { color: var(--muted); font-size: 13px; }
.last-project { margin-top: 18px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.last-project .lp-name { font-weight: 700; }
.last-project .lp-meta { color: var(--muted); font-size: 12.5px; }
.last-project .spacer { margin-inline-start: auto; }
.landing-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 34px; }

/* ---------- project header ---------- */
.project-head { padding: 20px 22px; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.project-head h1 { font-size: clamp(20px, 3vw, 26px); color: var(--brand); }
.project-meta { color: var(--muted); font-size: 13px; margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.project-meta .dot { opacity: 0.45; }
.budget-box { margin-inline-start: auto; min-width: 230px; }
.budget-box .bb-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.budget-box .bb-row b { color: var(--ink); font-size: 13.5px; }
.bar { height: 8px; border-radius: 99px; background: #edf1ef; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-3), var(--brand-2)); }
.bar.over > i { background: linear-gradient(90deg, #e08263, var(--danger)); }
.budget-note { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.kpi { padding: 15px 16px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.kpi .k-label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .k-value { font-size: 21px; font-weight: 700; margin-top: 5px; letter-spacing: -0.01em; }
.kpi .k-value small { font-size: 12px; font-weight: 600; color: var(--muted); margin-inline-start: 4px; }
.kpi.k-total { background: linear-gradient(155deg, #10423e, #0b322f); border-color: #0b322f; color: #fff; }
.kpi.k-total .k-label { color: #b9d2cc; }
.kpi.k-total .k-value small { color: #9dc0b8; }
.kpi .k-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ---------- toolbar ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.toolbar .spacer { margin-inline-start: auto; }
.search { position: relative; }
.search input {
  height: 40px; padding: 0 36px 0 12px; border-radius: 11px; border: 1px solid var(--line);
  background: #fff; width: 240px; outline: none;
}
.search input:focus { border-color: var(--brand-3); box-shadow: 0 0 0 3px rgba(47, 138, 123, 0.14); }
.search svg { position: absolute; inset-inline-end: 11px; top: 11px; color: var(--muted); }

/* ---------- category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cat-card {
  text-align: start; padding: 14px 15px; border-radius: var(--radius); background: #fff;
  border: 1px solid var(--line); cursor: pointer; position: relative; overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.08s;
  box-shadow: var(--shadow-sm);
}
.cat-card:hover { border-color: #c8d6d1; box-shadow: var(--shadow); transform: translateY(-1px); }
.cat-card .c-name { font-weight: 700; font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.cat-card .c-num {
  width: 22px; height: 22px; border-radius: 7px; background: var(--brand-tint); color: var(--brand-2);
  font-size: 11.5px; font-weight: 700; display: grid; place-items: center; flex: 0 0 auto;
}
.cat-card .c-total { font-size: 19px; font-weight: 700; margin-top: 10px; letter-spacing: -0.01em; }
.cat-card .c-total.empty { color: #b6c2be; font-weight: 600; font-size: 15px; }
.cat-card .c-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.cat-card .c-bar { height: 4px; border-radius: 99px; background: #eef2f0; margin-top: 10px; overflow: hidden; }
.cat-card .c-bar > i { display: block; height: 100%; background: var(--brand-3); border-radius: 99px; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.sum { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
table.sum th, table.sum td { padding: 10px 12px; text-align: start; border-bottom: 1px solid #eef2f0; }
table.sum thead th {
  background: #f7faf8; font-size: 12px; color: var(--ink-2); font-weight: 700;
  position: sticky; top: 0; border-bottom: 1px solid var(--line);
}
table.sum td.num, table.sum th.num { text-align: end; font-variant-numeric: tabular-nums; }
table.sum tbody tr:hover { background: #fbfdfc; }
table.sum tbody tr.total { background: var(--brand-tint); font-weight: 700; }
table.sum tbody tr.total td { border-bottom: none; color: var(--brand); }
table.sum td.muted { color: var(--muted); }

/* ---------- entries list ---------- */
.entry {
  display: grid; grid-template-columns: 84px 1fr auto auto; gap: 12px; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid #eef2f0;
}
.entry:last-child { border-bottom: none; }
.entry .e-date { color: var(--muted); font-size: 12px; }
.entry .e-title { font-weight: 600; font-size: 13.5px; }
.entry .e-notes { color: var(--muted); font-size: 12px; margin-top: 2px; }
.entry .e-qty { color: var(--muted); font-size: 12px; }
.entry .e-total { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.entry .e-actions { display: flex; gap: 4px; opacity: 0.55; transition: opacity 0.15s; }
.entry:hover .e-actions { opacity: 1; }
.chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px;
  font-size: 11.5px; font-weight: 600; background: #f1f5f3; color: var(--ink-2);
}
.chip.k-works { background: #eaf0e6; color: #33604a; }
.chip.k-purchases { background: #eef1fa; color: #3a4d8f; }
.chip.k-materials { background: var(--gold-tint); color: #8a6417; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid transparent; background: transparent;
  color: var(--ink-2); display: grid; place-items: center; cursor: pointer;
}
.icon-btn:hover { background: #eef2f0; }
.icon-btn.danger:hover { background: #fdf3f2; color: var(--danger); }

.empty-state { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty-state .es-title { color: var(--ink); font-weight: 700; margin-bottom: 4px; }

/* ---------- category view ---------- */
.cat-head { padding: 18px 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.cat-head h1 { font-size: 20px; color: var(--brand); }
.cat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-inline-start: auto; }
.cat-chip { padding: 7px 12px; border-radius: 10px; background: #f6f9f7; border: 1px solid var(--line); font-size: 12px; }
.cat-chip b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(11, 26, 24, 0.42); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 18px;
  animation: fade 0.15s ease-out;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 520px; background: #fff; border-radius: 18px; padding: 20px;
  box-shadow: 0 24px 60px -20px rgba(9, 30, 27, 0.5); max-height: 92vh; overflow-y: auto;
  animation: pop 0.16s ease-out;
}
@keyframes pop { from { transform: translateY(10px) scale(0.99); opacity: 0.6; } to { transform: none; opacity: 1; } }
.modal h3 { font-size: 17px; color: var(--brand); }
.modal .m-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; margin-top: 6px; }
.modal-actions .btn { flex: 1; height: 44px; }
.live-total {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--brand-tint); border-radius: 12px; padding: 12px 14px; margin: 4px 0 14px;
}
.live-total span { font-size: 13px; color: var(--ink-2); }
.live-total b { font-size: 19px; color: var(--brand); font-variant-numeric: tabular-nums; }

/* ---------- toast ---------- */
.toast-root { position: fixed; inset-inline: 0; bottom: 22px; z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  background: #12211f; color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 13px;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.5); animation: toastin 0.18s ease-out;
}
.toast.err { background: #7a1d16; }
@keyframes toastin { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- mobile FAB ---------- */
.fab {
  position: fixed; inset-inline-start: 16px; inset-inline-end: 16px; bottom: 16px; z-index: 45;
  height: 52px; border-radius: 14px; background: var(--brand); color: #fff; border: none;
  font-weight: 700; font-size: 15px; display: none; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 14px 30px -12px rgba(15, 61, 58, 0.7);
}

/* ---------- report ---------- */
.report-actions { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.sheet {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 26px 26px 30px;
  max-width: 900px; margin: 0 auto;
}
.sheet-head { display: flex; align-items: flex-start; gap: 14px; border-bottom: 2px solid var(--brand); padding-bottom: 14px; }
.sheet-head .brand { font-size: 20px; }
.sheet-head .sh-meta { margin-inline-start: auto; text-align: end; font-size: 12px; color: var(--muted); }
.sheet h1 { font-size: 22px; color: var(--brand); margin: 16px 0 2px; }
.sheet .sh-sub { color: var(--muted); font-size: 12.5px; }
.sheet-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
.sheet-kpi { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.sheet-kpi .l { font-size: 11px; color: var(--muted); }
.sheet-kpi .v { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
table.rep { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 8px; }
table.rep th, table.rep td { border-bottom: 1px solid #e8ecea; padding: 7px 8px; text-align: start; }
table.rep thead th { background: #f6f9f7; font-size: 11.5px; }
table.rep td.num, table.rep th.num { text-align: end; font-variant-numeric: tabular-nums; }
table.rep tr.total td { background: var(--brand-tint); font-weight: 700; color: var(--brand); border-bottom: none; }
.sheet-foot { margin-top: 18px; display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; border-top: 1px solid var(--line); padding-top: 10px; }
.rep-appendix { margin-top: 22px; }
.rep-appendix h2 { font-size: 14px; margin-bottom: 6px; }

/* ---------- error page ---------- */
.notfound { max-width: 460px; margin: 80px auto; text-align: center; padding: 30px; }
.notfound h1 { color: var(--brand); font-size: 20px; margin-bottom: 8px; }
.notfound p { color: var(--muted); margin-bottom: 18px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .landing-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .wrap { padding: 16px 14px 30px; }
  .topbar-in { padding: 9px 14px; gap: 8px; }
  .brand small { display: none; }
  .topbar-actions .btn span.lbl { display: none; }
  .topbar-actions .btn { width: 38px; padding: 0; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpis { gap: 10px; }
  .kpi .k-value { font-size: 18px; }
  .project-head { padding: 16px; gap: 14px; }
  .budget-box { margin-inline-start: 0; width: 100%; }
  .search input { width: 100%; }
  .search { flex: 1; }
  .toolbar .btn-primary { display: none; }
  .fab { display: flex; }
  .entry { grid-template-columns: 1fr auto; grid-template-areas: 'title total' 'meta actions'; row-gap: 4px; }
  .entry .e-date { grid-area: meta; }
  .entry .e-title { grid-area: title; }
  .entry .e-total { grid-area: total; }
  .entry .e-actions { grid-area: actions; justify-self: end; opacity: 1; }
  .entry .e-qty { display: none; }
  .sheet { padding: 16px 14px 20px; }
  .sheet-kpis { grid-template-columns: repeat(2, 1fr); }
  .modal { max-width: 100%; border-radius: 18px 18px 0 0; align-self: flex-end; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal-actions .btn { height: 46px; }
  .field-row { grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* ---------- print ---------- */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; font-size: 11px; }
  .no-print, .topbar, .fab, .toast-root { display: none !important; }
  .app-shell { padding: 0; }
  .wrap { padding: 0; max-width: none; }
  .sheet { border: none; box-shadow: none; border-radius: 0; padding: 0; max-width: none; }
  .sheet-head { border-bottom: 2px solid #1f4636; }
  table.rep { font-size: 10px; page-break-inside: auto; }
  table.rep tr { page-break-inside: avoid; }
  thead { display: table-header-group; }
  .rep-appendix { page-break-before: always; }
  .sheet-foot { position: fixed; bottom: 0; inset-inline: 0; }
}

/* ---------- auth / login ---------- */
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 28px 16px; background: radial-gradient(120% 80% at 50% 0%, #fdf7ec 0%, #f2e7d4 60%, #eadcc4 100%); }
.login-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px 22px 22px; box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-weight: 700; font-size: 17px; color: var(--brand); }
.login-brand small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.login-brand .brand-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; }
.login-card h1 { font-size: 22px; margin: 0 0 6px; }
.login-card .hint { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.login-card .field { margin-bottom: 12px; }
.login-card .btn-block { margin-top: 8px; height: 46px; }
.login-err { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 18px; }
.login-foot { margin-top: 16px; text-align: center; font-size: 12px; color: var(--muted); }

.user-chip { font-size: 12px; color: var(--ink-2); background: var(--brand-tint); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { .user-chip { display: none; } }

/* ---------- client home ---------- */
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 16px; flex-wrap: wrap; }
.home-head h1 { font-size: 24px; margin: 0; }
.home-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.proj-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: inherit; box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s; }
.proj-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.pc-name { font-weight: 700; font-size: 16px; color: var(--ink); }
.pc-meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.pc-total { font-size: 22px; font-weight: 700; color: var(--brand); margin-top: 12px; }
.pc-total small { font-size: 12px; font-weight: 400; color: var(--muted); }
.pc-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.proj-card .bar { margin-top: 10px; }

/* ---------- admin ---------- */
.admin-new { margin-bottom: 8px; }
.admin-new .field { margin-bottom: 10px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
select { font-family: var(--font); }
.modal-confirm { max-width: 380px; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { filter: brightness(0.95); }

/* ---------- ألوان البنود ---------- */
.cat-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; vertical-align: middle; }
.cat-card .c-name { display: flex; align-items: center; gap: 7px; }
.cat-card .c-bar i { background: var(--cat, var(--brand-3)); }
.cat-card { border-top: 3px solid var(--cat, transparent); }
.cat-card .c-num { background: color-mix(in srgb, var(--cat, var(--brand-3)) 15%, #fff); color: color-mix(in srgb, var(--cat, var(--brand)) 78%, #2a2119); }
.sum td .cat-dot, .rep td .cat-dot { margin-inline-end: 7px; }
.entry .e-notes .cat-dot { margin-inline-end: 5px; }
.cat-head h1 { display: flex; align-items: center; gap: 9px; }
.cat-head .cat-dot { width: 12px; height: 12px; }

/* على الشاشات الكبيرة الزرار العايم مش محتاجينه */
@media (min-width: 900px) { .fab { display: none; } }

/* ---------- تقرير على الموبايل ---------- */
@media (max-width: 620px) {
  .sheet { padding: 14px 10px 18px; }
  .sheet h1 { font-size: 19px; }
  .sheet-kpis { gap: 8px; margin: 14px 0; }
  .sheet-kpi { padding: 8px 9px; }
  .sheet-kpi .v { font-size: 14px; }
  table.rep { font-size: 11px; }
  table.rep th, table.rep td { padding: 6px 4px; }
  table.rep thead th { font-size: 10.5px; }
  table.rep td .cat-dot { width: 7px; height: 7px; margin-inline-end: 4px; }
  .sheet-foot { font-size: 10px; }
}
