/* =================================================================
   Gestión de Proyectos - Ciberimaginario
   Sistema de diseño adaptado de ciberimaginario.cloud
   Tipografías: Bebas Neue (títulos) · Inter (body) · DM Mono (labels)
   ================================================================= */

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

:root {
  --red:      #b1040e;
  --red-dark: #8f1000;
  --red-soft: #fef2f2;
  --gold:     #fcbd00;
  --gray:     #aaaaaa;
  --gray-2:   #777777;
  --gray-3:   #555555;
  --black:    #111111;
  --off:      #f9f9f9;
  --off-2:    #f3f4f6;
  --white:    #ffffff;
  --border:   rgba(0,0,0,0.08);
  --border-2: rgba(0,0,0,0.12);
  --cyan:     #0891b2;
  --amber:    #d97706;
  --rose:     #be185d;
  --green:    #059669;
  --green-soft:#ecfdf5;
  --amber-soft:#fffbeb;
  --blue-soft:#eff6ff;
  --purple-soft:#faf5ff;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--white);
  color: var(--black);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.accent-line {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red-dark), var(--red), var(--gold));
  z-index: 100;
}

/* ── NAV ── */
.app-nav {
  position: fixed;
  top: 3px; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: rgba(255,255,255,0.93);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 90;
}
.app-nav .brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--black);
}
.app-nav .brand-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  color: var(--black);
}
.app-nav .brand-logo em {
  color: var(--red);
  font-style: normal;
}
.app-nav .brand-sub {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  border-left: 1px solid var(--border-2);
  padding-left: 1rem;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.nav-links a {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-2);
  text-decoration: none;
  transition: color 0.2s;
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover { color: var(--red); }
.nav-links a.active {
  color: var(--red);
  border-bottom-color: var(--red);
}
.nav-right { display: flex; align-items: center; gap: 1.25rem; }
.nav-logout {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  text-decoration: none;
  border: 1px solid var(--border-2);
  padding: 0.4rem 0.75rem;
  border-radius: 2px;
  transition: all 0.2s;
}
.nav-logout:hover { color: var(--red); border-color: var(--red); }

/* ── MAIN ── */
.app-main {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
}

/* ── PAGE HEADER ── */
.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-header .breadcrumb {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 0.5rem;
}
.page-header .breadcrumb a {
  color: var(--gray-2);
  text-decoration: none;
}
.page-header .breadcrumb a:hover { color: var(--red); }
.page-header h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--black);
}
.page-header h1 em {
  color: var(--red);
  font-style: normal;
}
.page-header .subtitle {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.5rem;
}

/* ── SECTION LABEL ── */
.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
}
.section-label.subtle { color: var(--gray); }
.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: 0.03em;
  color: var(--black);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ── KPI GRID ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.kpi {
  padding: 1.5rem 1.25rem;
  background: var(--white);
  border-right: 1px solid var(--border);
  position: relative;
}
.kpi:last-child { border-right: none; }
.kpi-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 0.5rem;
}
.kpi-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--black);
}
.kpi-value.accent { color: var(--red); }
.kpi-value.warn { color: var(--amber); }
.kpi-value.ok { color: var(--green); }
.kpi-sub {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  color: var(--gray-2);
  margin-top: 0.25rem;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.55rem 1rem;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  line-height: 1.2;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--red-dark);
}
.btn-secondary {
  background: var(--white);
  color: var(--black);
  border-color: var(--border-2);
}
.btn-secondary:hover {
  background: var(--off);
  border-color: var(--gray);
}
.btn-danger {
  background: var(--white);
  color: var(--red);
  border-color: rgba(177,4,14,0.3);
}
.btn-danger:hover {
  background: var(--red-soft);
  border-color: var(--red);
}
.btn-sm { font-size: 0.72rem; padding: 0.35rem 0.7rem; }
.btn-xs { font-size: 0.65rem; padding: 0.25rem 0.55rem; }

/* ── BADGES ── */
.badge {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
  border: 1px solid var(--border-2);
  background: var(--white);
  color: var(--gray-2);
  white-space: nowrap;
}
.badge-red    { color: var(--red);  border-color: var(--red); }
.badge-amber  { color: var(--amber); border-color: var(--amber); }
.badge-green  { color: var(--green); border-color: var(--green); }
.badge-cyan   { color: var(--cyan); border-color: var(--cyan); }
.badge-rose   { color: var(--rose); border-color: var(--rose); }
.badge-gray   { color: var(--gray-2); border-color: var(--border-2); }
.badge-solid-red {
  background: var(--red); color: var(--white); border-color: var(--red);
}
.badge-filled-amber { background: var(--amber-soft); color: var(--amber); border-color: var(--amber); }
.badge-filled-green { background: var(--green-soft); color: var(--green); border-color: var(--green); }

