/* =========================================================
   Dunhill Global — industrial / utilitarian design system
   high-contrast monochrome · sharp type · blueprint diagrams
   ========================================================= */

:root {
  --ink:        #0c0d10;
  --ink-2:      #1a1c20;
  --ink-soft:   #4b5560;
  --ink-mute:   #8a9099;
  --paper:      #f4f3ee;
  --paper-2:    #ecebe4;
  --line:       #d6d3c8;
  --line-2:     #c2bfb3;
  --accent:     #b8422e;   /* signal red — used sparingly */
  --accent-ink: #ff5a3c;

  --font-sans:  'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-disp:  'Space Grotesk', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --max:        84rem;
  --max-narrow: 60rem;
  --rule:       1px solid var(--line);
  --rule-2:     1px solid var(--line-2);
}

*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

.mono { font-family: var(--font-mono); font-size: 0.8em; letter-spacing: 0.02em; }
.dim  { color: var(--ink-mute); }

a { color: inherit; }

/* =========================================================
   TOP BAR
   ========================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: var(--rule);
  backdrop-filter: saturate(140%) blur(8px);
}
.topbar__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
}
.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--ink);
  color: var(--ink);
}
.brand__word {
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.16em;
}
.topnav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.topnav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}
.topnav a:hover, .topnav a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--ink);
  outline: none;
}
.topnav__cta {
  color: var(--ink) !important;
  border: 1px solid var(--ink);
  padding: 0.4rem 0.7rem !important;
}
.topnav__cta:hover, .topnav__cta:focus-visible {
  background: var(--ink);
  color: var(--paper) !important;
  border-bottom-color: var(--ink) !important;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) 1.5rem 0;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
  overflow: hidden;
}
.hero__inner { position: relative; }

.hero__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line-2);
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}
.dot {
  width: 8px; height: 8px;
  background: var(--accent);
  display: inline-block;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

.hero__h1 {
  font-family: var(--font-disp);
  font-size: clamp(2.5rem, 6.5vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
}
.hero__h1 .line {
  display: block;
  background: linear-gradient(to bottom, var(--ink) 60%, var(--ink-soft) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__h1 .line:nth-child(2) { padding-left: 1.5rem; }
.hero__h1 .line:nth-child(4) { padding-left: 1.5rem; color: var(--ink); -webkit-text-fill-color: var(--ink); }

.hero__lede {
  max-width: 36rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin: 0 0 2rem 0;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--ink);
  transition: background 120ms ease, color 120ms ease, transform 120ms ease;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  font-weight: 500;
}
.btn--solid {
  background: var(--ink);
  color: var(--paper);
}
.btn--solid:hover, .btn--solid:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
  outline: none;
}
.btn--ghost:hover, .btn--ghost:focus-visible {
  background: var(--ink);
  color: var(--paper);
  outline: none;
}

.telemetry {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: var(--rule);
  border-bottom: var(--rule);
}
.telemetry__cell {
  padding: 0.85rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-right: var(--rule);
}
.telemetry__cell:last-child { border-right: none; }
.telemetry__cell .mono { font-size: 0.7rem; letter-spacing: 0.08em; }
.telemetry__cell .mono:first-child { color: var(--ink-mute); text-transform: uppercase; }
.telemetry__cell .mono:last-child  { color: var(--ink); }

/* blueprint diagram */
.hero__diagram {
  position: relative;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  align-self: stretch;
  min-height: 480px;
  overflow: hidden;
}
.hero__diagram::before {
  content: "BLUEPRINT · 01";
  position: absolute;
  top: 0.6rem;
  left: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  z-index: 2;
}
.hero__diagram::after {
  content: "DUNHILL GLOBAL · FACILITY SCHEMATIC";
  position: absolute;
  bottom: 0.6rem;
  right: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  z-index: 2;
}
.hero__diagram svg { width: 100%; height: 100%; display: block; }

