:root {
  --ink: #2a1f28;
  --muted: #7a6975;
  --line: #ecdfe4;
  --line-soft: #f5ecef;
  --paper: #ffffff;
  --bg: #fbf6f4;
  --bg-warm: #f7ecec;
  --blush: #c98a96;
  --blush-deep: #a8606e;
  --rose: #d9a7ad;
  --warn-bg: #fdf2e2;
  --warn-line: #ecd09a;
  --warn-ink: #7a541a;
  --success-bg: #eef7ef;
  --success-line: #bcdbc1;
  --success-ink: #2f6238;
  --error-bg: #fbecec;
  --error-line: #e8b6b6;
  --error-ink: #8a2a2a;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1100px 600px at 80% -10%, #f6dfe2 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 110%, #f3e2d6 0%, transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

.stage {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 36px 18px 64px;
}

.curtain {
  text-align: center;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0;
  color: var(--blush-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

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

h1 {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 600;
  font-size: clamp(36px, 7vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
  margin-top: 6px;
}

h2 {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.subtitle {
  margin: 12px auto 0;
  max-width: 460px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 0 0 16px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(10px);
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.tab:hover:not(.active) { color: var(--ink); }

.tab.active {
  background: var(--blush-deep);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(168, 96, 110, 0.55);
}

.tab-label { white-space: nowrap; }

.tab-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(168, 96, 110, 0.14);
  color: var(--blush-deep);
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.tab.active .tab-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  box-shadow:
    0 1px 0 rgba(42, 31, 40, 0.02),
    0 24px 60px -32px rgba(168, 96, 110, 0.22);
}

.form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.field-hint {
  font-size: 12px;
  color: var(--muted);
}

.field-label .optional {
  color: var(--muted);
  font-weight: 400;
  margin-left: 4px;
}

textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  font: inherit;
  font-size: 15px;
  background: #fff;
  color: var(--ink);
  resize: vertical;
  min-height: 96px;
  line-height: 1.45;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

textarea.urls {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 14px;
}

textarea:focus {
  border-color: var(--blush);
  box-shadow: 0 0 0 4px rgba(201, 138, 150, 0.18);
  outline: none;
}

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

button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 20px;
  font: inherit;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
}

button:active:not(:disabled) { transform: translateY(1px); }

.primary {
  background: var(--blush-deep);
  border-color: var(--blush-deep);
  color: #fff;
}

.primary:hover:not(:disabled) {
  background: #8e4b59;
  border-color: #8e4b59;
}

.secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.secondary:hover:not(:disabled) {
  background: var(--bg-warm);
}

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

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

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

.review-intro {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.row {
  display: grid;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 80ms ease;
}

.row:hover {
  border-color: var(--rose);
  background: var(--bg-warm);
}

.row:active { transform: translateY(1px); }

.review-row {
  min-height: 0;
}

.row-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.row-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.row-url {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.status-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--bg-warm);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill.review {
  background: #fdeef0;
  color: var(--blush-deep);
}

.status-pill.approved {
  background: #eef3fb;
  color: #355a8c;
}

.status-pill.warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
}

.status-pill.error {
  background: var(--error-bg);
  color: var(--error-ink);
}

.status-pill.muted {
  background: var(--bg-warm);
  color: var(--muted);
}

.bar {
  height: 6px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--blush-deep));
  border-radius: inherit;
  transition: width 280ms ease;
}

.row-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  min-height: 0;
}

.back:hover {
  color: var(--blush-deep);
}

.draft-title {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.draft-title .source {
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.notice {
  border-radius: 12px;
  padding: 13px 15px;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 18px;
}

.notice strong {
  font-weight: 700;
}

.notice.review-ready {
  background: #fdeef0;
  border: 1px solid var(--line);
  color: var(--ink);
}

.packet-summary {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #fff8f9;
}

.packet-summary-head,
.section-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.packet-summary h3,
.section-head h3 {
  margin-top: 3px;
  color: var(--ink);
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: none;
}

.packet-summary > p {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

.packet-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.packet-meta span,
.update-count {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.review-block {
  margin: 0 0 18px;
}

.review-block h3 {
  margin-bottom: 10px;
}

.packet-section {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

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

.update-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.update-card:hover {
  border-color: var(--rose);
  background: #fffafb;
}

.update-card.is-approve {
  border-color: var(--success-line);
  background: var(--success-bg);
  box-shadow: 0 10px 28px -22px rgba(47, 98, 56, 0.45);
}

.update-card.is-deny {
  border-color: var(--error-line);
  background: var(--error-bg);
}

.update-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.update-number {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 7px;
  background: var(--bg-warm);
  color: var(--blush-deep);
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 auto;
}

.check-copy {
  display: grid;
  gap: 2px;
}

.check-copy strong {
  font-size: 15px;
  line-height: 1.3;
}

.check-copy em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-note {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff8f9;
}

.note-label {
  color: var(--blush-deep);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.note-text {
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.48;
}

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

.value-block {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--paper);
}

.value-block.proposed {
  border-color: var(--success-line);
  background: #f8fcf8;
}

.value-label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.value-text {
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.update-employee-note {
  display: grid;
  gap: 6px;
}

.update-employee-note textarea {
  min-height: 78px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.45;
}

.update-decision {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 2px;
}

.decision-chip {
  min-height: 34px;
  border-radius: 999px;
  padding: 0 14px;
  font-size: 13px;
}

.decision-chip.approve {
  border-color: var(--success-line);
  color: var(--success-ink);
  background: #fff;
}

.decision-chip.approve:hover,
.decision-chip.approve.active {
  background: var(--success-ink);
  border-color: var(--success-ink);
  color: #fff;
}

.decision-chip.deny {
  border-color: var(--error-line);
  color: var(--error-ink);
  background: #fff;
}

.decision-chip.deny:hover,
.decision-chip.deny.active {
  background: var(--error-ink);
  border-color: var(--error-ink);
  color: #fff;
}

.decision-state {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.update-evidence {
  color: var(--blush-deep);
  font-size: 12px;
  font-weight: 700;
}

.empty-packet {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 18px;
  background: #fff;
}

.empty-packet strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.employee-notes {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.employee-notes textarea {
  min-height: 104px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 12px);
  max-width: calc(100vw - 32px);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
  box-shadow: 0 12px 40px -12px rgba(42, 31, 40, 0.35);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 640px) {
  .stage { padding-top: 48px; }
  .card { padding: 32px; }
}

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

  .row-head,
  .row-foot,
  .packet-summary-head,
  .section-head {
    display: grid;
  }

  .update-values {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .tab-label { font-size: 13px; }
  .tab { padding: 0 6px; }
}