/* ── CARDS ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: hidden;
}
.card-head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-head h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.03em;
  color: var(--black);
}
.card-body { padding: 1.25rem; }
.card-body.tight { padding: 0; }

/* ── TABLES ── */
.table-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  overflow-x: auto;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
table.data thead {
  background: var(--off);
}
table.data thead th {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-2);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
table.data thead th.num { text-align: right; }
table.data thead th.ctr { text-align: center; }
table.data tbody td {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}
table.data tbody td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tbody td.ctr { text-align: center; }
table.data tbody td.mono { font-family: 'DM Mono', monospace; font-size: 0.75rem; }
table.data tbody td.xs { font-size: 0.75rem; color: var(--gray-2); white-space: nowrap; }
table.data tbody tr:hover { background: var(--off); }
table.data tbody tr.clickable { cursor: pointer; }
table.data a { color: var(--red); text-decoration: none; }
table.data a:hover { text-decoration: underline; }

/* ── FILTERS BAR ── */
.filters {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 1rem;
  margin-bottom: 1rem;
}
.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  align-items: end;
}

/* ── FORMS ── */
.form-section {
  background: var(--white);
  border: 1px solid var(--border);
  max-width: 1000px;
}
fieldset.form-group {
  padding: 1.5rem;
  border: none;
  border-bottom: 1px solid var(--border);
}
fieldset.form-group:last-child { border-bottom: none; }
fieldset.form-group legend {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
  padding: 0;
}

.form-row {
  display: grid;
  gap: 1rem;
}
.form-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
.form-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-row + .form-row { margin-top: 1rem; }

label.field {
  display: block;
}
label.field > .label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-2);
  margin-bottom: 0.4rem;
}
label.field > .label .req { color: var(--red); }
label.field > .hint {
  display: block;
  font-size: 0.72rem;
  color: var(--gray);
  margin-top: 0.3rem;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="search"],
select,
textarea {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-2);
  border-radius: 2px;
  background: var(--white);
  color: var(--black);
  transition: border-color 0.2s;
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--red);
}
input.mono { font-family: 'DM Mono', monospace; }
textarea { resize: vertical; min-height: 60px; }

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--gray-3);
}
.checkbox-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
}

.form-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--off);
  border-top: 1px solid var(--border);
}

/* ── DETAIL VIEW ── */
.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
}
.detail-section {
  background: var(--white);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.detail-section-head {
  padding: 0.75rem 1.25rem;
  background: var(--off);
  border-bottom: 1px solid var(--border);
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-2);
}
.detail-section dl {
  padding: 0.5rem 0;
}
.detail-section dl .row {
  display: flex;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
.detail-section dl .row:first-child { border-top: none; }
.detail-section dl dt {
  width: 140px;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
  flex-shrink: 0;
}
.detail-section dl dd {
  flex: 1;
  color: var(--black);
}

.actions-bar {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.actions-bar .spacer { flex: 1; }

/* ── PROGRESS BAR ── */
.progress {
  display: inline-block;
  width: 80px;
  height: 4px;
  background: var(--off-2);
  border-radius: 2px;
  overflow: hidden;
  vertical-align: middle;
  margin-right: 0.5rem;
}
.progress-bar {
  height: 100%;
  background: var(--red);
  transition: width 0.3s;
}
.progress-bar.ok { background: var(--green); }
.progress-bar.warn { background: var(--amber); }
.progress-bar.over { background: var(--red); }

/* ── EMPTY / ALERT STATES ── */
.alert {
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  background: var(--off);
  font-size: 0.85rem;
  color: var(--gray-3);
  margin-bottom: 1.5rem;
}
.alert.amber { background: var(--amber-soft); border-color: var(--amber); color: #92400e; }
.alert.red { background: var(--red-soft); border-color: var(--red); color: var(--red-dark); }

.empty {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--gray);
  font-size: 0.9rem;
}

/* ── FILTER PILLS ── */
.pills {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.pill {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border-2);
  background: var(--white);
  color: var(--gray-2);
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.15s;
}
.pill:hover { border-color: var(--red); color: var(--red); }
.pill.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
.pill .count { opacity: 0.6; margin-left: 0.3rem; }

/* ── LOGIN ── */
.login-wrap {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 2.5rem 2rem;
}
.login-card .eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
}
.login-card h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.03em;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.login-card h1 em { color: var(--red); font-style: normal; }
.login-card .sub {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 1.75rem;
}

/* ── FOOTER ── */
.app-footer {
  border-top: 1px solid var(--border);
  background: var(--off);
  padding: 1.5rem 2rem;
  position: relative;
  z-index: 1;
}
.app-footer .inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--gray);
  text-transform: uppercase;
}

