body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #0f172a;
  color: #f1f5f9;
}

.container {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  padding: 16px;
}

.card {
  background: #1e293b;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

h1 {
  font-size: 20px;
  margin: 0 0 12px 0;
}

.input, select, textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #f1f5f9;
  margin-bottom: 10px;
}

.btn {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.btn:hover {
  background: #2563eb;
}
.btn--ghost {
  background: transparent;
  border: 1px solid #475569;
  color: #e2e8f0;
}
.btn--ghost:hover {
  background: #334155;
}

.small {
  font-size: 12px;
  color: #94a3b8;
}

.price {
  font-size: 22px;
  font-weight: bold;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  background: #334155;
  font-size: 12px;
  font-weight: 500;
}
.badge--warn {
  background: #f59e0b;
  color: #1e293b;
}
.badge.pulse {
  animation: pulse 1.5s ease infinite;
}
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.order-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  padding: 4px 0;
  border-bottom: 1px solid #334155;
}
.order-key {
  font-weight: 500;
  color: #94a3b8;
}
.order-val {
  color: #f1f5f9;
}
.order-notes {
  margin-top: 8px;
}
.order-notes pre {
  white-space: pre-wrap;
  background: #0f172a;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #334155;
}

#map {
  width: 100%;
  height: 480px;
  border-radius: 12px;
}
#map-skeleton {
  width: 100%;
  height: 480px;
  background: #1e293b;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 14px;
}
#map-skeleton.hide {
  display: none;
}

/* === Date/Time inputs: светлые иконки на тёмной теме === */
input[type="date"],
input[type="time"] {
  color-scheme: light;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.15);
  opacity: 0.9;
  cursor: pointer;
}
@supports (-moz-appearance: none) {
  input[type="date"],
  input[type="time"] {
    color: #eaecef;
  }
}
input[type="time"]::-webkit-inner-spin-button,
input[type="time"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* === Кнопка «Скопировать сводку» === */
#copySummaryBtn,
.btn.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 10px 14px;
  border-radius: 10px;

  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;

  font: 500 14px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  text-decoration: none;
  user-select: none;

  transition: background .15s ease, border-color .15s ease, transform .02s ease;
}
#copySummaryBtn:hover,
.btn.secondary:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
}
#copySummaryBtn:active,
.btn.secondary:active {
  transform: translateY(1px);
}
#copySummaryBtn:disabled,
.btn.secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
#copySummaryBtn:focus-visible,
.btn.secondary:focus-visible,
input[type="date"]:focus-visible,
input[type="time"]:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.9);
  outline-offset: 2px;
  border-color: rgba(125, 211, 252, 0.7);
}

/* Для выравнивания кнопок действий */
.order-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ============ SUMMARY / ИТОГ — ULTRA STYLED ============ */

/* Заголовок-цена: крупно, с мягким градиентом и свечением */
#summaryTitle{
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 6px 0 2px 0;
  background: linear-gradient(135deg, #93c5fd 0%, #a7f3d0 50%, #fde68a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 24px rgba(147,197,253,.15);
}

/* Подзаголовок (краткое резюме) */
#summarySubtitle{
  color: #a5b4fc;
  font-weight: 500;
  opacity: .9;
  margin-bottom: 14px;
}

/* Контейнер с данными итога — «стекло» с лёгким объёмом */
#orderPreview{
  position: relative;
  padding: 14px;
  border-radius: 14px;
  background:
    radial-gradient(1000px 400px at 10% -20%, rgba(59,130,246,.08), transparent 60%),
    radial-gradient(800px 300px at 110% 120%, rgba(16,185,129,.08), transparent 60%),
    rgba(15,23,42,0.55);
  border: 1px solid rgba(148,163,184,0.20);
  box-shadow:
    0 10px 30px rgba(2,6,23,.35),
    inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(6px);
}

/* Разделители — тонкие, с легкой подсветкой */
#orderPreview .order-item{
  display: grid;
  grid-template-columns: 170px 1fr;
  align-items: start;
  gap: 10px 14px;
  padding: 10px 0;
  border-bottom: 1px solid transparent;
  background:
    linear-gradient(to right, rgba(148,163,184,0.25), rgba(148,163,184,0.05)) bottom/100% 1px no-repeat;
}
#orderPreview .order-item:first-child{ padding-top: 4px; }
#orderPreview .order-item:last-child{
  border-bottom: none;
  background: none;
  padding-bottom: 2px;
}

