@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Cormorant+Garamond:wght@600;700&display=swap");

:root {
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --page-max: 1320px;
  --page-pad: 32px;
  --card-radius: 20px;
  --control-radius: 14px;
  --pill-radius: 999px;
  --bg: #f6efe3;
  --bg-soft: #fcf8f1;
  --surface: rgba(255, 252, 246, 0.94);
  --surface-strong: rgba(255, 252, 246, 0.98);
  --surface-muted: rgba(255, 251, 244, 0.8);
  --line: rgba(54, 41, 22, 0.14);
  --line-soft: rgba(16, 61, 33, 0.1);
  --ink: #1f1812;
  --muted: #635749;
  --muted-soft: #817564;
  --forest: #103d21;
  --forest-strong: #0b2d18;
  --forest-soft: rgba(16, 61, 33, 0.08);
  --gold: #cfb06a;
  --gold-soft: rgba(207, 176, 106, 0.18);
  --success: #2e7d52;
  --success-soft: rgba(46, 125, 82, 0.12);
  --danger: #8b2c2c;
  --danger-soft: rgba(139, 44, 44, 0.08);
  --pending: #d8d1c5;
  --shadow-sm: 0 8px 18px rgba(43, 32, 16, 0.05);
  --shadow-md: 0 14px 30px rgba(43, 32, 16, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(16, 61, 33, 0.08), transparent 22%),
    radial-gradient(circle at 85% 8%, rgba(207, 176, 106, 0.18), transparent 16%),
    linear-gradient(180deg, #fbf8f2 0%, #f5ecdd 48%, #ede0cb 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(67, 51, 29, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(67, 51, 29, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 76%);
}

.page-shell {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-4) var(--page-pad) 56px;
}

.topbar {
  display: grid;
  grid-template-columns: 12fr;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.brand-lockup,
.story-panel,
.access-shell,
.dashboard-card,
.legend-strip {
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
}

.brand-mark {
  width: 174px;
  max-width: 24vw;
  height: auto;
  display: block;
}

.brand-copy {
  display: grid;
  gap: 4px;
}

.brand-kicker,
.eyebrow,
.mini-label,
.legend-title {
  display: block;
  margin: 0;
  color: var(--forest);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 13px;
  font-weight: 800;
}

.brand-copy strong {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.stage {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-4);
  align-items: stretch;
}

.story-panel {
  grid-column: span 7;
  position: relative;
  overflow: hidden;
  min-height: 708px;
  padding: var(--space-4);
  background:
    radial-gradient(circle at 82% 12%, rgba(207, 176, 106, 0.16), transparent 16%),
    linear-gradient(160deg, rgba(12, 47, 25, 0.98), rgba(19, 65, 36, 0.94));
  color: #fffaf3;
  box-shadow: var(--shadow-md);
}

.story-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.04), transparent 30%),
    linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.08) 100%);
}

.story-head,
.story-steps,
.story-footer {
  position: relative;
  z-index: 1;
}

.story-head .eyebrow {
  color: #ead88f;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.schedule-card strong,
.request-head h3 {
  font-family: "Cormorant Garamond", serif;
}

h1 {
  max-width: 10ch;
  margin: var(--space-2) 0;
  font-size: 52px;
  line-height: 0.98;
  letter-spacing: -0.05em;
}

h2 {
  margin: 0;
  font-size: 36px;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.story-copy {
  max-width: 60ch;
  color: rgba(255, 250, 243, 0.82);
  font-size: 16px;
  line-height: 1.75;
}

.story-steps {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-4) 0;
  padding: 0;
  list-style: none;
}

.story-steps li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-2);
  align-items: start;
  padding: var(--space-2);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-radius: 12px;
  background: rgba(234, 216, 143, 0.14);
  color: #ead88f;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.story-steps strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 700;
}

.story-steps p {
  margin: 0;
  color: rgba(255, 250, 243, 0.72);
  font-size: 14px;
  line-height: 1.6;
}

.story-footer {
  display: grid;
  gap: var(--space-2);
}

.schedule-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.schedule-card {
  padding: var(--space-2);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
}

.schedule-card .mini-label {
  margin-bottom: 8px;
  color: rgba(234, 216, 143, 0.94);
}

.schedule-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 28px;
  line-height: 0.98;
}

