:root {
  color-scheme: dark;
  --ink: #f8f7f1;
  --muted: #b9bcaf;
  --page: #10140f;
  --surface: #1b2118;
  --surface-soft: #242d20;
  --line: rgba(231, 238, 211, 0.14);
  --pistache: #d6e989;
  --olive: #94ab5e;
  --warn: #ffcf75;
  --danger: #ff9f9f;
  --shadow: 0 16px 45px rgba(0, 0, 0, 0.24);
  font-family: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% -10%, rgba(204, 226, 117, 0.17), transparent 33rem),
    radial-gradient(circle at 90% 0%, rgba(126, 159, 93, 0.15), transparent 28rem),
    var(--page);
}

button, a { font: inherit; }

.topbar {
  min-height: 80px;
  padding: 14px clamp(18px, 4vw, 56px);
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto minmax(130px, 1fr);
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 20, 15, 0.84);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.06em;
  width: fit-content;
}

.brand-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  color: #1d2417;
  background: var(--pistache);
}

.brand strong { font-size: 0.76rem; }
.brand small { color: var(--pistache); font-size: 0.7rem; margin-left: 3px; }

.title-block { text-align: center; }
.title-block p, .eyebrow { margin: 0; color: var(--pistache); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.title-block h1 { margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: 1.55rem; line-height: 1.1; }

.session-status {
  justify-self: end;
  max-width: 230px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.topbar-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.topbar-actions a {
  color: #e3f0d3;
  font-size: .78rem;
}

.page-shell { width: min(1800px, 100%); margin: 0 auto; padding: clamp(20px, 3vw, 46px); }

.access-gate, .intro-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(39, 50, 31, 0.92), rgba(24, 30, 21, 0.96));
  box-shadow: var(--shadow);
}

.access-gate { max-width: 650px; margin: 8vh auto; padding: clamp(25px, 5vw, 52px); text-align: center; }
.access-gate h2 { margin: 12px 0; font-family: "Playfair Display", Georgia, serif; }
.access-gate p { color: var(--muted); line-height: 1.55; }

.primary-link {
  display: inline-flex;
  margin-top: 14px;
  padding: 11px 16px;
  color: #1d2417;
  background: var(--pistache);
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
}

.intro-card {
  padding: clamp(22px, 3.4vw, 38px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.intro-card h2, .board-heading h2 { margin: 7px 0; font-family: "Playfair Display", Georgia, serif; font-size: clamp(1.55rem, 3vw, 2.3rem); }
.intro-card p { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.55; }

.automation-notice {
  width: min(100%, 310px);
  padding: 16px;
  border: 1px solid rgba(255, 207, 117, 0.32);
  border-radius: 14px;
  color: var(--warn);
  background: rgba(106, 77, 25, 0.18);
}

.automation-notice strong, .automation-notice span { display: block; }
.automation-notice span { margin-top: 4px; color: #efdfb7; font-size: 0.82rem; line-height: 1.35; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin: 18px 0 38px; }
.stats-grid article { min-height: 92px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(30, 38, 26, 0.78); }
.stats-grid span { display: block; color: var(--muted); font-size: 0.8rem; line-height: 1.25; }
.stats-grid strong { display: block; margin-top: 8px; color: var(--pistache); font-size: 1.65rem; }

.board-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.board-heading h2 { margin-bottom: 0; }
.board-heading p { color: var(--muted); font-size: 0.88rem; text-align: right; }

.flow-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(245px, 1fr));
  gap: 14px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 12px;
}

.flow-column { min-height: 300px; padding: 11px; border: 1px solid var(--line); border-radius: 16px; background: rgba(25, 32, 23, 0.78); }
.flow-column[data-status="Esperando datos/assets"] { border-color: rgba(255, 207, 117, 0.36); }
.flow-column[data-status="En revisión"] { border-color: rgba(149, 187, 255, 0.38); }
.flow-column[data-status="Publicado"], .flow-column[data-status="Entregado"] { border-color: rgba(157, 223, 158, 0.32); }

.column-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 7px; padding: 4px 3px 11px; border-bottom: 1px solid var(--line); }
.column-header h3 { margin: 0; font-size: 0.91rem; line-height: 1.25; }
.column-header span { min-width: 24px; padding: 2px 7px; border-radius: 100px; color: #1d2417; background: var(--pistache); font-size: 0.74rem; font-weight: 700; text-align: center; }
.column-list { display: grid; gap: 10px; padding-top: 11px; }
.empty-column { margin: 9px 3px; color: #899083; font-size: 0.81rem; line-height: 1.4; }

.order-card { padding: 13px; border: 1px solid rgba(232, 239, 214, 0.13); border-radius: 13px; background: var(--surface-soft); box-shadow: 0 7px 18px rgba(0, 0, 0, 0.12); }
.order-card h4 { margin: 9px 0 3px; font-size: 1rem; overflow-wrap: anywhere; }
.order-card > p { margin: 0; color: var(--muted); font-size: 0.78rem; overflow-wrap: anywhere; }

.folio-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.folio-row code { max-width: 150px; overflow: hidden; color: #dce5bd; font: 600 0.68rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }
.status-chip { padding: 3px 7px; border-radius: 100px; background: rgba(214, 233, 137, 0.17); color: var(--pistache); font-size: 0.66rem; font-weight: 700; }

.detail-list { display: grid; gap: 5px; margin: 12px 0; }
.detail-list div { display: grid; grid-template-columns: 78px 1fr; gap: 6px; font-size: 0.75rem; }
.detail-list dt { color: #a7ae9d; }
.detail-list dd { margin: 0; color: #e8eadf; overflow-wrap: anywhere; }

.missing-list { margin: 10px 0 0; padding: 9px 10px 8px 25px; border-radius: 9px; color: #fae2aa; background: rgba(113, 78, 25, 0.22); font-size: 0.75rem; line-height: 1.35; }
.missing-list li + li { margin-top: 4px; }
.project-path { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); color: #adb5a2; font-size: 0.7rem; overflow-wrap: anywhere; }
.project-path strong { color: #dce5bd; }

.card-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.card-actions a, .card-actions button { padding: 7px 9px; border: 1px solid rgba(214, 233, 137, 0.32); border-radius: 8px; color: var(--pistache); background: transparent; cursor: pointer; font-size: 0.72rem; font-weight: 700; text-decoration: none; }
.card-actions button:hover, .card-actions a:hover { background: rgba(214, 233, 137, 0.1); }

@media (max-width: 800px) {
  .topbar { min-height: 65px; grid-template-columns: 1fr auto; }
  .title-block { grid-column: 1 / -1; grid-row: 2; text-align: left; display: flex; align-items: baseline; gap: 7px; }
  .title-block p { font-size: 0.62rem; }
  .title-block h1 { font-size: 1.15rem; }
  .session-status { max-width: 140px; font-size: 0.72rem; }
  .intro-card { align-items: flex-start; flex-direction: column; }
  .automation-notice { width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board-heading { align-items: flex-start; flex-direction: column; }
  .board-heading p { margin: 0; text-align: left; }
}

@media (max-width: 460px) {
  .page-shell { padding: 17px 13px 28px; }
  .topbar { padding: 10px 13px; }
  .brand strong { font-size: 0.66rem; }
  .stats-grid article { min-height: 82px; padding: 12px; }
  .stats-grid strong { font-size: 1.35rem; }
}
