/* Tech Station Console — the approved design (2026-11-11). */
:root {
  --ink: #0F172A;
  --ink-2: #334058;
  --muted: #556079;
  --faint: #6B7489;
  --line: #E3E7EF;
  --line-2: #EEF1F6;
  --ground: #F4F6FA;
  --card: #FFFFFF;
  --side: #0E1322;
  --side-2: #161D31;
  --side-on: #1E2742;
  --side-ink: #C8CFDF;
  --accent: #3355FF;
  --accent-ink: #2446E8;
  --ok-bg: #E7F6EC; --ok: #116430; --ok-dot: #16A34A;
  --warn-bg: #FFF2DC; --warn: #7A4300; --warn-dot: #E08A00;
  --bad-bg: #FDE9E9; --bad: #A11A1A; --bad-dot: #DC2626;
  --idle-bg: #EEF1F6; --idle: #4A5468; --idle-dot: #8A93A6;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  color: var(--ink);
  background: var(--ground);
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: #1A33B0; }
h1, h2, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.latin { font-family: system-ui, sans-serif; }

/* Shell: side menu + content; the menu stacks on a phone. */
.shell { min-height: 100vh; display: flex; flex-wrap: wrap; align-items: stretch; }
.side {
  flex: 1 1 248px; max-width: 100%;
  background: var(--side); color: var(--side-ink);
  display: flex; flex-direction: column; gap: 28px; padding: 28px 18px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
  font-family: system-ui, sans-serif; letter-spacing: .5px;
}
.brand-name { color: #fff; font-weight: 700; font-size: 16px; font-family: system-ui, sans-serif; }
.brand-sub { font-size: 12px; color: #8E98B0; }
.brand > div { display: flex; flex-direction: column; gap: 2px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px;
  border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--side-ink);
}
.nav a:hover { background: #172038; color: #fff; }
.nav a[aria-current="page"] { background: var(--side-on); color: #fff; }
.nav .dot { width: 8px; height: 8px; border-radius: 4px; background: #3A4560; }
.nav a[aria-current="page"] .dot { background: var(--accent); }
.me { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 12px; background: var(--side-2); }
.me-row { display: flex; align-items: center; gap: 10px; }
.me-avatar { width: 36px; height: 36px; border-radius: 18px; background: #26304A; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.me-name { color: #fff; font-weight: 600; font-size: 14px; }
.me-role { font-size: 12px; color: #8E98B0; }
.me-2fa { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #7BD9A2; }
.me form { margin: 0; }
.btn-side {
  width: 100%; height: 40px; border: 1px solid #2A3550; border-radius: 10px; background: transparent;
  color: var(--side-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.btn-side:hover { background: #1B2338; color: #fff; }

.main { flex: 999 1 560px; min-width: 0; padding: 32px 40px 48px; display: flex; flex-direction: column; gap: 28px; }
@media (max-width: 640px) { .main { padding: 24px 16px 40px; } }

.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.page-head > div { display: flex; flex-direction: column; gap: 6px; }
.page-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -.2px; }
.page-head p { font-size: 14px; color: var(--muted); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.card-pad { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.card h2, .section-title { font-size: 18px; font-weight: 700; }
.note { font-size: 13px; color: var(--muted); line-height: 1.7; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi-value { font-size: 30px; font-weight: 700; letter-spacing: -.5px; }
.kpi-note { font-size: 12px; color: var(--faint); }

.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.project { padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.project-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project-id { display: flex; align-items: center; gap: 12px; }
.project-id > div { display: flex; flex-direction: column; gap: 3px; }
.project-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; background: #E9EDFF; color: var(--accent-ink); }
.project-icon.alt { background: #E6F5F1; color: #0B6B55; }
.project-name { font-size: 17px; font-weight: 700; }
.project-kind { font-size: 13px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 12px; background: #F6F8FB; border-radius: 10px; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 18px; font-weight: 700; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 4px; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.ok::before { background: var(--ok-dot); }
.pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.warn::before { background: var(--warn-dot); }
.pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.bad::before { background: var(--bad-dot); }
.pill.idle { background: var(--idle-bg); color: var(--idle); } .pill.idle::before { background: var(--idle-dot); }

.split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.split > .wide { flex: 999 1 640px; min-width: 0; }
.split > .narrow { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

.table-box { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: right; color: var(--muted); font-size: 12px; font-weight: 600; padding: 12px; }
td { padding: 14px 12px; border-top: 1px solid var(--line-2); }
th:first-child, td:first-child { padding-inline-start: 22px; }
th:last-child, td:last-child { padding-inline-end: 22px; }
.cell-sub { font-size: 12px; color: var(--faint); }
.cell-main { font-weight: 600; }
.cell-stack { display: flex; flex-direction: column; gap: 2px; }
.empty { padding: 28px 22px; text-align: center; color: var(--faint); font-size: 14px; }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.timeline li { display: flex; gap: 12px; align-items: flex-start; }
.timeline .bullet { width: 8px; height: 8px; border-radius: 4px; background: var(--accent); margin-top: 8px; flex: none; }
.timeline li > div { display: flex; flex-direction: column; gap: 2px; }
.timeline .what { font-size: 14px; line-height: 1.6; }
.timeline .when { font-size: 12px; color: var(--faint); }

.person { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 16px 22px; border-top: 1px solid var(--line-2); }
.avatar { width: 44px; height: 44px; border-radius: 22px; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; background: #E9EDFF; color: var(--accent-ink); }
.person-main { flex: 1 1 220px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.person-name { font-size: 15px; font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.role-tag { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 12px; background: #EEF1F6; color: var(--ink-2); }
.role-tag.owner { background: var(--ink); color: #fff; }
.person-side { flex: 1 1 200px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.ok-text { color: var(--ok); font-weight: 600; }
.bad-text { color: var(--bad); font-weight: 600; }
.yes { color: var(--ok-dot); }
.no { display: inline-block; width: 14px; height: 2px; background: #B5BDCC; vertical-align: middle; }
td.mid, th.mid { text-align: center; }

.btn { height: 44px; padding: 0 18px; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary { border: 0; background: var(--accent); color: #fff; }
.btn-primary:hover { background: #2446E8; }
.btn-plain { border: 1px solid #DCE1EA; background: #fff; color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Sign-in */
.auth { min-height: 100vh; background: var(--side); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 48px 16px; }
.auth .brand { padding: 0; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.auth-card h1 { font-size: 22px; font-weight: 700; }
.auth-card p { font-size: 14px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input {
  height: 48px; border: 1px solid #DCE1EA; border-radius: 12px; padding: 0 14px;
  font: inherit; font-size: 15px; color: var(--ink); background: #fff;
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field input.ltr { direction: ltr; text-align: right; }
.field input.code { direction: ltr; text-align: center; font-size: 24px; font-weight: 700; letter-spacing: 10px; height: 56px; }
.field-hint { font-size: 12px; font-weight: 400; color: var(--faint); }
.auth-card .btn-primary { height: 50px; font-size: 16px; font-weight: 700; }
.alert { padding: 12px 14px; border-radius: 12px; background: var(--bad-bg); color: var(--bad); font-size: 14px; font-weight: 600; }
.secure-note { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 12px; background: var(--ground); font-size: 12px; color: var(--ink-2); line-height: 1.7; }
.copyright { font-size: 12px; color: #8E98B0; }
.brand-name.big { font-size: 20px; }
.stack-6 { display: flex; flex-direction: column; gap: 6px; }
.secure-note svg { flex: none; margin-top: 2px; }
.stack-14{display:flex;flex-direction:column;gap:14px}