.schedule-card small {
  color: rgba(255, 250, 243, 0.74);
  font-size: 13px;
  line-height: 1.45;
}

.story-caption {
  margin: 0;
  color: rgba(255, 250, 243, 0.7);
  font-size: 13px;
  line-height: 1.55;
}

.access-column {
  grid-column: span 5;
  display: flex;
}

.access-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 708px;
  padding: var(--space-4);
  background: var(--surface-strong);
}

.access-intro {
  margin-bottom: var(--space-3);
}

.section-copy,
.muted {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.access-tabs {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 8px;
  margin-bottom: var(--space-3);
  padding: 6px;
  border-radius: var(--pill-radius);
  background: rgba(16, 61, 33, 0.05);
  border: 1px solid rgba(16, 61, 33, 0.08);
}

.tab-button {
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--pill-radius);
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.tab-button.is-active {
  background: #ffffff;
  color: var(--forest);
  box-shadow: 0 4px 12px rgba(43, 32, 16, 0.06);
}

.tab-panels {
  display: grid;
  flex: 1;
}

.tab-panel {
  height: 100%;
  border: 1px solid var(--line-soft);
  border-radius: var(--card-radius);
  background: rgba(255, 255, 255, 0.54);
  padding: var(--space-3);
}

.tab-panel:not(.is-active) {
  display: none;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: 12px;
}

.priority-badge,
.section-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: var(--pill-radius);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.priority-badge {
  background: var(--forest-soft);
  color: var(--forest);
}

.section-tag {
  background: var(--gold-soft);
  color: #6d5425;
}

.legend-strip {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  margin: var(--space-3) 0;
  padding: var(--space-2) var(--space-3);
  background: var(--surface-muted);
}

.legend-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: var(--pill-radius);
  border: 1px solid rgba(54, 41, 22, 0.08);
  background: #ffffff;
  color: var(--muted);
  font-size: 14px;
}

.chip {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(54, 41, 22, 0.12);
  display: inline-block;
}

.chip-approved {
  background: rgba(46, 125, 82, 0.56);
}

.chip-pending {
  background: var(--pending);
}

.chip-available {
  background: #ffffff;
}

.stack {
  display: grid;
  gap: var(--space-2);
}

.stack.dense {
  gap: 14px;
}

.top-gap {
  margin-top: var(--space-2);
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  min-height: 50px;
  padding: 13px 16px;
  border-radius: var(--control-radius);
  border: 1px solid rgba(54, 41, 22, 0.14);
  background: #ffffff;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

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

input::placeholder,
textarea::placeholder {
  color: var(--muted-soft);
}

input:hover,
textarea:hover {
  border-color: rgba(16, 61, 33, 0.18);
}

input:focus,
textarea:focus {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(16, 61, 33, 0.34);
  box-shadow: 0 0 0 4px rgba(16, 61, 33, 0.08);
}

input:disabled,
textarea:disabled,
.button:disabled,
.slot:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--pill-radius);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(16, 61, 33, 0.08);
}