/* ── UTILITIES ── */
.text-mono { font-family: 'DM Mono', monospace; }
.text-display { font-family: 'Bebas Neue', sans-serif; }
.text-xs { font-size: 0.72rem; }
.text-sm { font-size: 0.8rem; }
.text-muted { color: var(--gray-2); }
.text-subtle { color: var(--gray); }
.text-red { color: var(--red); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.hidden { display: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.3); }

/* HTMX indicator */
.htmx-indicator { opacity: 0; transition: opacity 200ms ease; }
.htmx-request .htmx-indicator { opacity: 1; }
.htmx-request.htmx-indicator { opacity: 1; }

/* Responsive */
@media (max-width: 768px) {
  .app-nav { padding: 0 1rem; }
  .nav-links { display: none; }
  .app-nav .brand-sub { display: none; }
  .app-main { padding: 5rem 1rem 3rem; }
  .form-row.cols-2, .form-row.cols-3 { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}

/* ── WORKFLOW BAR ── */
.workflow-bar {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
}
.workflow-track {
    display: flex;
    align-items: center;
    gap: 0;
}
.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    min-width: 70px;
}
.workflow-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border-2);
    color: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
}
.workflow-step.done .workflow-dot {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
}
.workflow-step.active .workflow-dot {
    background: var(--white);
    border: 2px solid var(--red);
    color: var(--red);
    box-shadow: 0 0 0 3px rgba(177,4,14,0.15);
}
.workflow-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gray);
    text-align: center;
}
.workflow-step.active .workflow-label {
    color: var(--red);
    font-weight: 500;
}
.workflow-step.done .workflow-label {
    color: var(--gray-2);
}
.workflow-line {
    flex: 1;
    height: 1px;
    background: var(--border-2);
    min-width: 20px;
    margin-top: -1.1rem;
}
.workflow-line.done {
    background: var(--red);
}

/* ── KANBAN ── */
.kanban {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    min-height: 500px;
}
.kanban-column {
    flex: 0 0 260px;
    background: var(--off);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 200px);
}
.kanban-col-head {
    padding: 0.75rem 1rem;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.kanban-col-title {
    font-family: 'DM Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray-2);
    font-weight: 500;
}
.kanban-col-count {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: var(--red);
    line-height: 1;
}
.kanban-col-body {
    padding: 0.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}
.kanban-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--border);
    padding: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
    position: relative;
}
.kanban-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px;
    height: 0;
    background: var(--red);
    transition: height 0.2s;
}
.kanban-card:hover {
    background: var(--off);
    border-color: var(--gray);
}
.kanban-card:hover::before {
    height: 100%;
}
.kanban-card-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--black);
    line-height: 1.35;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.kanban-card-meta {
    font-size: 0.7rem;
    color: var(--gray-2);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}
.kanban-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    margin-top: 0.25rem;
}
.kanban-amount {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    color: var(--black);
    letter-spacing: 0.02em;
}
.kanban-age {
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    color: var(--gray);
}
.kanban-age.stale {
    color: var(--amber);
    font-weight: 500;
}
.kanban-empty {
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--gray);
    text-align: center;
    padding: 2rem 1rem;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .workflow-step { min-width: 55px; }
    .workflow-label { font-size: 0.5rem; }
    .kanban-column { flex: 0 0 240px; }
}

/* ── EXTRACTION LAYOUT ── */
.extraction-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    min-height: calc(100vh - 300px);
}
.extraction-pdf {
    background: var(--white);
    border: 1px solid var(--border);
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.extraction-review {
    min-width: 0;
}
.extraction-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.extraction-item {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    position: relative;
}
.extraction-item .ei-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

@media (max-width: 1100px) {
    .extraction-layout { grid-template-columns: 1fr; }
    .extraction-pdf { position: relative; top: 0; max-height: 500px; }
}
