@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/static/font/plus-jakarta-sans-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #012253;
  --brand-2: #0a3a6b;
  --accent: #00e7a7;
  --accent-2: #00a97a;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e5ecf6;
  --bg: #f5f8fc;
  --card: #ffffff;
  --danger: #c2362b;
  --warn: #b7791f;
  --radius: 16px;
  --shadow: 0 10px 30px -24px rgba(1, 34, 83, 0.45);
  --nav-h: 62px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  touch-action: manipulation;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 0.72rem; }
.i { flex: 0 0 auto; }

/* ------------------------------------------------------------------ */
/* Shell                                                               */
/* ------------------------------------------------------------------ */
.app-shell { min-height: 100dvh; }
.app-main { min-height: 100dvh; display: flex; flex-direction: column; }
.content {
  flex: 1;
  padding: 14px 14px calc(var(--nav-h) + 30px + env(safe-area-inset-bottom));
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.sidebar { display: none; }
.sidebar-overlay { display: none; }
.menu-btn { display: inline-flex; }
.logout-btn { display: inline-flex; }

.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(9px + env(safe-area-inset-top)) 12px 9px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.appbar-left { display: flex; align-items: center; gap: 6px; min-width: 0; }
.appbar-left h1 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.2;
  color: var(--brand);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.appbar-left p {
  margin: 2px 0 0;
  font-size: 0.69rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.appbar-right { display: flex; align-items: center; gap: 2px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--brand);
}
.icon-btn:hover { background: #eef4fb; }

.install-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #c9f4e4;
  background: #eefbf6;
  color: #047052;
  font-size: 0.75rem;
  font-weight: 700;
}
.install-chip span { display: none; }

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 54px;
  padding: 6px 6px 4px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.bottom-nav a svg { width: 22px; height: 22px; }
.bottom-nav a.active { color: var(--brand); }
.bottom-nav a.active svg { color: var(--accent-2); }
.bottom-nav a:active { background: #f1f6fc; }

.support-banner {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  background: #fff7e6;
  border-bottom: 1px solid #f3e3c3;
  color: #8a5a12;
  font-size: 0.76rem;
  text-align: center;
}
.support-banner a { font-weight: 800; text-decoration: underline; }

/* ------------------------------------------------------------------ */
/* Desktop                                                             */
/* ------------------------------------------------------------------ */
@media (min-width: 900px) {
  .app-shell { display: grid; grid-template-columns: 252px 1fr; }
  .sidebar {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100dvh;
    padding: 18px 12px 14px;
    background: linear-gradient(180deg, var(--brand) 0%, #01183c 100%);
    color: #fff;
  }
  .side-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 12px;
  }
  .side-brand img { width: 38px; height: 38px; object-fit: contain; }
  .side-brand strong { display: block; font-size: 0.9rem; line-height: 1.15; }
  .side-brand span { display: block; font-size: 0.65rem; color: var(--accent); font-weight: 600; margin-top: 2px; }
  .side-nav { display: flex; flex-direction: column; gap: 3px; margin-top: 20px; }
  .side-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border-radius: 10px;
    color: #cfe0f5;
    font-size: 0.84rem;
    font-weight: 600;
  }
  .side-link svg { width: 19px; height: 19px; opacity: 0.9; }
  .side-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
  .side-link.active { background: rgba(255, 255, 255, 0.13); color: #fff; }
  .side-link.active svg { color: var(--accent); }
  .side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
  .side-user { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
  .side-user .avatar { background: var(--accent); color: var(--brand); }
  .side-user strong { display: block; font-size: 0.8rem; }
  .side-user span { display: block; font-size: 0.65rem; color: #9fb4d1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
  .side-logout { display: flex; align-items: center; gap: 8px; padding: 9px 10px; font-size: 0.78rem; color: #cfe0f5; border-radius: 9px; }
  .side-logout:hover { background: rgba(255, 255, 255, 0.08); }

  .menu-btn { display: none; }
  .logout-btn { display: none; }
  .bottom-nav { display: none; }
  .install-chip span { display: inline; }
  .content { padding: 26px 30px 44px; }
  .appbar { padding: 12px 30px; }
  .appbar-left h1 { font-size: 1.3rem; }
  .appbar-left p { font-size: 0.76rem; }
}

/* ------------------------------------------------------------------ */
/* Page / cards                                                        */
/* ------------------------------------------------------------------ */
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.page-actions form { margin: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}
.card-head h2 { margin: 0; font-size: 0.98rem; color: var(--brand); letter-spacing: -0.01em; }
.card-head p { margin: 3px 0 0; font-size: 0.73rem; color: var(--muted); }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.kpi {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #eefbf6;
  color: var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.kpi-icon svg { width: 20px; height: 20px; }
.kpi > div:last-child { min-width: 0; }
.kpi span {
  display: block;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.kpi strong {
  display: block;
  margin-top: 3px;
  font-size: 1.28rem;
  line-height: 1.12;
  color: var(--brand);
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.kpi small { display: block; margin-top: 3px; font-size: 0.68rem; color: var(--muted); line-height: 1.3; }
.kpi-address { font-size: 0.86rem !important; line-height: 1.25 !important; }

@media (min-width: 760px) {
  .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.08s ease, filter 0.12s ease, background 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-accent { background: var(--accent); color: var(--brand); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--brand); }
.btn-ghost:hover { background: #f7fbff; }
.btn-danger { background: #fff1ef; border-color: #f3cfca; color: var(--danger); }
.btn-sm { min-height: 34px; padding: 0 10px; font-size: 0.75rem; border-radius: 10px; }
.btn-block { width: 100%; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin: 4px 0 16px; }

@media (max-width: 560px) {
  .page-actions .btn { flex: 1 1 auto; }
  .form-actions .btn { flex: 1 1 auto; }
}

/* ------------------------------------------------------------------ */
/* Forms                                                               */
/* ------------------------------------------------------------------ */
.form-layout { display: block; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 0.76rem; font-weight: 800; color: var(--brand); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(0, 169, 122, 0.13);
  background: #fff;
}
.field textarea { min-height: 92px; resize: vertical; }
.field small { font-size: 0.68rem; color: var(--muted); line-height: 1.4; }
.field-wide { grid-column: 1 / -1; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon input { padding-left: 38px; }

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #eef3f9;
}
.switch-row:last-child { border-bottom: 0; }
.switch-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.switch-row b { font-size: 0.83rem; color: var(--brand); }
.switch-row small { font-size: 0.69rem; color: var(--muted); }
.switch-row input[type="checkbox"] {
  appearance: none;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #dfe8f3;
  position: relative;
  flex: 0 0 auto;
  transition: background 0.15s;
  cursor: pointer;
}
.switch-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s;
}
.switch-row input[type="checkbox"]:checked { background: var(--accent-2); }
.switch-row input[type="checkbox"]:checked::after { transform: translateX(20px); }

.days-grid { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.day-chip { position: relative; }
.day-chip input { position: absolute; opacity: 0; pointer-events: none; }
.day-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  padding: 9px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}
.day-chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }

.check-list { display: flex; flex-direction: column; gap: 8px; }
.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
}
.check-item input { width: 20px; height: 20px; accent-color: var(--accent-2); }
.check-item > span:last-child { display: flex; flex-direction: column; gap: 1px; }
.check-item strong { font-size: 0.84rem; color: var(--brand); }
.check-item small { font-size: 0.7rem; color: var(--muted); }

.form-error {
  background: #fff1ef;
  border: 1px solid #f3cfca;
  color: #a93226;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  margin-bottom: 12px;
}
.form-ok {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #eefbf6;
  border: 1px solid #c9f4e4;
  color: #046b50;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  margin-bottom: 12px;
}

@media (min-width: 760px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-wide { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------------ */
/* Lists, badges, info                                                 */
/* ------------------------------------------------------------------ */
.list { display: flex; flex-direction: column; gap: 8px; }
.list-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  min-width: 0;
}
.list-link:hover { background: #f8fbff; }
.list-main { flex: 1; min-width: 0; }
.list-main strong {
  display: block;
  font-size: 0.86rem;
  color: var(--brand);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-main span { display: block; font-size: 0.72rem; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-actions { display: flex; align-items: center; gap: 5px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #eef4fb;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.86rem;
  flex: 0 0 auto;
}
.avatar-sm { width: 32px; height: 32px; font-size: 0.74rem; }
.avatar-brand { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 800;
  white-space: nowrap;
}
.badge-ok { background: #e7fbf3; color: #047052; }
.badge-warn { background: #fff7e6; color: #8a5a12; }
.badge-bad { background: #fff1ef; color: #a93226; }
.badge-muted { background: #eef3f9; color: var(--muted); }

.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.info-box { background: #f8fbff; border: 1px solid var(--line); border-radius: 11px; padding: 10px 11px; min-width: 0; }
.info-box span { display: block; font-size: 0.63rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.info-box strong { display: block; margin-top: 3px; font-size: 0.84rem; color: var(--brand); overflow-wrap: anywhere; }

.schedule-strip {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border-radius: 12px;
  background: #f8fbff;
  border: 1px solid var(--line);
}
.schedule-strip.is-open { background: #eefbf6; border-color: #c9f4e4; }
.schedule-strip.is-closed { background: #fff8ee; border-color: #f3e3c3; }
.schedule-dot { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; flex: 0 0 auto; }
.schedule-strip.is-open .schedule-dot { background: var(--accent-2); box-shadow: 0 0 0 4px rgba(0, 169, 122, 0.14); }
.schedule-strip.is-closed .schedule-dot { background: #d69e2e; }
.schedule-strip strong { display: block; font-size: 0.84rem; color: var(--brand); }
.schedule-strip span { font-size: 0.72rem; color: var(--muted); }

.empty { text-align: center; color: var(--muted); font-size: 0.82rem; padding: 22px 12px; line-height: 1.5; }
.empty strong { display: block; color: var(--brand); margin-bottom: 4px; font-size: 0.9rem; }

.brand-preview {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.brand-preview strong { display: block; font-size: 0.85rem; color: var(--brand); }
.brand-preview span { display: block; font-size: 0.7rem; color: var(--muted); }

.security-box { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 12px; }

.setup-grid { display: grid; grid-template-columns: 1fr; gap: 9px; }
.setup-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbff;
}
.setup-item > span { font-size: 0.63rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.setup-item strong { font-size: 0.9rem; color: var(--brand); word-break: break-all; }
.setup-item .btn { align-self: flex-start; }
.highlight-card { border-color: #c9f4e4; background: linear-gradient(180deg, #f7fffc, #fff); }

@media (min-width: 640px) {
  .setup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .info-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ */
/* Maps                                                                */
/* ------------------------------------------------------------------ */
.map {
  height: 280px;
  border-radius: 14px;
  overflow: hidden;
  background: #e9eff7;
  z-index: 0;
}
.map-lg { height: 360px; }
.leaflet-container { font-family: inherit !important; }
.map-pin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-2);
  border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(0, 169, 122, 0.18);
}
.map-pin.offline { background: #94a3b8; box-shadow: 0 0 0 6px rgba(148, 163, 184, 0.18); }
@media (min-width: 760px) {
  .map { height: 380px; }
  .map-lg { height: 460px; }
}

/* ------------------------------------------------------------------ */
/* Audit, flash, dialogs                                               */
/* ------------------------------------------------------------------ */
.audit-list { display: flex; flex-direction: column; gap: 11px; }
.audit-row { display: flex; align-items: flex-start; gap: 9px; }
.audit-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); margin-top: 6px; flex: 0 0 auto; }
.audit-main { min-width: 0; }
.audit-main strong { display: block; font-size: 0.8rem; color: var(--brand); }
.audit-main > span { display: block; font-size: 0.69rem; color: var(--muted); margin-top: 1px; }
.audit-details {
  display: block;
  margin-top: 4px;
  font-size: 0.67rem;
  color: #475569;
  background: #f8fbff;
  border-radius: 6px;
  padding: 4px 6px;
  overflow-wrap: anywhere;
}

.flash-stack {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(520px, calc(100% - 24px));
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.flash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px -20px rgba(1, 34, 83, 0.35);
  font-size: 0.8rem;
  line-height: 1.4;
}
.flash.success { border-color: #c9f4e4; background: #f2fdf9; color: #046b50; }
.flash.error { border-color: #f3cfca; background: #fff5f3; color: #a93226; }
.flash.warning { border-color: #f3e3c3; background: #fffaf0; color: #8a5a12; }
.flash-close { margin-left: auto; border: 0; background: none; color: inherit; padding: 0; display: flex; }

.sheet {
  border: 0;
  padding: 0;
  border-radius: 20px;
  width: min(520px, calc(100% - 24px));
  max-height: 88dvh;
  overflow: auto;
  box-shadow: 0 30px 80px -20px rgba(1, 34, 83, 0.5);
  background: #fff;
}
dialog::backdrop { background: rgba(1, 24, 60, 0.55); backdrop-filter: blur(4px); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 6px; }
.sheet-head h2 { margin: 0; font-size: 1.02rem; color: var(--brand); }
.sheet-body { padding: 0 18px 22px; }
.install-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.install-steps li { display: flex; gap: 12px; align-items: flex-start; }
.install-steps li > span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  flex: 0 0 auto;
}
.install-steps li div { font-size: 0.84rem; color: #334155; line-height: 1.45; }

.pwa-float {
  position: fixed;
  right: 12px;
  bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom));
  z-index: 35;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pwa-float-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
  box-shadow: 0 14px 30px -12px rgba(1, 34, 83, 0.6);
}
.login-body .pwa-float { display: none; }
@media (min-width: 900px) { .pwa-float { display: none; } }
@media (max-width: 640px) {
  .sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 20px 20px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ------------------------------------------------------------------ */
/* Login                                                               */
/* ------------------------------------------------------------------ */
.login-body {
  min-height: 100dvh;
  background: radial-gradient(1100px 550px at 10% 0%, #0a3a6b 0%, #012253 58%, #01183c 100%);
}
.login-page { min-height: 100dvh; display: grid; grid-template-columns: 1.05fr 0.95fr; }
.login-hero { position: relative; display: flex; overflow: hidden; background: var(--brand); }
.login-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(1, 24, 60, 0.5), rgba(1, 24, 60, 0.86)),
    url("/static/img/login.webp") center/cover no-repeat;
}
.login-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding: 42px;
  color: #fff;
  width: 100%;
}
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand img { width: 52px; height: 52px; object-fit: contain; }
.login-brand strong { display: block; font-size: 1.2rem; line-height: 1.1; }
.login-brand span { display: block; font-size: 0.74rem; color: var(--accent); font-weight: 700; margin-top: 2px; }
.login-copy h1 { margin: 0 0 16px; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.04; letter-spacing: -0.03em; }
.login-copy h1 span { color: var(--accent); }
.login-copy p { margin: 0; max-width: 36ch; color: #d8e6f7; line-height: 1.6; font-size: 0.94rem; }
.login-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.login-chips span {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.login-foot { color: #9fb4d1; font-size: 0.72rem; }
.login-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafe 100%);
}
.login-card {
  width: min(410px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 24px;
  box-shadow: 0 30px 60px -40px rgba(1, 34, 83, 0.5);
}
.login-card-head h2 { margin: 0 0 6px; font-size: 1.45rem; color: var(--brand); letter-spacing: -0.02em; }
.login-card-head p { margin: 0 0 18px; color: var(--muted); font-size: 0.82rem; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-links { text-align: right; margin-top: 10px; font-size: 0.75rem; }
.login-links a { color: var(--muted); font-weight: 700; }
.login-install {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.login-install-text { flex: 1; min-width: 150px; }
.login-install-text strong { display: block; font-size: 0.8rem; color: var(--brand); }
.login-install-text span { display: block; font-size: 0.7rem; color: var(--muted); }
.login-legal { margin-top: 14px; font-size: 0.68rem; color: var(--muted); text-align: center; }

@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-hero { min-height: 232px; }
  .login-hero-content { padding: 24px; justify-content: flex-start; gap: 16px; }
  .login-copy h1 { font-size: 1.72rem; margin-bottom: 8px; }
  .login-copy p, .login-chips, .login-foot { display: none; }
  .login-main { padding: 18px 14px 34px; justify-content: flex-start; }
  .login-card { padding: 22px 18px; border-radius: 18px; }
  .login-legal { margin-top: 12px; }
}

/* ------------------------------------------------------------------ */
/* Auth pages                                                          */
/* ------------------------------------------------------------------ */
.auth-body {
  min-height: 100dvh;
  background: radial-gradient(1000px 500px at 10% 0%, #0a3a6b 0%, #012253 60%, #01183c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
}
.auth-page { width: 100%; max-width: 460px; }
.auth-card {
  background: #fff;
  border-radius: 22px;
  padding: 28px 24px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6);
}
.auth-card-wide { max-width: 520px; }
.auth-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.auth-brand img { width: 46px; height: 46px; object-fit: contain; }
.auth-brand strong { display: block; color: var(--brand); }
.auth-brand span { display: block; font-size: 0.7rem; color: var(--muted); }
.auth-card h1 { font-size: 1.35rem; margin: 0 0 8px; color: var(--brand); letter-spacing: -0.02em; }
.auth-card p { font-size: 0.84rem; line-height: 1.5; }
.auth-form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 0.78rem; color: var(--muted); }
.qr-box { display: flex; justify-content: center; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin: 12px 0; }
.secret-line { font-size: 0.73rem; color: var(--muted); text-align: center; }
.secret-line code { background: #f1f5f9; padding: 3px 6px; border-radius: 6px; font-size: 0.7rem; }
.code-input { text-align: center; letter-spacing: 0.35em; font-size: 1.25rem; font-weight: 800; }

.closed-card { text-align: center; padding: 34px 20px; }
.closed-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #fff7e6;
  color: #b7791f;
  display: flex;
  align-items: center;
  justify-content: center;
}
.closed-card h2 { color: var(--brand); font-size: 1.2rem; margin: 0 0 10px; }
.closed-next { background: #f8fbff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: inline-block; margin: 8px 0 18px; }

/* ------------------------------------------------------------------ */
/* Misc                                                                */
/* ------------------------------------------------------------------ */
.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-form select, .inline-form input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
}
.filter-form select, .filter-form input { min-width: 140px; }
.holiday-form { margin-bottom: 12px; }
@media (max-width: 600px) {
  .list-item { flex-wrap: wrap; }
  .list-actions { width: 100%; justify-content: flex-end; }
  .kpi { padding: 12px; }
  .kpi strong { font-size: 1.16rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