.button.primary {
  background: linear-gradient(135deg, var(--forest), #165a30);
  color: #fffaf2;
  box-shadow: 0 10px 18px rgba(16, 61, 33, 0.16);
}

.button.secondary {
  background: linear-gradient(135deg, #1f2921, #2b3a2f);
  color: #fffaf2;
  box-shadow: 0 8px 16px rgba(43, 32, 16, 0.12);
}

.button.ghost,
.button.subtle {
  background: rgba(16, 61, 33, 0.05);
  color: var(--forest);
  border-color: rgba(16, 61, 33, 0.08);
}

.button.wide {
  width: 100%;
}

.text-button {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--forest);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: var(--space-2);
}

.recovery-panel {
  margin-top: var(--space-2);
  padding: var(--space-2);
  border-radius: 16px;
  border: 1px solid rgba(54, 41, 22, 0.08);
  background: rgba(255, 255, 255, 0.74);
}

.recovery-panel h4 {
  margin: 0 0 6px;
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.compact {
  font-size: 14px;
  line-height: 1.55;
}

.helper-text {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.message {
  margin-bottom: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: 16px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
}

.message.hidden {
  display: none;
}

.message.success {
  background: var(--success-soft);
  border-color: rgba(46, 125, 82, 0.18);
  color: #1e5b3b;
}

.message.error {
  background: var(--danger-soft);
  border-color: rgba(139, 44, 44, 0.16);
  color: #7f2626;
}

.summary,
.note {
  padding: var(--space-2);
  border-radius: 16px;
  border: 1px solid rgba(54, 41, 22, 0.08);
  background: rgba(255, 255, 255, 0.78);
}

.hidden {
  display: none;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 12px;
  margin-bottom: 10px;
  border-radius: var(--pill-radius);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pendiente {
  background: rgba(216, 209, 197, 0.76);
  color: #635749;
}

.status-aprobado {
  background: rgba(46, 125, 82, 0.14);
  color: var(--forest);
}

.status-rechazado {
  background: rgba(139, 44, 44, 0.12);
  color: #7f2626;
}

.dashboard-card {
  margin-top: var(--space-3);
  padding: var(--space-4);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 332px;
  gap: var(--space-3);
  align-items: start;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: var(--space-2);
}

.day-card {
  padding: var(--space-2);
  border-radius: 18px;
  border: 1px solid rgba(54, 41, 22, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.day-head {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(54, 41, 22, 0.12);
}

.day-head h3 {
  margin-bottom: 4px;
  font-size: 22px;
  font-family: "Manrope", sans-serif;
  font-weight: 700;
}

.slots {
  display: grid;
  gap: 10px;
}

.slot {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(54, 41, 22, 0.1);
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  text-align: left;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.slot:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: rgba(16, 61, 33, 0.2);
  box-shadow: 0 8px 16px rgba(43, 32, 16, 0.06);
}

.slot-available {
  background: #ffffff;
}

.slot-pending {
  background: #ddd8cf;
  color: #4f493f;
}

.slot-approved {
  background: rgba(46, 125, 82, 0.16);
  color: #1d5b3a;
  border-color: rgba(46, 125, 82, 0.22);
}

.slot.selected {
  outline: 2px solid rgba(16, 61, 33, 0.6);
  box-shadow: 0 0 0 5px rgba(16, 61, 33, 0.08);
}

.request-box {
  position: sticky;
  top: 20px;
  padding: var(--space-3);
  border-radius: var(--card-radius);
  border: 1px solid rgba(54, 41, 22, 0.08);
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(249, 243, 232, 0.96));
}

.request-head {
  margin-bottom: var(--space-2);
}

.request-head h3 {
  margin: 8px 0;
  font-size: 30px;
  line-height: 0.98;
}

.request-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

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

th,
td {
  padding: 14px 10px;
  border-bottom: 1px solid rgba(54, 41, 22, 0.08);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.table-action {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
}

@media (max-width: 1180px) {
  .stage {
    grid-template-columns: 1fr;
  }

  .story-panel,
  .access-column {
    grid-column: auto;
  }

  .story-panel {
    min-height: auto;
  }

  .access-shell {
    min-height: auto;
  }

  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .request-box {
    position: static;
  }
}

@media (max-width: 860px) {
  .page-shell {
    padding: var(--space-3) 18px 40px;
  }

  .brand-lockup {
    padding: var(--space-2);
  }

  .brand-mark {
    width: 150px;
    max-width: 34vw;
  }

  .legend-strip {
    grid-template-columns: 1fr;
  }

  .legend-items {
    justify-content: flex-start;
  }

  .schedule-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .access-column {
    order: 1;
  }

  .story-panel {
    order: 2;
    padding: var(--space-3);
  }

  .access-shell,
  .dashboard-card {
    padding: var(--space-3);
  }

  .card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  h1 {
    max-width: 12ch;
    font-size: 40px;
  }

  h2 {
    font-size: 32px;
  }

  h3 {
    font-size: 26px;
  }

  .story-steps li {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .page-shell {
    padding: var(--space-2) 14px 32px;
  }

  .brand-lockup {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .brand-mark {
    width: 136px;
    max-width: 50vw;
  }

  .topbar-note,
  .access-shell,
  .dashboard-card,
  .legend-strip {
    padding: var(--space-2);
  }

  .access-tabs {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tab-button {
    width: 100%;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 28px;
  }

  .legend-chip {
    width: 100%;
    justify-content: flex-start;
  }
}
