:root {
  --orange: #f68d2e;
  --orange-dark: #d96f17;
  --ink: #111111;
  --paper: #f5f2ec;
  --surface: rgba(17, 17, 17, .78);
  --line: rgba(255, 255, 255, .16);
  --text: #f8f8f8;
  --muted: rgba(255, 255, 255, .72);
  --card: rgba(255, 255, 255, .08);
  --white: #ffffff;
  color-scheme: dark;
  font-family: Barlow, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: #101010;
}

button, input, textarea, select {
  font: inherit;
}

button, a {
  touch-action: manipulation;
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .42), rgba(0, 0, 0, .78)),
    url("https://gestionpublicitaria.co/wp-content/uploads/2026/03/Fondo-inicio.webp") center / cover fixed no-repeat;
}

.topbar, .hero, .quick-panel, .tools-grid, .footer {
  width: min(1220px, calc(100% - 40px));
  margin-inline: auto;
}

.topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.brand img {
  display: block;
  width: 126px;
  height: auto;
}

.topbar-copy {
  display: grid;
  text-align: right;
}

.topbar-copy strong {
  font-size: 20px;
  text-transform: uppercase;
}

.topbar-copy span,
.eyebrow,
.tool small {
  font-family: VT323, monospace;
  color: var(--orange);
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) minmax(280px, 360px);
  gap: 26px;
  align-items: center;
  padding: 62px 0 30px;
}

.hero-accent {
  width: 12px;
  height: 132px;
  background: var(--orange);
  box-shadow: 0 16px 36px rgba(246, 141, 46, .32);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 28px;
}

.hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(42px, 6vw, 84px);
  line-height: .9;
  text-transform: uppercase;
}

.hero-text {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 20px;
}

.primary-action {
  min-height: 142px;
  padding: 22px;
  border: 1px solid rgba(246, 141, 46, .82);
  border-radius: 8px;
  color: white;
  background:
    linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.38)),
    url("https://gestionpublicitaria.co/wp-content/uploads/2026/03/Fondo-Naranja-industrial.jpg") center / cover no-repeat;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 20px 60px rgba(0,0,0,.34);
}

.primary-action span,
.primary-action small {
  display: block;
}

.primary-action span {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.primary-action small {
  margin-top: 12px;
  color: white;
  font-family: VT323, monospace;
  font-size: 24px;
  text-transform: uppercase;
}

.quick-panel {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 18px;
  align-items: end;
  margin-bottom: 22px;
}

.search span {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: rgba(255,255,255,.94);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(255,255,255,.08);
  cursor: pointer;
}

.chip.is-active {
  border-color: var(--orange);
  background: rgba(246,141,46,.22);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 58px;
}

.tool {
  min-height: 248px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(135deg, rgba(246,141,46,.12), var(--surface));
  background-size: 42px 42px, 42px 42px, auto;
  box-shadow: 0 22px 58px rgba(0,0,0,.28);
}

.tool.featured {
  grid-column: span 2;
  border-color: rgba(246,141,46,.82);
}

.tool.platform-card {
  background:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(135deg, rgba(246,141,46,.08), rgba(17,17,17,.84));
  background-size: 42px 42px, 42px 42px, auto;
}

.tool.platform-card-orange {
  border-color: rgba(246,141,46,.78);
  background:
    linear-gradient(180deg, rgba(0,0,0,.14), rgba(0,0,0,.42)),
    url("https://gestionpublicitaria.co/wp-content/uploads/2026/03/Fondo-Naranja-industrial.jpg") center / cover no-repeat;
}

.tool small {
  display: block;
  margin-bottom: 10px;
  font-size: 23px;
}

.tool h2 {
  margin: 0;
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1;
  text-transform: uppercase;
}

.tool p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.35;
}

.tool button,
.tool a {
  width: fit-content;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  color: #111;
  background: var(--orange);
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool button:disabled,
.tool .disabled-action {
  color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.14);
  cursor: not-allowed;
}

.tool a,
.tool .secondary-action {
  margin-left: 8px;
  color: white;
  background: rgba(255,255,255,.12);
}

.tool-actions .secondary-action {
  margin-left: 0;
}

.tool.is-hidden {
  display: none;
}

.footer {
  margin-top: auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255,255,255,.66);
  border-top: 1px solid var(--line);
}

.modal {
  width: min(920px, calc(100% - 30px));
  max-height: min(86vh, 900px);
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
}

.modal::backdrop {
  background: rgba(0,0,0,.72);
}

.modal-box {
  position: relative;
  margin: 0;
  padding: 28px;
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
}

.close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: #111;
  font-size: 28px;
  line-height: 1;
}

