:root {
  color-scheme: light;
  --bg: #f4efe8;
  --surface: rgba(255, 255, 255, 0.74);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --line: rgba(22, 33, 45, 0.08);
  --text: #132231;
  --muted: #64748b;
  --accent: #0f766e;
  --accent-warm: #d97706;
  --success: #15803d;
  --warning: #b45309;
  --shadow-lg: 0 24px 80px rgba(19, 34, 49, 0.12);
  --shadow-md: 0 18px 40px rgba(19, 34, 49, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 26%),
    radial-gradient(circle at bottom right, rgba(217, 119, 6, 0.15), transparent 24%),
    linear-gradient(180deg, #fbf7f1 0%, #f3ede4 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  opacity: 0.45;
  z-index: -1;
}

body::before {
  top: -8rem;
  right: -10rem;
  background: rgba(15, 118, 110, 0.18);
}

body::after {
  bottom: -10rem;
  left: -8rem;
  background: rgba(217, 119, 6, 0.12);
}

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

button {
  cursor: pointer;
  border: 0;
}

textarea {
  resize: vertical;
}

#app {
  min-height: 100vh;
}

.page-shell {
  min-height: 100vh;
}

.login-shell,
.app-shell {
  width: min(1320px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 430px);
  gap: 1.5rem;
  align-items: stretch;
  padding-top: 2.5rem;
}

.hero-panel,
.auth-card,
.panel,
.preview-card,
.stage-card,
.editor-card,
.focus-card,
.toast,
.user-card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow-md);
}

.hero-panel,
.auth-card,
.panel {
  border-radius: var(--radius-xl);
}

.hero-panel {
  padding: 2.8rem;
  position: relative;
  overflow: hidden;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.5), transparent 44%),
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), transparent 60%);
  pointer-events: none;
}

.auth-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
  margin: 0;
}

h1 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 0.96;
  max-width: 11ch;
}

h2 {
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.02;
}

h3 {
  font-size: 1.1rem;
  line-height: 1.15;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.hero-copy {
  max-width: 62ch;
  margin: 1rem 0 1.8rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
}

.hero-progress-card,
.preview-card,
.metric-card,
.mini-stat,
.credential-chip,
.session-pill,
.focus-card,
.empty-card,
.notification-item,
.user-card {
  border-radius: var(--radius-md);
}

.hero-progress-card {
  padding: 1.4rem;
  background: rgba(19, 34, 49, 0.9);
  color: white;
  margin-bottom: 1.4rem;
}

.hero-progress-card p,
.hero-progress-card span {
  color: rgba(255, 255, 255, 0.78);
}

.progress-kicker {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.progress-kicker strong {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 0.9;
  font-family: "Space Grotesk", sans-serif;
}

.progress-bar {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.18);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #34d399);
}

.progress-bar.large {
  height: 14px;
}

.hero-stat-grid,
.metric-grid,
.form-grid,
.chips-row,
.dashboard-grid,
.admin-panels,
.admin-dual-grid,
.user-card-grid {
  display: grid;
  gap: 1rem;
}

.hero-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}

.mini-stat,
.metric-card,
.preview-card,
.credential-chip,
.focus-card,
.empty-card {
  padding: 1rem 1.1rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.mini-stat strong,
.metric-card strong {
  display: block;
  margin-top: 0.4rem;
  font-size: 1.3rem;
  color: var(--text);
}

.preview-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.hero-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.preview-badge,
.status-pill,
.soft-chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.preview-badge {
  padding: 0.5rem 0.75rem;
  background: rgba(15, 118, 110, 0.12);
  color: var(--accent);
}

.preview-badge.admin {
  background: rgba(217, 119, 6, 0.14);
  color: var(--accent-warm);
}

.auth-card__header {
  display: grid;
  gap: 0.6rem;
}

.auth-form,
.stack-form,
.field,
.editor-card {
  display: grid;
  gap: 0.95rem;
}

.field span,
.field-inline span {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
}

.field-inline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #0f766e;
}

.checkbox-row strong {
  font-size: 0.92rem;
  color: var(--text);
}

.remember-field {
  gap: 0.3rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid rgba(100, 116, 139, 0.18);
  border-radius: 16px;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.range-input:focus {
  border-color: rgba(15, 118, 110, 0.36);
  box-shadow: 0 0 0 5px rgba(15, 118, 110, 0.12);
}

.primary-btn,
.ghost-btn,
.icon-btn,
.text-btn {
  border-radius: 999px;
  font-weight: 800;
  transition: transform 140ms ease, opacity 140ms ease, background-color 140ms ease;
}

.primary-btn:hover,
.ghost-btn:hover,
.icon-btn:hover,
.text-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  padding: 0.92rem 1.2rem;
  background: linear-gradient(135deg, #0f766e, #0b5d57);
  color: white;
}

.ghost-btn {
  padding: 0.88rem 1rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  border: 1px solid var(--line);
}

.icon-btn,
.text-btn {
  padding: 0;
  background: none;
  color: var(--accent);
}

.demo-access,
.credentials-list {
  display: grid;
  gap: 0.8rem;
}

.credentials-list {
  margin-top: auto;
}

.credential-chip {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.session-pill {
  padding: 0.75rem 0.95rem;
  display: flex;
  flex-direction: column;
  min-width: 170px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.session-pill span {
  font-size: 0.84rem;
  color: var(--muted);
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 390px);
  align-items: start;
}

.admin-dual-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.main-column,
.side-column,
.admin-panels {
  gap: 1rem;
}

.main-column,
.side-column {
  display: grid;
}

.panel {
  padding: 1.4rem;
}

.overview-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 1.3rem;
}

.overview-copy {
  display: grid;
  gap: 1rem;
}

.chips-row {
  grid-template-columns: repeat(2, minmax(0, max-content));
}

.soft-chip {
  padding: 0.68rem 0.92rem;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
}

.metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.section-panel,
.side-panel,
.form-panel {
  display: grid;
  gap: 1rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.section-head.compact {
  align-items: start;
}

.section-head p {
  max-width: 34ch;
}

.timeline-list,
.editor-list,
.notification-list,
.user-card-grid {
  display: grid;
  gap: 1rem;
}

.timeline-list {
  position: relative;
  padding-left: 1.1rem;
}

.timeline-list::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  bottom: 0.4rem;
  left: 0.1rem;
  width: 2px;
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.5), rgba(15, 118, 110, 0.08));
}

