/* ============================================================
   PCG FLEET - DESIGN SYSTEM
   Cream / editorial / brutalist-minimal
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Hind+Siliguri:wght@400;500;600;700&family=Hind:wght@400;500;600;700&display=swap');

:root {
  /* Palette */
  --cream:        #F0EDE3;
  --cream-soft:   #E8E4D8;
  --cream-deep:   #DDD8C8;
  --ink:          #1A1A1A;
  --ink-soft:     #3A3A3A;
  --muted:        #6B6B6B;
  --muted-soft:   #9B9B9B;
  --rust:         #C8472A;
  --rust-deep:    #A93820;
  --rust-soft:    rgba(200, 71, 42, 0.08);
  --teal:         #0d8a7d;
  --green:        #2D6A3E;
  --green-soft:   rgba(45, 106, 62, 0.08);
  --amber:        #B8830F;
  --amber-soft:   rgba(184, 131, 15, 0.08);

  /* Typography */
  --font-sans:    'Manrope', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
  --font-bn:      'Hind Siliguri', 'Manrope', system-ui, sans-serif;
  --font-ne:      'Hind', 'Manrope', system-ui, sans-serif;

  /* Spacing */
  --r-sm: 4px;
  --r-md: 6px;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0,
    transparent 10px,
    rgba(0,0,0,0.025) 10px,
    rgba(0,0,0,0.025) 11px
  );
  line-height: 1.5;
  min-height: 100vh;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
body[lang="bn"] { font-family: var(--font-bn); }
body[lang="ne"] { font-family: var(--font-ne); }

button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ============================================================
   TYPOGRAPHY HELPERS
   ============================================================ */
.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.uppercase { text-transform: uppercase; letter-spacing: 0.08em; }
.tracked { letter-spacing: 0.12em; }

.h1 { font-size: 32px; font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; }
.h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.005em; }
.h3 { font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.eyebrow { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.15em; text-transform: uppercase; }
.label { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--ink); letter-spacing: 0.1em; text-transform: uppercase; }

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }
.divider { border: none; border-top: 1px dashed var(--ink); margin: 20px 0; }
.divider-soft { border-top: 1px dashed var(--muted-soft); }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row-tight { display: flex; gap: 6px; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-tight { display: flex; flex-direction: column; gap: 6px; }
.center { display: flex; align-items: center; justify-content: center; }

.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 800px) { .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .grid-2, .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: 1fr; } }

/* ============================================================
   CARD - the signature offset shadow look
   ============================================================ */
.card {
  background: var(--cream);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 24px;
  position: relative;
}
.card.flat { box-shadow: none; }
.card.tight { padding: 16px; }
.card.snug { padding: 12px; }
.card-body { padding: 20px; }
.card-section { padding: 16px 20px; border-bottom: 1px dashed var(--ink); }
.card-section:last-child { border-bottom: 0; }

/* ============================================================
   STAMP / BADGE
   ============================================================ */