.form-view h2,
.panel-view h2 {
  margin: 0 48px 8px 0;
  font-size: 34px;
  line-height: 1;
}

.form-note {
  margin: 0 48px 20px 0;
  color: #5f5f66;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

label input,
label textarea,
label select {
  width: 100%;
  border: 1px solid #d3d0c8;
  border-radius: 8px;
  padding: 10px 12px;
  color: #111;
  background: white;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.span-2 {
  grid-column: span 2;
}

.check {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #d3d0c8;
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
}

.check input {
  width: auto;
}

.material-table {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(90px, .7fr) minmax(120px, .8fr) minmax(180px, 1.4fr);
  gap: 8px;
  padding: 12px;
  border: 1px solid #d3d0c8;
  border-radius: 8px;
  background: rgba(255,255,255,.72);
}

.material-table label {
  gap: 4px;
}

.material-table select,
.material-table .unit-other {
  width: 100%;
}

.unit-other {
  margin-top: 6px;
}

.unit-other[hidden] {
  display: none;
}

.material-table label span {
  color: #666;
  font-size: 12px;
}

.material-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
  color: white;
  background: #111;
  font-weight: 800;
}

.stock-hint {
  color: #69645c;
  font-size: 12px;
  font-weight: 700;
}

.product-catalog {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.product-search {
  gap: 6px;
}

.product-picker {
  overflow: hidden;
  border: 1px solid #d3d0c8;
  border-radius: 8px;
  background: #fff;
}

.product-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #ebe7df;
  background: #f6f2ea;
  color: #2b261f;
}

.product-picker-head span {
  color: #69645c;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.product-list {
  display: grid;
  max-height: 280px;
  overflow-y: auto;
}

.product-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #eee9df;
  border-radius: 0;
  color: #1d1a16;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.product-option:hover,
.product-option:focus-visible {
  background: rgba(246,141,46,.12);
}

.product-option span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.product-option strong,
.product-option small {
  overflow-wrap: anywhere;
}

.product-option small {
  color: #69645c;
  font-size: 12px;
  font-weight: 700;
}

.product-option em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 8px;
  color: #111;
  background: var(--orange);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.catalog-empty {
  padding: 16px;
  color: #69645c;
  font-weight: 700;
}

.dashboard-login {
  display: grid;
  max-width: 460px;
  gap: 12px;
  margin-top: 16px;
}

.dashboard-login button {
  width: max-content;
}

.auth-error {
  margin-top: 12px;
  border: 1px solid rgba(246,141,46,.55);
  border-radius: 8px;
  padding: 10px 12px;
  color: #4b2600;
  background: rgba(246,141,46,.16);
  font-weight: 800;
}

.stock-summary {
  grid-column: span 2;
  border: 1px solid rgba(246,141,46,.42);
  border-radius: 8px;
  padding: 12px;
  color: #2b261f;
  background: rgba(246,141,46,.12);
  font-weight: 800;
}

.checklist-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d3d0c8;
  border-radius: 8px;
  background: rgba(255,255,255,.72);
}

.checklist-section h3 {
  margin: 0;
  color: #111;
  font-size: 19px;
  line-height: 1.1;
  text-transform: uppercase;
}

.checklist-table {
  display: grid;
  grid-template-columns: 56px minmax(190px, 1fr) minmax(160px, .8fr);
  gap: 7px;
  align-items: center;
}

.checklist-table.activity-table {
  grid-template-columns: 56px minmax(180px, 1fr) minmax(210px, 1.1fr) minmax(150px, .8fr);
}

.checklist-table.docs-table {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, .8fr);
}

.checklist-head {
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
  color: white;
  background: #111;
  font-weight: 800;
}

.checklist-table span,
.checklist-table strong,
.checklist-table em {
  min-height: 40px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  padding: 8px 10px;
  color: #161616;
  background: white;
  font-style: normal;
}

.checklist-table span {
  justify-content: center;
  color: #111;
  background: rgba(246,141,46,.42);
  font-weight: 800;
}

.checklist-table input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d3d0c8;
  border-radius: 6px;
  padding: 8px 10px;
  color: #111;
  background: white;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.form-actions button,
.form-actions a {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  color: white;
  background: #111;
  text-decoration: none;
  font-weight: 800;
}

.form-actions .orange {
  color: #111;
  background: var(--orange);
}

.panel-list {
  display: grid;
  gap: 12px;
}

.panel-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #d7d2c7;
  border-radius: 8px;
  background: white;
}

.panel-item strong,
.panel-item span {
  display: block;
}

