:root {
  --navy: #1E2A4D;
  --navy-2: #2A3A66;
  --orange: #F26F21;
  --teal: #1F8FB0;
  --bg: #EEF2F7;
  --panel: #FFFFFF;
  --ink: #1A1F2E;
  --muted: #5C6680;
  --line: #D8DEE9;
  --ok: #2D7D46;
  --warn: #C7861A;
  --danger: #C0392B;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(30, 42, 77, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, .display {
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.01em;
  margin: 0 0 0.4em;
  line-height: 1.05;
}

/* ---- top bar ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 1.2rem;
  background: var(--navy); color: #fff;
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 0.55rem; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark {
  font-family: "Barlow Condensed", sans-serif; font-weight: 700;
  background: var(--orange); color: var(--navy);
  padding: 0.15rem 0.5rem; border-radius: 6px; font-size: 1.05rem;
}
.brand-name { font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: 1.3rem; }
.nav { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.nav a, .nav button {
  color: #dfe5f2; background: none; border: none; font: inherit;
  cursor: pointer; padding: 0.35rem 0.6rem; border-radius: 7px; font-size: 0.92rem;
}
.nav a:hover, .nav button:hover { background: rgba(255,255,255,0.12); text-decoration: none; }
.nav .who { color: #aab4cf; font-size: 0.82rem; padding-right: 0.2rem; }

/* ---- layout ---- */
.app { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 1.4rem 1.1rem 2.5rem; }
.footer {
  background: var(--navy); color: #aab4cf; font-size: 0.78rem;
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; justify-content: space-between;
  padding: 0.9rem 1.2rem;
}
.footer a { color: #cdd6ea; }

/* ---- buttons ---- */
.btn {
  font: inherit; font-weight: 600; cursor: pointer;
  border: none; border-radius: 9px; padding: 0.62rem 1.1rem;
  background: var(--orange); color: #fff; transition: filter .12s;
}
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.secondary { background: var(--navy); }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn.small { padding: 0.4rem 0.7rem; font-size: 0.85rem; }

/* ---- cards / panels ---- */
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.2rem 1.3rem; margin-bottom: 1rem;
}
.muted { color: var(--muted); }
.row { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 0.75rem; }

/* ---- job card (ticket aesthetic) ---- */
.jobcard {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 6px solid var(--orange);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1rem 1.15rem; margin-bottom: 0.9rem; cursor: pointer;
  transition: transform .1s, box-shadow .1s;
}
.jobcard:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(30,42,77,0.13); }
.jobcard .jc-top { display: flex; justify-content: space-between; align-items: start; gap: 0.6rem; }
.jobcard .jc-id { font-family: "Barlow Condensed", sans-serif; font-weight: 700; color: var(--navy); font-size: 1.15rem; }
.jobcard .jc-sub { color: var(--muted); font-size: 0.85rem; }
.jobcard .jc-desc { margin: 0.5rem 0 0; color: var(--ink); font-size: 0.95rem; }

/* ---- status badges ---- */
.badge {
  display: inline-block; font-weight: 600; font-size: 0.74rem;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.22rem 0.55rem; border-radius: 999px; white-space: nowrap;
}
.s-submitted   { background: #E6ECF5; color: #3B4A6B; }
.s-reviewed    { background: #E2F0F6; color: #14627D; }
.s-quoted      { background: #FDEBD9; color: #A8530F; }
.s-accepted    { background: #E7F0FB; color: #1D5FB0; }
.s-in_progress { background: #FEF3D6; color: #8A6209; }
.s-delivered   { background: #E2F4E8; color: #1E6B36; }
.s-closed      { background: #E9EDF2; color: #4A5570; }
.s-declined    { background: #FBE4E1; color: #A02C1E; }

/* ---- forms ---- */
label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 0.3rem; color: var(--navy); }
input, select, textarea {
  width: 100%; font: inherit; padding: 0.6rem 0.7rem;
  border: 1.5px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); }
textarea { resize: vertical; min-height: 110px; }
.field + .field { margin-top: 0.85rem; }
.form-narrow { max-width: 460px; }
.err { color: var(--danger); font-size: 0.88rem; }

/* ---- hero / pricing ---- */
.hero { text-align: center; padding: 2rem 0 1rem; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); color: var(--navy); }
.hero .tag { color: var(--orange); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.9rem; }
.hero .lead { color: var(--muted); font-size: 1.12rem; max-width: 620px; margin: 0.5rem auto 1.2rem; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.tier { background: var(--panel); border: 1px solid var(--line); border-top: 5px solid var(--teal); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); }
.tier h3 { color: var(--navy); font-size: 1.5rem; }
.tier .price { font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 1.7rem; color: var(--orange); margin: 0.2rem 0 0.6rem; }
.tier ul { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.92rem; }
.tier li { margin-bottom: 0.3rem; }

/* ---- timeline ---- */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1rem 1.1rem; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--teal); border: 2px solid #fff;
}
.timeline .tl-when { color: var(--muted); font-size: 0.8rem; }
.timeline .tl-note { margin: 0.15rem 0 0; }

/* ---- toast ---- */
.toast {
  position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%) translateY(2rem);
  background: var(--navy); color: #fff; padding: 0.7rem 1.1rem; border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; max-width: 90vw; font-size: 0.92rem; z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--danger); }

table.kv { border-collapse: collapse; width: 100%; }
table.kv td { padding: 0.3rem 0.5rem 0.3rem 0; vertical-align: top; font-size: 0.95rem; }
table.kv td.k { color: var(--muted); width: 130px; }

.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.spinner { text-align: center; color: var(--muted); padding: 2rem; }
