:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #6f7686;
  --line: #e7e8ec;
  --paper: #ffffff;
  --canvas: #f6f7f9;
  --shadow: 0 18px 50px rgba(26, 35, 54, 0.1);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--canvas);
}

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

button {
  cursor: pointer;
}

.app-header {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 24px;
  border-radius: 8px 8px 12px 12px;
  background: var(--accent, #ff5c35);
  position: relative;
}

.brand-mark::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 8px;
  left: 7px;
  top: -6px;
  border-radius: 50% 50% 4px 4px;
  background: var(--accent, #ff5c35);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

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

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

.btn {
  border: 0;
  border-radius: 13px;
  padding: 12px 18px;
  color: #fff;
  background: var(--accent, #ff5c35);
  font-weight: 800;
  transition: transform 160ms ease, filter 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

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

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

.btn.ghost {
  color: var(--accent, #ff5c35);
  background: color-mix(in srgb, var(--accent, #ff5c35) 10%, white);
}

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

.field label {
  font-size: 13px;
  font-weight: 800;
  color: #505767;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid #dfe2e8;
  border-radius: 12px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent, #ff5c35);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #ff5c35) 15%, transparent);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent, #ff5c35);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.muted {
  color: var(--muted);
}

.stat {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.stat strong {
  display: block;
  margin-top: 7px;
  font-size: 26px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  padding: 13px 17px;
  color: #fff;
  background: #172033;
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .app-header {
    padding: 0 16px;
  }

  .page {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .back-link {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
