@import "../style.css";
/* style.css already imports tokens.css; no direct import needed here. */

/* ============================================================
   app/shell.css — the shared chrome every surface (dashboard,
   absensi, invoice, payroll, kontrak, petugas, klien) sits inside.

   Holds: top bar (agency + clock), nav strip, page container/head,
   footer with the mesindev lockup, and shared table styling for the
   money surfaces. NOTHING surface-specific belongs in this file —
   a surface's own stylesheet holds its own layout.

   Every colour / space / radius / font is a var(--token). No hex.
   Ember (--accent / --sev-kosong) means the worst state and nothing
   else: this file must never use it for chrome, navigation, or
   decoration. No coloured left rules, no state dots, no gradients.
   ============================================================ */

[x-cloak] { display: none !important; }

html, body {
  min-height: 100%;
  background: var(--bg-deep);
}

/* ---- top bar — matches dashboard/dashboard.css's .dp-top ------------- */
/* Kept as a second definition, not a shared class dashboard.css consumes:
   dashboard/index.html already ships this chrome under dp-* names and
   works; this is the copy the six new surfaces build against. Same
   tokens, same rule (max-width:559px stacks agency over clock so the
   name never truncates mid-word), so the two stay visually identical. */

.shell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--margin);
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}

@media (max-width: 559px) {
  .shell-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}

.shell-top__agency {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.shell-top__clock {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  color: var(--muted);
  white-space: nowrap;
}

/* ---- nav strip ---------------------------------------------------------
   ONE destination, not seven. Scrollable on mobile with no visible
   scrollbar chrome; a plain row once it fits (>=960px). Current item is
   carried by weight + ink alone — never a pill, a tinted background, or
   an underline. Encoding "current" a second way (colour dot, left rule)
   is the exact pattern rule 3 in ../../CLAUDE.md forbids: one fact said
   twice reads as machine-made. ------------------------------------------ */

.shell-nav {
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}

.shell-nav__list {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  margin: 0;
  padding: var(--space-2) var(--margin);
  list-style: none;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.shell-nav__list::-webkit-scrollbar { display: none; }

.shell-nav__item { flex: none; }

.shell-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.shell-nav__link[aria-current="page"] {
  font-weight: 700;
  color: var(--ink);
}

@media (hover: hover) {
  .shell-nav__link:hover { color: var(--ink); }
}

@media (min-width: 960px) {
  .shell-nav__list { overflow-x: visible; gap: var(--space-6); }
}

/* ---- page container / head ---------------------------------------------
   A surface's top-of-page heading — not a landing subsection heading
   (.section__h2 in ../style.css already covers that shape). Kept spare:
   a route name and one short line of context, nothing else competes. */

.shell-main {
  padding: var(--space-6) var(--margin) var(--space-16);
}

@media (min-width: 960px) {
  .shell-main { padding-block: var(--space-8) var(--space-24); }
}

.shell-page-head {
  margin-bottom: var(--space-6);
}

.shell-page-head__h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-h1);
  color: var(--ink);
  margin-bottom: var(--space-1);
}

.shell-page-head__sub {
  font-size: var(--text-body);
  color: var(--muted);
  max-width: var(--measure-lead);
}

/* ---- footer — mesindev lockup, matches dashboard/dashboard.css's .dp-foot */

.shell-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-8) var(--margin) var(--space-10);
  border-top: 1px solid var(--border);
  margin-top: var(--space-8);
}

.shell-foot__note {
  font-size: var(--text-small);
  color: var(--faint);
}

.shell-foot__link {
  font-size: var(--text-small);
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (min-width: 960px) {
  .shell-foot {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-6);
  }
}

/* ---- shared table styling — Absensi / Invoice / Payroll -----------------
   One plain table pattern for the three surfaces that read rows as ledger
   lines. Numeric/money columns are right-aligned and set in the mono face,
   because that is functional (columns of digits align), not decorative. */

.shell-table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.shell-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-small);
}

.shell-table th,
.shell-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.shell-table thead th {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--paper);
}

.shell-table tbody tr:last-child td {
  border-bottom: none;
}

.shell-table tfoot td {
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border-top: 1px solid var(--border-strong);
  border-bottom: none;
}

.shell-table td--num,
.shell-table th--num {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) {
  .shell-table tbody tr:hover td { background: var(--paper); }
}
