:root {
  color-scheme: light;
  --paper: oklch(97.8% 0.008 80);
  --surface: oklch(99.2% 0.006 78);
  --surface-2: oklch(95.4% 0.012 76);
  --ink: oklch(20.5% 0.052 258);
  --muted: oklch(48% 0.042 260);
  --line: oklch(88% 0.012 82);
  --navy: oklch(25% 0.105 258);
  --navy-strong: oklch(19% 0.092 258);
  --coral: oklch(66% 0.18 31);
  --mint: oklch(75% 0.12 156);
  --blue: oklch(62% 0.13 238);
  --shadow: 0 18px 60px oklch(30% 0.05 258 / 0.12);
  --radius: 8px;
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, oklch(82% 0.012 78 / 0.36) 1px, transparent 1px),
    linear-gradient(0deg, oklch(82% 0.012 78 / 0.36) 1px, transparent 1px),
    var(--paper);
  background-size: 48px 48px;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px 18px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  text-decoration: none;
  font-family: "Sora", sans-serif;
  font-weight: 700;
}

.brand img {
  width: 104px;
  height: auto;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: oklch(98.5% 0.004 80);
}

.nav-list {
  display: grid;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.nav-item:hover,
.nav-item.active {
  color: var(--ink);
  background: var(--surface-2);
}

.sync-card {
  margin-top: auto;
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: oklch(97.2% 0.01 78);
}

.sync-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

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

.status-dot.online {
  background: var(--mint);
}

.workspace {
  padding: 32px clamp(20px, 4vw, 56px) 56px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: "Sora", sans-serif;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  font-size: clamp(2rem, 4vw, 4.15rem);
  line-height: 0.98;
}

h2 {
  font-size: clamp(1.15rem, 1.6vw, 1.55rem);
  line-height: 1.16;
}

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

.primary-button,
.ghost-button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--radius);
  font-weight: 800;
  border: 1px solid transparent;
}

.primary-button {
  color: oklch(98% 0.005 80);
  background: var(--navy);
}

.ghost-button {
  color: var(--navy);
  background: var(--surface);
  border-color: var(--line);
}

.notice {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  padding: 12px 14px;
  border: 1px solid oklch(84% 0.055 238);
  border-radius: var(--radius);
  color: oklch(34% 0.07 238);
  background: oklch(95% 0.025 235);
}

.notice[data-tone="success"] {
  border-color: oklch(78% 0.09 156);
  color: oklch(35% 0.07 156);
  background: oklch(94% 0.035 156);
}

.notice[data-tone="error"] {
  border-color: oklch(76% 0.13 31);
  color: oklch(36% 0.1 31);
  background: oklch(94% 0.04 31);
}

.notice[data-tone="warn"] {
  border-color: oklch(78% 0.1 78);
  color: oklch(36% 0.07 70);
  background: oklch(94% 0.045 82);
}

.hidden {
  display: none !important;
}

.empty {
  margin: 0;
  color: var(--muted);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.summary-panel,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.summary-panel {
  padding: 22px;
}

.summary-panel p,
.summary-panel span {
  margin: 0;
  color: var(--muted);
}

.summary-panel h2 {
  margin: 8px 0;
  font-size: clamp(1.8rem, 3vw, 3.3rem);
}

.summary-panel.strong {
  color: oklch(97% 0.006 80);
  background: var(--navy);
  border-color: oklch(40% 0.09 258);
}

.summary-panel.strong p,
.summary-panel.strong span {
  color: oklch(86% 0.03 245);
}

.two-column,
.data-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  gap: 16px;
}

.panel {
  padding: 28px;
}

.panel-heading {
  margin-bottom: 24px;
}

.dark-panel {
  color: oklch(97% 0.006 80);
  background: var(--navy-strong);
  border-color: oklch(38% 0.09 258);
}

.operation-stack {
  display: grid;
  gap: 10px;
}

.operation-stack span {
  display: block;
  padding: 12px;
  border-radius: var(--radius);
  background: oklch(28% 0.08 258);
}

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

.checklist li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.checklist li:last-child {
  border-bottom: 0;
}

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

.form-panel {
  display: grid;
  gap: 16px;
}

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

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: oklch(99.1% 0.004 80);
  outline: 0;
}

input,
select {
  height: 44px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  min-height: 100px;
  padding: 12px;
  line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px oklch(72% 0.1 238 / 0.2);
}

.wide {
  grid-column: 1 / -1;
}

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

.record {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: oklch(98% 0.006 78);
}

.record p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.record span {
  flex: 0 0 auto;
  color: var(--coral);
  font-weight: 800;
}

.security-note {
  padding: 12px;
  border-radius: var(--radius);
  color: oklch(40% 0.08 31);
  background: oklch(94% 0.035 50);
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .summary-grid,
  .two-column,
  .data-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .workspace {
    padding: 22px 14px 36px;
  }

  .topbar {
    display: grid;
  }

  .top-actions,
  .form-actions {
    justify-content: stretch;
  }

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

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

  .panel {
    padding: 20px;
  }
}



.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
  background:
    radial-gradient(circle at 22% 18%, oklch(93% 0.035 35 / 0.72), transparent 32%),
    linear-gradient(135deg, oklch(98% 0.008 80), oklch(94% 0.018 238));
}

.auth-brand {
  position: fixed;
  top: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-family: "Sora", sans-serif;
  font-weight: 800;
}

.auth-brand img {
  width: 118px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.auth-card {
  width: min(720px, 100%);
  padding: clamp(26px, 5vw, 46px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: oklch(99% 0.006 80 / 0.94);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  max-width: 620px;
  font-size: clamp(2.25rem, 7vw, 4.8rem);
}

.auth-copy {
  max-width: 580px;
  margin: 16px 0 28px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

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

.auth-form .form-actions {
  justify-content: flex-start;
}
.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 22px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.auth-tab {
  min-height: 42px;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.auth-tab.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 8px 22px oklch(30% 0.05 258 / 0.08);
}