:root {
  --green: #1F5E41;
  --green-dark: #183D27;
  --gold: #CAA229;
  --gold-soft: #F1E3B3;
  --cream: #F7F6F2;
  --ink: #1B241F;
  --muted: #4A564F;
  --line: #E4E1D8;
  --field: #D5D1C6;
  --warn: #6B4A00;
  --danger: #8C1D18;
  --ok-bg: #E6F0EA;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--cream); color: var(--ink); font-family: Manrope, system-ui, -apple-system, sans-serif; -webkit-tap-highlight-color: transparent; }
body { min-height: 100vh; }
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--green); }

.top { background: var(--green-dark); color: var(--cream); padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.top-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.brand { font-weight: 800; letter-spacing: 3px; font-size: 17px; }
.top h1 { margin: 0; font-size: 24px; font-weight: 700; }
.top .sub { font-size: 14px; color: #D9DED9; }
.bar { position: sticky; top: 0; z-index: 5; min-height: 56px; padding: 0 8px; display: flex; align-items: center; gap: 4px; background: #fff; border-bottom: 1px solid var(--line); }
.bar h1 { margin: 0; font-size: 18px; font-weight: 700; flex: 1; }
.icon-btn { width: 44px; height: 44px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; border-radius: 22px; cursor: pointer; color: inherit; text-decoration: none; }
.link-light { color: var(--cream); font-weight: 700; font-size: 14px; background: none; border: none; min-height: 44px; cursor: pointer; text-decoration: underline; }

main { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 12px; padding-bottom: 96px; }
.section { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; margin-top: 6px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.card.focus { border: 2px solid var(--green); }
.card.late { border: 2px solid var(--danger); }
.card.dark { background: var(--green-dark); color: var(--cream); border: none; }
a.card { color: inherit; text-decoration: none; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.prop { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.title { font-size: 17px; font-weight: 700; }
.small { font-size: 13px; color: var(--muted); }
.pre { white-space: pre-line; line-height: 1.5; }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; font-size: 14px; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: rgba(247,246,242,0.12); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; color: var(--cream); text-decoration: none; }
.stat b { font-size: 22px; }
.stat span { font-size: 12px; color: #D9DED9; }
.stat.gold { background: var(--gold); color: var(--ink); }
.stat.gold span { color: var(--ink); font-weight: 600; }

.pill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 10px; white-space: nowrap; }
.pill.espera { background: var(--gold-soft); color: var(--ink); }
.pill.asignado { border: 1px solid var(--green); color: var(--green); }
.pill.en_curso { background: var(--green); color: #fff; }
.pill.terminado { background: #DCE8F5; color: #1F3B5E; }
.pill.entregado { background: var(--ok-bg); color: var(--green-dark); }
.pill.alerta { background: #F7DAD7; color: var(--danger); }

label.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.field input, .field select, .field textarea { height: 46px; border: 1px solid var(--field); border-radius: 10px; padding: 0 12px; font-size: 16px; font-weight: 600; background: #fff; color: var(--ink); width: 100%; }
.field textarea { height: 96px; padding: 10px 12px; resize: vertical; font-weight: 500; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--field); background: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.chip.on { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15px; }
.check input { width: 22px; height: 22px; accent-color: var(--green); }

.btn { min-height: 50px; border-radius: 14px; border: none; background: var(--green); color: #fff; font-weight: 700; font-size: 16px; padding: 0 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; width: 100%; }
.btn.ghost { background: #fff; color: var(--green); border: 1px solid var(--green); }
.btn.gold { background: var(--gold); color: var(--ink); }
.btn.danger { background: #fff; color: var(--danger); border: 1px solid var(--danger); }
.btn.small { min-height: 44px; font-size: 14px; border-radius: 12px; }
.btn:disabled { background: #C9CFCB; color: #3E4842; border: none; cursor: not-allowed; }
.btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #E7E3D9; display: block; }
.add-photo { aspect-ratio: 1; border: 2px dashed #A9B3AD; border-radius: 8px; background: var(--cream); color: var(--green); display: flex; flex-direction: column; gap: 2px; align-items: center; justify-content: center; cursor: pointer; }
.add-photo small { font-size: 11px; font-weight: 700; }
.add-photo input { display: none; }

.notice { border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 600; display: flex; gap: 8px; align-items: flex-start; }
.notice.ok { background: var(--ok-bg); color: var(--green-dark); }
.notice.warn { background: var(--gold-soft); color: var(--ink); }
.notice.bad { background: #F7DAD7; color: var(--danger); }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; font-size: 14px; }
.kv div:nth-child(even) { text-align: right; font-weight: 700; }

nav.tabs { position: fixed; bottom: 0; left: 0; right: 0; height: calc(68px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 560px; margin: 0 auto; z-index: 10; }
nav.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; position: relative; }
nav.tabs a.on { color: var(--green); }
nav.tabs .badge { position: absolute; top: 6px; right: calc(50% - 22px); background: var(--gold); color: var(--ink); font-size: 10px; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

#toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; max-width: calc(100% - 32px); z-index: 50; display: none; }
.login { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px; gap: 14px; }
.login .brand { color: var(--green-dark); font-size: 30px; text-align: center; }
.login .tag { text-align: center; color: var(--muted); font-size: 14px; margin-top: -8px; }
.spinner { margin: 40px auto; width: 32px; height: 32px; border: 3px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.busy { opacity: 0.6; pointer-events: none; }

.check.small { font-size: 13px; color: var(--muted); min-height: 32px; }
details summary { cursor: pointer; min-height: 32px; }
.photos a.vid { position: relative; display: block; }
.photos video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #1B241F; display: block; }
.photos a.vid span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 26px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.ph-wrap { position: relative; }
.rm-photo { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 14px; border: 2px solid #fff; background: rgba(140,29,24,.92); color: #fff; font-size: 14px; font-weight: 800; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.cam-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cam-box { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 10px; }
.cam-box video { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 14px; background: #111; transform: scaleX(-1); }
.cam-msg { color: #fff; font-size: 15px; font-weight: 600; text-align: center; min-height: 40px; }
.chat { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 82%; background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 8px 12px; align-self: flex-start; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; background: var(--green); color: #fff; border-color: var(--green); border-radius: 14px 14px 4px 14px; }
.msg-meta { font-size: 11px; opacity: .75; margin-top: 3px; }
.chat-box textarea { height: 80px; }
.cargo-in { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--field); border-radius: 10px; padding: 0 10px; font-size: 15px; }
.msg-img { display: block; max-width: 220px; max-height: 260px; border-radius: 10px; margin-bottom: 4px; }
.msg-pdf { display: inline-block; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.06); color: inherit; font-weight: 600; text-decoration: none; margin-bottom: 4px; }
.msg.mine .msg-pdf { background: rgba(255,255,255,.2); }
.attach { display: block; text-align: center; margin-top: 8px; cursor: pointer; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 48px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; font-size: 20px; cursor: pointer; }
details.respaldo { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
details.respaldo summary { font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
details.respaldo .btn { margin-top: 6px; }
.cargo-box { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.cargo-box select, .cargo-box .cargo-otro, .field .cargo-otro { height: 42px; border: 1px solid var(--field); border-radius: 10px; padding: 0 10px; font-size: 15px; background: #fff; width: 100%; }
.field .cargo-otro { margin-top: 6px; }
.cargo-box .cargo-in { flex: none; height: 42px; width: 100%; }
.c-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: var(--green); color: #fff; }
.c-head .small { color: rgba(255,255,255,.85); }
.brand-sm { font-weight: 800; letter-spacing: .18em; font-size: 18px; }
.lang-btn { border: 1px solid currentColor; background: transparent; color: inherit; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.login .lang-btn { color: var(--green); margin: 4px 0 8px; }
.inv-msg { width: 100%; border: 1px solid var(--field); border-radius: 10px; padding: 8px; font-size: 13px; margin: 8px 0; resize: vertical; }
.msg[data-act="msgMenu"] { cursor: pointer; }
.msg.deleted { font-style: italic; opacity: .75; }
.msg-orig { font-size: 12px; margin-top: 4px; opacity: .85; }
.msg-acts { display: flex; gap: 6px; margin-top: 6px; }
.msg-acts .btn { width: auto; padding: 6px 10px; }
.msg.mine .msg-acts .btn.ghost { background: #fff; }
.msg-audio { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.msg-audio audio { height: 36px; max-width: 220px; }
.rec-box { margin-top: 8px; padding: 10px; border-radius: 10px; background: #fdecea; color: #8a1c1c; font-weight: 600; }
.rec-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #d93025; animation: recblink 1s infinite; }
@keyframes recblink { 50% { opacity: .2; } }
.dl-btn { display: block; margin: 2px 0 4px; border: 0; background: rgba(0,0,0,.06); color: inherit; border-radius: 8px; padding: 4px 8px; font-size: 12px; font-weight: 700; cursor: pointer; }
.msg.mine .dl-btn { background: rgba(255,255,255,.2); }
.ph-wrap { position: relative; }
.dl-mini { position: absolute; left: 4px; bottom: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 14px; cursor: pointer; }
.stats4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats4 .stat b { font-size: 18px; white-space: nowrap; }
.stats4 + * { margin-top: 0; }
main > .chips { margin: 10px 0; }
.month-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.month-head span:last-child { font-weight: 600; text-transform: none; letter-spacing: 0; }
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: center; margin: 8px 0; }
.week-nav .btn { width: auto; }
.pay-total { font-size: 20px; font-weight: 800; color: var(--green); }
.pay-line { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; color: inherit; text-decoration: none; }
.pay-line b { white-space: nowrap; }
.pay-sec { margin-top: 10px; font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--muted); }
.pay-sec.warn { color: #9a6700; }
.ok-txt { color: #1e7a3c; } .warn-txt { color: #9a6700; } .bad-txt { color: #b42318; }
.week-nav .btn { min-width: 48px; font-size: 20px; }
.pay-card .pay-total { font-size: 22px; }
.msg-orig-file { margin-top: 4px; opacity: .9; } .msg-orig-file .msg-img { max-width: 160px; max-height: 180px; }
.stat small { font-size: 13px; font-weight: 600; opacity: .8; }
.alert-stat { background: rgba(217,48,37,.35) !important; }
.nav-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.nav-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nav-btns .btn { width: auto; flex: 1 1 auto; }
.map-ov { position: fixed; inset: 0; z-index: 9999; background: #fff; display: flex; flex-direction: column; }
.map-top, .map-bot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; }
.map-bot { flex-wrap: wrap; border-top: 1px solid var(--line); padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.map-top .btn, .map-bot .btn { width: auto; }
#map-box { flex: 1; }
.day-head { margin: 14px 0 6px; padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 800; letter-spacing: .03em; color: var(--muted); }
.day-head.hoy { background: #1e7a3c; color: #fff; font-size: 14px; }
.day-head.manana { background: #fff4d6; color: #7a5a00; }
.day-head.atrasado { background: #fdecea; color: #b42318; }
.card.day-hoy { background: #e6f4ea; border: 2px solid #1e7a3c; }
.card.day-manana { background: #fffaf0; }

.card.ret-card{border-left:4px solid var(--danger)}
.ret-note{background:rgba(200,60,60,.07);border-radius:8px;padding:8px 10px;margin:6px 0}
.ret-sub{font-weight:700;margin-top:10px;font-size:14px}
.pill.ok-pill{background:#e3f4e8;color:#1f7a3d}

.card.reasg{border-left:4px solid var(--danger)}
.reasg-row{display:flex;gap:8px;margin-top:8px;align-items:center}
.reasg-row select{flex:1;min-width:0;height:44px;border:1px solid var(--field);border-radius:10px;padding:0 10px;font-size:16px;font-weight:600;background:#fff;color:var(--ink)}
.reasg-row .btn{width:auto;margin:0;white-space:nowrap}

ol.terms{margin:8px 0 8px 18px;padding:0;display:flex;flex-direction:column;gap:6px;font-size:15px;line-height:1.4}
/* ---- Cotizador ---- */
.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.est-row{display:flex;align-items:center;gap:8px;border-top:1px solid var(--line);padding:8px 0;font-size:14px}
.est-row span{flex:1;min-width:0}
.x-btn{border:0;background:#f3e3e3;color:var(--danger);border-radius:8px;width:32px;height:32px;font-weight:700;flex:none}
details.pick{border:1px dashed var(--field);border-radius:10px;padding:8px 10px;margin-top:8px}
details.pick summary{font-weight:700;color:var(--green);cursor:pointer}
details.pick select,details.pick input{height:44px;border:1px solid var(--field);border-radius:10px;padding:0 10px;font-size:16px;background:#fff;color:var(--ink);width:100%;margin-top:8px}
details.pick .reasg-row select,details.pick .reasg-row input{margin-top:0}
.cot-line{display:flex;gap:10px;align-items:center;border-top:1px solid var(--line);padding:8px 0;font-size:14px}
.cot-line>div:first-child{flex:1;min-width:0}
.cot-in{display:flex;flex-direction:column;gap:4px;width:92px;flex:none}
.cot-in input{height:36px;border:1px solid var(--field);border-radius:8px;padding:0 6px;font-size:15px;width:100%;text-align:right}
.cot-in input:nth-child(2){font-size:12px;height:30px;color:var(--muted)}
.cot-in input.need{border:2px solid var(--danger)}
.est-doc{background:#fff;max-width:720px;margin:12px auto;padding:22px 20px;border-radius:14px;border:1px solid var(--line);color:#1d2a24;font-size:14px}
.est-hd{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:4px solid #CAA229;padding-bottom:12px;margin-bottom:12px}
.est-brand{font-size:28px;font-weight:800;letter-spacing:6px;color:#1F5E41}
.est-sub{font-size:11px;letter-spacing:1px;color:#6b776f;text-transform:uppercase}
.est-meta{text-align:right;font-size:12px;color:#44524a;line-height:1.5}
.est-meta b{color:#1F5E41;letter-spacing:1px}
.est-to{display:grid;grid-template-columns:1fr 1fr;gap:8px;background:#F7F6F2;border-radius:10px;padding:10px 12px;margin-bottom:10px}
.est-to span{display:block;font-size:11px;color:#6b776f;text-transform:uppercase}
.est-g{background:#1F5E41;color:#fff;font-weight:700;padding:5px 10px;border-radius:6px;margin-top:12px;font-size:13px;letter-spacing:.5px}
.est-it{display:flex;justify-content:space-between;gap:10px;padding:6px 10px;border-bottom:1px solid #ecebe4}
.est-it i{color:#6b776f}
.est-total{display:flex;justify-content:space-between;align-items:center;margin-top:14px;padding:12px;border:2px solid #1F5E41;border-radius:10px;font-size:16px}
.est-total b{font-size:22px;color:#1F5E41}
.est-note{font-size:11.5px;color:#6b776f;margin-top:10px;line-height:1.4}
.est-ft{font-size:11px;color:#1F5E41;border-top:1px solid #CAA229;margin-top:14px;padding-top:8px;text-align:center}
@media print{.no-print,.bar,.tabs,.c-head,#toast{display:none!important}body{background:#fff!important}.est-doc{border:0;margin:0;max-width:none}main{padding:0!important}}
.est-g{display:flex;justify-content:space-between}

.est-th{width:52px;height:52px;object-fit:cover;border-radius:8px;margin-right:8px;flex:none;vertical-align:middle}
.est-ths{display:flex;gap:6px;margin-top:4px;flex-wrap:wrap}
.est-it.rep{align-items:flex-start}
.est-it-main{flex:1;min-width:0}
.est-loc{font-size:12px;color:#6b776f}
.ce-box{width:22px;height:22px;accent-color:#1F5E41;margin-right:8px;flex:none}
.est-g .ce-box{accent-color:#CAA229}
.est-it.off,.est-g.off{opacity:.45}
.est-it.off b{text-decoration:line-through}
.ce-ok{display:inline-block;font-size:11px;font-weight:700;color:#1f7a3d;background:#e3f4e8;border-radius:6px;padding:1px 6px;margin-top:3px}
.ce-no{display:inline-block;font-size:11px;font-weight:700;color:#a12d2d;background:#f6e1e1;border-radius:6px;padding:1px 6px;margin-top:3px}
.est-mk{padding:4px 10px}
.est-hint{font-size:12.5px;color:#1F5E41;background:#eef5f0;border-radius:8px;padding:8px 10px;margin:6px 0}
.est-total.ok{border-color:#CAA229;font-size:14px}
.est-doc.rep .est-to{grid-template-columns:repeat(4,1fr)}
.rep-card{border:1px solid #ecebe4;border-radius:10px;padding:10px;margin-top:8px;page-break-inside:avoid}
.rep-h{display:flex;justify-content:space-between;gap:8px;font-size:14px}
.rep-h span{font-size:12px;color:#6b776f;white-space:nowrap}
.rep-li{font-size:13px;padding:2px 0}
.rep-ev{font-size:12.5px;padding:4px 8px;border-radius:6px;background:#F7F6F2;margin-top:4px}
.rep-ev.ok{background:#e3f4e8}.rep-ev.warn{background:#fbefd9}
.rep-ph{display:flex;gap:4px;flex-wrap:wrap;margin:4px 0}
.rep-ph img{width:64px;height:64px;object-fit:cover;border-radius:6px}
.rep-vid{font-size:12px;padding:20px 8px;background:#1d2a24;color:#fff;border-radius:6px}

.rep-kpis{display:flex;gap:10px;margin:12px 0}.rep-kpis>div{flex:1;border:1px solid #e3e7e4;border-radius:10px;padding:10px;text-align:center}.rep-kpis b{display:block;font-size:20px;color:#1F5E41}.rep-kpis span{font-size:12px;color:#6b776f}
.rep-tbl{width:100%;border-collapse:collapse;font-size:12.5px;margin:6px 0}.rep-tbl th{text-align:left;color:#6b776f;font-weight:600;border-bottom:2px solid #1F5E41;padding:5px 4px}.rep-tbl td{border-bottom:1px solid #eef1ef;padding:5px 4px}.rep-tbl td:last-child,.rep-tbl th:last-child{text-align:right;white-space:nowrap}
.mv-photo { display: block; width: 100%; margin-top: 4px; height: 26px; border-radius: 8px; border: 0; background: var(--primary, #1F5C45); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.has-mv .dl-mini { bottom: 34px; }
/* Visitas de cotización */
.v-q { font-weight: 700; margin: 16px 0 6px; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.v-n { display: inline-block; min-width: 22px; height: 22px; border-radius: 11px; background: var(--green); color: #fff; font-size: 12px; text-align: center; line-height: 22px; }
.v-sub { font-size: 13px; color: var(--muted); margin: 8px 0 4px; }
.v-form .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.v-form .chip { border: 1px solid var(--field); background: #fff; border-radius: 18px; padding: 8px 12px; font-size: 14px; color: var(--ink); cursor: pointer; }
.v-form .chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.v-form .chip.box::before { content: "☐ "; }
.v-form .chip.box.on::before { content: "☑ "; }
.v-det { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.v-det summary { font-weight: 700; cursor: pointer; }
.v-dw { border: 1px dashed var(--field); border-radius: 10px; padding: 8px; margin: 8px 0; }
.v-sel { display: block; width: 100%; padding: 9px; border: 1px solid var(--field); border-radius: 8px; background: #fff; font-size: 15px; margin-top: 6px; box-sizing: border-box; }
.v-wall { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.v-wall > span:first-child { width: 58px; font-size: 14px; }
.v-wall input { flex: 1; padding: 9px; border: 1px solid var(--field); border-radius: 8px; font-size: 15px; min-width: 0; }
.v-form textarea { width: 100%; box-sizing: border-box; }
.v-int { background: var(--gold-soft); color: var(--warn); border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.v-ln { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.v-ln small { display: block; color: var(--muted); font-size: 12px; }
.v-tot { display: flex; justify-content: space-between; font-weight: 800; font-size: 18px; padding-top: 10px; }
.v-kv { font-size: 14px; line-height: 1.55; }
.v-kv b { display: inline-block; min-width: 116px; color: var(--muted); font-weight: 600; }
.v-tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--muted); margin: 4px 0 2px; }
.v-tag.op { color: var(--warn); }
.c-log { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.c-log:last-child { border-bottom: 0; }
.c-log.new { background: var(--gold-soft); margin: 0 -10px; padding: 8px 10px; border-radius: 8px; }
.v-n.ok { background: var(--ok, #2e7d4f); }
.v-q.v-bad .v-n { background: var(--bad, #b3261e); }
.v-falta { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--bad, #b3261e); text-transform: uppercase; }
.v-prog { position: sticky; top: 0; z-index: 2; background: var(--gold-soft); color: var(--warn); border-radius: 10px; padding: 8px 12px; font-size: 14px; margin-top: 10px; }
.stats2x2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; font-size: 14px; }
.v-row input { padding: 9px; border: 1px solid var(--field); border-radius: 8px; font-size: 15px; min-width: 0; box-sizing: border-box; }
.v-head { color: var(--muted); font-size: 12px; margin-top: 2px; }
.v-head span:first-child { width: 62px; }
.v-total { background: var(--ok-bg); color: var(--green); border-radius: 8px; padding: 8px 10px; font-weight: 800; font-size: 14px; margin-top: 8px; }
.v-orig { margin-top: 8px; border: 1px dashed var(--field); border-radius: 10px; padding: 8px 10px; }
.v-orig summary { font-weight: 700; cursor: pointer; font-size: 14px; }
.acc-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.acc-row:last-child { border-bottom: 0; }
.acc-row .btns { margin: 0; }
.acc-bad { color: var(--bad, #b3261e); font-weight: 700; }
.acc-warn { color: var(--warn); font-weight: 700; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 8px 0; }
/* Informe del portal: mismo diseño que el PDF de KYRON (verde #1F5E41, verde oscuro #183D27, dorado #C5A059, crema #F7F6F2). */
.kr-doc { background: #fff; color: #1c2620; font-family: Helvetica, Arial, sans-serif; max-width: 8.5in; margin: 10px auto; padding: 0.45in 0.55in 0.4in; box-sizing: border-box; font-size: 11.5px; box-shadow: 0 1px 6px rgba(0,0,0,.08); }
.kr-band { background: #183D27; border-bottom: 3px solid #C5A059; color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; }
.kr-brand { font-size: 24px; font-weight: 800; letter-spacing: .5px; }
.kr-tag { color: #C5A059; font-size: 9.5px; letter-spacing: 1px; }
.kr-title { text-align: right; font-size: 11px; line-height: 1.4; }
.kr-title b { font-size: 15px; }
.kr-meta { margin: 8px 0; line-height: 1.45; }
.kr-kpis { display: flex; background: #F7F6F2; border: 0.5px solid #C5A059; margin: 8px 0 4px; }
.kr-kpis > div { flex: 1; text-align: center; padding: 8px 2px; border-right: 1px solid #fff; }
.kr-kpis b { display: block; color: #1F5E41; font-size: 17px; }
.kr-kpis span { color: #5d6b62; font-size: 9px; }
.kr-h2 { color: #1F5E41; font-weight: 700; font-size: 13px; margin: 11px 0 5px; }
.kr-t { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.kr-t th { background: #1F5E41; color: #fff; text-align: left; padding: 4px 5px; font-weight: 700; }
.kr-t td { padding: 4px 5px; border-bottom: 0.5px solid #dcdcd4; }
.kr-t tbody tr:nth-child(even) td { background: #F7F6F2; }
.kr-t tr.kr-tot td { background: #e9efe9 !important; border-top: 1px solid #1F5E41; }
.kr-r { display: block; text-align: right; white-space: nowrap; }
.kr-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kr-note { color: #5d6b62; margin-top: 10px; line-height: 1.45; }
.kr-foot { color: #5d6b62; font-size: 9px; text-align: center; margin-top: 18px; }
@media (max-width: 640px) { .kr-doc { padding: 12px; font-size: 11px; } .kr-two { grid-template-columns: 1fr; } .kr-kpis { flex-wrap: wrap; } .kr-kpis > div { flex: 1 0 33%; } .kr-work { display: block; overflow-x: auto; } }
@media print { .kr-doc { box-shadow: none; margin: 0; max-width: none; padding: 0; } .kr-band, .kr-kpis, .kr-t th, .kr-t td, .kr-tot td { -webkit-print-color-adjust: exact; print-color-adjust: exact; } @page { size: letter; margin: 0.5in 0.55in; } }

/* Mensajes con KYRON: como los mensajes de texto del teléfono */
.sms-main { padding-bottom: 90px; }
.msg-day { align-self: center; font-size: 11px; color: var(--muted); margin: 6px 0 2px; }
.msg-dl { display: inline-block; font-size: 12px; margin: 0 0 6px; color: inherit; opacity: .85; }
.msg-sel { display: block; font-size: 12px; margin-top: 4px; }
.sms-bar { position: sticky; bottom: 0; display: flex; align-items: flex-end; gap: 8px; background: var(--bg, #F7F6F2); padding: 8px 0; margin-top: 10px; }
.sms-bar textarea { flex: 1; min-width: 0; min-height: 42px; max-height: 120px; border: 1px solid var(--field); border-radius: 21px; padding: 10px 14px; font-size: 15px; resize: none; }
.sms-att, .sms-send { flex: none; width: 42px; height: 42px; border-radius: 21px; display: flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; border: 1px solid var(--line); background: #fff; }
.sms-send { background: var(--green); color: #fff; border-color: var(--green); }
.msg-rq { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--green); background: #fff; color: var(--green); cursor: pointer; text-decoration: none; }
.eq-more > summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--green); margin-top: 6px; }
.eq-more[open] > summary { margin-bottom: 6px; }
.eq-grp > summary { cursor: pointer; font-size: 15px; padding: 2px 0; }
.eq-grp > .card { margin: 8px 0 0; box-shadow: none; }
/* Calendario del trabajador (fila de días que se corre con el dedo) */
.wcal { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.wday { flex: none; width: 52px; scroll-snap-align: center; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 6px 0; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; color: inherit; font: inherit; }
.wday span { font-size: 11px; text-transform: uppercase; color: var(--muted); }
.wday b { font-size: 18px; line-height: 1.1; }
.wday i { font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: #d9622b; border-radius: 999px; min-width: 18px; padding: 0 5px; }
.wday em { height: 15px; }
.wday.today { border-color: var(--green); }
.wday.past { opacity: .55; }
.wday.on { background: var(--green); color: #fff; border-color: var(--green); }
.wday.on span { color: rgba(255,255,255,.85); }

/* Menú ☰ del trabajador */
.menu-btn { color: var(--cream); font-size: 26px; margin-left: -8px; }
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; width: min(84vw, 320px); background: #fff; z-index: 41; display: flex; flex-direction: column; overflow-y: auto; box-shadow: 4px 0 18px rgba(0,0,0,.2); }
.drawer-head { background: var(--green-dark); color: var(--cream); padding: 8px 16px 18px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.drawer-head .icon-btn { align-self: flex-start; color: var(--cream); font-size: 20px; }
.drawer-head .small { color: #D9DED9; }
.avatar { width: 72px; height: 72px; border-radius: 36px; background: var(--gold); color: var(--green-dark); font-weight: 800; font-size: 24px; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; border: 3px solid var(--cream); flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 40px; height: 40px; font-size: 14px; border: none; cursor: default; }
.eq-who { display: flex; align-items: center; gap: 10px; }
.drawer-lvl { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 12px; color: #fff; }
.drawer a { display: flex; align-items: center; gap: 12px; padding: 0 18px; min-height: 52px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.drawer a i { font-style: normal; width: 24px; text-align: center; }
.drawer a span { flex: 1; }
.drawer a em { font-style: normal; background: var(--danger); color: #fff; border-radius: 10px; font-size: 12px; padding: 1px 8px; }
.drawer-out { margin: 16px; min-height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 10px; font-weight: 700; color: var(--danger); cursor: pointer; }
/* Mi desempeño */
.des-lvl { font-size: 30px; font-weight: 800; line-height: 1.1; }
.des-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.des-seg i { height: 8px; border-radius: 4px; background: var(--line); }
.des-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.des-area { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--ink); text-decoration: none; }
.des-area.warn { border: 2px solid var(--gold); }
.des-ic { font-size: 28px; line-height: 1; }
.des-badge { background: var(--gold-soft); color: var(--warn); font-weight: 700; font-size: 12px; border-radius: 12px; padding: 2px 10px; }
.des-ok { color: var(--green); font-size: 12px; font-weight: 700; }
.des-prog { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.des-prog div { height: 100%; background: var(--gold); border-radius: 5px; }
.des-rule { flex-direction: row; align-items: flex-start; gap: 12px; }
.des-iss.grave { border-left: 5px solid var(--danger); }
.des-iss.leve { border-left: 5px solid var(--gold); }
.kudo { border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.des-chart { width: 100%; height: auto; display: block; }

/* Vista de computadora: la app ocupa la pantalla como página web (el menú de abajo pasa a la izquierda). */
nav.tabs.desk-only { display: none; }
@media (min-width: 960px) {
  nav.tabs.desk-only { display: grid; }
  nav.tabs::before { content: "KYRON"; font-weight: 800; letter-spacing: 3px; font-size: 17px; color: var(--green-dark); padding: 6px 22px 0; display: flex; align-items: center; }
  #app { max-width: 1280px; }
  #app:has(nav.tabs) { padding-left: 240px; }
  nav.tabs { top: 0; bottom: 0; right: auto; left: max(0px, calc(50% - 640px)); width: 240px; max-width: none; height: auto; padding: 18px 0 0; margin: 0; border-top: none; border-right: 1px solid var(--line); grid-template-columns: 1fr; grid-auto-rows: 54px; align-content: start; }
  nav.tabs a { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 0 22px; font-size: 15px; }
  nav.tabs a.on { background: var(--ok-bg); border-right: 4px solid var(--green); }
  nav.tabs .badge { position: static; margin-left: auto; }
  main { padding: 24px 32px 48px; }
  .top { padding: 22px 32px 24px; }
  .bar { padding: 0 24px; }
  .des-grid { grid-template-columns: repeat(4, 1fr); }
  #toast { bottom: 32px; }
}

.drawer-sec { padding: 14px 18px 6px; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }
@media (min-width: 960px) { .owner-menu { display: none !important; } }

/* Catálogo de precios (mismo diseño del catálogo 2026 de KYRON) */
.kc-doc { --kg: #1F5E41; --ko: #C9A22A; --kb: #F7F6F2; font-family: Carlito, Calibri, "Segoe UI", Lato, Arial, sans-serif; color: #2d3a33; max-width: 8.5in; margin: 10px auto; font-size: 12.5px; line-height: 1.4; }
.kc-doc h2, .kc-doc h3, .kc-band, .kc-cv-name, .kc-cv-title, .kc-cv-tag { font-family: "DejaVu Serif", Georgia, "Times New Roman", serif; }
.kc-cover { background: var(--kb); padding: 0.55in 0; }
.kc-cv-in { background: var(--kg); color: #fff; text-align: center; padding: 1.6in 0.5in 1.3in; }
.kc-logo { width: 160px; max-width: 45%; }
.kc-cv-name { font-size: 40px; font-weight: 700; margin-top: 6px; letter-spacing: .5px; }
.kc-cv-tag { color: var(--ko); font-style: italic; font-size: 17px; }
.kc-cv-rule { border-top: 2px solid var(--ko); margin: 34px 0 18px; }
.kc-cv-title { font-size: 23px; }
.kc-cv-sub { max-width: 5.6in; margin: 14px auto 0; font-size: 13.5px; }
.kc-cv-loc { color: var(--ko); font-weight: 700; font-size: 11.5px; margin-top: 28px; }
.kc-cv-for { color: #fff; font-size: 12px; margin-top: 10px; opacity: .9; }
.kc-cv-badge { background: var(--ko); color: #1d3a2a; font-weight: 700; font-size: 11.5px; display: inline-block; padding: 9px 0; width: 70%; margin-top: 70px; }
.kc-cv-contact { font-size: 12px; margin-top: 16px; }
.kc-page { background: var(--kb); padding: 0.45in 0.75in 0.4in; margin-top: 10px; position: relative; }
.kc-hd { border-bottom: 1px solid #d9d9d2; font-size: 9.5px; color: #8a918c; text-align: right; padding-bottom: 3px; margin-bottom: 10px; }
.kc-hd span { margin-left: 18px; }
.kc-ft { border-top: 2px solid var(--ko); font-size: 9.5px; color: #6b746e; text-align: center; padding-top: 5px; margin-top: 26px; }
.kc-h { color: var(--kg); font-size: 22px; border-bottom: 2px solid var(--ko); padding-bottom: 4px; margin: 22px 0 14px; }
.kc-doc h3 { color: var(--kg); font-size: 17px; margin: 16px 0 4px; }
.kc-doc .kc-h3b { font-size: 19px; }
.kc-doc p { margin: 4px 0 8px; }
.kc-b { font-weight: 700; color: #1d3a2a; }
.kc-band { background: var(--kg); color: #fff; font-weight: 700; font-size: 19px; padding: 9px 14px; margin: 4px 0 14px; }
.kc-band.gold { background: var(--ko); color: #1d3a2a; }
.kc-t { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: 12px; }
.kc-t th { background: var(--kg); color: #fff; text-align: left; padding: 4px 7px; font-weight: 700; }
.kc-t th:last-child, .kc-t td:last-child { text-align: right; }
.kc-t td { padding: 3px 7px; background: #fff; }
.kc-t tr:nth-child(odd) td { background: #F3F2EC; }
.kc-t td:last-child { font-weight: 700; color: #1d3a2a; }
.kc-t4 td:nth-child(3), .kc-t4 td:nth-child(4), .kc-t4 th:nth-child(3), .kc-t4 th:nth-child(4) { width: 60px; }
.kc-t4 td:last-child, .kc-t4 th:last-child { width: 60px; }
.kc-feat { width: 100%; border-collapse: collapse; margin: 10px 0 18px; }
.kc-feat th { background: var(--kg); color: #fff; text-align: left; width: 28%; padding: 14px 12px; font-size: 12.5px; vertical-align: middle; }
.kc-feat td { padding: 10px 14px; vertical-align: middle; }
.kc-gold { background: var(--ko); color: #1d3a2a; text-align: center; font-weight: 700; font-size: 16px; padding: 11px; margin-top: 8px; }
.kc-warn { background: #fbefd2; color: #8a5a00; font-weight: 700; padding: 12px 14px; margin: 14px 0; }
.kc-doc ul { margin: 4px 0 10px 18px; padding: 0; }
@media (max-width: 640px) { .kc-page { padding: 16px 14px; } .kc-cv-in { padding: 60px 18px 50px; } .kc-cv-name { font-size: 30px; } .kc-cv-badge { width: 92%; margin-top: 36px; } .kc-feat th { width: 38%; } }
@page kc { size: letter; margin: 0; }
@media print {
  .kc-doc { max-width: none; margin: 0; }
  .kc-cover, .kc-page { page: kc; }
  .kc-doc * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .kc-cover, .kc-page { break-after: page; page-break-after: always; margin: 0; }
  .kc-page:last-child { break-after: auto; page-break-after: auto; }
  .kc-cover { padding: 0.65in 0; height: 11in; box-sizing: border-box; }
  .kc-cv-in { height: 9.7in; box-sizing: border-box; }
  .kc-page { height: 11in; overflow: hidden; box-sizing: border-box; padding: 0.5in 0.75in 0.75in; font-size: 11.5px; }
  .kc-page .kc-t { font-size: 11px; margin: 4px 0 8px; }
  .kc-page .kc-t td, .kc-page .kc-t th { padding: 2px 7px; }
  .kc-page h3 { font-size: 15.5px; margin: 11px 0 3px; }
  .kc-page .kc-h3b { font-size: 17px; }
  .kc-page .kc-band { font-size: 17px; padding: 7px 12px; margin-bottom: 10px; }
  .kc-page p { margin: 3px 0 6px; }
  .kc-ft { position: absolute; left: 0.75in; right: 0.75in; bottom: 0.45in; margin: 0; }
}

/* Informes (nov 2026): una sección debajo de la otra, con espacio para leer bien los números. */
.kr-two { display: block; }
.kr-two > div + div { margin-top: 6px; }
.kr-h2 { font-size: 14px; margin: 22px 0 8px; padding-bottom: 3px; border-bottom: 1.5px solid #C5A059; }
.kr-t { font-size: 11.5px; }
.kr-t th { padding: 6px 8px; }
.kr-t td { padding: 6px 8px; }
.kr-t td:last-child, .kr-t th:last-child { white-space: nowrap; }
@media print { .kr-h2 { break-after: avoid; page-break-after: avoid; } .kr-t tr { break-inside: avoid; page-break-inside: avoid; } }
/* Columnas con la misma medida en todas las tablas: así las Units y los montos quedan uno debajo del otro. */
.kr-t.kr-g { table-layout: fixed; }
.kr-t .kr-fit { width: 76px; }
.kr-t.kr-g .kr-tot td { white-space: nowrap; overflow: visible; }
.kr-t.kr-g td.kr-n { white-space: nowrap; }
.kr-t th.kr-fit { white-space: normal; }
.kr-t .kr-n { width: 130px; text-align: right; }
.kr-t td:not(.kr-fit) { overflow-wrap: anywhere; }
/* Mis seguros */
.pill.warn { background: var(--gold-soft); color: var(--ink); }
.ins-t { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.ins-t th, .ins-t td { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--line, #e6e1d6); vertical-align: top; }
.ins-t th { font-size: 12px; color: var(--muted, #6b6b6b); font-weight: 600; }
.ins-t td:nth-child(2), .ins-t td:nth-child(3) { white-space: nowrap; }