.stamp {
  position: absolute;
  border: 2px solid var(--rust);
  color: var(--rust);
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--cream);
  transform: rotate(8deg);
}
.stamp.tr { top: -10px; right: -10px; }
.stamp.green { color: var(--green); border-color: var(--green); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px;
  border: 1.5px solid var(--ink);
  background: var(--cream);
}
.pill.green { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.pill.rust { border-color: var(--rust); color: var(--rust); background: var(--rust-soft); }
.pill.amber { border-color: var(--amber); color: var(--amber); background: var(--amber-soft); }
.pill.muted { border-color: var(--muted); color: var(--muted); }
.pill.solid { background: var(--ink); color: var(--cream); }
.pill::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.no-dot::before { display: none; }

/* ============================================================
   BUTTON
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--rust);
  color: var(--cream);
  border: 2px solid var(--ink);
  padding: 12px 22px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}
.btn:hover { transform: translate(1px, 1px); }
.btn-shadow { box-shadow: 4px 4px 0 var(--ink); }
.btn-shadow:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn-shadow:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn.ghost { background: var(--cream); color: var(--ink); }
.btn.green { background: var(--green); }
.btn.dark { background: var(--ink); }
.btn.sm { padding: 8px 14px; font-size: 11px; }
.btn.icon-only { padding: 10px; min-width: 40px; }
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn-link {
  background: none; border: none; padding: 0; font-weight: 600;
  font-size: 13px; color: var(--ink); text-decoration: underline;
  cursor: pointer; text-transform: none; letter-spacing: 0;
}
.btn-link:hover { color: var(--rust); }

/* ============================================================
   FORMS
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--ink); letter-spacing: 0.1em; text-transform: uppercase; }
.input,
.select,
.textarea {
  background: var(--cream);
  border: 2px solid var(--ink);
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  width: 100%;
  outline: none;
  transition: background 0.15s;
}
.input:focus, .select:focus, .textarea:focus { background: #fff; }
.input.mono, .select.mono { font-family: var(--font-mono); font-size: 13px; }
.textarea { resize: vertical; min-height: 80px; }

.checkbox { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 8px 0; user-select: none; }
.checkbox input { appearance: none; width: 18px; height: 18px; border: 2px solid var(--ink); background: var(--cream); cursor: pointer; position: relative; flex-shrink: 0; }
.checkbox input:checked { background: var(--rust); }
.checkbox input:checked::after { content: 'OK'; color: var(--cream); position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 13px; font-weight: 800; }
.checkbox-label { font-size: 14px; }

.helper { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: 4px; }
.error-msg { font-family: var(--font-mono); font-size: 12px; color: var(--rust); margin-top: 6px; }

/* ============================================================
   TABS / NAV
   ============================================================ */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--ink);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 12px 18px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: none;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  display: flex; align-items: center; gap: 6px;
}
.tab.active { color: var(--ink); border-bottom-color: var(--rust); }
.tab:hover:not(.active) { color: var(--ink-soft); }

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
  border-bottom: 2px solid var(--ink);
  background: var(--cream);
  position: sticky;
  top: 0; z-index: 50;
}
.app-header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 0;
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.brand-name { font-weight: 800; font-size: 18px; line-height: 1; }
.brand-tag { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: 0.15em; text-transform: uppercase; margin-top: 2px; }

