/* Hermes by Data Solutions — tokens da identidade visual */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --charcoal: #1f1f1f;
  --red: #d62828;
  --red-dark: #b71f1f;
  --red-soft: #fbe9e9;
  --warm: #ede7e3;
  --warm-2: #e2dad4;
  --off: #faf8f6;
  --white: #ffffff;
  --muted: #6f6a66;
  --line: #e7e1dc;
  --ok: #2f9e5b;
  --ok-soft: #e5f4ea;
  --warn: #e39b1b;
  --warn-soft: #fcf1dc;
  --info: #2f6fd6;
  --info-soft: #e5edfb;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(31, 31, 31, 0.04), 0 6px 20px rgba(31, 31, 31, 0.06);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
.ic { width: 1em; height: 1em; flex: none; vertical-align: -0.14em; }
.btn .ic { width: 1.15em; height: 1.15em; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  color: var(--charcoal);
  background: var(--off);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 700;
  background: var(--red); color: #fff; transition: background .15s, transform .05s; text-decoration: none;
}
.btn:hover { background: var(--red-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: var(--white); color: var(--charcoal); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--warm); }
.btn.dark { background: var(--charcoal); }
.btn.dark:hover { background: #000; }
.btn.ok { background: var(--ok); }
.btn.sm { padding: 6px 12px; font-size: 13px; }

.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-recebido { background: var(--red-soft); color: var(--red); }
.st-chapa { background: #fdecd8; color: #b4410e; }
.st-cozinha { background: var(--warn-soft); color: #a86c00; }
.st-pronto { background: var(--info-soft); color: var(--info); }
.st-alocado { background: #efe8fb; color: #6a3fc6; }
.st-em_rota { background: #e3f4f6; color: #137b8a; }
.st-entregue { background: var(--ok-soft); color: var(--ok); }
.st-cancelado { background: #eee; color: #888; }

.input {
  width: 100%; border: 1px solid var(--line); background: var(--white); border-radius: var(--radius-sm);
  padding: 11px 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
label.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }

/* Toasts */
#toasts { position: fixed; z-index: 9999; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; }
.toast {
  background: var(--charcoal); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: toast-in .2s ease-out; max-width: 90vw;
}
.toast.err { background: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(31,31,31,.45); display: grid; place-items: center; z-index: 1000; padding: 16px; }
.modal { background: var(--white); border-radius: 20px; width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal h2 { margin: 0 0 16px; font-size: 20px; }

/* login das telas da equipe */
.login-bg { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; background: var(--warm); overflow: auto; }
.login-card { background: var(--white); border-radius: 24px; padding: 28px; width: min(380px, 100%); box-shadow: var(--shadow); display: grid; gap: 12px; text-align: center; }
.login-logo { height: 44px; justify-self: center; margin-bottom: 4px; }
.login-card h2 { margin: 0; font-size: 22px; }
.login-sub { margin: 0; color: var(--muted); font-size: 14px; }
.login-in { text-align: center; font-size: 18px; }
.login-in.pin { font-size: 30px; letter-spacing: .4em; height: 64px; }
.login-err { margin: 0; color: var(--red); font-weight: 600; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button { height: 68px; border-radius: 16px; border: 1px solid var(--line); background: var(--off); font: 700 26px var(--font); color: var(--charcoal); }
.keypad button:active { background: var(--warm); }
.keypad button.ok { background: var(--red); color: #fff; border-color: var(--red); font-size: 20px; }

.leaflet-container { font-family: var(--font) !important; }
.map-pin {
  width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.map-pin span { transform: rotate(45deg); color: #fff; font-weight: 800; font-size: 12px; }
.map-store { width: 38px; height: 38px; border-radius: 12px; background: var(--charcoal); display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.map-store img { width: 30px !important; height: auto !important; }
.tiles-dark { filter: invert(1) hue-rotate(185deg) brightness(.82) contrast(.92) saturate(.6); }
.map-driver { width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 800; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); font-size: 14px; }
