@font-face {
  font-family: "Fraunces Bruno";
  src: url("/assets/fonts/Fraunces-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces Bruno";
  src: url("/assets/fonts/Fraunces-BoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #07111f;
  --paper-soft: #101f32;
  --ink: #f7fafc;
  --muted: #b8c3ce;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.18);
  --green: #8fc85c;
  --green-soft: #a6d877;
  --dark: #101f32;
  --panel: rgba(16, 31, 50, 0.72);
  --panel-soft: rgba(255, 255, 255, 0.055);
  --panel-hover: rgba(255, 255, 255, 0.085);
  --field: rgba(13, 27, 44, 0.92);
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  --nav-bg: rgba(12, 24, 38, 0.76);
  --nav-pill: rgba(255, 255, 255, 0.08);
  --danger: #9a3227;
  --serif: "Fraunces Bruno", Georgia, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

:root[data-theme="light"] {
  --paper: #eef2f2;
  --paper-soft: #ffffff;
  --ink: #111927;
  --muted: #66717e;
  --line: rgba(16, 31, 50, 0.11);
  --line-strong: rgba(16, 31, 50, 0.18);
  --green: #8fc85c;
  --green-soft: #8fc85c;
  --dark: #101f32;
  --panel: rgba(255, 255, 255, 0.76);
  --panel-soft: rgba(255, 255, 255, 0.58);
  --panel-hover: rgba(255, 255, 255, 0.86);
  --field: #ffffff;
  --shadow: 0 13px 35px rgba(31, 43, 55, 0.11);
  --nav-bg: rgba(248, 250, 251, 0.78);
  --nav-pill: rgba(16, 31, 50, 0.065);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

button {
  border: 0;
  cursor: pointer;
}

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

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  background: var(--paper);
}

.page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 46px;
}

.brand-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: 112px;
  padding: 18px clamp(22px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--nav-bg);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px) saturate(145%);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  width: clamp(210px, 19vw, 270px);
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.brand-logo-light {
  display: none;
}

:root[data-theme="light"] .brand-logo-dark {
  display: none;
}

:root[data-theme="light"] .brand-logo-light {
  display: block;
}

.header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.header-meta > span:not(.portal-label) {
  white-space: nowrap;
}

.header-right {
  display: grid;
  grid-template-columns: minmax(0, auto) auto;
  grid-template-areas: "meta actions";
  align-items: center;
  justify-content: end;
  gap: 14px clamp(18px, 2.4vw, 34px);
  min-width: 0;
}

.header-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.header-meta {
  grid-area: meta;
}

.header-button {
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--nav-pill);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.header-button:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--green) 42%, var(--line));
  background: var(--panel-hover);
}

.button-icon {
  width: 17px;
  height: 17px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle {
  position: relative;
  width: 92px;
  height: 50px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(145deg, rgba(11, 20, 33, 0.96), rgba(22, 38, 58, 0.96));
  color: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 10px 22px rgba(16, 31, 50, 0.14);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.theme-toggle .theme-icon {
  position: relative;
  z-index: 2;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 1;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.18) 58%, rgba(255, 255, 255, 0.08) 100%), linear-gradient(180deg, #f2f4f3, #cfd5d4);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: transform 220ms cubic-bezier(.2, .8, .2, 1);
}

.theme-toggle.is-dark .theme-thumb {
  transform: translateX(42px);
}

.theme-toggle.is-light .theme-icon.sun,
.theme-toggle.is-dark .theme-icon.moon {
  color: #172233;
}

.theme-toggle.is-light .theme-icon.moon,
.theme-toggle.is-dark .theme-icon.sun {
  color: rgba(255, 255, 255, 0.72);
}

.portal-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 7px 11px;
  border: 1px solid color-mix(in srgb, var(--green) 44%, var(--line));
  border-radius: 999px;
  color: var(--ink);
  background: color-mix(in srgb, var(--green) 10%, transparent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.portal-label::before {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 12px color-mix(in srgb, var(--green) 75%, transparent);
  content: "";
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.72fr);
  gap: 30px;
  align-items: stretch;
  margin-top: 28px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(150deg, #101f32, #0d1b2c);
  color: white;
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] .intro,
:root[data-theme="dark"] .panel-count,
:root[data-theme="dark"] .status-completado,
:root[data-theme="dark"] .editor-tabs button.active {
  background: #101f32;
}

:root[data-theme="light"] .intro {
  background: linear-gradient(150deg, #101f32, #172b43);
}

.intro-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  min-height: 280px;
}

.project-name,
.section-kicker {
  margin: 0;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.intro .project-name,
.stage-panel .section-kicker {
  color: var(--green-soft);
}

.intro h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--serif);
  font-size: 78px;
  line-height: 0.92;
}

.intro h1 em {
  color: var(--green-soft);
  font-style: italic;
}

.intro p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
  line-height: 1.42;
  font-weight: 700;
}

