﻿:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --line: #dfe7f1;
  --text: #20324a;
  --muted: #66758a;
  --blue: #2196f3;
  --green: #4caf50;
  --red: #ef4444;
  --shadow: 0 10px 30px rgba(27, 54, 93, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fbff 0%, #eef3f9 100%);
}
button, input, textarea, select { font: inherit; }
.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 40px;
}
.hero-card,
.panel-card,
.note-card,
.modal-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.hero-card {
  padding: 22px 24px;
  margin-bottom: 14px;
}
.eyebrow {
  margin: 0 0 10px;
  color: #b45309;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-card h1 {
  margin: 0;
  font-size: 58px;
  line-height: 1.02;
  font-weight: 800;
}
.hero-copy {
  margin: 10px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}
.toolbar-card {
  padding: 18px 24px 20px;
  margin-bottom: 14px;
}
.toolbar-head {
  display: grid;
  grid-template-columns: 1.05fr minmax(420px, 560px);
  gap: 20px;
  align-items: start;
}
.toolbar-head h2,
.list-head h3,
.note-card h3,
.modal-head h3 {
  margin: 0;
}
.toolbar-copy {
  margin: 8px 0 0;
  color: var(--muted);
}
.toolbar-actions textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #d6dde8;
  resize: vertical;
  min-height: 88px;
}
.button-row,
.list-head,
.address-actions,
.import-row,
.geo-row,
.geo-actions,
.modal-actions,
.phone-row,
.field-head {
  display: flex;
  gap: 10px;
  align-items: center;
}
.button-row { margin-top: 12px; flex-wrap: wrap; }
.status-bar {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #f1b7b7;
  background: #fffefe;
  color: #cc2f1f;
  font-weight: 600;
  min-height: 48px;
}
.list-card {
  padding: 18px 22px;
}
.list-head {
  justify-content: space-between;
  margin-bottom: 16px;
}
.list-title-wrap {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.count-chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: #206bb0;
  font-size: 12px;
  font-weight: 700;
}
.address-list {
  min-height: 220px;
  display: grid;
  gap: 14px;
}
.address-list.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #8392a6;
  border: 1px dashed #d8e1ec;
  border-radius: 14px;
  background: #fbfdff;
  padding: 40px 20px;
}
.address-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid #d9e8d9;
  border-left: 4px solid var(--green);
  border-radius: 12px;
  background: #f9fffa;
}
.address-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 16px;
}
.address-item p {
  margin: 8px 0 0;
  color: #4b5e73;
  line-height: 1.55;
}
.divider { color: #91a0b3; }
.badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.notes-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.note-card {
  padding: 16px 18px;
}
.note-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}
.btn {
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 700;
  transition: 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-ghost { background: #fff; color: #38506b; border: 1px solid #d2dbe7; }
.btn-danger { background: #fff; color: var(--red); border: 1px solid #f1c2c2; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid #d7dfe9;
  background: #fff;
  cursor: pointer;
  font-size: 24px;
  color: #6b7a8d;
}
.icon-btn.small {
  width: 42px;
  height: 42px;
  font-size: 17px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}
.modal-backdrop.hidden { display: none; }
.modal-card {
  width: min(760px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  padding: 26px 28px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #edf1f6;
  margin-bottom: 20px;
}
.import-box {
  background: #f0f7ff;
  border: 1px dashed #5eaef2;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 20px;
}
.import-box label,
.field,
.field-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #35485d;
}
.import-row { align-items: stretch; margin-top: 10px; }
.import-row textarea { min-height: 44px; }
.modal-form { display: grid; gap: 18px; }
.form-row.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-row.one-col { display: block; }
.field input,
.field textarea,
.field select {
  width: 100%;
  margin-top: 8px;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid #d5dee9;
  background: #fff;
}
.field textarea { resize: vertical; }
.geo-box {
  background: #f8fafc;
  border-radius: 12px;
  padding: 15px;
  border: 1px solid #eef2f7;
}
.geo-actions {
  margin-top: 10px;
  align-items: flex-start;
}
.helper {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.default-box {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #e6ebf1;
  border-radius: 10px;
  font-weight: 600;
}
.text-link {
  border: none;
  background: none;
  color: #e53935;
  font-weight: 700;
  cursor: pointer;
}
.modal-actions { justify-content: flex-end; padding-top: 6px; }
code {
  background: #eef3f8;
  padding: 2px 6px;
  border-radius: 5px;
}
@media (max-width: 980px) {
  .toolbar-head,
  .notes-grid,
  .form-row.two-col {
    grid-template-columns: 1fr;
  }
  .toolbar-actions { min-width: 0; }
  .address-item { flex-direction: column; }
  .address-actions { flex-wrap: wrap; }
  .hero-card h1 { font-size: 42px; }
}
@media (max-width: 680px) {
  .page-shell { padding: 18px 14px 28px; }
  .hero-card h1 { font-size: 34px; }
  .modal-card { padding: 18px; }
  .button-row,
  .list-head,
  .address-actions,
  .import-row,
  .geo-row,
  .geo-actions,
  .modal-actions,
  .phone-row,
  .field-head { flex-wrap: wrap; }
}
