/* ============================================================
   assets/css/app.css — Guardias PdV · ExpertCell
   Diseño aprobado v1
============================================================ */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }

/* ── VARIABLES ── */
:root {
  --sb:       #1a2540;
  --sb2:      #243050;
  --sb-txt:   #8ea3c3;
  --sb-on:    #ffffff;
  --bg:       #f4f6fb;
  --white:    #ffffff;
  --border:   #e3e8f0;
  --border2:  #d0d8e8;
  --blue:     #2563eb;
  --blue-h:   #1d4ed8;
  --blue-lt:  #eff4ff;
  --text:     #1a2540;
  --text2:    #5a6a85;
  --text3:    #9aaabf;
  --red:      #dc2626;
  /* Estatus */
  --ap-bg: #dcfce7; --ap-tx: #15803d;
  --ci-bg: #dbeafe; --ci-tx: #1d4ed8;
  --de-bg: #fef9c3; --de-tx: #854d0e;
  --va-bg: #f3e8ff; --va-tx: #7e22ce;
  --ho-bg: #f1f5f9; --ho-tx: #475569;
  /* Misc */
  --shadow:    0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --r:  8px;
  --rl: 10px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c8d0e0; border-radius: 4px; }

a { text-decoration: none; color: inherit; }

/* ============================================================
   LOGIN
============================================================ */
.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: var(--bg);
}
.login-wrap { width: 100%; max-width: 400px; padding: 20px; }
.login-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--rl); padding: 40px 36px;
  box-shadow: var(--shadow-md);
}
.login-logo {
  display: flex; align-items: center; gap: 12px; margin-bottom: 28px;
}
.login-icon {
  width: 38px; height: 38px; border-radius: 9px; background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: #fff; flex-shrink: 0;
}
.login-name { font-size: 17px; font-weight: 700; color: var(--text); }
.login-sub  { font-size: 15px; color: var(--text3); margin-top: 1px; }

.alert-error {
  background: #fef2f2; border: 1px solid #fca5a5;
  color: var(--red); border-radius: var(--r);
  padding: 10px 14px; font-size: 15px; margin-bottom: 16px;
}

.form-group  { margin-bottom: 14px; }
.form-label  { display: block; font-size: 15px; font-weight: 600; color: var(--text2); margin-bottom: 5px; }
.form-input  {
  width: 100%; border: 1px solid var(--border); border-radius: var(--r);
  padding: 10px 13px; font-size: 14px; font-family: 'Inter', sans-serif;
  color: var(--text); background: var(--bg); outline: none; transition: border-color .15s;
}
.form-input:focus { border-color: var(--blue); background: var(--white); }
.form-input.pin-input { letter-spacing: 5px; font-size: 18px; }
.btn-login {
  width: 100%; padding: 11px; background: var(--blue); border: none;
  border-radius: var(--r); color: #fff; font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s; margin-top: 4px;
}
.btn-login:hover { background: var(--blue-h); }

/* ============================================================
   APP SHELL
============================================================ */
.app { display: flex; height: 100vh; overflow: hidden; }