/* =========================================================
   SECTIONS
   ========================================================= */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) 1.5rem;
  border-top: var(--rule);
}
.section--alt { background: var(--paper-2); border-top: 0; border-bottom: var(--rule); max-width: none; }
.section--alt .section__head { max-width: var(--max); margin: 0 auto 2.5rem; }
.section--alt > * { max-width: var(--max); margin-left: auto; margin-right: auto; }

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.section__index {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.section__h2 {
  font-family: var(--font-disp);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 700;
  max-width: 26ch;
}

/* =========================================================
   SERVICES grid
   ========================================================= */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.card {
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 1.75rem 1.5rem 1.5rem;
  position: relative;
}
.card__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: var(--rule);
}
.card__num {
  width: 28px; height: 28px;
  border: 1px solid var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.card__title {
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.card__list li {
  display: flex;
  align-items: baseline;
  gap: 0.95rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.97rem;
}
.card__list li:last-child { border-bottom: none; }
.card__list .mono { width: 2rem; flex-shrink: 0; }

/* =========================================================
   SYSTEMS grid
   ========================================================= */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--ink);
  border: 1px solid var(--ink);
}
.tile {
  background: var(--paper);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.tile__label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.tile__title {
  font-family: var(--font-disp);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.tile__body {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* =========================================================
   PROCESS
   ========================================================= */
.process {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--ink);
}
.process li {
  padding: 1.5rem 1.25rem;
  border-right: 1px solid var(--ink);
  position: relative;
}
.process li:last-child { border-right: none; }
.process__num {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  text-transform: uppercase;
  display: block;
  margin-bottom: 1.25rem;
  position: relative;
}
.process__num::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.55rem;
  width: 1.5rem;
  height: 1px;
  background: var(--ink);
}
.process__title {
  font-family: var(--font-disp);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.01em;
}
.process__body {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.93rem;
}

/* =========================================================
   CONTACT
   ========================================================= */
.section--contact { padding-bottom: clamp(4rem, 7vw, 6rem); }
.contact {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2.5rem;
}
.contact__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1rem;
  border: 1px solid var(--ink);
  padding: 1.5rem;
  background: var(--paper);
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field--full { grid-column: 1 / -1; }
.field__label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.field input, .field textarea {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line-2);
  background: var(--paper);
  color: var(--ink);
  border-radius: 0;
  transition: border-color 120ms ease;
  font-feature-settings: "tnum";
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ink);
}
.field textarea { resize: vertical; min-height: 6rem; }
.contact__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.contact__note {
  font-size: 0.78rem;
  color: var(--ink-mute);
  transition: color 120ms ease;
}
.contact__note[data-state="ok"] { color: var(--accent); }