.panel-item span {
  color: #68666b;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.panel-actions a,
.panel-actions button,
.panel-item a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  color: #111;
  background: var(--orange);
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.request-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.request-summary article {
  padding: 14px;
  border: 1px solid #d7d2c7;
  border-radius: 8px;
  background: white;
}

.request-summary strong,
.request-summary span {
  display: block;
}

.request-summary strong {
  color: #111;
  font-size: 30px;
  line-height: 1;
}

.request-summary span {
  margin-top: 6px;
  color: #68666b;
  font-weight: 700;
}

.request-table-wrap {
  max-height: 52vh;
  overflow: auto;
  margin-top: 16px;
  border: 1px solid #d7d2c7;
  border-radius: 8px;
  background: white;
}

.request-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  color: #161616;
}

.request-table th,
.request-table td {
  padding: 10px;
  border-bottom: 1px solid #e2ded5;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.request-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: white;
  background: #111;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  color: #111;
  background: rgba(246,141,46,.28);
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.enviado-a-luis {
  background: rgba(84,156,255,.26);
}

.status-pill.gestionado {
  background: rgba(72,190,122,.28);
}

.status-pill.disponible-en-stock,
.status-pill.stock-validado-pendiente-entrega {
  background: rgba(72,190,122,.28);
}

.status-pill.entregado-a-produccion {
  background: rgba(84,156,255,.26);
}

.status-pill.faltante-compra,
.status-pill.compra-solicitada {
  background: rgba(246,141,46,.35);
}

.stock-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stock-lines span {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
}

.stock-ok {
  color: #17351f;
  background: rgba(72,190,122,.26);
}

.stock-missing {
  color: #4b2600;
  background: rgba(246,141,46,.32);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.row-actions button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  padding: 0 9px;
  color: #111;
  background: rgba(246,141,46,.48);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.row-actions button:last-child {
  color: #fff;
  background: #4f4d4b;
}

.empty-state {
  margin-top: 16px;
  padding: 18px;
  border: 1px dashed #d7d2c7;
  border-radius: 8px;
  color: #68666b;
  background: white;
  font-weight: 700;
}

.birthday-calendar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.birthday-month {
  min-height: 190px;
  overflow: hidden;
  border: 1px solid #d7d2c7;
  border-radius: 8px;
  background:
    linear-gradient(rgba(17,17,17,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,17,17,.04) 1px, transparent 1px),
    #ffffff;
  background-size: 28px 28px, 28px 28px, auto;
}

.birthday-month header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  color: white;
  background: #111;
}

.birthday-month header strong {
  font-size: 19px;
  text-transform: uppercase;
}

.birthday-month header span {
  color: rgba(255,255,255,.72);
  font-size: 13px;
}

.birthday-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.birthday-person {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 8px;
  align-items: center;
  color: #191919;
  font-weight: 700;
  line-height: 1.15;
}

.birthday-day {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #111;
  background: var(--orange);
  font-weight: 800;
}

.birthday-empty {
  min-height: 86px;
  display: grid;
  place-items: center;
  color: #777;
  border: 1px dashed #d7d2c7;
  border-radius: 8px;
}

.birthday-month.is-empty header {
  background: #4f4d4b;
}

.print-area {
  display: none;
}

@media (max-width: 980px) {
  .hero,
  .quick-panel,
  .tools-grid,
  .birthday-calendar {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 42px;
  }

  .hero-accent {
    display: none;
  }

  .tool.featured {
    grid-column: span 1;
  }

  .birthday-month {
    min-height: auto;
  }

  .request-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar, .hero, .quick-panel, .tools-grid, .footer {
    width: min(100% - 28px, 1220px);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 14px 0;
  }

  .topbar-copy {
    text-align: left;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .material-table {
    grid-template-columns: 1fr;
  }

  .request-summary {
    grid-template-columns: 1fr;
  }

  .material-head,
  .checklist-head {
    display: none;
  }

  .checklist-table,
  .checklist-table.activity-table,
  .checklist-table.docs-table {
    grid-template-columns: 1fr;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 0;
  }
}

@media print {
  body {
    background: white;
  }

  body.printing .shell,
  body.printing .modal {
    display: none !important;
  }

  body.printing .print-area {
    display: block;
    padding: 24px;
    color: #111;
    font-family: Arial, sans-serif;
  }

  .print-doc h1 {
    margin: 0 0 4px;
    font-size: 22px;
  }

  .print-doc .meta {
    margin-bottom: 18px;
    color: #555;
  }

  .print-table {
    width: 100%;
    border-collapse: collapse;
  }

  .print-table th,
  .print-table td {
    border: 1px solid #222;
    padding: 8px;
    text-align: left;
    vertical-align: top;
  }

  .signature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 60px;
  }

  .signature-line {
    border-top: 1px solid #111;
    padding-top: 8px;
  }
}