/* ── SIDEBAR ── */
.sb {
  width: 220px; min-width: 220px; background: var(--sb);
  display: flex; flex-direction: column; height: 100vh; overflow: hidden;
}
.sb-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 16px 16px; border-bottom: 1px solid rgba(255,255,255,.07);
}
.sb-ico {
  width: 32px; height: 32px; border-radius: 8px; background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #fff; flex-shrink: 0;
}
.sb-nm  { font-size: 15px; font-weight: 700; color: #fff; }
.sb-tg  { font-size: 11px; color: var(--sb-txt); }
.sb-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
.sb-nav::-webkit-scrollbar { width: 3px; }
.sb-nav::-webkit-scrollbar-thumb { background: #334; }
.sb-sec { margin-bottom: 20px; }
.sb-lbl {
  font-size: 14px; font-weight: 600; color: var(--sb-txt);
  text-transform: uppercase; letter-spacing: .9px;
  padding: 0 8px; margin-bottom: 4px; display: block;
}
.sb-it {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border-radius: 6px; cursor: pointer; color: var(--sb-txt);
  font-size: 15px; margin-bottom: 1px; transition: all .12s;
}
.sb-it:hover { background: var(--sb2); color: #fff; }
.sb-it.on    { background: var(--blue); color: #fff; }
.sb-it svg   { width: 15px; height: 15px; flex-shrink: 0; }
.sb-user {
  padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; gap: 9px;
}
.sb-av {
  width: 32px; height: 32px; border-radius: 50%; background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.sb-un     { font-size: 14px; font-weight: 600; color: #fff; }
.sb-ur     { font-size: 14px; color: var(--sb-txt); }
.sb-logout {
  margin-left: auto; color: var(--sb-txt); transition: color .12s; padding: 4px;
}
.sb-logout:hover { color: #f87171; }

/* ── MAIN ── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* ── TOPBAR ── */
.topbar {
  height: 54px; background: var(--white); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px; padding: 0 22px; flex-shrink: 0;
}
.topbar-title { font-size: 15px; font-weight: 700; flex: 1; color: var(--text); }

/* ── BOTONES ── */
.btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: var(--r); font-family: 'Inter', sans-serif;
  font-size: 15px; font-weight: 500; cursor: pointer; transition: all .12s;
  border: 1px solid var(--border); background: var(--white); color: var(--text2);
}
.btn:hover  { background: var(--bg); border-color: var(--border2); }
.btn-p      { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-p:hover{ background: var(--blue-h); border-color: var(--blue-h); }
.btn-danger { background: #fef2f2; color: var(--red); border-color: #fca5a5; }
.btn-danger:hover { background: #fee2e2; }

/* Period nav */
.pnav { display: flex; align-items: center; gap: 6px; }
.pnav-btn {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 6px; background: var(--white);
  cursor: pointer; font-size: 16px; color: var(--text2); transition: background .12s;
}
.pnav-btn:hover { background: var(--bg); }
.pnav-lbl { font-size: 15px; font-weight: 500; min-width: 160px; text-align: center; }

/* View toggle */
.vt { display: flex; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--bg); }
.vt button {
  background: none; border: none; padding: 6px 14px; font-size: 15px;
  font-family: 'Inter', sans-serif; cursor: pointer; color: var(--text3); transition: all .12s;
}
.vt button.on { background: var(--white); color: var(--blue); font-weight: 600; box-shadow: var(--shadow); }

/* ── FILTER BAR ── */
.fbar {
  display: flex; gap: 8px; padding: 10px 22px;
  border-bottom: 1px solid var(--border); background: var(--white); flex-shrink: 0; flex-wrap: wrap;
}
.fsel, .finp {
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); padding: 6px 11px; font-size: 15px;
  font-family: 'Inter', sans-serif; outline: none; transition: border-color .15s;
}
.fsel:focus, .finp:focus { border-color: var(--blue); }
.finp { min-width: 180px; }
.finp::placeholder { color: var(--text3); }

/* ── STATS BAR ── */
.sbar { display: flex; border-bottom: 1px solid var(--border); background: var(--white); flex-shrink: 0; }
.sc {
  flex: 1; display: flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-right: 1px solid var(--border); font-size: 15px; color: var(--text2);
}
.sc:last-child { border-right: none; }
.sc strong { font-size: 18px; font-weight: 700; color: var(--text); margin-left: 2px; }
.sdot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* ── PAGE SCROLL ── */
.pscroll { flex: 1; overflow-y: auto; padding: 20px 22px; }

/* ============================================================
   GUARDIAS — TABLA SEMANAL
============================================================ */
.pdv {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--rl); margin-bottom: 8px; overflow: hidden;
  box-shadow: var(--shadow);
}
.pdv-block {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--rl); margin-bottom: 12px; overflow: hidden;
  box-shadow: var(--shadow);
}
.pdv-meta {
  padding: 10px 14px; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 3px;
}
.pdv-nm   { font-size: 15px; font-weight: 700; color: var(--text); }
.pdv-ci   { font-size: 13px; color: var(--text3); margin-top: 1px; }
.pdv-tags { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }

.tag      { font-size: 12px; padding: 3px 9px; border-radius: 10px; font-weight: 600; }
.tag-reg  { background: #e0e7ff; color: #3730a3; }
.tag-hor  { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

.dcol {
  padding: 8px 4px; text-align: center; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.dcol:last-child { border-right: none; }
.dname { font-size: 14px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: .3px; }
.dnum  { font-size: 15px; font-weight: 700; color: var(--text); }
.dcol.tod .dname { color: var(--blue); }
.dcol.tod .dnum  {
  background: var(--blue); color: #fff;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}

.prow {
  display: grid; grid-template-columns: 90px 220px repeat(7, minmax(70px, 140px));
  border-top: 1px solid var(--border); transition: background .1s;
}
.pdv-head {
  display: grid; grid-template-columns: 310px repeat(7, minmax(70px, 140px));
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.prow:hover { background: #f8faff; }
.rcell {
  padding: 8px 12px; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
}
.crole { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: .3px; }
.cname { font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.3; }
.scell {
  padding: 4px 4px; border-right: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.scell:last-child { border-right: none; }

/* STATUS PILLS */
.pill {
  font-size: 15px; font-weight: 600; padding: 5px 6px; border-radius: 6px;
  border: none; cursor: pointer; width: 100%; text-align: center;
  font-family: 'Inter', sans-serif; transition: opacity .12s, transform .1s;
}
.pill:hover { opacity: .75; transform: scale(.97); }
.p-ap { background: var(--ap-bg); color: var(--ap-tx); }
.p-ci { background: var(--ci-bg); color: var(--ci-tx); }
.p-de { background: var(--de-bg); color: var(--de-tx); }
.p-va { background: var(--va-bg); color: var(--va-tx); }
.p-ho { background: var(--ho-bg); color: var(--ho-tx); }

/* ── LEYENDA ── */
.legend {
  display: flex; gap: 16px; padding: 8px 22px;
  border-top: 1px solid var(--border); background: var(--white);
  flex-shrink: 0; align-items: center; flex-wrap: wrap;
}
.lit  { display: flex; align-items: center; gap: 5px; font-size: 15px; color: var(--text2); }
.ldot { width: 10px; height: 10px; border-radius: 3px; }
.ltip { margin-left: auto; font-size: 15px; color: var(--text3); }

/* ============================================================
   MONTHLY
============================================================ */
.mgrid { display: grid; grid-template-columns: repeat(7,1fr); gap: 3px; }
.mdhdr { font-size: 14px; font-weight: 600; color: var(--text3); text-transform: uppercase; text-align: center; padding: 5px 0; }
.mcell {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 6px; min-height: 58px; padding: 6px;
}
.mcell.oth { opacity: .35; }
.mcell.tod { border-color: var(--blue); }
.mdnum { font-size: 14px; color: var(--text3); margin-bottom: 4px; font-weight: 500; }
.mpill {
  font-size: 15px; font-weight: 600; padding: 2px 5px; border-radius: 3px;
  margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ============================================================
   ABC — TABLAS
============================================================ */
.page-header {
  display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px;
}
.page-header-left h2 { font-size: 15px; font-weight: 700; }
.page-header-left p  { font-size: 14px; color: var(--text3); margin-top: 2px; }

.dtbl {
  width: 100%; border-collapse: collapse; background: var(--white);
  border-radius: var(--rl); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.dtbl th {
  padding: 10px 15px; text-align: left; font-size: 15px; font-weight: 600;
  color: var(--text3); text-transform: uppercase; letter-spacing: .5px;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.dtbl td {
  padding: 12px 15px; font-size: 15px; color: var(--text);
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
.dtbl tr:last-child td { border-bottom: none; }
.dtbl tr:hover td { background: #f8faff; }
.tact { display: flex; gap: 5px; }
.tb {
  font-size: 14px; padding: 4px 12px; border-radius: 5px;
  border: 1px solid var(--border); background: var(--white); color: var(--text2);
  cursor: pointer; font-family: 'Inter', sans-serif; transition: all .12s;
}
.tb:hover     { background: var(--bg); border-color: var(--border2); color: var(--text); }
.tb.dng:hover { background: #fef2f2; color: var(--red); border-color: #fca5a5; }

/* Role badges */
.rb        { font-size: 14px; padding: 2px 9px; border-radius: 10px; font-weight: 600; }
.rb-admin  { background: #fdf4ff; color: #7e22ce; }
.rb-reg    { background: #eff6ff; color: #1d4ed8; }
.rb-zona   { background: #fff7ed; color: #c2410c; }
.rb-tienda { background: #f0fdf4; color: #15803d; }
.rb-th     { background: #f8fafc; color: #475569; }
.rb-mon    { background: #fff1f2; color: #be123c; }
.rb-seg    { background: var(--bg); color: var(--text3); }

/* Métricas */
.mrow { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 18px; }
.mcard {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--rl); padding: 18px 20px; box-shadow: var(--shadow);
}
.mval { font-size: 30px; font-weight: 700; line-height: 1; color: var(--text); }
.mlbl { font-size: 15px; color: var(--text3); text-transform: uppercase; letter-spacing: .4px; margin-top: 5px; }

/* Tabs */
.tbar { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tit  {
  padding: 9px 18px; font-size: 15px; font-weight: 500; cursor: pointer;
  color: var(--text2); border-bottom: 2px solid transparent; transition: all .12s;
}
.tit:hover { color: var(--text); }
.tit.on    { color: var(--blue); border-bottom-color: var(--blue); }

/* Importar */
.igrid  { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 14px; }
.ipanel {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--rl); padding: 22px; box-shadow: var(--shadow);
}
.ipt { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.ips { font-size: 14px; color: var(--text3); margin-bottom: 14px; }
.dropz {
  border: 2px dashed var(--border); border-radius: var(--rl);
  padding: 30px; text-align: center; cursor: pointer; transition: all .15s;
}
.dropz:hover { border-color: var(--blue); background: var(--blue-lt); }
.dicon { font-size: 28px; margin-bottom: 8px; opacity: .4; }
.dtxt  { font-size: 15px; color: var(--text2); }
.dsub  { font-size: 15px; color: var(--text3); margin-top: 3px; }

/* Historial */
.hist-wrap {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--rl); padding: 4px 20px; box-shadow: var(--shadow);
}
.hist-item { display: flex; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.hist-item:last-child { border-bottom: none; }
.hdot  { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.hmeta { font-size: 15px; color: var(--text3); margin-top: 4px; }
.hact  { font-size: 15px; color: var(--text); line-height: 1.5; }
.huser { color: var(--blue); font-weight: 600; }

/* Notas / avisos */
.nota {
  font-size: 14px; color: var(--text3); padding: 12px 14px;
  background: var(--bg); border-radius: var(--r); border: 1px solid var(--border);
  margin-top: 14px;
}
.nota strong { color: var(--text2); }

/* Alertas */
.alert-warn {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--r);
  padding: 10px 14px; display: flex; gap: 9px; align-items: flex-start;
  font-size: 14px; color: #92400e;
}
.alert-info {
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: var(--r);
  padding: 10px 14px; display: flex; gap: 9px; align-items: flex-start;
  font-size: 14px; color: #1e40af;
}

/* ============================================================
   MODAL
============================================================ */
.moverlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center;
  z-index: 999; opacity: 0; pointer-events: none; transition: opacity .18s;
}
.moverlay.on { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white); border-radius: var(--rl); border: 1px solid var(--border);
  width: 470px; max-width: 95vw; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-md); transform: translateY(8px); transition: transform .18s;
}
.moverlay.on .modal { transform: translateY(0); }
.mhdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 17px 20px; border-bottom: 1px solid var(--border);
}
.mt   { font-size: 14px; font-weight: 700; }
.mcls { background: none; border: none; cursor: pointer; color: var(--text3); font-size: 20px; line-height: 1; }
.mcls:hover { color: var(--text); }
.mbody { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.mftr  { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

.fg { display: flex; flex-direction: column; gap: 5px; }
.fl { font-size: 15px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: .4px; }
.fi, .fs {
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--bg); color: var(--text); padding: 9px 13px;
  font-size: 15px; font-family: 'Inter', sans-serif; outline: none;
  transition: border-color .15s; width: 100%;
}
.fi:focus, .fs:focus { border-color: var(--blue); background: var(--white); }
.fi::placeholder { color: var(--text3); }
.fr  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fh  { font-size: 15px; color: var(--text3); margin-top: 2px; }

/* Status selector */
.sgrid { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.sopt  {
  padding: 11px 8px; border-radius: var(--r); border: 2px solid transparent;
  cursor: pointer; font-size: 14px; font-weight: 600; text-align: center;
  transition: all .12s; font-family: 'Inter', sans-serif;
}
.sopt:hover { transform: scale(1.02); opacity: .85; }
.sopt.sel   { border-color: var(--text) !important; }
.so-ap { background: var(--ap-bg); color: var(--ap-tx); }
.so-ci { background: var(--ci-bg); color: var(--ci-tx); }
.so-de { background: var(--de-bg); color: var(--de-tx); }
.so-va { background: var(--va-bg); color: var(--va-tx); }
.so-ho { background: var(--ho-bg); color: var(--ho-tx); }


/* ── RESPONSIVE MÓVIL ── */
@media (max-width: 768px) {

  /* Sidebar oculto por defecto */
  .sidebar {
    position: fixed; left: -240px; top: 0; height: 100vh;
    z-index: 1000; transition: left .25s; box-shadow: 4px 0 20px rgba(0,0,0,.3);
  }
  .sidebar.open { left: 0; }

  /* Overlay oscuro cuando sidebar abierto */
  .sb-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); z-index: 999;
  }
  .sb-overlay.on { display: block; }

  /* Contenido ocupa todo el ancho */
  .main { margin-left: 0 !important; width: 100%; }

  /* Botón hamburger */
  .hamburger {
    display: flex !important; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 6px;
    background: var(--bg); border: 1px solid var(--border);
    cursor: pointer; flex-shrink: 0;
  }

  /* Topbar */
  .topbar { gap: 8px; flex-wrap: wrap; padding: 10px 12px; }
  .topbar-title { font-size: 14px; }

  /* Filtros en columna */
  .fbar { flex-wrap: wrap; padding: 8px 12px; gap: 6px; }
  .fsel, .finp { width: 100% !important; }

  /* Scroll horizontal en tablas */
  .pscroll { overflow-x: auto; }
  .dtbl { min-width: 600px; }

  /* Guardias scroll horizontal */
  #view-week { overflow-x: auto; }
  .pdv { min-width: 800px; }

  /* Geografía — paneles en stack */
  .geo-panel { min-width: 100% !important; }
  .geo-panel + .geo-panel { border-top: 2px solid var(--border); }

  /* Ubicaciones — mapa debajo de lista */
  #map-wrap { height: 300px; }

  /* Modales full width */
  .modal { margin: 10px; width: calc(100% - 20px) !important; max-width: none !important; }

  /* Ocultar hamburger en desktop */
  .hamburger { display: none; }
}

@media (min-width: 769px) {
  .hamburger { display: none; }
  .sb-overlay { display: none !important; }
}

/* ── RESPONSIVE ── */
.hamburger { display: none; }
.sb-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 999; }
.ham-bar { display: none; padding: 8px 12px; border-bottom: 1px solid var(--border); }

@media (max-width: 768px) {
  .sidebar, .sb { position: fixed; left: -240px; top: 0; height: 100vh; z-index: 1000; transition: left .25s; }
  .sidebar.open, .sb.open { left: 0; }
  .sb-overlay.on { display: block; }
  .main { margin-left: 0 !important; width: 100%; }
  .ham-bar { display: flex; }
  .hamburger { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 6px; background: var(--bg); border: 1px solid var(--border); cursor: pointer; }
  .topbar { gap: 8px; flex-wrap: wrap; padding: 10px 12px; }
  .topbar-title { font-size: 14px; }
  .fbar { flex-wrap: wrap; padding: 8px 12px; gap: 6px; }
  .fsel, .finp { width: 100% !important; box-sizing: border-box; }
  .pscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dtbl { min-width: 600px; }
  #view-week { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pdv { min-width: 800px; }
  .geo-panel { min-width: 100% !important; flex: none !important; }
  #map-wrap { height: 300px; }
  .modal { margin: 10px; width: calc(100% - 20px) !important; max-width: none !important; }
  .fr { flex-direction: column; }
}








