:root {
  --bg-1: #f2f4f8;
  --bg-2: #dce5ee;
  --surface: #ffffff;
  --surface-2: #f7fafc;
  --text: #122030;
  --muted: #5f7284;
  --primary: #0a7c6f;
  --primary-2: #0b5f55;
  --warning: #c66a1b;
  --border: #d7e0ea;
  --ok: #2f8f4e;
  --bad: #b63f3f;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow: 0 14px 35px rgba(17, 31, 47, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
}

.operator-bg {
  background: radial-gradient(circle at 15% 15%, #d0ece4 0%, transparent 35%),
    radial-gradient(circle at 90% 5%, #c9dff1 0%, transparent 30%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
}

.admin-bg {
  background: linear-gradient(155deg, #f4f1e8 0%, #dae8e4 50%, #d7e1ef 100%);
}

.container {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 20px 14px 32px;
}

.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
  animation: card-enter 0.38s ease both;
}

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

h1 {
  font-size: clamp(1.35rem, 2.8vw, 2rem);
}

h2 {
  font-size: 1.15rem;
}

h3 {
  font-size: 1rem;
}

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

.small {
  font-size: 0.84rem;
}

.row {
  display: flex;
}

.full {
  width: 100%;
}

.mt-10 {
  margin-top: 10px;
}

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

.center {
  align-items: center;
}

.gap {
  gap: 10px;
}

.grow {
  flex: 1;
}

label {
  font-size: 0.92rem;
  margin-top: 8px;
}

input,
textarea,
button,
a.btn {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 11px;
  background: #fff;
}

input:focus,
textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--primary) 33%, transparent);
  border-color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  padding: 10px 12px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.15s ease, opacity 0.2s ease;
}

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

.btn.primary {
  background: linear-gradient(145deg, var(--primary), var(--primary-2));
  color: white;
}

.btn.secondary {
  background: #eaf2f7;
  border-color: #c8d8e6;
  color: #254055;
}

.btn.warning {
  background: #fef0e2;
  border-color: #f5c89a;
  color: #8c4d15;
}

.btn.ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}

.street-banner {
  border-radius: var(--radius-md);
  border: 1px solid #c6dfd8;
  background: linear-gradient(135deg, #ebfaf4, #f3fcfa);
  padding: 10px 12px;
  margin: 12px 0;
}

.stepper {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.step-chip {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #f8fbfd;
  color: #4e6275;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease, background-color 0.25s ease, color 0.25s ease;
}

.step-chip__num {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #bfd0df;
  background: #fff;
}

.step-chip.is-active {
  background: #e8f6f2;
  color: #0a645b;
  transform: translateY(-1px);
}

.step-chip.is-done {
  background: #eef8ff;
  color: #2f5577;
}

.step-screen {
  display: none;
  margin-top: 12px;
}

.step-screen.active {
  display: block;
  animation: step-enter 0.28s ease both;
}

.form-grid {
  display: grid;
  gap: 6px;
}

.geo-box {
  margin-top: 8px;
  border: 1px dashed #b8c8d7;
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.feedback {
  margin-top: 12px;
  border-radius: var(--radius-md);
  padding: 10px;
  font-weight: 700;
  animation: feedback-enter 0.2s ease both;
}

.feedback.ok {
  background: #e9f8ee;
  border: 1px solid #bde7cb;
  color: var(--ok);
}

.feedback.warn {
  background: #fff5ea;
  border: 1px solid #f6d4b1;
  color: #8f5c21;
}

.feedback.bad {
  background: #fdeaea;
  border: 1px solid #f1c2c2;
  color: var(--bad);
}

.error {
  margin-top: 8px;
  color: var(--bad);
}

.records-list {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.record-item {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius-md);
  padding: 9px 10px;
}

.result-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 12px;
}

.result-card.ok {
  border-color: #bfe9cc;
  background: #eefaf2;
}

.result-card.warn {
  border-color: #f5d4b3;
  background: #fff6ec;
}

.result-card.bad {
  border-color: #efc4c4;
  background: #fdf1f1;
}

.summary-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.summary-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 10px;
}

.summary-card .value {
  font-size: 1.4rem;
  font-weight: 800;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-top: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 840px;
  font-size: 0.9rem;
}

th,
td {
  border-bottom: 1px solid #e6edf4;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #edf4fa;
  position: sticky;
  top: 0;
  z-index: 1;
}

.tag {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.tag.ok {
  background: #e7f8ed;
  color: var(--ok);
}

.tag.warn {
  background: #fff1df;
  color: #8e5a1d;
}

.tag.bad {
  background: #fce8e8;
  color: var(--bad);
}

.admin-layout {
  width: min(100%, 1200px);
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes step-enter {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes feedback-enter {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 720px) {
  .container {
    padding: 14px 10px 24px;
  }

  .row.gap {
    flex-direction: column;
  }

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

  .geo-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .step-chip {
    font-size: 0.74rem;
    gap: 6px;
  }
}

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