.contact__meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 1px solid var(--ink);
  padding-left: 2rem;
}
.meta__row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 0;
  border-bottom: 1px dashed var(--line);
}
.meta__row:last-child { border-bottom: none; }
.meta__row .mono { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; }
.meta__row a { text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 1px; }
.meta__row a:hover { color: var(--accent); border-color: var(--accent); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  border-top: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--paper);
}
.footer__brand .brand__mark {
  border-color: var(--paper);
  color: var(--paper);
}
.footer__brand .brand__word {
  color: var(--paper);
}
.footer__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 2.5rem;
  }
  .hero__diagram { min-height: 380px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .process { grid-template-columns: 1fr 1fr; }
  .process li { border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
  .process li:nth-child(2n) { border-right: none; }
  .process li:nth-last-child(-n+2) { border-bottom: none; }
  .contact { grid-template-columns: 1fr; }
  .contact__meta { border-left: none; padding-left: 0; border-top: 1px solid var(--ink); padding-top: 1rem; }
  .telemetry { grid-template-columns: 1fr 1fr; }
  .telemetry__cell:nth-child(2) { border-right: none; }
  .telemetry__cell:nth-child(-n+2) { border-bottom: var(--rule); }
}
@media (max-width: 620px) {
  .topbar__inner { padding: 0.75rem 1rem; }
  .topnav { gap: 0.9rem; font-size: 0.7rem; }
  .topnav .topnav__cta { padding: 0.35rem 0.55rem !important; }
  .topnav a:not(.topnav__cta) { display: none; }
  .hero__h1 .line:nth-child(2),
  .hero__h1 .line:nth-child(4) { padding-left: 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .process li { border-right: none; border-bottom: 1px solid var(--ink); }
  .process li:last-child { border-bottom: none; }
  .contact__form { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   /inventory page (kept from prior build)
   ========================================================= */
.inv-wrap { max-width: 56rem; }
.inv-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0.75rem; }
.inv-count { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 1.5rem 0; }
table.inv { width: 100%; border-collapse: collapse; margin-top: 1rem; border: 1px solid var(--ink); }
table.inv th, table.inv td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: var(--rule); font-size: 0.95rem; }
table.inv tr:last-child td { border-bottom: none; }
table.inv th { color: var(--ink-soft); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.08em; background: var(--paper-2); }
table.inv td.num { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-block; padding: 0.15rem 0.55rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--ink-soft); }
.pill.ok { color: #0f6b3a; border-color: #bfe0c9; background: #f1faf4; }
.pill.low { color: #8a5a00; border-color: #f0d99a; background: #fdf6e3; }
.pill.out { color: #8a1a1a; border-color: #f0c0c0; background: #fbeced; }
.inv-empty { color: var(--ink-soft); font-style: italic; }
.inv-error { color: #8a1a1a; border: 1px solid #f0c0c0; background: #fbeced; padding: 0.75rem 1rem; }

/* =========================================================
   Mobile (max-width: 768px)
   ========================================================= */
@media (max-width: 768px) {
  body { font-size: 15px; }
  .inv-page { padding: 14px 14px 24px; }
  .inv-page h1 { font-size: 22px; }
  .inv-page .sub { font-size: 13px; margin-bottom: 12px; }

  /* Dashboard tiles: 2-column grid instead of flex row */
  .dash-row { display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
  .dash-tile { padding: 12px 14px; min-height: 64px; }
  .dash-tile .label { font-size: 10px; }
  .dash-tile .value { font-size: 22px; }

  /* Toolbar: stack everything, full-width controls, touch-friendly buttons */
  .toolbar { flex-direction: column; align-items: stretch; gap: 8px; margin-bottom: 16px; }
  .toolbar input,
  .toolbar select,
  .toolbar label { width: 100%; min-width: 0; box-sizing: border-box; }
  .toolbar input[type="checkbox"] { width: auto; min-width: auto; }
  .toolbar > label[style*="cursor: pointer"] { display: flex; justify-content: center; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
  .toolbar > #user-info { margin-left: 0 !important; text-align: right; }

  /* Touch targets: bump button heights to ≥44px */
  button.btn { padding: 12px 16px; min-height: 44px; font-size: 14px; border-radius: 6px; }

  /* Toolbar buttons: full width with comfortable tap targets */
  .toolbar button.btn,
  .toolbar > label.btn { width: 100%; margin: 0; }
  .toolbar > * + button.btn,
  .toolbar > * + .btn { margin-top: 0; }

  /* Table → card layout: scroll container keeps overflow off the page */
  .table-scroll { width: 100%; }
  table.inv { font-size: 14px; }
  table.inv thead { display: none; }
  table.inv, table.inv tbody, table.inv tr, table.inv td { display: block; width: 100%; box-sizing: border-box; }
  table.inv tr {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }
  table.inv tbody { display: block; }
  table.inv td {
    padding: 0;
    border-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 14px;
    line-height: 1.4;
  }
  /* Label pseudo-element from data-label */
  table.inv td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    min-width: 90px;
  }
  table.inv td[data-label="SKU"]::before,
  table.inv td[data-label="Name"]::before,
  table.inv td[data-label="EPC"]::before { min-width: 0; }
  /* Hide low-priority columns on mobile to keep cards compact */
  table.inv td[data-label="Category"],
  table.inv td[data-label="Location"],
  table.inv td[data-label="Last print"],
  table.inv td[data-label="Reads"],
  table.inv td[data-label="Serial"] { display: none; }
  /* Actions: full-width stack of buttons */
  table.inv td.row-actions,
  table.inv td[data-label="Actions"] {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }
  table.inv td.row-actions::before,
  table.inv td[data-label="Actions"]::before { display: none; }
  table.inv td.row-actions .btn,
  table.inv td[data-label="Actions"] .btn { width: 100%; }
  table.inv tr:hover td { background: transparent; }

  /* Pagination: bigger touch targets */
  .pagination { justify-content: space-between; }
  .pagination .btn { padding: 12px 16px; }

  /* Modals: full-screen sheet on mobile */
  .modal-bg.open { align-items: flex-end; }
  .modal {
    width: 100%;
    max-width: 100%;
    border-radius: 12px 12px 0 0;
    padding: 20px 16px 24px;
    max-height: 92vh;
    overflow-y: auto;
  }
  .modal h2 { font-size: 18px; margin-bottom: 8px; }
  .modal label { margin-top: 14px; }
  .modal input, .modal select, .modal textarea { padding: 12px; font-size: 16px; }
  .modal-actions { flex-direction: column-reverse; gap: 8px; }
  .modal-actions .btn { width: 100%; padding: 14px; font-size: 15px; }

  /* Login card: less wasted vertical space */
  .login-card { margin: 24px 0; max-width: 100%; padding: 24px 20px; }
  .login-card input { padding: 14px; font-size: 16px; }
  .login-card .btn { width: 100%; padding: 14px; font-size: 15px; }

  /* Footer: smaller, no big top margin */
  .inv-page + footer,
  body > footer { padding: 16px 14px !important; margin-top: 24px !important; font-size: 11px !important; }
}

/* =========================================================
   /time — Employee kiosk
   ========================================================= */
:root {
  --time-bg:       #e6f1fa;
  --time-card:     #25272c;
  --time-card-2:   #2c2f35;
  --time-text:     #ffffff;
  --time-mute:     #b6bdc6;
  --time-key:      #1b1d22;
  --time-key-hi:   #2a2d34;
  --time-accent:   #3a8efb;
  --time-ok:       #22c55e;
  --time-err:      #ef4444;
}

.time-kiosk {
  min-height: calc(100vh - 60px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  background: var(--time-bg);
}
.time-card {
  background: var(--time-card);
  color: var(--time-text);
  border-radius: 14px;
  padding: 1.75rem 1.5rem 1.25rem;
  width: 100%; max-width: 26rem;
  box-shadow: 0 22px 60px -20px rgba(15,23,42,0.45);
  text-align: center;
}
.time-card__date  { font-size: 1.05rem; color: var(--time-mute); margin: 0.25rem 0 0.5rem; }
.time-card__clock { font-family: var(--font-mono); font-size: 3.25rem; line-height: 1.05; margin: 0 0 1.25rem; letter-spacing: 0.02em; font-weight: 500; }
.time-card__label { font-size: 0.95rem; color: var(--time-mute); margin: 0.25rem 0 0.5rem; }
.time-card__input {
  width: 100%; font-size: 1.4rem; padding: 0.85rem 1rem;
  border: 2px solid var(--time-accent); border-radius: 8px;
  background: #fff; color: var(--ink);
  font-family: var(--font-mono); letter-spacing: 0.08em; text-align: center;
  outline: none;
}
.time-card__input:focus { box-shadow: 0 0 0 4px rgba(58,142,251,0.18); }
.time-card__input[readonly] { background: #f4f4f4; color: var(--ink); }
.time-card__name { margin: 0.5rem 0 0; color: var(--time-mute); min-height: 1.5rem; font-size: 0.95rem; }
.time-card__name strong { color: var(--time-text); }

.time-keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin: 1.25rem auto 0.5rem;
  max-width: 18rem;
}
.time-key {
  background: var(--time-key);
  color: var(--time-text);
  border: none; border-radius: 999px;
  width: 4.25rem; height: 4.25rem;
  margin: 0 auto;
  font-family: var(--font-mono); font-size: 1.5rem;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; user-select: none;
  transition: background 0.12s ease, transform 0.06s ease;
}
.time-key:hover  { background: var(--time-key-hi); }
.time-key:active { transform: scale(0.97); background: var(--time-key-hi); }
.time-key--del   { font-size: 1.05rem; }

.time-actions {
  display: flex; justify-content: space-between;
  gap: 1rem; margin-top: 1.5rem;
}
.time-action {
  background: var(--time-key);
  color: var(--time-text);
  border: none; border-radius: 999px;
  width: 5.5rem; height: 5.5rem;
  font-family: var(--font-mono); font-size: 1.4rem; letter-spacing: 0.12em;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; user-select: none;
  transition: background 0.12s ease, transform 0.06s ease;
}
.time-action:hover  { background: var(--time-key-hi); }
.time-action:active { transform: scale(0.97); }
.time-action--out   { background: var(--time-key); }

.time-toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
  background: var(--time-card); color: var(--time-text);
  padding: 0.85rem 1.25rem; border-radius: 8px;
  font-family: var(--font-mono); font-size: 0.95rem;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.35);
  opacity: 0; transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none; z-index: 100;
}
.time-toast.show { opacity: 1; transform: translate(-50%, -4px); }
.time-toast.ok   { border-left: 4px solid var(--time-ok); }
.time-toast.err  { border-left: 4px solid var(--time-err); }

.time-shake { animation: time-shake 0.35s ease; }
@keyframes time-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

/* =========================================================
   /time-admin — Manager dashboard
   ========================================================= */
:root {
  --card:     #ffffff;
  --text:     #1a1c20;
  --bg:       #fafaf8;
  --muted:    #6b7280;
  --line:     #e5e7eb;
  --line-2:   #d1d5db;
  --accent:   #b8422e;
  --ok-bg:    #d1fae5; --ok-ink:    #065f46;
  --warn-bg:  #fef3c7; --warn-ink:  #92400e;
  --err-bg:   #fee2e2; --err-ink:   #b91c1c;
  --info-bg:  #dbeafe; --info-ink:  #1e40af;
}

.time-admin { max-width: 80rem; margin: 0 auto; padding: 1.25rem 1.5rem 3rem; }
.time-admin__hd { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.time-admin__hd h1 { margin: 0; font-size: 1.6rem; font-weight: 600; letter-spacing: -0.01em; }
.time-admin__hd .sub { color: var(--muted); font-size: 0.9rem; margin: 0; }

.time-admin__lock {
  max-width: 24rem; margin: 6rem auto; padding: 2rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 6px 24px -10px rgba(0,0,0,0.08);
}
.time-admin__lock h2 { margin: 0 0 0.5rem; font-size: 1.25rem; }
.time-admin__lock p  { margin: 0 0 1rem; color: var(--muted); font-size: 0.9rem; }
.time-admin__lock input {
  width: 100%; padding: 0.7rem 0.85rem; font-size: 1rem;
  border: 1px solid var(--line-2); border-radius: 6px; outline: none;
  font-family: var(--font-mono); letter-spacing: 0.05em;
}
.time-admin__lock input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(184,66,46,0.12); }
.time-admin__lock button {
  margin-top: 0.85rem; width: 100%; padding: 0.7rem; font-size: 1rem;
  background: var(--ink, #0c0d10); color: #fff; border: none; border-radius: 6px; cursor: pointer;
  font-family: var(--font-sans);
}
.time-admin__lock button:hover { opacity: 0.92; }
.time-admin__lock .err { color: var(--err-ink); margin-top: 0.6rem; font-size: 0.85rem; min-height: 1.2rem; }

.time-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin: 0 0 1.25rem; overflow-x: auto; }
.time-tab  { padding: 0.7rem 1rem; border: none; background: transparent; cursor: pointer;
             color: var(--muted); font-family: var(--font-sans); font-size: 0.92rem;
             border-bottom: 2px solid transparent; white-space: nowrap; }
.time-tab:hover  { color: var(--text); }
.time-tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

.time-pane { display: none; }
.time-pane.active { display: block; }

.time-toolbar { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.time-toolbar input, .time-toolbar select {
  padding: 0.5rem 0.65rem; font-size: 0.9rem; border: 1px solid var(--line-2); border-radius: 6px;
  background: #fff; font-family: var(--font-sans); outline: none;
}
.time-toolbar input:focus, .time-toolbar select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(184,66,46,0.10); }
.time-toolbar input[type="date"] { font-family: var(--font-mono); }
.time-toolbar button {
  padding: 0.5rem 0.85rem; font-size: 0.9rem; border: 1px solid var(--line-2); background: #fff;
  border-radius: 6px; cursor: pointer; font-family: var(--font-sans);
}
.time-toolbar button:hover { border-color: var(--ink); }
.time-toolbar button.primary { background: var(--ink, #0c0d10); color: #fff; border-color: var(--ink, #0c0d10); }
.time-toolbar button.primary:hover { opacity: 0.92; }
.time-toolbar button.danger { color: var(--err-ink); }
.time-toolbar .spacer { flex: 1; }

.tbl { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tbl th, .tbl td { padding: 0.55rem 0.7rem; text-align: left; font-size: 0.92rem; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: none; }
.tbl th { background: #f9fafb; color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.06em; }
.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.tbl td.actions { white-space: nowrap; text-align: right; }
.tbl .empty { text-align: center; color: var(--muted); padding: 2rem; font-style: italic; }

.tbl-pill { display: inline-block; padding: 0.15rem 0.55rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; border-radius: 999px; border: 1px solid transparent; }
.tbl-pill.ok    { color: var(--ok-ink);   background: var(--ok-bg);   border-color: #a7f3d0; }
.tbl-pill.warn  { color: var(--warn-ink); background: var(--warn-bg); border-color: #fde68a; }
.tbl-pill.err   { color: var(--err-ink);  background: var(--err-bg);  border-color: #fecaca; }
.tbl-pill.info  { color: var(--info-ink); background: var(--info-bg); border-color: #bfdbfe; }
.tbl-pill.mute  { color: var(--muted);    background: #f3f4f6;       border-color: var(--line); }

.icon-btn { display: inline-flex; align-items: center; justify-content: center;
            width: 1.85rem; height: 1.85rem; border: 1px solid var(--line-2); background: #fff;
            border-radius: 6px; cursor: pointer; font-size: 0.85rem; margin-left: 0.25rem;
            color: var(--text); }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn.danger { color: var(--err-ink); }
.icon-btn.ok     { color: var(--ok-ink); }

.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: none; align-items: center; justify-content: center; z-index: 200; padding: 1rem; }
.modal-bg.show { display: flex; }
.modal { background: #fff; border-radius: 10px; width: 100%; max-width: 30rem; padding: 1.5rem; box-shadow: 0 20px 60px -10px rgba(0,0,0,0.4); }
.modal h3 { margin: 0 0 1rem; font-size: 1.1rem; }
.modal label { display: block; margin-top: 0.7rem; font-size: 0.85rem; color: var(--muted); font-family: var(--font-sans); }
.modal input, .modal select, .modal textarea {
  width: 100%; padding: 0.5rem 0.65rem; font-size: 0.95rem; border: 1px solid var(--line-2); border-radius: 6px; outline: none; margin-top: 0.2rem;
  font-family: var(--font-sans);
}
.modal textarea { min-height: 4.5rem; resize: vertical; }
.modal input:focus, .modal select:focus, .modal textarea:focus { border-color: var(--accent); }
.modal .actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1.25rem; }
.modal .actions button { padding: 0.5rem 0.95rem; font-size: 0.92rem; border: 1px solid var(--line-2); background: #fff; border-radius: 6px; cursor: pointer; font-family: var(--font-sans); }
.modal .actions button.primary { background: var(--ink, #0c0d10); color: #fff; border-color: var(--ink, #0c0d10); }

.dash-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.85rem; margin-bottom: 1.25rem; }
.dash-tile { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 0.95rem 1.05rem; }
.dash-tile .label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.dash-tile .value { font-size: 1.6rem; font-weight: 600; margin-top: 0.3rem; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.dash-tile .sub { font-size: 0.78rem; color: var(--muted); margin-top: 0.15rem; }

.notice { padding: 0.75rem 1rem; border-radius: 6px; font-size: 0.88rem; margin-bottom: 1rem; }
.notice.err { background: var(--err-bg); color: var(--err-ink); border: 1px solid #fecaca; }
.notice.info { background: var(--info-bg); color: var(--info-ink); border: 1px solid #bfdbfe; }

@media (max-width: 768px) {
  .time-kiosk { padding: 1rem; min-height: calc(100vh - 50px); }
  .time-card { padding: 1.25rem 1rem 1rem; }
  .time-card__clock { font-size: 2.6rem; }
  .time-key { width: 3.75rem; height: 3.75rem; font-size: 1.3rem; }
  .time-action { width: 5rem; height: 5rem; font-size: 1.25rem; }
  .time-admin { padding: 1rem; }
  .tbl th, .tbl td { padding: 0.4rem 0.5rem; font-size: 0.85rem; }
}
