/* Общий стиль: как у сайта 7 Qazan (Montserrat, белый фон, серые плашки, тёмная корзина). */
:root {
  --bg: #ffffff; --soft: #f2f3f5; --soft2: #e7e9ed; --text: #16181d; --muted: #6b7280; --dark: #1f2329;
  --accent: #b8862b; --brand: #b8862b; --ok: #2e9e5b; --warn: #e8a317; --err: #e0453a; --info: #2f6fde;
  --r: 16px; --r-sm: 12px; --shadow: 0 6px 24px rgba(16, 24, 40, .08); --shadow-lg: 0 16px 48px rgba(16, 24, 40, .18);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 500 15px/1.4 Montserrat, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hide { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1 1 auto; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px; border-radius: 14px;
  background: var(--soft); font-weight: 700; font-size: 15px; transition: transform .08s, opacity .15s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-err { background: #fdecea; color: var(--err); }
.btn-line { background: #fff; box-shadow: inset 0 0 0 1.5px var(--soft2); }
.btn-sm { height: 38px; padding: 0 14px; border-radius: 11px; font-size: 14px; }
.btn-block { width: 100%; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--soft); flex: 0 0 auto; }
.icon-btn svg { width: 22px; height: 22px; }

/* поля */
.field { display: block; margin: 0 0 12px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px; font-weight: 600; }
.input, select.input, textarea.input { width: 100%; height: 50px; border: 0; border-radius: 14px; background: var(--soft); padding: 0 16px; outline: none; font-weight: 600; }
textarea.input { height: 84px; padding: 14px 16px; resize: vertical; }
.input:focus { box-shadow: inset 0 0 0 2px var(--dark); background: #fff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* сегменты и чипы */
.seg { display: flex; background: var(--soft); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { flex: 1; height: 42px; border-radius: 11px; font-weight: 700; color: var(--muted); }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; height: 38px; padding: 0 16px; border-radius: 19px; background: var(--soft); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--dark); color: #fff; }

/* плашки статусов */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 700; background: var(--soft); white-space: nowrap; }
.b-new { background: #fff3d6; color: #9a6500; }
.b-accepted { background: #e6efff; color: #1f55b8; }
.b-ready { background: #efe7ff; color: #6a3fc8; }
.b-picked { background: #e0f4ff; color: #0b6b98; }
.b-delivered { background: #e3f5ea; color: #1f7a45; }
.b-cancelled { background: #fdecea; color: #b4231a; }
.b-paid { background: #e3f5ea; color: #1f7a45; }
.b-unpaid { background: #fdecea; color: #b4231a; }

/* карточки */
.card { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; }
.soft-card { background: var(--soft); border-radius: var(--r); padding: 14px 16px; }
.sum-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; }
.sum-row.total { font-weight: 800; font-size: 17px; padding-top: 10px; }
.divider { height: 1px; background: var(--soft2); margin: 10px 0; }

/* всплывающие окна */
.overlay { position: fixed; inset: 0; background: rgba(15, 18, 24, .5); z-index: 1000; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 24px 24px 0 0; animation: up .2s ease-out; position: relative; }
@media (min-width: 700px) { .overlay { align-items: center; } .sheet { border-radius: 24px; } }
.sheet-close { position: absolute; top: 12px; right: 12px; z-index: 2; background: #fff; box-shadow: var(--shadow); }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .5; } }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--dark); color: #fff; padding: 12px 18px; border-radius: 14px;
  font-weight: 600; z-index: 2000; box-shadow: var(--shadow-lg); max-width: calc(100% - 32px); text-align: center; animation: fade .2s; }
.toast.err { background: var(--err); }

/* вход сотрудников */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--soft); }
.login-box { width: 100%; max-width: 380px; background: #fff; border-radius: 24px; padding: 28px 22px; box-shadow: var(--shadow); }
.login-box h1 { font-size: 22px; margin-bottom: 6px; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 22px 0; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--soft2); }
.pin-dots i.on { background: var(--dark); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button { height: 60px; border-radius: 16px; background: var(--soft); font-size: 22px; font-weight: 700; }
.keypad button:active { background: var(--soft2); }

.leaflet-container { font: inherit; }
.map-pin { width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.25); border: 2px solid #fff; }
.map-pin > span { transform: rotate(45deg); font-size: 15px; line-height: 1; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }
.spin { width: 28px; height: 28px; border: 3px solid var(--soft2); border-top-color: var(--dark); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
