/* ============================================================================
   base.css — tokens, reset, typography, form controls, small utilities
   Design direction: workshop steel + hazard amber, sharp corners (3px),
   part numbers and prices set in mono with tabular figures.
   ========================================================================= */
@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn.f6d31671339d.woff2") format("woff2-variations"),
       url("/static/fonts/Vazirmatn.f6d31671339d.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink:        #15191c;
  --steel-900:  #1a2024;
  --steel-800:  #242c31;
  --steel-700:  #38434a;
  --steel-500:  #6c7a82;
  --steel-300:  #aab4ba;
  --steel-150:  #d9dedf;
  --steel-100:  #e7eaea;
  --paper:      #f3f5f4;
  --white:      #ffffff;

  --amber:      #f0a500;
  --amber-deep: #b87a00;
  --amber-wash: #fff6e0;

  --ok:   #2c7a4b;
  --low:  #b8681e;
  --gone: #a33a2a;

  --r:    3px;
  --r-lg: 6px;
  --line: 1px solid var(--steel-150);
  --shadow: 0 1px 2px rgba(21,25,28,.06), 0 10px 30px -22px rgba(21,25,28,.55);
  --wrap: min(1280px, 94vw);
  --bottom-nav: 62px;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, "Courier New", "Vazirmatn", monospace;
}

* { box-sizing: border-box; }
/* Any rule with a display value beats the [hidden] attribute, which is how the
   login modal ended up showing both steps at once. Settle it once, globally. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink); overflow-x: hidden;
  font-family: "Vazirmatn", Tahoma, system-ui, sans-serif;
  font-size: 15px; line-height: 1.75;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
h1, h2, h3, h4 { letter-spacing: -.02em; }

.wrap { width: var(--wrap); margin-inline: auto; }
main.wrap { padding-block: 24px 40px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.muted { color: var(--steel-500); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--r); border: 1px solid var(--steel-800);
  background: var(--steel-800); color: var(--white); cursor: pointer; font-weight: 500; }
.btn:hover { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.btn.ghost { background: var(--white); color: var(--steel-800); }
.btn.ghost:hover { background: var(--steel-800); color: var(--white); }
.btn.amber { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.btn-link { background: none; border: 0; color: var(--amber-deep); cursor: pointer; text-decoration: underline; }
.icon-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border: var(--line);
  border-radius: var(--r); background: var(--white); cursor: pointer; font-size: .85rem; white-space: nowrap; }
.icon-btn:hover { border-color: var(--steel-800); }
.icon-btn.solid { background: var(--steel-900); color: var(--white); border-color: var(--steel-900); }
.icon-btn.solid:hover { background: var(--amber); color: var(--ink); border-color: var(--amber); }

/* forms + tables */
input[type="text"], input[type="search"], input[type="tel"], input[type="number"],
input[type="email"], select, textarea {
  padding: 9px 11px; border: var(--line); border-radius: var(--r); background: var(--white); width: 100%;
}
.form-card { display: grid; gap: 12px; max-width: 560px; background: var(--white); border: var(--line);
  border-radius: var(--r); padding: 18px; }
.card-panel { background: var(--white); border: var(--line); border-radius: var(--r); padding: 18px; }
.table { width: 100%; border-collapse: collapse; background: var(--white); }
.table th, .table td { border: var(--line); padding: 9px 11px; text-align: start; font-size: .9rem; }
.table th { background: var(--paper); font-weight: 600; }

.alert { padding: 11px 15px; border-radius: var(--r); margin: 10px 0; background: var(--white);
  border-inline-start: 3px solid var(--steel-500); }
.alert-success { border-inline-start-color: var(--ok); }
.alert-error { border-inline-start-color: var(--gone); }
.alert-info { border-inline-start-color: var(--amber); }
.empty-state { text-align: center; padding: 56px 0; }
.pagination { display: flex; gap: 12px; justify-content: center; align-items: center; margin: 26px 0; font-size: .88rem; }
.pagination a { padding: 7px 14px; border: var(--line); border-radius: var(--r); background: var(--white); }
.pagination a:hover { border-color: var(--steel-800); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
