/* Yo Cargo · sistema de diseño de la plataforma */
:root {
    --navy: #183650;
    --navy-2: #1f4566;
    --navy-3: #0f2538;
    --gold: #efc22f;
    --gold-2: #f6d565;
    --blue: #1a67a3;
    --ink: #172433;
    --muted: #6b7a8f;
    --line: #e3e8ef;
    --bg: #f3f5f9;
    --card: #ffffff;
    --ok: #2e8b57;
    --ok-bg: #e7f5ec;
    --warn: #b7791f;
    --warn-bg: #fdf3dc;
    --bad: #c0392b;
    --bad-bg: #fbe9e7;
    --info-bg: #e6f0f9;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(16, 37, 56, .06), 0 4px 16px rgba(16, 37, 56, .06);
    --font: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-title: "Titillium Web", "Open Sans", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-title); color: var(--navy); margin: 0 0 .5rem; line-height: 1.2; }
h1 { font-size: 1.7rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
small, .muted { color: var(--muted); }
code, .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }

/* ---------- Estructura de la app ---------- */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #c9d6e3; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.sidebar .brand { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.2rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .brand img { height: 34px; }
.sidebar .brand span { font-family: var(--font-title); font-weight: 700; color: #fff; letter-spacing: .02em; }
.sidebar nav { padding: .6rem .6rem 1.2rem; flex: 1; }
.sidebar .grupo { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: #7f97ad; margin: 1rem .7rem .3rem; font-weight: 700; }
.sidebar a.item { display: flex; align-items: center; gap: .65rem; padding: .52rem .7rem; border-radius: 8px; color: #d4e0ea; font-weight: 600; font-size: .9rem; }
.sidebar a.item svg { width: 18px; height: 18px; opacity: .85; flex: none; }
.sidebar a.item:hover { background: rgba(255,255,255,.07); text-decoration: none; color: #fff; }
.sidebar a.item.activo { background: var(--gold); color: var(--navy); }
.sidebar a.item.activo svg { opacity: 1; }
.sidebar a.item .pill { margin-left: auto; background: var(--gold); color: var(--navy); border-radius: 99px; font-size: .7rem; padding: 0 .45rem; font-weight: 700; }
.sidebar a.item.activo .pill { background: var(--navy); color: #fff; }
.sidebar .pie { padding: .9rem 1.2rem; border-top: 1px solid rgba(255,255,255,.08); font-size: .78rem; color: #7f97ad; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 1rem; padding: 0 1.5rem; position: sticky; top: 0; z-index: 20; }
.topbar .buscar { flex: 1; max-width: 460px; position: relative; }
.topbar .buscar input { width: 100%; padding: .5rem .8rem .5rem 2.2rem; border: 1px solid var(--line); border-radius: 99px; background: var(--bg); }
.topbar .buscar svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 16px; color: var(--muted); }
.topbar .usuario { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-weight: 700; font-size: .8rem; font-family: var(--font-title); }
.menu-movil { display: none; background: none; border: 0; padding: .3rem; cursor: pointer; color: var(--navy); }
.contenido { padding: 1.5rem; max-width: 1400px; width: 100%; }

.encabezado { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.encabezado p { margin: .15rem 0 0; color: var(--muted); }
.migas { font-size: .8rem; color: var(--muted); margin-bottom: .2rem; }
.migas a { color: var(--muted); }
.acciones { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* ---------- Tarjetas y rejillas ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid #edf1f6; }
.card > .cab { padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.card > .cab h2, .card > .cab h3 { margin: 0; }
.card > .cuerpo { padding: 1.2rem; }
.card > .pie { padding: .9rem 1.2rem; border-top: 1px solid var(--line); background: #fafbfd; border-radius: 0 0 var(--radius) var(--radius); }
.grid { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.mt { margin-top: 1rem; } .mb { margin-bottom: 1rem; } .mt2 { margin-top: 2rem; }
.flex { display: flex; gap: .6rem; align-items: center; } .entre { justify-content: space-between; } .wrap { flex-wrap: wrap; }
.derecha { text-align: right; } .centro { text-align: center; }

.stat { padding: 1.1rem 1.2rem; display: flex; gap: .9rem; align-items: center; }
.stat .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--info-bg); color: var(--navy); flex: none; }
.stat .ico svg { width: 22px; height: 22px; }
.stat .ico.oro { background: #fdf5d6; color: #9a7a0c; }
.stat .ico.verde { background: var(--ok-bg); color: var(--ok); }
.stat .ico.rojo { background: var(--bad-bg); color: var(--bad); }
.stat .valor { font-family: var(--font-title); font-size: 1.55rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.stat .etiqueta { color: var(--muted); font-size: .8rem; font-weight: 600; }

/* ---------- Tablas ---------- */
.tabla-wrap { overflow-x: auto; }
table.tabla { width: 100%; border-collapse: collapse; }
.tabla th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: .65rem .9rem; border-bottom: 1px solid var(--line); background: #fafbfd; white-space: nowrap; }
.tabla td { padding: .7rem .9rem; border-bottom: 1px solid #eef2f6; vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla tbody tr:hover { background: #f8fafc; }
.tabla .num, .tabla th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabla tfoot td { font-weight: 700; background: #fafbfd; border-top: 2px solid var(--line); }
.tabla.compacta td, .tabla.compacta th { padding: .45rem .7rem; }
.fila-link { cursor: pointer; }

/* ---------- Etiquetas ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 99px; font-size: .74rem; font-weight: 700; background: #eef2f6; color: var(--navy); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--blue); }
.badge.oro { background: #fdf5d6; color: #8a6d07; }
.badge.navy { background: var(--navy); color: #fff; }
.punto { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .55rem 1rem; border-radius: 9px; border: 1px solid transparent; font-weight: 700; font-size: .87rem; cursor: pointer; font-family: var(--font); background: var(--navy); color: #fff; line-height: 1.2; white-space: nowrap; transition: transform .05s, background .15s, box-shadow .15s; }
.btn:hover { text-decoration: none; background: var(--navy-2); box-shadow: 0 2px 8px rgba(24,54,80,.18); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn.oro { background: var(--gold); color: var(--navy); }
.btn.oro:hover { background: var(--gold-2); }
.btn.sec { background: #fff; color: var(--navy); border-color: var(--line); }
.btn.sec:hover { background: #f5f7fa; }
.btn.ok { background: var(--ok); } .btn.bad { background: var(--bad); }
.btn.bad-sec { background: #fff; color: var(--bad); border-color: #f1c7c1; }
.btn.chico { padding: .35rem .65rem; font-size: .8rem; border-radius: 7px; }
.btn.grande { padding: .8rem 1.4rem; font-size: 1rem; border-radius: 11px; }
.btn.bloque { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-link { background: none; border: 0; color: var(--blue); cursor: pointer; font: inherit; padding: 0; font-weight: 600; }

/* ---------- Formularios ---------- */
.campo { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; }
.campo label, .etq { font-weight: 700; font-size: .8rem; color: #334457; }
.campo .ayuda { font-size: .76rem; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], input[type=search], input[type=url], input[type=file], select, textarea {
    width: 100%; padding: .55rem .75rem; border: 1px solid #d3dbe5; border-radius: 9px; font: inherit; color: var(--ink); background: #fff; transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,103,163,.15); }
textarea { min-height: 90px; resize: vertical; }
input[type=checkbox], input[type=radio] { accent-color: var(--navy); width: 16px; height: 16px; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 600; cursor: pointer; }
.error-campo { color: var(--bad); font-size: .78rem; font-weight: 600; }
.form-fila { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.inline-form { display: inline; }

.alerta { padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1rem; display: flex; gap: .6rem; align-items: flex-start; font-weight: 600; }
.alerta svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.alerta.ok { background: var(--ok-bg); color: #1d6b40; }
.alerta.bad { background: var(--bad-bg); color: #8e2a1f; }
.alerta.warn { background: var(--warn-bg); color: #7d5410; }
.alerta.info { background: var(--info-bg); color: #164f7d; }

.vacio { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.vacio svg { width: 42px; height: 42px; color: #b6c3d1; margin-bottom: .5rem; }

/* pestañas */
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; overflow-x: auto; }
.tabs a { padding: .6rem .9rem; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.activo { color: var(--navy); border-color: var(--gold); }
.tabs a:hover { text-decoration: none; color: var(--navy); }
.tabs-grupos { flex-wrap: wrap; overflow: visible; row-gap: 0; align-items: center; }
.tabs-grupos a { padding: .5rem .7rem; font-size: .88rem; }
.tabs-grupo { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; padding: 0 .2rem 0 .8rem; border-left: 1px solid var(--line); }
.tabs-grupo:first-child { border-left: 0; padding-left: 0; }

.filtros { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.filtros .campo { margin: 0; min-width: 150px; }

/* lista de definición */
.dl { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 0; }
.dl dt { color: var(--muted); font-weight: 600; font-size: .82rem; }
.dl dd { margin: 0; font-weight: 600; }

/* barra de progreso */
.progreso { height: 8px; background: #e8edf3; border-radius: 99px; overflow: hidden; }
.progreso > span { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), var(--blue)); border-radius: 99px; }

/* línea de tiempo */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 1rem 1.6rem; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: -6px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li .dot { position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 2px var(--line); }

/* pasos (seguimiento de paquete) */
.pasos { display: flex; gap: 0; margin: 1rem 0; }
.pasos .paso { flex: 1; text-align: center; position: relative; font-size: .74rem; font-weight: 700; color: var(--muted); }
.pasos .paso::before { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.pasos .paso:first-child::before { display: none; }
.pasos .paso .c { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 3px solid var(--line); display: grid; place-items: center; margin: 0 auto .35rem; position: relative; z-index: 1; }
.pasos .paso.hecho { color: var(--navy); }
.pasos .paso.hecho .c { background: var(--navy); border-color: var(--navy); color: var(--gold); }
.pasos .paso.hecho::before { background: var(--navy); }
.pasos .paso.actual .c { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.pasos .paso svg { width: 14px; height: 14px; }

/* kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 1rem; overflow-x: auto; padding-bottom: .5rem; }
.kanban .col { background: #e9eef4; border-radius: var(--radius); padding: .7rem; min-height: 200px; }
.kanban .col h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; display: flex; justify-content: space-between; }
.kanban .tarjeta { background: #fff; border-radius: 10px; padding: .75rem; margin-bottom: .6rem; box-shadow: 0 1px 2px rgba(0,0,0,.06); display: block; color: var(--ink); border-left: 4px solid var(--gold); }
.kanban .tarjeta:hover { text-decoration: none; box-shadow: var(--shadow); }

/* mapas */
.mapa { height: 460px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); z-index: 0; }
.marcador-num { background: var(--navy); color: var(--gold); border: 2px solid #fff; border-radius: 50%; width: 30px !important; height: 30px !important; display: grid; place-items: center; font-weight: 800; font-size: .8rem; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.marcador-num.hecho { background: var(--ok); color: #fff; }
.marcador-num.fallo { background: var(--bad); color: #fff; }
.marcador-bodega { background: var(--gold); color: var(--navy); border: 2px solid var(--navy); border-radius: 8px; width: 34px !important; height: 34px !important; display: grid; place-items: center; font-weight: 800; }

.paradas { list-style: none; margin: 0; padding: 0; }
.paradas li { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem .9rem; border-bottom: 1px solid var(--line); background: #fff; }
.paradas li .n { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-weight: 800; font-size: .75rem; flex: none; }
.paradas li.entregada .n { background: var(--ok); color: #fff; }
.paradas li.fallida .n { background: var(--bad); color: #fff; }
.paradas .asa { cursor: grab; color: #a7b4c2; }

/* modal */
dialog.modal { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog.modal::backdrop { background: rgba(15, 37, 56, .55); }
dialog.modal .cab { padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
dialog.modal .cuerpo { padding: 1.2rem; }
dialog.modal .pie { padding: .9rem 1.2rem; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: .5rem; }

/* firma */
.firma { border: 2px dashed #c4cfdb; border-radius: 10px; background: #fff; touch-action: none; width: 100%; height: 170px; }

/* paginación */
.paginacion { display: flex; gap: .3rem; justify-content: flex-end; padding: .8rem 1rem; flex-wrap: wrap; }
.paginacion a, .paginacion span { padding: .3rem .65rem; border-radius: 7px; border: 1px solid var(--line); font-weight: 600; font-size: .82rem; background: #fff; }
.paginacion .actual { background: var(--navy); color: #fff; border-color: var(--navy); }
.paginacion .off { color: #b3bfcc; }

/* pantallas de acceso */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: #fff; }
.auth .lado { background: linear-gradient(150deg, var(--navy-3), var(--navy) 55%, var(--navy-2)); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth .lado::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; border: 50px solid rgba(239,194,47,.12); }
.auth .lado h1 { color: #fff; font-size: 2.3rem; }
.auth .lado .oro { color: var(--gold); }
.auth .formulario { display: grid; place-items: center; padding: 2rem; }
.auth .formulario > div { width: min(400px, 100%); }

.bloqueo { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(150deg, var(--navy-3), var(--navy)); padding: 1.5rem; }
.bloqueo .card { max-width: 520px; padding: 2.4rem; text-align: center; }

/* app del piloto */
.piloto { max-width: 560px; margin: 0 auto; }
.piloto .parada-card { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 1rem; margin-bottom: .8rem; border-left: 5px solid var(--gold); }
.piloto .parada-card.entregada { border-left-color: var(--ok); opacity: .75; }
.piloto .parada-card.fallida { border-left-color: var(--bad); opacity: .75; }
.nav-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .7rem; }
.btn.waze { background: #33ccff; color: #062a3a; }
.btn.gmaps { background: #fff; color: #1a73e8; border-color: #c6dafc; }

@media (max-width: 1100px) {
    .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .app { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: 0; top: 0; width: 270px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
    body.menu-abierto .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
    .menu-movil { display: block; }
    .g2, .g3, .g4, .g-2-1, .g-1-2 { grid-template-columns: 1fr; }
    .contenido { padding: 1rem; }
    .topbar { padding: 0 1rem; }
    .auth { grid-template-columns: 1fr; }
    .auth .lado { display: none; }
    .mapa { height: 340px; }
    .ocultar-movil { display: none !important; }
}
@media print {
    .sidebar, .topbar, .acciones, .no-print { display: none !important; }
    .app { display: block; } body { background: #fff; }
    .card { box-shadow: none; border: 0; }
}

.filtros-compacto > * { width: auto; flex: 1 1 140px; }
.filtros-compacto > button { flex: 0 0 auto; }

/* navegación de contabilidad: grupos arriba, páginas del grupo abajo */
.conta-nav { margin-bottom: 1rem; }
.conta-grupos { display: flex; gap: .4rem; flex-wrap: wrap; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 12px; padding: .35rem; }
.conta-grupos a { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .85rem; border-radius: 9px; font-weight: 700; font-size: .88rem; color: var(--muted); white-space: nowrap; }
.conta-grupos a:hover { text-decoration: none; color: var(--navy); background: #f2f5f9; }
.conta-grupos a.activo { background: var(--navy); color: #fff; }
.conta-sub { margin: .5rem 0 0; }
.conta-sub-vacio { height: .25rem; }

/* Editor del sitio web */
.editor-sitio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 1.2rem; align-items: start; }
.vista-previa { position: sticky; top: 1rem; }
.marco-vista { background: #e9eef4; padding: .6rem; border-radius: 0 0 12px 12px; display: flex; justify-content: center; }
.marco-vista iframe { width: 100%; height: 76vh; border: 0; border-radius: 8px; background: #fff; transition: width .25s; }
.bloque-editor { margin-bottom: .6rem; }
.bloque-editor > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .6rem; }
.bloque-editor > summary::-webkit-details-marker { display: none; }
.bloque-editor[open] > summary { border-bottom: 1px solid var(--line); background: #f7f9fc; }
.bloque-editor.oculto { opacity: .65; }
.bloque-editor .resumen { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asa { cursor: grab; color: var(--muted); display: inline-flex; }
.ico-bloque { width: 32px; height: 32px; border-radius: 9px; background: #fdf5d6; color: #8a6d07; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.acciones-bloque form { display: inline; }
.pie-bloque { position: sticky; bottom: 0; background: #fff; padding-top: .6rem; display: flex; justify-content: flex-end; }
.fila-lista { display: grid; grid-template-columns: auto 1fr; gap: .6rem; border: 1px solid var(--line); border-radius: 10px; padding: .7rem; margin-bottom: .5rem; background: #fafbfd; }
.fila-acciones { display: flex; flex-direction: column; gap: .2rem; }
.fila-campos .campo { margin-bottom: .55rem; }
.vista-imagen { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.selector-icono { display: flex; align-items: center; gap: .5rem; }
.vista-icono { width: 34px; height: 34px; border-radius: 9px; background: #f2f5f9; display: inline-flex; align-items: center; justify-content: center; color: var(--navy); flex: none; }
.tipos-bloque { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; }
.tipo-bloque { border: 2px solid var(--line); border-radius: 12px; padding: .8rem; cursor: pointer; display: grid; gap: .3rem; align-content: start; }
.tipo-bloque input { display: none; }
.tipo-bloque small { color: var(--muted); font-size: .78rem; }
.tipo-bloque:has(input:checked) { border-color: var(--gold); background: #fffbea; }
.modal-ancho { width: min(860px, 96vw); }
.fila-pagina { display: flex; align-items: center; gap: .8rem; padding: .75rem 1rem; border-top: 1px solid var(--line); background: #fff; }
.fila-pagina:first-child { border-top: 0; }
@media (max-width: 1100px) { .editor-sitio { grid-template-columns: 1fr; } .vista-previa { position: static; } }

/* Botón de ubicación por GPS */
.ubicacion-gps { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }
.estado-ubicacion { font-size: .86rem; font-weight: 600; color: var(--muted); }
.estado-ubicacion.ok { color: var(--ok); }
.estado-ubicacion.error { color: var(--bad); }

/* Barra de borrador del sitio web */
.barra-borrador { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem; padding: .8rem 1rem; border-radius: 12px; margin-bottom: 1rem; background: var(--ok-bg); color: #1d6b40; position: sticky; top: .5rem; z-index: 20; box-shadow: 0 4px 14px rgba(24,54,80,.08); }
.barra-borrador.con-cambios { background: #fdf5d6; color: #6b5200; }
.barra-borrador small { font-weight: 600; opacity: .85; }
.estado-guardado { font-size: .82rem; font-weight: 600; margin-right: auto; }
.estado-guardado.ok { color: var(--ok); }
.estado-guardado.error { color: var(--bad); }
.pie-bloque { gap: .6rem; align-items: center; }

/* Vista previa del sitio a pantalla completa */
.previa-completa { position: fixed; inset: 0; z-index: 1000; background: #0d2233; display: flex; flex-direction: column; }
.previa-completa[hidden] { display: none; }
.previa-barra { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; padding: .7rem 1rem; background: #fff; border-bottom: 3px solid var(--gold); }
.previa-barra select { width: auto; min-width: 160px; }
.previa-marco { flex: 1; display: flex; justify-content: center; padding: .8rem; overflow: auto; }
.previa-marco iframe { width: 100%; height: 100%; border: 0; border-radius: 10px; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.35); transition: width .25s; }

/* Menú lateral comprimible (solo íconos) */
.comprimir-menu { background: none; border: 0; color: var(--navy); cursor: pointer; padding: .35rem; border-radius: 8px; display: inline-flex; margin-right: .4rem; }
.comprimir-menu:hover { background: #eef2f6; }
.sidebar .logo-mini { display: none; height: 34px; }
@media (min-width: 861px) {
    html.menu-compacto .app { grid-template-columns: 72px 1fr; }
    html.menu-compacto .sidebar .logo-completo { display: none; }
    html.menu-compacto .sidebar .logo-mini { display: block; }
    html.menu-compacto .sidebar .brand { justify-content: center; padding: 1.1rem .4rem; }
    html.menu-compacto .sidebar nav { padding: .6rem .5rem 1.2rem; }
    html.menu-compacto .sidebar .grupo { font-size: 0; margin: .7rem .4rem; border-top: 1px solid rgba(255,255,255,.12); }
    html.menu-compacto .sidebar a.item { justify-content: center; font-size: 0; gap: 0; padding: .6rem 0 !important; position: relative; }
    html.menu-compacto .sidebar a.item svg { width: 20px; height: 20px; }
    html.menu-compacto .sidebar a.item .pill { position: absolute; top: 2px; right: 6px; font-size: .62rem; padding: 0 .3rem; }
    html.menu-compacto .sidebar .pie { display: none; }
}
