/* ═══════════════════════════════════════════════
   HoldCrew v3 — Design System
   Shared by all PM tool pages
═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Mono:wght@400;500&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300&display=swap');

/* ─── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Tokens ─────────────────────────────────── */
:root {
  --bg:            #0a0a0a;
  --surface:       #111111;
  --surface-mid:   #161616;
  --surface-raised:#1c1c1c;
  --border:        #2a2a2a;
  --border-inner:  #1e1e1e;
  --amber:         #f5a623;
  --amber-dim:     #c47f00;
  --text:          #e0e0e0;
  --subtle:        #888;
  --muted:         #555;
  --dim:           #333;
  --green:         #3ecf70;
  --red:           #e05c5c;

  --font-display:  'Bebas Neue', Impact, sans-serif;
  --font-mono:     'DM Mono', Consolas, monospace;
  --font-body:     'DM Sans', Helvetica, Arial, sans-serif;

  --radius:        6px;
  --radius-lg:     10px;
}

/* ─── Base ───────────────────────────────────── */
html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; }

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Job Header (top nav bar) ───────────────── */
.job-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1.5rem;
  height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.job-header__home {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--subtle);
  white-space: nowrap;
  flex-shrink: 0;
}
.job-header__home:hover { color: var(--amber); text-decoration: none; }

.job-header__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex-shrink: 0;
}
.job-header__name {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.job-header__date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--subtle);
}

.job-header__nav {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.job-header__nav::-webkit-scrollbar { display: none; }

.job-header__link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--subtle);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.job-header__link:hover { color: var(--text); background: var(--surface-raised); text-decoration: none; }
.job-header__link--active { color: var(--amber); background: var(--surface-raised); }

/* ─── Page shell ─────────────────────────────── */
.page { max-width: 900px; margin: 0 auto; padding: 2rem 1.5rem; }
.page--wide { max-width: 1100px; }
.page--narrow { max-width: 640px; }

.page-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
}

/* ─── Cards ──────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
}
.card + .card { margin-top: 1rem; }

.card__title {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.06em;
  color: var(--amber);
  margin-bottom: 0.75rem;
}

/* ─── Stage pipeline (job dashboard) ────────── */
.stages {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
}
.stage {
  flex: 1;
  padding: 1rem 0.75rem;
  background: var(--surface);
  border-right: 1px solid var(--border);
  text-align: center;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.stage:last-child { border-right: none; }
.stage:hover { background: var(--surface-raised); }
.stage--active { background: var(--surface-raised); }

.stage__label {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--text);
}
.stage__status {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--subtle);
}
.stage--done .stage__label { color: var(--green); }
.stage--done .stage__status { color: var(--green); opacity: 0.7; }

/* ─── Status badges ──────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  border: 1px solid;
}
.badge--pending  { color: var(--subtle);  border-color: var(--border); background: transparent; }
.badge--active   { color: var(--amber);   border-color: var(--amber-dim); background: rgba(245,166,35,0.07); }
.badge--done     { color: var(--green);   border-color: rgba(62,207,112,0.3); background: rgba(62,207,112,0.07); }
.badge--warning  { color: #e09a3e;        border-color: rgba(224,154,62,0.3); background: rgba(224,154,62,0.07); }

/* ─── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--amber); color: var(--amber); background: rgba(245,166,35,0.06); text-decoration: none; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn--primary {
  background: var(--amber);
  border-color: var(--amber);
  color: #000;
  font-weight: 600;
}
.btn--primary:hover { background: #e09520; border-color: #e09520; color: #000; }

.btn--danger { border-color: var(--red); color: var(--red); }
.btn--danger:hover { background: rgba(224,92,92,0.08); }

.btn--lg { font-size: 14px; padding: 0.8rem 1.75rem; }
.btn--sm { font-size: 11px; padding: 0.4rem 0.85rem; }

/* ─── Forms ──────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field + .field { margin-top: 1rem; }

.field__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--subtle);
}

.field__input,
.field__select,
.field__textarea {
  background: var(--surface-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 0.6rem 0.85rem;
  width: 100%;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.field__input:focus,
.field__select:focus,
.field__textarea:focus {
  outline: none;
  border-color: var(--amber);
}
.field__textarea { resize: vertical; min-height: 90px; }
.field__select { cursor: pointer; }

/* ─── Tables ─────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--subtle);
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border-inner);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-raised); }

/* ─── Dividers ───────────────────────────────── */
.rule { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.rule--amber { border-top-color: var(--amber); opacity: 0.4; }

/* ─── Loading / empty states ─────────────────── */
.loading {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--subtle);
  padding: 2rem;
  text-align: center;
}
.empty {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  padding: 2rem;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

/* ─── Alerts ─────────────────────────────────── */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 13px;
  border: 1px solid;
  margin-bottom: 1rem;
}
.alert--success { background: rgba(62,207,112,0.07); border-color: rgba(62,207,112,0.3); color: var(--green); }
.alert--error   { background: rgba(224,92,92,0.07);  border-color: rgba(224,92,92,0.3);  color: var(--red); }
.alert--warning { background: rgba(245,166,35,0.07); border-color: rgba(245,166,35,0.3); color: var(--amber); }

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 600px) {
  .job-header { gap: 0.75rem; padding: 0 1rem; }
  .job-header__info { display: none; }
  .page { padding: 1.25rem 1rem; }
  .stages { flex-direction: column; }
  .stage { flex-direction: row; justify-content: space-between; border-right: none; border-bottom: 1px solid var(--border); }
  .stage:last-child { border-bottom: none; }
}