/* Ключ/лейбл — читается, но не «кричит» */
.order-key{
  color: #9aa7bd;
  font-weight: 600;
  text-transform: none;
  letter-spacing: .01em;
}

/* Значение — главный текст строки */
.order-val{
  color: #e7eef9;
  font-weight: 500;
  word-break: break-word;
}

/* Примечания/описание блока */
.order-notes{
  margin-top: 14px;
  border-radius: 12px;
  border: 1px dashed rgba(148,163,184,0.35);
  background: rgba(2,6,23,0.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.order-notes .order-key{
  padding: 10px 12px 0 12px;
  color: #a5b4fc;
}
.order-notes pre{
  margin: 0;
  padding: 10px 12px 12px 12px;
  background: transparent;
  border: 0;
  color: #e7eef9;
  white-space: pre-wrap;
}

/* Блок действий под итогом — выровнять красиво */
.order-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* Ховер-эффект строки — лёгкая подсветка */
#orderPreview .order-item:hover{
  background:
    linear-gradient(90deg, rgba(59,130,246,.06), rgba(16,185,129,.0));
  border-radius: 8px;
}

/* Адаптив: на узких экранах лейбл сверху, значение снизу */
@media (max-width: 720px){
  #orderPreview .order-item{
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 8px 0;
  }
}

/* Кнопки около итога — чуть «дороже» выглядят */
#copySummaryBtn,
.btn.secondary{
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.25);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.04));
  box-shadow:
    0 6px 18px rgba(2,6,23,0.35),
    inset 0 1px 0 rgba(255,255,255,0.06);
}
#copySummaryBtn:hover,
.btn.secondary:hover{
  border-color: rgba(148,163,184,0.4);
  transform: translateY(-1px);
}
#copySummaryBtn:active,
.btn.secondary:active{
  transform: translateY(0);
}

/* Фокус — явный и аккуратный */
#copySummaryBtn:focus-visible,
.btn.secondary:focus-visible{
  outline: 2px solid rgba(125,211,252,.9);
  outline-offset: 2px;
}

/* === Выравнивание кнопок действий === */
#copySummaryBtn,
#createOrderBtn {
  padding: 10px 16px;         /* одинаковые внутренние отступы */
  min-height: 42px;           /* фиксированная высота */
  font-size: 14px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Бейджик над ценой «Сводка заказа» */
.summary-embedded .muted{
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: linear-gradient(90deg, rgba(59,130,246,.18), rgba(147,197,253,.18));
  color: #cfe6ff;
  border: 1px solid rgba(147,197,253,.35);
  box-shadow:
    0 2px 6px rgba(15,23,42,.25),
    inset 0 1px 0 rgba(255,255,255,.1);
}

/* Мобильный брейкпоинт */
@media (max-width: 720px){
  .container{
    grid-template-columns: 1fr;       /* одна колонка */
    gap: 12px;
    padding: 12px;
  }

  #map, #map-skeleton{
    height: 60vh;                     /* карта повыше на телефоне */
  }

  /* Итог уже делает 1 колонку — доп. отступы */
  #orderPreview{
    padding: 12px;
  }

  /* Поля формы и кнопки — удобные для пальца */
  input, select, textarea, .btn, #copySummaryBtn, #createOrderBtn{
    min-height: 46px;
    font-size: 16px;                  /* 16px: iOS не зумит поле */
  }

  /* Действия — растянуть на всю ширину по желанию */
  .order-actions{
    gap: 10px;
  }
  .order-actions > *{
    flex: 1 1 48%;
  }
}

/* Мелкие UX-штрихи под телефон */
html, body{ -webkit-text-size-adjust: 100%; }
*:focus{ outline-offset: 2px; }
a, button{ -webkit-tap-highlight-color: transparent; }
body{ overscroll-behavior-y: contain; } /* меньше «дёрганий» при скролле */

.admin-login-wrap {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.admin-login-btn {
    text-decoration: none !important;
}