.stage-panel {
  display: grid;
  align-content: center;
  gap: 16px;
  min-height: 280px;
  padding: 24px;
  border: 1px solid color-mix(in srgb, var(--green) 58%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--paper-soft) 94%, transparent);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.stage-panel h2,
.panel-header h2,
.budget-panel h2,
.message-box h1,
.editor-panel h2,
.admin-toolbar h1 {
  margin: 0;
  font-family: var(--serif);
  line-height: 1;
}

.stage-panel h2 {
  font-size: 38px;
}

.stage-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 700;
}

.progress-card {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.progress-head strong {
  color: var(--ink);
  font-size: 18px;
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 20%, transparent);
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.progress-0 span {
  width: 0;
}

.progress-10 span {
  width: 10%;
}

.progress-20 span {
  width: 20%;
}

.progress-30 span {
  width: 30%;
}

.progress-40 span {
  width: 40%;
}

.progress-50 span {
  width: 50%;
}

.progress-60 span {
  width: 60%;
}

.progress-70 span {
  width: 70%;
}

.progress-80 span {
  width: 80%;
}

.progress-90 span {
  width: 90%;
}

.progress-100 span {
  width: 100%;
}

.progress-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.overview-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 18px 0 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.overview-strip article {
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 20px 22px;
  border-right: 1px solid var(--line);
}

.overview-strip article:last-child {
  border-right: 0;
}

.overview-strip span {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.overview-strip strong {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
}

.timeline-panel,
.panel,
.editor-panel,
.message-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.timeline-panel {
  margin-bottom: 22px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-header.no-line {
  border-bottom: 0;
  padding-bottom: 10px;
}

.panel-header h2 {
  font-size: 34px;
}

.panel-count {
  flex: 0 0 auto;
  min-width: 44px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--dark);
  color: white;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  padding: 24px 22px 26px;
}

.timeline::before {
  position: absolute;
  top: 62px;
  left: 44px;
  right: 44px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), color-mix(in srgb, var(--green) 20%, var(--line)));
  content: "";
}

.timeline-item {
  position: relative;
  display: grid;
  gap: 16px;
  align-content: start;
  min-height: 170px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  overflow: hidden;
}

.timeline-item:last-child {
  border-right: 1px solid var(--line);
}

.timeline-item.phase-actual {
  background: color-mix(in srgb, var(--green) 12%, transparent);
  box-shadow: inset 0 4px 0 var(--green);
}

.timeline-item.phase-completado {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.timeline-number {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin: 10px 0 0 18px;
  border: 2px solid var(--green);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--green);
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 0 0 8px var(--paper), 0 10px 22px rgba(0, 0, 0, 0.16);
}

.timeline-item > div {
  padding: 0 18px 18px;
}

.timeline-item strong {
  display: block;
  font-size: 17px;
}

.timeline-item p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.36;
  font-weight: 700;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.8fr);
  gap: 22px;
  align-items: start;
}

.calendar-list,
.link-groups,
.request-list {
  display: grid;
}

.calendar-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.calendar-item:last-child,
.link-item:last-child,
.request-item:last-child {
  border-bottom: 0;
}

.calendar-actual {
  background: color-mix(in srgb, var(--green) 10%, transparent);
  box-shadow: inset 4px 0 0 var(--green);
}

