:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #4b5563;
  --quiet: #8a94a6;
  --bg: #ffffff;
  --card: #ffffff;
  --line: #e5e7eb;
  --blue: #007aff;
  --blue-dark: #005fcc;
  --blue-light: #60a5fa;
  --navy-900: #0a1035;
  --navy-800: #041749;
  --blue-soft: #eff6ff;
  --yellow-soft: #fff7d7;
  --purple-soft: #f0eaff;
  --green-soft: #e9f9ee;
  --red-soft: #fff0ef;
  --shadow: 0 18px 60px rgba(15, 23, 42, 0.08);
  --shadow-blue: 0 24px 80px rgba(37, 99, 235, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(96, 165, 250, 0.08), transparent 30rem),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button {
  color: inherit;
}

.shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 56px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 80px;
  margin-bottom: 0;
  padding: 12px 0;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.beacon-logo {
  display: block;
  width: min(210px, 42vw);
  height: auto;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #1d2939;
  font-size: 0.93rem;
}

.technovatime-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #111;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.technovatime-brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.edit-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 10px 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  color: #111827;
  cursor: pointer;
  font-weight: 800;
}

.edit-toggle[aria-pressed="true"] {
  border-color: rgba(0, 122, 255, 0.35);
  background: linear-gradient(135deg, #60a5fa 0%, #007aff 55%, #005fcc 100%);
  color: #fff;
}

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 28px;
  margin: 12px 0 28px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 32px;
  background:
    radial-gradient(circle at 50% 50%, rgba(79, 195, 247, 0.25) 0%, rgba(79, 195, 247, 0.05) 50%, rgba(9, 9, 121, 0) 70%),
    linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%);
  box-shadow: 0 24px 80px rgba(10, 16, 53, 0.16);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20 Q10 10, 20 20 T40 20' stroke='%23ffffff' stroke-width='1' fill='none' opacity='0.7'/%3E%3C/svg%3E");
  background-size: 40px 40px;
}

.hero__content,
.hero__status-card {
  position: relative;
  z-index: 1;
}