.app-nav {
  border-bottom: 2px solid var(--ink);
  background: var(--cream);
  position: sticky; top: 65px; z-index: 49;
}
.app-nav-inner { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; }
.app-nav-inner::-webkit-scrollbar { display: none; }
.nav-item {
  padding: 14px 20px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.nav-item.active { color: var(--ink); border-bottom-color: var(--rust); }
.nav-item:hover:not(.active) { color: var(--ink-soft); }

/* Lang toggle */
.lang-toggle {
  display: inline-flex; border: 2px solid var(--ink); background: var(--cream);
  overflow: hidden;
}
.lang-toggle button {
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em;
  background: var(--cream);
  color: var(--ink);
  border: none;
  cursor: pointer;
  border-right: 2px solid var(--ink);
}
.lang-toggle button:last-child { border-right: none; }
.lang-toggle button.active { background: var(--ink); color: var(--cream); }

/* User chip */
.user-chip { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1.5px solid var(--ink); }
.user-avatar { width: 28px; height: 28px; background: var(--rust); color: var(--cream); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 11px; border-radius: 4px; }
.user-info { line-height: 1.2; }
.user-name { font-size: 12px; font-weight: 700; }
.user-meta { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat {
  background: var(--cream);
  border: 2px solid var(--ink);
  padding: 16px;
  position: relative;
}
.stat-label { font-family: var(--font-mono); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 8px; }
.stat-value { font-size: 36px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.stat-value.green { color: var(--green); }
.stat-value.rust { color: var(--rust); }
.stat-value.amber { color: var(--amber); }
.stat-value.red { color: #b03030; }

/* Inventory module */
.inv-table th {
  text-align: left; padding: 12px 14px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  border-bottom: 2px solid var(--ink); background: rgba(0,0,0,0.02);
}
.inv-table td { padding: 14px; border-bottom: 1px dashed #ccc; font-size: 14px; }
.inv-table tr:hover { background: rgba(200,71,42,0.04); }
.inv-table tr.low { background: rgba(255,180,0,0.06); }
.inv-table tr.low:hover { background: rgba(255,180,0,0.12); }
.inv-table tr.out { background: rgba(176,48,48,0.06); }
.inv-table tr.out:hover { background: rgba(176,48,48,0.12); }
.inv-table tr:last-child td { border-bottom: none; }

.pill-ok  { background: #dff5e3; color: var(--green); border-color: var(--green); }
.pill-low { background: #fff4d8; color: var(--amber); border-color: var(--amber); }
.pill-out { background: #ffe0e0; color: #b03030;     border-color: #b03030; }

/* View toggle (list/calendar) */
.view-toggle { display: flex; border: 2px solid var(--ink); width: fit-content; }
.view-toggle button { font-family: var(--font-mono); font-size: 12px; font-weight: 700; padding: 8px 16px; background: var(--cream); border: none; cursor: pointer; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink); }
.view-toggle button.active { background: var(--ink); color: var(--cream); }

/* Calendar */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); border-left: 1.5px solid var(--ink); border-top: 1.5px solid var(--ink); }
.cal-dow { font-family: var(--font-mono); font-size: 10px; font-weight: 700; text-transform: uppercase; text-align: center; padding: 6px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); background: var(--ink); color: var(--cream); }
.cal-cell { min-height: 78px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); padding: 4px; background: #fff; }
.cal-cell.other { background: #ece8da; }
.cal-daynum { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.cal-event { font-family: var(--font-mono); font-size: 9px; padding: 2px 4px; margin-top: 2px; color: #fff; font-weight: 700; border-radius: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
@media (max-width: 600px) {
  .cal-cell { min-height: 54px; }
  .cal-event { font-size: 7px; padding: 1px 2px; }
}

/* Service status tags */
.status-tag { font-family: var(--font-mono); font-size: 11px; font-weight: 700; padding: 3px 10px; border: 1px solid; letter-spacing: 0.05em; white-space: nowrap; }
.status-tag.tag-ok { color: var(--green); border-color: var(--green); background: #dff5e3; }
.status-tag.tag-soon { color: var(--amber); border-color: var(--amber); background: #fff4d8; }
.status-tag.tag-overdue { color: #b03030; border-color: #b03030; background: #ffe0e0; }

@media (max-width: 700px) {
  .inv-table th:nth-child(2), .inv-table td:nth-child(2) { display: none; }
}
.stat-icon { position: absolute; top: 14px; right: 14px; opacity: 0.4; }

/* ============================================================
   STATUS & EVENT COLORS
   ============================================================ */
.status-installed { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.status-in_repair { color: var(--amber); border-color: var(--amber); background: var(--amber-soft); }
.status-available { color: var(--ink); border-color: var(--ink); background: var(--cream-soft); }
.status-retired { color: var(--muted); border-color: var(--muted); background: rgba(0,0,0,0.04); }

.event-sent { border-left-color: var(--amber); background: var(--amber-soft); }
.event-received { border-left-color: var(--green); background: var(--green-soft); }
.event-installed { border-left-color: var(--rust); background: var(--rust-soft); }
.event-removed { border-left-color: var(--ink); background: var(--cream-soft); }
.event-registered { border-left-color: var(--muted); background: rgba(0,0,0,0.03); }

/* ============================================================
   PART CARD (grid item)
   ============================================================ */
.part-card {
  background: var(--cream);
  border: 2px solid var(--ink);
  padding: 16px;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s;
  display: flex; flex-direction: column; gap: 10px;
  text-align: left;
}
.part-card:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.part-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.part-icon {
  width: 44px; height: 44px;
  background: var(--ink); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px;
  border-radius: 6px;
  flex-shrink: 0;
}
.part-id { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--rust); letter-spacing: 0.05em; }
.part-name { font-weight: 700; font-size: 15px; line-height: 1.3; }
.part-serial { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.part-meta {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; padding-top: 10px;
  border-top: 1px dashed var(--ink);
}
.part-meta-cell { line-height: 1.2; }
.part-meta-cell .label { display: block; margin-bottom: 2px; font-size: 10px; color: var(--muted); }
.part-meta-cell .value { font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.part-card-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; border-top: 1px dashed var(--ink); margin-top: 4px; }

/* ============================================================
   TABLE
   ============================================================ */
.tbl { width: 100%; border-collapse: collapse; }
.tbl thead th {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  text-align: left; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 12px 14px;
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  background: var(--cream-soft);
}
.tbl tbody td { padding: 12px 14px; border-bottom: 1px dashed var(--ink); font-size: 13px; vertical-align: middle; }
.tbl tbody tr { cursor: pointer; transition: background 0.1s; }
.tbl tbody tr:hover { background: rgba(0,0,0,0.03); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl-wrap { overflow-x: auto; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline { position: relative; padding-left: 32px; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--ink); border-left: 2px dashed var(--ink); border-color: var(--ink); }
.timeline-item { position: relative; margin-bottom: 16px; }
.timeline-dot {
  position: absolute; left: -32px; top: 0;
  width: 24px; height: 24px;
  border: 2px solid var(--ink);
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  border-radius: 50%;
  z-index: 2;
}
.timeline-dot.green { background: var(--green); color: var(--cream); }
.timeline-dot.rust { background: var(--rust); color: var(--cream); }
.timeline-dot.amber { background: var(--amber); color: var(--cream); }
.timeline-dot.dark { background: var(--ink); color: var(--cream); }
.timeline-card { background: var(--cream); border: 2px solid var(--ink); padding: 14px; }
.timeline-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.timeline-meta-item { display: flex; align-items: center; gap: 4px; }

/* ============================================================
   QR
   ============================================================ */
.qr-frame {
  display: inline-block;
  background: #fff;
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 18px;
  position: relative;
}
.qr-frame .qr-tag-top, .qr-frame .qr-tag-bottom {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.15em;
  padding: 3px 10px;
}
.qr-frame .qr-tag-top { top: -12px; background: var(--rust); color: var(--cream); }
.qr-frame .qr-tag-bottom { bottom: -12px; background: var(--ink); color: var(--cream); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(26, 26, 26, 0.72);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
.modal {
  background: var(--cream);
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  width: 100%; max-width: 560px;
  position: relative;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 2px solid var(--ink); }
.modal-title { font-size: 18px; font-weight: 800; }
.modal-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--ink); cursor: pointer; font-weight: 800; }
.modal-close:hover { background: var(--ink); color: var(--cream); }
.modal-body { padding: 22px; }
.modal-foot { display: flex; gap: 10px; padding: 16px 22px; border-top: 2px solid var(--ink); }
.modal-foot .btn { flex: 1; }

/* ============================================================
   TOAST
   ============================================================ */
.toast-host { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast {
  background: var(--cream);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  animation: toast-in 0.25s ease;
}
.toast.success { border-color: var(--green); color: var(--green); box-shadow: 4px 4px 0 var(--green); }
.toast.error { border-color: var(--rust); color: var(--rust); box-shadow: 4px 4px 0 var(--rust); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-shell {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-card {
  background: var(--cream);
  border: 2px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  width: 100%; max-width: 460px;
  padding: 36px 32px 28px;
  position: relative;
}
.login-logo {
  width: 96px; height: 96px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.login-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.login-title { text-align: center; font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.login-version { text-align: center; font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.18em; margin-bottom: 24px; text-transform: uppercase; }
.login-field { margin-bottom: 16px; }
.login-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--ink); }
.login-default { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.login-default strong { color: var(--ink); }

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.search-bar .input { flex: 1; min-width: 200px; }
.filter-group { display: flex; gap: 0; border: 2px solid var(--ink); }
.filter-btn {
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  border: none; background: var(--cream); color: var(--ink);
  cursor: pointer;
  border-right: 2px solid var(--ink);
}
.filter-btn:last-child { border-right: none; }
.filter-btn.active { background: var(--ink); color: var(--cream); }

/* ============================================================
   ATTACHMENTS / PHOTOS
   ============================================================ */
.attach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.attach-item {
  border: 2px solid var(--ink);
  background: var(--cream);
  padding: 6px;
  position: relative;
}
.attach-item img { width: 100%; height: 100px; object-fit: cover; }
.attach-name { font-family: var(--font-mono); font-size: 10px; color: var(--muted); padding: 4px 0 0; word-break: break-all; }
.attach-pdf { background: var(--rust); color: var(--cream); height: 100px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 24px; }

/* ============================================================
   FOOTER
   ============================================================ */
.app-footer {
  border-top: 2px solid var(--ink);
  margin-top: auto;
  padding: 16px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.app-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ============================================================
   UTILITIES
   ============================================================ */
.hidden { display: none !important; }
.text-muted { color: var(--muted); }
.text-rust { color: var(--rust); }
.text-green { color: var(--green); }
.text-amber { color: var(--amber); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
.no-print { }
@media print {
  body { background: #fff; }
  body::before { display: none; }
  .no-print, .app-header, .app-nav, .app-footer, .modal-backdrop, .toast-host { display: none !important; }
  .card { box-shadow: none; border-color: #000; }
  .btn { display: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .h1 { font-size: 26px; }
  .h2 { font-size: 18px; }
  .stat-value { font-size: 28px; }
  .container { padding: 0 14px; }
  .card { padding: 18px; }
  .login-card { padding: 28px 22px; box-shadow: 6px 6px 0 var(--ink); }
  .modal { box-shadow: 6px 6px 0 var(--ink); }
}