.stage-card,
.editor-card {
  position: relative;
  padding: 1.3rem;
  animation: rise 480ms ease both;
  animation-delay: var(--delay, 0ms);
}

.user-card {
  display: grid;
  gap: 0.9rem;
  padding: 1.1rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  animation: rise 480ms ease both;
  animation-delay: var(--delay, 0ms);
}

.stage-card {
  margin-left: 0.8rem;
}

.stage-card::before {
  content: "";
  position: absolute;
  top: 1.5rem;
  left: -1.42rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f766e, #34d399);
  box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.14);
}

.stage-card__head,
.stage-meta,
.notification-top,
.focus-meta,
.editor-card__header,
.editor-footer,
.user-card__top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.stage-card__head,
.editor-card__header,
.notification-top {
  align-items: start;
}

.stage-card h3,
.editor-card h3,
.focus-card h3 {
  margin-top: 0.55rem;
  margin-bottom: 0.5rem;
}

.stage-meta,
.stage-date,
.editor-footer span,
.focus-meta span,
.notification-top span,
.user-card__meta span {
  font-size: 0.84rem;
  color: var(--muted);
}

.user-card__meta {
  display: grid;
  gap: 0.3rem;
}

.user-card__meta strong {
  color: var(--text);
  font-size: 0.95rem;
}

.status-pill {
  padding: 0.45rem 0.75rem;
  border: 1px solid transparent;
}

.status-pill.pending {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

.status-pill.in_progress {
  background: rgba(15, 118, 110, 0.12);
  color: var(--accent);
}

.status-pill.completed {
  background: rgba(21, 128, 61, 0.12);
  color: var(--success);
}

.focus-card {
  display: grid;
  gap: 0.9rem;
}

.browser-notification-card .primary-btn {
  width: auto;
}

.range-input {
  width: 100%;
  appearance: none;
  height: 10px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.18);
  outline: none;
}

.range-input::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0f766e;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}

.range-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: #0f766e;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}

.notification-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.notification-item.is-unread {
  border-color: rgba(15, 118, 110, 0.26);
  background: rgba(255, 255, 255, 0.92);
}

.notification-item__icon {
  width: 54px;
  min-width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
}

.notification-item__icon.info {
  background: rgba(15, 118, 110, 0.14);
  color: var(--accent);
}

.notification-item__icon.success {
  background: rgba(21, 128, 61, 0.12);
  color: var(--success);
}

.notification-item__icon.warning {
  background: rgba(180, 83, 9, 0.14);
  color: var(--warning);
}

.notification-item__content {
  display: grid;
  gap: 0.5rem;
}

.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  gap: 0.75rem;
  z-index: 40;
}

.toast {
  min-width: 240px;
  max-width: 320px;
  padding: 1rem 1.1rem;
  border-radius: 22px;
}

.toast strong {
  display: block;
}

.toast.info {
  background: rgba(15, 118, 110, 0.94);
  color: white;
}

.toast.success {
  background: rgba(21, 128, 61, 0.94);
  color: white;
}

.toast.warning {
  background: rgba(180, 83, 9, 0.96);
  color: white;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .login-shell,
  .dashboard-grid,
  .overview-panel,
  .admin-dual-grid {
    grid-template-columns: 1fr;
  }

  .hero-preview-grid,
  .hero-stat-grid,
  .metric-grid,
  .chips-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .login-shell,
  .app-shell {
    width: min(100% - 1rem, 1320px);
    padding-top: 1rem;
  }

  .hero-panel,
  .auth-card,
  .panel {
    padding: 1.1rem;
    border-radius: 26px;
  }

  .topbar,
  .topbar-actions,
  .section-head,
  .editor-card__header,
  .editor-footer,
  .user-card__top,
  .stage-card__head,
  .stage-meta,
  .focus-meta,
  .notification-top,
  .credential-chip {
    flex-direction: column;
    align-items: start;
  }

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

  .session-pill {
    min-width: 0;
    width: 100%;
  }

  .topbar-actions {
    width: 100%;
  }

  .ghost-btn,
  .primary-btn {
    width: 100%;
  }

  .notification-item {
    grid-template-columns: 1fr;
  }
}