.hero__eyebrow {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.7rem, 6vw, 4.6rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.hero__dek {
  max-width: 760px;
  margin: 18px 0 0;
  color: #d1d5db;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.65;
}

.hero__status-card {
  align-self: flex-start;
  min-width: 210px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero__status-label {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero__status-card strong {
  display: block;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.35;
}

.date-editor {
  min-width: 150px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy-900);
}

.refresh-icon {
  display: inline-block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.15rem;
}

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

.summary-card {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 124px;
  padding: 22px;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.summary-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 122, 255, 0.22);
  box-shadow: var(--shadow-blue);
}

.summary-card span:not(.summary-icon),
.section-label,
.note-panel span,
.precondition-label {
  display: block;
  color: #111827;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.summary-card strong {
  display: block;
  margin-top: 2px;
  color: #111827;
  font-size: 2.35rem;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.summary-card small {
  display: block;
  margin-top: 2px;
  color: #4b5563;
  font-size: 0.9rem;
  line-height: 1.25;
}

.summary-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  place-items: center;
  border-radius: 999px;
  font-size: 1.65rem;
  font-weight: 800;
}

.summary-icon--blue {
  color: #007aff;
  background: var(--blue-soft);
}

.summary-icon--yellow {
  color: #9a6b00;
  background: var(--yellow-soft);
}

.summary-icon--purple {
  color: #007aff;
  background: var(--purple-soft);
}

.summary-icon--green {
  color: #219653;
  background: var(--green-soft);
}

.portfolio {
  margin-top: 6px;
}

.table-card {
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
}

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

th,
td {
  padding: 19px 22px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: #111827;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

tbody tr {
  transition: background 160ms ease;
}

tbody tr:hover {
  background: #f8fbff;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td {
  color: #374151;
  font-size: 0.94rem;
  line-height: 1.35;
}

.workflow-name {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border: 0;
  background: transparent;
  color: #172033;
  cursor: pointer;
  font-weight: 900;
  text-align: left;
}

.workflow-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  color: #007aff;
  background: #eff6ff;
  font-size: 1rem;
}

.workflow-icon[data-tone="blocked"] {
  color: #7c3aed;
  background: #f0eaff;
}

.workflow-icon[data-tone="queued"] {
  color: #1d70b8;
  background: #eaf5ff;
}

.workflow-icon[data-tone="future"] {
  color: #d97706;
  background: #fff4df;
}

.stage-badge,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.stage-badge[data-tone="blocked"],
.badge[data-tone="blocked"] {
  color: #b42318;
  background: var(--red-soft);
}

.stage-badge[data-tone="queued"],
.badge[data-tone="queued"] {
  color: #007aff;
  background: #eff6ff;
}

.stage-badge[data-tone="active"],
.badge[data-tone="active"] {
  color: #7a5b00;
  background: var(--yellow-soft);
}

.stage-badge[data-tone="future"],
.badge[data-tone="future"] {
  color: #55556b;
  background: #eeedf5;
}

.stage-badge[data-tone="live"],
.badge[data-tone="live"] {
  color: #219653;
  background: var(--green-soft);
}

.stage-select,
.inline-editor {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.stage-select {
  min-width: 150px;
  padding: 10px 12px;
}

.inline-editor {
  min-width: 210px;
  resize: vertical;
  padding: 11px 12px;
  line-height: 1.35;
}

.drawer-editor {
  min-width: 0;
  width: 100%;
  color: var(--ink);
}

.drawer dd .stage-select {
  min-width: 0;
}

.is-editing tbody tr {
  background: #fbfdff;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.row-action {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  font-size: 1.7rem;
  line-height: 1;
}

.row-action:hover,
.workflow-name:hover {
  color: var(--blue);
}

.row-action--remove {
  font-size: 1rem;
  font-weight: 800;
}

.row-action--remove:hover {
  color: #b42318;
}

.table-footer {
  display: flex;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
}

.add-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px dashed rgba(0, 122, 255, 0.4);
  border-radius: 999px;
  padding: 10px 18px;
  background: #f8fbff;
  color: var(--blue-dark);
  cursor: pointer;
  font-weight: 800;
}

.add-row:hover {
  border-style: solid;
  border-color: var(--blue);
  background: var(--blue-soft);
}

.note-panel {
  margin-top: 22px;
  padding: 22px 24px;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: var(--shadow);
}

.note-panel p {
  margin: 6px 0 0;
  color: var(--muted);
}

.drawer {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: flex-end;
  background: rgba(10, 16, 53, 0.48);
  backdrop-filter: blur(4px);
  z-index: 10;
}

.drawer.is-open {
  display: flex;
}

.drawer__panel {
  width: min(560px, 100%);
  height: 100%;
  overflow: auto;
  padding: 30px;
  background: #fff;
  box-shadow: -30px 0 80px rgba(10, 16, 53, 0.24);
}

.drawer__close {
  float: right;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 10px 14px;
  background: white;
  color: var(--ink);
  cursor: pointer;
}

.drawer h2 {
  clear: both;
  margin: 56px 0 8px;
  color: #111827;
  font-size: 2rem;
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.drawer p {
  color: #4b5563;
  line-height: 1.5;
}

.drawer dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  margin: 24px 0;
}

.drawer dt {
  color: #8a94a6;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drawer dd {
  margin: 0;
  color: var(--ink);
}

.drawer ul {
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.stage-checklist {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin: 18px 0 22px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: #f8fbff;
}

.stage-checklist legend {
  padding: 0 6px;
  color: #111827;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stage-check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.94rem;
  cursor: pointer;
}

.stage-check input {
  width: 16px;
  height: 16px;
  accent-color: #1d70b8;
}

.blocker-list {
  margin: 18px 0 20px;
  padding: 0;
  list-style: none;
}

.blocker-list li {
  position: relative;
  margin-top: 10px;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.blocker-list li::before {
  content: "";
  position: absolute;
  top: 0.7em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.45;
}

.error {
  padding: 24px;
  border: 1px solid #fda29b;
  border-radius: 14px;
  background: #fff1f0;
  color: #b42318;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-card {
    overflow-x: auto;
  }

  table {
    min-width: 920px;
  }
}

@media (max-width: 700px) {
  .shell {
    width: min(100% - 24px, 1180px);
    padding-top: 18px;
  }

  .topbar,
  .hero {
    display: block;
  }

  .topbar__right,
  .hero__status {
    margin-top: 14px;
  }

  .topbar__right {
    justify-content: space-between;
  }

  .technovatime-brand {
    font-size: 0.92rem;
  }

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