.calendar-date {
  display: grid;
  align-content: start;
  gap: 4px;
  color: var(--green);
  font-weight: 800;
}

.calendar-date strong {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 0.95;
}

.calendar-copy h3,
.link-copy h3,
.request-item h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.calendar-copy p,
.link-copy p,
.request-item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.42;
  font-weight: 700;
}

.status-pill {
  align-self: start;
  min-width: 92px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.status-actual {
  border-color: transparent;
  background: var(--green);
  color: #0b0f14;
}

.status-completado {
  border-color: transparent;
  background: var(--dark);
  color: white;
}

.side-stack {
  display: grid;
  gap: 22px;
}

.client-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 10px 0;
}

.client-tabs button {
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  font-weight: 900;
}

.client-tabs button:hover {
  border-color: color-mix(in srgb, var(--green) 42%, var(--line));
}

.client-tabs button.active {
  background: var(--green);
  color: #0b0f14;
  border-color: transparent;
}

.client-tab-panel {
  display: none;
}

.client-tab-panel.active {
  display: block;
}

.client-panel-stack {
  display: grid;
  gap: 22px;
}

.client-panel {
  overflow: hidden;
}

.request-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: start;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--green);
}

.request-completado .status-dot {
  background: var(--dark);
}

.link-group {
  border-bottom: 1px solid var(--line);
}

.link-group:last-child {
  border-bottom: 0;
}

.link-group > h3 {
  margin: 0;
  padding: 18px 20px 0;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.link-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.link-type {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--green) 38%, transparent);
  background: color-mix(in srgb, var(--green) 10%, transparent);
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.open-link,
.primary-button,
.secondary-button,
.danger-button,
.icon-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.open-link,
.primary-button {
  padding: 10px 16px;
  background: var(--green);
  color: #0b0f14;
}

:root[data-theme="dark"] .secondary-button,
:root[data-theme="dark"] .header-button,
:root[data-theme="dark"] .editor-tabs button {
  background: var(--panel-soft);
  color: var(--ink);
}

.open-link {
  min-width: 118px;
}

.secondary-button {
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--ink);
}

.danger-button {
  padding: 10px 14px;
  background: var(--danger);
  color: white;
}

.icon-button {
  width: 40px;
  background: rgba(154, 50, 39, 0.09);
  color: var(--danger);
  font-size: 22px;
  line-height: 1;
}

.budget-panel {
  padding: 22px;
}

.budget-panel h2 {
  margin-top: 14px;
  font-size: 29px;
}

.budget-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.budget-row {
  display: grid;
  gap: 5px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.budget-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.budget-row span {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.budget-row p {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
}

.note-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.note-list li {
  position: relative;
  padding-left: 15px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
}

.note-list li::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--green);
}

.client-note-list {
  padding: 22px;
  gap: 14px;
}

.client-note-list li {
  padding: 16px 16px 16px 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
}

.client-note-list li::before {
  top: 23px;
  left: 16px;
}

