:root {
  color-scheme: light;
  --paper: #fbf4e8;
  --paper-strong: #f7eddc;
  --ink: #1f2937;
  --muted: #5b6778;
  --accent: #d95734;
  --accent-dark: #9e3219;
  --sea: #4e94d9;
  --shadow: 0 24px 80px rgba(88, 61, 25, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 191, 128, 0.4), transparent 28%),
    radial-gradient(circle at top right, rgba(89, 160, 224, 0.28), transparent 24%),
    linear-gradient(180deg, #fff9ef 0%, #f9efe1 48%, #f2e8da 100%);
}

h1,
h2,
h3,
h4 {
  font-family: "Fraunces", "Georgia", serif;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(71, 85, 105, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.8rem 0.95rem;
  color: #0f172a;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(78, 148, 217, 0.9);
  box-shadow: 0 0 0 4px rgba(78, 148, 217, 0.12);
}

textarea {
  resize: vertical;
}

.mono-ui {
  font-family: "IBM Plex Mono", "Consolas", monospace;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.5rem 0.85rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8c371e;
  box-shadow: 0 14px 40px rgba(142, 69, 31, 0.14);
}

.hero-panel {
  position: relative;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.78)),
    linear-gradient(135deg, rgba(255, 173, 96, 0.12), rgba(72, 148, 224, 0.12));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(217, 87, 52, 0.1), transparent 36%),
    radial-gradient(circle at bottom right, rgba(78, 148, 217, 0.18), transparent 28%);
  pointer-events: none;
}

.hero-panel > * {
  position: relative;
  z-index: 1;
}

.hero-stat {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
  padding: 1rem 1.1rem;
  box-shadow: 0 16px 40px rgba(114, 83, 40, 0.12);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.hero-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-stat-value {
  margin-top: 0.5rem;
  font-size: clamp(1.8rem, 2.7vw, 2.6rem);
  font-weight: 700;
  line-height: 1;
  color: #0f172a;
}

.panel-card {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  padding: 1.2rem;
  box-shadow: 0 24px 60px rgba(114, 83, 40, 0.14);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.field {
  display: block;
}

.field-compact input {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.field-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.action-button {
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  color: #0f172a;
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 18px 40px rgba(114, 83, 40, 0.14);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 48px rgba(114, 83, 40, 0.18);
}

.action-button-strong {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff7f3;
}

.action-button-danger {
  background: linear-gradient(135deg, #3c434c, #18212f);
  color: #f8fafc;
}

.board-shell {
  min-width: max-content;
}

.board-grid {
  display: grid;
  gap: 1rem;
  align-items: start;
}

.header-card,
.row-card,
.drop-cell,
.report-lane {
  min-height: 100%;
}

.header-card,
.row-card {
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.82);
  padding: 1rem;
  box-shadow: 0 18px 50px rgba(114, 83, 40, 0.12);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.header-card-corner {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 243, 0.95)),
    linear-gradient(135deg, rgba(78, 148, 217, 0.06), rgba(217, 87, 52, 0.06));
}

.report-header {
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.95), rgba(30, 41, 59, 0.92)),
    linear-gradient(135deg, rgba(217, 87, 52, 0.18), rgba(78, 148, 217, 0.18));
  color: #f8fafc;
}

.report-header .field-label,
.report-header .text-slate-500,
.report-header .text-slate-600,
.report-header .text-slate-950 {
  color: #e2e8f0 !important;
}

.row-card {
  position: sticky;
  left: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(249, 240, 223, 0.96));
}

.drop-cell,
.report-lane {
  min-height: 260px;
  border-radius: 28px;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.56);
  border: 1px dashed rgba(148, 163, 184, 0.45);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.46);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.drop-cell-active {
  border-color: rgba(78, 148, 217, 0.8);
  background: rgba(234, 244, 255, 0.9);
}

.report-lane {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(240, 247, 255, 0.92));
}

.empty-cell {
  display: grid;
  place-items: center;
  min-height: 180px;
  border-radius: 22px;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.66);
}

.ticket-note {
  position: relative;
  border: 0;
  border-radius: 24px;
  padding: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 244, 219, 0.92)),
    var(--note-paper);
  box-shadow:
    0 16px 46px rgba(102, 76, 42, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.66);
  transform: rotate(var(--note-tilt, -1deg));
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.ticket-note:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow:
    0 22px 54px rgba(102, 76, 42, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.7);
}

.ticket-note::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: radial-gradient(circle at top right, var(--note-glow), transparent 40%);
  pointer-events: none;
}

.heat-pill,
.grade-pill,
.stage-grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.heat-pill {
  color: #0f172a;
}

.grade-pill {
  min-width: 2.2rem;
  background: linear-gradient(135deg, #1f2937, #334155);
  color: #f8fafc;
}

.stage-grade {
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #1e293b;
}

.heat-track {
  height: 0.62rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
}

.heat-fill {
  height: 100%;
  border-radius: 999px;
}

.ticket-button {
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  color: #0f172a;
  padding: 0.55rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(102, 76, 42, 0.1);
}

.ticket-button-strong {
  background: linear-gradient(135deg, rgba(78, 148, 217, 0.92), rgba(34, 94, 164, 0.95));
  color: white;
}

.report-card {
  width: 100%;
  border: 0;
  text-align: left;
  border-radius: 24px;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 247, 252, 0.92));
  box-shadow: 0 16px 40px rgba(36, 53, 77, 0.14);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.report-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 54px rgba(36, 53, 77, 0.18);
}

.line-clamp-3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
}

.modal-panel {
  width: min(1240px, 100%);
  max-height: min(92vh, 1100px);
  overflow: auto;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(251, 245, 233, 0.96));
  padding: 1.4rem;
  box-shadow: 0 32px 90px rgba(15, 23, 42, 0.32);
}

.close-button {
  border: 0;
  border-radius: 16px;
  background: #0f172a;
  color: white;
  padding: 0.8rem 1rem;
  font-weight: 700;
}

.timeline-entry,
.score-row {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  padding: 1rem;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.42);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.45);
  border-radius: 999px;
}

@media (max-width: 1024px) {
  .row-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .hero-panel,
  .panel-card,
  .header-card,
  .row-card,
  .drop-cell,
  .report-lane,
  .modal-panel {
    border-radius: 24px;
  }

  .ticket-note,
  .report-card,
  .timeline-entry,
  .score-row {
    border-radius: 20px;
  }
}