.footer {
  display: flex;
  justify-content: center;
  margin-top: 34px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.message-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
  background: var(--paper);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(8, 7, 19, 0.58);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(520px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

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

.modal-head h2 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
}

.modal-card p {
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 700;
}

.notification-form {
  display: grid;
  gap: 14px;
}

.message-box {
  width: min(520px, 100%);
  padding: 28px;
}

.message-box h1 {
  margin-top: 20px;
  font-size: 36px;
}

.message-box p {
  margin: 10px 0 18px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.admin-layout {
  display: grid;
  gap: 18px;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-strong);
  background: var(--paper);
  backdrop-filter: blur(10px);
}

.admin-toolbar h1 {
  font-size: 54px;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.editor-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: sticky;
  top: 103px;
  z-index: 4;
  padding: 10px 0;
  background: var(--paper);
}

.editor-tabs button {
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  font-weight: 800;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.editor-tabs button:hover {
  background: var(--dark);
  color: #ffffff;
  border-color: var(--dark);
  transform: translateY(-1px);
}

.editor-tabs button.active {
  background: var(--dark);
  color: #ffffff;
  border-color: var(--dark);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.editor-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.editor-panel h2 {
  font-size: 30px;
}

.field-grid {
  display: grid;
  gap: 14px;
}

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

.access-box {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.check-field {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.check-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.field label {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field textarea,
:root[data-theme="dark"] .field select {
  background: var(--field);
  color: var(--ink);
}

.field-help {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
}

.field input,
.field select {
  min-height: 42px;
  padding: 9px 11px;
}

.password-input {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input input {
  padding-right: 50px;
}

.password-toggle {
  position: absolute;
  right: 7px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--muted);
}

.password-toggle:hover,
.password-toggle.is-visible {
  color: var(--green);
  background: color-mix(in srgb, var(--green) 10%, transparent);
}

.password-toggle .button-icon {
  width: 18px;
  height: 18px;
}

.password-status {
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
  padding: 11px;
  line-height: 1.4;
}

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

.editor-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.editor-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.editor-card-head strong {
  font-size: 14px;
}

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

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.74fr) minmax(0, 1.26fr);
  gap: 22px;
  align-items: start;
  margin-top: 22px;
}

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

.project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.project-row div:first-child {
  display: grid;
  gap: 4px;
}

.project-row strong {
  font-size: 18px;
}

.project-row span,
.project-row small {
  color: var(--muted);
  font-weight: 700;
}

.project-row-actions {
  display: flex;
  gap: 8px;
}

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

.subscriber-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

:root[data-theme="dark"] .subscriber-row,
:root[data-theme="dark"] .editor-card,
:root[data-theme="dark"] .project-row {
  background: var(--panel-soft);
}

.subscriber-row span {
  color: var(--muted);
  font-weight: 700;
}

.login-form {
  display: grid;
  gap: 14px;
}

.toast {
  min-height: 20px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.empty {
  padding: 20px 22px;
  color: var(--muted);
  font-weight: 700;
}

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

  .timeline::before {
    top: 34px;
    bottom: 34px;
    left: 49px;
    right: auto;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, var(--green), color-mix(in srgb, var(--green) 20%, var(--line)));
  }

  .timeline-item,
  .timeline-item:last-child {
    min-height: auto;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .timeline-number {
    margin-left: 18px;
  }

  .timeline-item:last-child {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 900px) {
  .page {
    width: min(100% - 28px, 680px);
    padding: 22px 0 34px;
  }

  .brand-header {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 16px 24px;
    min-height: auto;
    padding: 22px;
    border-radius: 30px;
  }

  .wordmark {
    width: min(260px, 45vw);
  }

  .header-right {
    width: auto;
    grid-template-columns: 1fr;
    grid-template-areas:
      "actions"
      "meta";
    justify-content: end;
    justify-items: end;
    justify-self: stretch;
  }

  .header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .header-meta {
    justify-content: flex-end;
    text-align: right;
  }

  .header-meta > span:not(.portal-label) {
    white-space: normal;
  }

  .admin-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .intro,
  .content-grid,
  .dashboard-grid,
  .inline-grid {
    grid-template-columns: 1fr;
  }

  .intro {
    gap: 18px;
    margin-top: 22px;
    padding: 24px;
  }

  .intro-copy,
  .stage-panel {
    min-height: auto;
  }

  .intro h1 {
    font-size: 42px;
  }

  .intro p {
    font-size: 17px;
  }

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

  .overview-strip article {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .overview-strip article:last-child {
    border-bottom: 0;
  }

  .calendar-item,
  .link-item,
  .request-item,
  .project-row {
    grid-template-columns: 1fr;
  }

  .status-pill {
    width: fit-content;
  }

  .toolbar-actions,
  .project-row-actions {
    justify-content: flex-start;
  }

  .editor-tabs {
    position: static;
  }
}

@media (max-width: 680px) {
  .brand-header {
    grid-template-columns: 1fr;
    align-items: flex-start;
    border-radius: 24px;
    padding: 18px;
  }

  .wordmark {
    width: min(230px, 82vw);
  }

  .header-meta {
    justify-content: flex-start;
    text-align: left;
  }

  .header-right {
    width: 100%;
    justify-items: start;
  }

  .header-actions {
    justify-content: flex-start;
  }
}
