
*{box-sizing:border-box}body{margin:0;background:#f4f7f5;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:#17221c}
header{background:#ecefee;color:#59615d;padding:8px 16px;border-bottom:1px solid #dfe4e1}.wrap{max-width:1050px;margin:auto}h1{margin:0;font-size:18px;font-weight:700;line-height:1.15}header p{margin:2px 0 0;color:#7a827e;font-size:11.5px;font-weight:500;line-height:1.2}
main{padding:16px}.street-radio{position:absolute;opacity:0;pointer-events:none}
.street-tabs{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:8px;margin:0 0 16px}
.street-tab{display:block;background:white;border:1px solid #cfdbd5;border-radius:12px;padding:12px 8px;text-align:center;font-weight:750;cursor:pointer;color:#29483b}
.street-page{display:none;background:white;border:1px solid #dbe4df;border-radius:16px;overflow:hidden}
.page-head{padding:16px;border-bottom:1px solid #e7ece9;display:flex;justify-content:space-between;align-items:center}.page-head h2{margin:0;font-size:24px}.page-head span{font-size:12px;color:#6a7771}
.scroll{overflow-x:auto}table{width:100%;min-width:680px;border-collapse:collapse}th{background:#f8faf9;text-align:left;padding:10px;font-size:12px;color:#65736d}td{padding:6px;border-top:1px solid #edf1ef}
input,select{width:100%;font-size:16px;padding:10px;border:1px solid #d4dfd9;border-radius:9px;background:white}select{font-weight:650}
.langwrap{display:flex;align-items:stretch;gap:7px}
.langwrap select{flex:1}
.langbadge{width:12px;border-radius:7px;background:#c9d2ce;flex:none}
.langbadge.es{background:#16a34a}
.langbadge.en{background:#1683e8}
.langbadge.bi{background:#8b5cf6}
.langbadge.no{background:#dc2626}
.langbadge.dog{background:#ef4444}
.langbadge.nt{background:#991b1b}
.langbadge.other{background:#ec4899}
.langbadge.letter{background:#facc15}
select.lang-nt{background:#8b0000!important;color:#fff!important;font-weight:800!important}
select.lang-dog{background:#dc2626!important;color:#fff!important;font-weight:800!important}
select.lang-no{background:#fff!important;color:#111!important;font-weight:650!important}
select.lang-other{background:#f9a8d4!important;color:#831843!important;font-weight:800!important}
select.lang-letter{background:#fff!important;color:#1f2937!important;font-weight:800!important}
.tip{font-size:14px;color:#5f6f67;margin:0 0 9px}
#s0:checked ~ .pages .page0{display:block}#s0:checked ~ .street-tabs label[for="s0"]{background:#245b48;color:white;border-color:#245b48}#s1:checked ~ .pages .page1{display:block}#s1:checked ~ .street-tabs label[for="s1"]{background:#245b48;color:white;border-color:#245b48}#s2:checked ~ .pages .page2{display:block}#s2:checked ~ .street-tabs label[for="s2"]{background:#245b48;color:white;border-color:#245b48}#s3:checked ~ .pages .page3{display:block}#s3:checked ~ .street-tabs label[for="s3"]{background:#245b48;color:white;border-color:#245b48}#s4:checked ~ .pages .page4{display:block}#s4:checked ~ .street-tabs label[for="s4"]{background:#245b48;color:white;border-color:#245b48}#s5:checked ~ .pages .page5{display:block}#s5:checked ~ .street-tabs label[for="s5"]{background:#245b48;color:white;border-color:#245b48}#s6:checked ~ .pages .page6{display:block}#s6:checked ~ .street-tabs label[for="s6"]{background:#245b48;color:white;border-color:#245b48}#s7:checked ~ .pages .page7{display:block}#s7:checked ~ .street-tabs label[for="s7"]{background:#245b48;color:white;border-color:#245b48}#s8:checked ~ .pages .page8{display:block}#s8:checked ~ .street-tabs label[for="s8"]{background:#245b48;color:white;border-color:#245b48}#s9:checked ~ .pages .page9{display:block}#s9:checked ~ .street-tabs label[for="s9"]{background:#245b48;color:white;border-color:#245b48}#s10:checked ~ .pages .page10{display:block}#s10:checked ~ .street-tabs label[for="s10"]{background:#245b48;color:white;border-color:#245b48}#s11:checked ~ .pages .page11{display:block}#s11:checked ~ .street-tabs label[for="s11"]{background:#245b48;color:white;border-color:#245b48}
@media(max-width:600px){.street-tabs{grid-template-columns:repeat(2,1fr)}h1{font-size:17px}}

.dynamic-page{display:none;background:#fff;border:1px solid #dbe4df;border-radius:16px;overflow:hidden}
.dynamic-page.active-new{display:block!important}
.dynamic-tab.active-new{background:#245b48!important;color:#fff!important;border-color:#245b48!important}
.add-address-btn{margin:12px;border:1px solid #245b48;background:#eef7f3;color:#245b48;border-radius:10px;padding:10px 14px;font-weight:800;font-size:15px}

  .custom-house-keypad{position:fixed;left:0;right:0;bottom:0;z-index:99999;background:#eef1f4;border-top:1px solid #c8cdd3;box-shadow:0 -8px 24px rgba(0,0,0,.16);padding:10px 10px calc(10px + env(safe-area-inset-bottom));}
  .custom-house-keypad[hidden]{display:none!important}
  .custom-house-keypad .keypad-status{display:flex;align-items:center;justify-content:space-between;gap:8px;max-width:520px;margin:0 auto 8px;font-size:13px;font-weight:800;color:#334155}
  .custom-house-keypad .keypad-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;max-width:520px;margin:0 auto}
  .custom-house-keypad button{min-height:50px;border:0;border-radius:10px;background:#fff;color:#111827;font-size:23px;font-weight:800;box-shadow:0 1px 2px rgba(0,0,0,.14);touch-action:manipulation}
  .custom-house-keypad button:active{transform:translateY(1px);background:#e5e7eb}
  .custom-house-keypad .key-next{grid-row:span 2;background:#245b48;color:#fff;font-size:18px}
  .custom-house-keypad .key-done{background:#1f6f46;color:#fff;font-size:17px}
  .custom-house-keypad .key-back{font-size:20px;background:#d9dee4}
  body.custom-keypad-open{padding-bottom:275px}
  input[data-field="house_number"][readonly]{caret-color:transparent;cursor:pointer;background:#fff}
  input[data-field="house_number"].custom-keypad-active{outline:3px solid #245b48!important;outline-offset:-2px}
  @media(max-width:420px){.custom-house-keypad button{min-height:48px;font-size:22px}.custom-house-keypad{padding-left:8px;padding-right:8px}}

  .street-title-wrap{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
  .street-complete-check{display:inline-flex;align-items:center;gap:7px;font-size:14px;font-weight:850;color:#245b48;background:#eef7f3;border:1px solid #b8d1c5;border-radius:999px;padding:7px 10px;white-space:nowrap}
  .street-complete-check input{width:20px!important;height:20px!important;margin:0;accent-color:#245b48;flex:none}
  .parity-prompt{padding:12px 14px 4px;background:#f5f8f6;color:#245b48;font-size:15px;font-weight:900;border-bottom:0}
  .parity-filter{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;padding:8px 12px 12px;background:#f5f8f6;border-bottom:1px solid #e1e9e5}
  .parity-filter button{min-height:52px;border:2px solid #8fb6a6;border-radius:14px;background:#ffffff;color:#245b48;font-size:18px;font-weight:900;touch-action:manipulation;box-shadow:0 3px 8px rgba(0,0,0,.08)}
  .parity-filter button.active{background:#245b48;color:#fff;border-color:#245b48;box-shadow:0 5px 14px rgba(36,91,72,.28);transform:translateY(-1px)}
  .parity-filter-note{padding:8px 12px;background:#eef7f3;color:#245b48;font-size:13px;font-weight:800;border-bottom:1px solid #dbe8e2}
  @media(max-width:600px){.street-title-wrap{gap:8px}.street-complete-check{font-size:13px;padding:6px 9px}.parity-prompt{font-size:14px;padding:10px 12px 4px}.parity-filter{gap:8px;padding:8px 10px 10px}.parity-filter button{font-size:17px;min-height:50px}}


#territory-tools{max-width:1050px;margin:16px auto;padding:0 16px}
#territory-tools .tool-title{font-size:14px;font-weight:900;color:#245b48;margin:0 0 8px}
#territory-tools .map-panel{background:white;border:2px solid #245b48;border-radius:16px;padding:12px;margin-bottom:14px}
#territory-tools .map-panel h2{font-size:20px;margin:0 0 10px;color:#245b48}
#territory-tools .map-panel img{display:block;width:100%;height:auto;border:1px solid #d7e0dc;border-radius:10px}
#territory-tools .add-panel{background:#eef7f3;border:2px solid #245b48;border-radius:16px;padding:12px;margin-bottom:12px}
#territory-tools .add-panel h2{font-size:20px;margin:0 0 10px;color:#245b48}
#territory-tools .add-controls{display:flex;gap:8px;flex-wrap:wrap}
#territory-tools input{flex:1;min-width:190px;font-size:16px;padding:11px;border:1px solid #bfcfc7;border-radius:10px}
#territory-tools button{font-size:16px;font-weight:850;padding:11px 16px;border:0;border-radius:10px;background:#245b48;color:white;min-height:44px}
#territory-tools .new-streets{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
#territory-tools .new-street{background:white;border:1px solid #9eb8ac;border-radius:10px;padding:9px 12px;font-weight:750;color:#245b48}


.compact-tools{max-width:1050px;margin:12px auto;padding:0 16px;display:grid;grid-template-columns:145px 1fr;gap:10px;align-items:stretch}
.map-thumb{border:2px solid #245b48;border-radius:14px;background:#fff;padding:6px;cursor:pointer;min-height:96px}
.map-thumb img{width:100%;height:62px;object-fit:cover;border-radius:8px;display:block}
.map-thumb span{display:block;color:#245b48;font-weight:850;font-size:13px;margin-top:4px}
.compact-add{border:2px solid #245b48;border-radius:14px;background:#eef7f3;padding:10px}
.compact-add label{font-weight:900;color:#245b48;display:block;margin-bottom:7px}
.compact-add-row{display:flex;gap:7px}
.compact-add-row input{flex:1;min-width:0;font-size:16px;padding:10px;border:1px solid #bfcfc7;border-radius:9px}
.compact-add-row button{border:0;border-radius:9px;background:#245b48;color:#fff;font-weight:850;padding:10px 13px;font-size:15px}
#addMsg86{margin:5px 0 0;font-size:12px;color:#52665d}
.map-modal[hidden]{display:none!important}
.map-modal{position:fixed;inset:0;z-index:9999;background:rgba(0,0,0,.72);padding:18px;display:flex;align-items:center;justify-content:center}
.map-modal-card{background:#fff;border-radius:16px;padding:10px;max-width:900px;width:100%;max-height:92%;overflow:auto}
.map-modal-card img{width:100%;height:auto;display:block;border-radius:10px}
.map-modal-head{display:flex;justify-content:space-between;align-items:center;padding:4px 3px 10px;color:#245b48}
.map-modal-head button{border:0;background:#245b48;color:#fff;width:40px;height:40px;border-radius:10px;font-size:20px}
@media(max-width:520px){.compact-tools{grid-template-columns:110px 1fr}.map-thumb img{height:54px}.compact-add-row{flex-direction:column}.compact-add-row button{min-height:40px}}


/* V2 proportions: map larger, Agregar calle smaller */
.compact-tools{
  grid-template-columns:minmax(175px,1.35fr) minmax(145px,.65fr)!important;
}
.parity-filter button.active::before{
  content:""!important;
  position:absolute!important;
  left:14px!important;
  right:14px!important;
  top:7px!important;
  height:4px!important;
  border-radius:999px!important;
  background:#245b48!important;
  z-index:4!important;
}

.map-thumb{min-height:118px!important;padding:7px!important}
.map-thumb img{height:82px!important}
.compact-add{padding:8px!important}
.compact-add label{font-size:14px!important;margin-bottom:5px!important}
.compact-add-row{gap:5px!important}
.compact-add-row input{padding:8px!important;font-size:15px!important}
.compact-add-row button{padding:8px 10px!important;font-size:14px!important;min-height:38px!important}
@media(max-width:520px){
 .compact-tools{grid-template-columns:1.25fr .75fr!important}
 .map-thumb img{height:78px!important}
 .compact-add-row{flex-direction:column!important}
}


.map-thumb{position:relative!important;overflow:hidden!important}
.map-thumb .expand-map-icon{
 position:absolute!important;
 right:8px!important;
 bottom:8px!important;
 display:flex!important;
 align-items:center!important;
 justify-content:center!important;
 width:36px!important;
 height:36px!important;
 border-radius:9px!important;
 background:rgba(255,255,255,.94)!important;
 border:1px solid #cbd7d1!important;
 color:#245b48!important;
 font-size:23px!important;
 font-weight:700!important;
 line-height:1!important;
 margin:0!important;
 z-index:10!important;
}


.map-thumb .map-hint{
 position:absolute!important;
 left:9px!important;
 bottom:9px!important;
 display:block!important;
 background:rgba(255,255,255,.92)!important;
 color:#245b48!important;
 border:1px solid rgba(36,91,72,.22)!important;
 border-radius:8px!important;
 padding:5px 8px!important;
 font-size:12px!important;
 font-weight:750!important;
 line-height:1.1!important;
 letter-spacing:.1px!important;
 z-index:11!important;
 box-shadow:0 1px 4px rgba(0,0,0,.10)!important;
}


.top-map-row{max-width:1050px;margin:10px auto 0;padding:0 16px;display:flex;justify-content:flex-end}
.top-map-tab{border:0;border-radius:10px;background:#245b48;color:#fff;font-size:14px;font-weight:850;padding:9px 14px;cursor:pointer;box-shadow:0 1px 3px rgba(0,0,0,.12)}
.slim-add-wrap{max-width:1050px;margin:8px auto 10px;padding:0 16px}
.slim-add-tab{width:100%;height:35px;border:1px solid #d6e1dc;border-radius:9px;background:#fff;color:#245b48;font-size:13px;font-weight:800;cursor:pointer}
.slim-add-form{margin-top:7px;border:1px solid #d6e1dc;border-radius:9px;padding:8px;background:#f8fbfa}
.slim-add-form input{width:calc(100% - 92px);box-sizing:border-box;padding:8px;border:1px solid #c8d5cf;border-radius:8px;font-size:15px}
.slim-add-form button{margin-left:5px;padding:8px 10px;border:0;border-radius:8px;background:#245b48;color:#fff;font-weight:800}
.slim-add-form p{margin:5px 0 0;font-size:12px;color:#52665d}


/* Match Ver mapa to Agregar calle */
.top-map-row{
 max-width:1050px!important;
 margin:8px auto 0!important;
 padding:0 16px!important;
 display:block!important;
}
.top-map-tab{
 width:100%!important;
 height:35px!important;
 border:1px solid #d6e1dc!important;
 border-radius:9px!important;
 background:#fff!important;
 color:#245b48!important;
 font-size:13px!important;
 font-weight:800!important;
 padding:0 12px!important;
 box-shadow:none!important;
 cursor:pointer!important;
}


/* Ver mapa + Agregar calle side by side */
.top-map-row{
  width:calc(50% - 20px)!important;
  max-width:505px!important;
  margin:8px 0 0 calc((100% - min(1050px, 100%)) / 2 + 16px)!important;
  padding:0!important;
  display:block!important;
}
.slim-add-wrap{
  width:calc(50% - 20px)!important;
  max-width:505px!important;
  margin:-35px calc((100% - min(1050px, 100%)) / 2 + 16px) 10px auto!important;
  padding:0!important;
}
.top-map-tab,.slim-add-tab{
  width:100%!important;
  height:35px!important;
}
.slim-add-form{
  position:relative!important;
  z-index:20!important;
  background:#f8fbfa!important;
}
@media(max-width:520px){
  .top-map-row{
    width:calc(50% - 12px)!important;
    margin-left:16px!important;
  }
  .slim-add-wrap{
    width:calc(50% - 12px)!important;
    margin-right:16px!important;
  }
}


/* Make the two utility buttons noticeable but still clean */
.top-map-tab{background:#e8f2ff!important;color:#175b9c!important;border:1.5px solid #8bb9e8!important;box-shadow:0 1px 3px rgba(0,0,0,.08)!important}
.slim-add-tab{background:#eaf7ee!important;color:#216b3a!important;border:1.5px solid #8fc7a0!important;box-shadow:0 1px 3px rgba(0,0,0,.08)!important}
.top-map-tab,.slim-add-tab{font-size:14px!important;font-weight:850!important}


/* Compact worksheet area */
.pages, main{margin-top:5px!important}
.page, .street-page{padding-top:6px!important}
table{font-size:12px!important}
th{padding:6px 4px!important;font-size:11px!important;line-height:1.05!important}
td{padding:4px 4px!important;line-height:1.05!important;height:30px!important}
td input, td select, table input, table select{
  min-height:27px!important;
  height:27px!important;
  padding:2px 4px!important;
  font-size:12px!important;
  border-radius:5px!important;
}
.street-title, .page h2, .street-page h2{
  margin:5px 0 7px!important;
  font-size:18px!important;
}
.tabs{margin-top:5px!important;margin-bottom:5px!important;gap:5px!important}
.tabs label,.tabs button{padding:6px 9px!important;font-size:12px!important}
@media(max-width:520px){
  table{font-size:11px!important}
  th{padding:5px 2px!important;font-size:10px!important}
  td{padding:3px 2px!important;height:27px!important}
  td input,td select,table input,table select{height:25px!important;min-height:25px!important;font-size:11px!important;padding:1px 3px!important}
}


/* Narrower worksheet columns + larger readable type */
table{table-layout:fixed!important;width:100%!important;font-size:14px!important}
table th:nth-child(1),table td:nth-child(1){width:18%!important}
table th:nth-child(2),table td:nth-child(2){width:20%!important}
table th:nth-child(3),table td:nth-child(3){width:25%!important}
table th:nth-child(4),table td:nth-child(4){width:37%!important}
th{font-size:12px!important}
td,td input,td select,table input,table select{font-size:14px!important}
td input,td select,table input,table select{width:100%!important;box-sizing:border-box!important}
@media(max-width:520px){
 table{font-size:13px!important}
 th{font-size:11px!important}
 td,td input,td select,table input,table select{font-size:13px!important}
}


/* Larger address bubbles/rows — target about 20 visible entries */
td{
  height:40px!important;
  padding:5px 4px!important;
  vertical-align:middle!important;
}
td input,td select,table input,table select{
  height:32px!important;
  min-height:32px!important;
  font-size:14px!important;
  padding:3px 5px!important;
  border-radius:7px!important;
}
@media(max-width:520px){
  td{height:38px!important;padding:4px 3px!important}
  td input,td select,table input,table select{
    height:31px!important;
    min-height:31px!important;
    font-size:14px!important;
  }
}


table th:nth-child(1),table td:nth-child(1){width:18%!important}
table th:nth-child(2),table td:nth-child(2){width:18%!important}
table th:nth-child(3),table td:nth-child(3){width:40%!important}
table th:nth-child(4),table td:nth-child(4){width:24%!important}
table th:nth-child(4){font-size:11px!important}


/* Make Nombre about half as wide and give the space to Observación */
table th:nth-child(1),table td:nth-child(1){width:18%!important}
table th:nth-child(2),table td:nth-child(2){width:18%!important}
table th:nth-child(3),table td:nth-child(3){width:22%!important}
table th:nth-child(4),table td:nth-child(4){width:42%!important}


/* Slightly thinner Nombre; make OBS clearly visible */
table th:nth-child(1),table td:nth-child(1){width:18%!important}
table th:nth-child(2),table td:nth-child(2){width:18%!important}
table th:nth-child(3),table td:nth-child(3){width:18%!important}
table th:nth-child(4),table td:nth-child(4){width:46%!important}
table th:nth-child(4){font-size:0!important}
table th:nth-child(4)::after{content:"OBSERVACIONES"!important;font-size:12px!important;font-weight:800!important}


/* Live Supabase behavior */
.street-page.live-page{display:none!important}
.street-page.live-page.active{display:block!important}
.street-tab.live-tab.active{background:#245b48!important;color:white!important;border-color:#245b48!important}
.street-tab.live-tab{position:relative}
.street-tab .tab-complete-mark{display:none;margin-left:5px;font-size:15px;font-weight:1000;color:#16834d;vertical-align:middle}
.street-tab.completed .tab-complete-mark{display:inline}
.street-tab.live-tab.active .tab-complete-mark{color:#d8ffe8}

.sync-status{font-size:12px;font-weight:700;margin:6px 0 10px;color:#527066;text-align:center}
.sync-status.error{color:#9d2d2d}
.add-number-bar{padding:10px;background:#f7faf8;border-top:1px solid #e3ebe7;display:flex;gap:7px}
.add-number-bar input{flex:1;min-width:0}
.add-number-bar button{border:0;border-radius:9px;padding:8px 10px;background:#245b48;color:#fff;font-weight:750}


/* Final override: status colors, including iPhone Safari */
select[data-field="language"].lang-nt { background-color:#7f0000 !important; color:#ffffff !important; border:2px solid #4a0000 !important; font-weight:900 !important; -webkit-appearance:auto !important; appearance:auto !important; }
select[data-field="language"].lang-letter { background-color:#fff !important; color:#1f2937 !important; border:1px solid #cfd8d3 !important; font-weight:800 !important; }
.langbadge.nt { background-color:#7f0000 !important; }
.langbadge.letter { background-color:#ffd400 !important; }

/* Admin-only street deletion */
.street-admin-bar{padding:9px 10px 12px;background:#f7faf8;border-top:1px solid #e3ebe7;display:flex;justify-content:flex-end}
.delete-street-btn{border:1px solid #d7b8b8;border-radius:9px;padding:7px 10px;background:#fff;color:#8b1e1e;font:inherit;font-size:12px;font-weight:600}
.delete-street-btn:active{background:#fff1f1}


/* Last preached date control */
.last-preached-row{
  display:flex;align-items:center;justify-content:flex-start;gap:7px;flex-wrap:wrap;
  margin:7px 0 10px;padding:7px 9px;background:#f7faf8;border:1px solid #e3ebe7;border-radius:10px;
}
.last-preached-label{font-size:12px;font-weight:750;color:#334b42;white-space:nowrap}
.last-preached-date{
  width:auto!important;min-width:138px;height:32px!important;min-height:32px!important;
  border:1px solid #cbd8d2;border-radius:8px;background:#fff;color:#1f2c27;
  font:inherit;font-size:13px!important;padding:3px 7px!important;
}
.today-date-btn{
  border:1px solid #bfd0c8;border-radius:8px;background:#fff;color:#245b48;
  font:inherit;font-size:12px;font-weight:750;padding:7px 9px;
}
.today-date-btn:active{background:#edf6f1}
@media(max-width:520px){
  .last-preached-row{gap:6px;padding:7px}
  .last-preached-label{width:100%;font-size:11px}
  .last-preached-date{min-width:145px;font-size:13px!important}
}


/* Small save confirmation toast */
#saveToast86{
  position:fixed;
  left:50%;
  bottom:24px;
  transform:translate(-50%,18px);
  z-index:20000;
  background:rgba(23,34,28,.94);
  color:#fff;
  border-radius:999px;
  padding:8px 14px;
  font-size:13px;
  font-weight:700;
  line-height:1;
  box-shadow:0 4px 16px rgba(0,0,0,.22);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease,transform .18s ease;
}
#saveToast86.show{opacity:1;transform:translate(-50%,0)}
#saveToast86.error{background:#991b1b}
@media(max-width:520px){#saveToast86{bottom:18px;font-size:12px;padding:8px 13px}}


/* Fix utility button overlap: keep side-by-side with clear spacing */
.top-map-row{
  float:left!important;
  width:calc(50% - 24px)!important;
  max-width:none!important;
  margin:8px 6px 12px 16px!important;
  padding:0!important;
}
.slim-add-wrap{
  float:right!important;
  width:calc(50% - 24px)!important;
  max-width:none!important;
  margin:8px 16px 12px 6px!important;
  padding:0!important;
}
.top-map-tab,.slim-add-tab{
  height:38px!important;
}
main{clear:both!important;}
@media(max-width:520px){
  .top-map-row{width:calc(50% - 22px)!important;margin:8px 6px 10px 16px!important;}
  .slim-add-wrap{width:calc(50% - 22px)!important;margin:8px 16px 10px 6px!important;}
  .top-map-tab,.slim-add-tab{font-size:13px!important;}
}


/* Mobile-first readability: vertical scrolling only, no sideways worksheet movement */
html,body{
  width:100%!important;
  max-width:100%!important;
  overflow-x:hidden!important;
}
body{font-size:16px!important;}
header,.wrap,.toolbar,.sync-status,.street-tabs,.pages,.street-page,.page,.top-map-row,.slim-add-wrap{
  box-sizing:border-box!important;
  max-width:100%!important;
}
.scroll{
  width:100%!important;
  max-width:100%!important;
  overflow-x:hidden!important;
  -webkit-overflow-scrolling:auto!important;
}
table{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  table-layout:fixed!important;
  border-collapse:collapse!important;
}
th,td{
  min-width:0!important;
  max-width:none!important;
  overflow:hidden!important;
}
th:nth-child(1),td:nth-child(1){width:18%!important;}
th:nth-child(2),td:nth-child(2){width:24%!important;}
th:nth-child(3),td:nth-child(3){width:23%!important;}
th:nth-child(4),td:nth-child(4){width:35%!important;}
th{
  font-size:12px!important;
  line-height:1.08!important;
  padding:6px 3px!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
td{
  padding:2px!important;
}
td input,td select,table input,table select{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  min-height:42px!important;
  height:42px!important;
  box-sizing:border-box!important;
  font-size:16px!important;
  line-height:1.1!important;
  padding:5px 4px!important;
  border-radius:7px!important;
}
.langwrap{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  gap:3px!important;
  overflow:hidden!important;
}
.langwrap select{min-width:0!important;max-width:100%!important;}
.langbadge{width:6px!important;min-width:6px!important;flex:0 0 6px!important;}
.page-head h2,.street-page .page-head h2{font-size:23px!important;}
.page-head span,.street-page .page-head span{font-size:13px!important;}
.street-tab,.street-tabs label,.tabs label,.tabs button{
  font-size:14px!important;
}
.last-preached-label,.last-row label{font-size:13px!important;}
.last-preached-date,.last-row input{font-size:16px!important;}

@media(max-width:600px){
  body{font-size:16px!important;}
  header{padding-left:12px!important;padding-right:12px!important;}
  h1{font-size:30px!important;}
  .pages{padding-left:5px!important;padding-right:5px!important;}
  .street-tabs{padding-left:8px!important;padding-right:8px!important;gap:7px!important;}
  .street-tab,.street-tabs label{font-size:14px!important;padding:9px 5px!important;min-height:40px!important;}
  .page-head{padding-left:7px!important;padding-right:7px!important;}
  .last-preached-row,.last-row{padding-left:7px!important;padding-right:7px!important;}
  table{font-size:15px!important;}
  th{font-size:11.5px!important;padding:6px 2px!important;}
  td{padding:2px 1px!important;}
  td input,td select,table input,table select{
    font-size:16px!important;
    min-height:42px!important;
    height:42px!important;
    padding:4px 3px!important;
  }
  .langbadge{width:5px!important;min-width:5px!important;flex-basis:5px!important;}
  .actions,.add-number-bar,.street-admin-bar{padding-left:7px!important;padding-right:7px!important;}
}


.top-map-row{
  float:left!important;
  width:calc(50% - 25px)!important;
  margin:9px 7px 12px 16px!important;
  padding:0!important;
}
.slim-add-wrap{
  float:right!important;
  width:calc(50% - 25px)!important;
  margin:9px 16px 12px 7px!important;
  padding:0!important;
}
.top-map-tab,.slim-add-tab{
  width:100%!important;
  height:40px!important;
  font-size:14px!important;
}
main,.pages,.street-tabs{clear:both!important;}
@media(max-width:520px){
  .top-map-row{width:calc(50% - 24px)!important;margin:9px 6px 11px 16px!important;}
  .slim-add-wrap{width:calc(50% - 24px)!important;margin:9px 16px 11px 6px!important;}
  .top-map-tab,.slim-add-tab{font-size:14px!important;}
}


/* Wider Nombre column, slimmer Observación column */
.scroll{overflow-x:hidden!important;}
table{table-layout:fixed!important;width:100%!important;max-width:100%!important;}
table th:nth-child(1),table td:nth-child(1){width:18%!important;}
table th:nth-child(2),table td:nth-child(2){width:24%!important;}
table th:nth-child(3),table td:nth-child(3){width:40%!important;}
table th:nth-child(4),table td:nth-child(4){width:18%!important;}
table th:nth-child(4){font-size:10px!important;line-height:1!important;overflow-wrap:anywhere!important;}
table td:nth-child(4) input{font-size:14px!important;padding-left:3px!important;padding-right:3px!important;}


/* Show Observaciones only once */
table th:nth-child(4)::after{content:none!important;display:none!important;}
table th:nth-child(4){font-size:10px!important;line-height:1!important;}

/* 24-hour street-view timeout notice */
.street-timeout-note{
  margin:12px 5px 18px;
  padding:18px 12px;
  border:1px dashed #b9c9c1;
  border-radius:14px;
  background:#f7faf8;
  color:#50625a;
  text-align:center;
  font-size:15px;
  font-weight:700;
}


table th:nth-child(4)::before,table th:nth-child(4)::after{content:none!important;display:none!important;}
table th:nth-child(4){font-size:10px!important;line-height:1!important;}


#streetTabsLive.street-tabs-collapsed{
  grid-template-columns:1fr!important;
  align-items:stretch;
}
#streetTabsLive.street-tabs-collapsed .live-tab{
  display:none!important;
}
.street-list-toggle{
  width:100%;
  min-height:52px;
  border:2px solid #245b48;
  border-radius:12px;
  background:#245b48;
  color:#fff;
  font-weight:900;
  padding:10px 14px;
  font-size:16px;
  box-shadow:0 4px 12px rgba(36,91,72,.22);
  grid-column:1/-1;
}
.street-list-toggle:active{transform:translateY(1px)}
#streetTabsLive:not(.street-tabs-collapsed) .street-list-toggle{
  grid-column:1/-1;
}


/* Thinner inline header */
header{
  background:#edf0ef!important;
  color:#5d655f!important;
  padding:6px 12px!important;
  border-bottom:1px solid #dfe4e1!important;
}
header .wrap.thin-header-inline{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  flex-wrap:nowrap!important;
}
header .wrap.thin-header-inline h1{
  margin:0!important;
  font-size:17px!important;
  font-weight:700!important;
  line-height:1!important;
  color:#575f5a!important;
  white-space:nowrap!important;
  flex:none!important;
}
header .wrap.thin-header-inline p{
  margin:0!important;
  font-size:11px!important;
  font-weight:500!important;
  line-height:1.05!important;
  color:#7a827e!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

/* Binder divider tabs for Pares / Nones */
.parity-prompt{
  padding:8px 14px 3px!important;
  background:transparent!important;
  color:#315647!important;
  font-size:14px!important;
  font-weight:850!important;
}
.parity-filter{
  display:flex!important;
  align-items:flex-end!important;
  gap:0!important;
  padding:0 12px!important;
  background:transparent!important;
  border-bottom:0!important;
  position:relative!important;
  z-index:2!important;
}
.parity-filter button{
  position:relative!important;
  min-height:44px!important;
  padding:10px 18px 9px!important;
  border:1px solid #a8c2b5!important;
  border-bottom:none!important;
  border-radius:14px 14px 0 0!important;
  background:#7ea391!important;
  color:#ffffff!important;
  font-size:17px!important;
  font-weight:900!important;
  box-shadow:none!important;
  margin-right:4px!important;
  transform:none!important;
}
.parity-filter button:not(.active){
  margin-top:8px!important;
  z-index:1!important;
  background:#86aa98!important;
  color:#eef7f3!important;
}
.parity-filter button.active{
  background:#ffffff!important;
  color:#245b48!important;
  border-color:#d9e4df!important;
  box-shadow:0 -2px 8px rgba(0,0,0,.04), 0 6px 16px rgba(0,0,0,.10)!important;
  z-index:3!important;
  margin-top:0!important;
}
.parity-filter-note{
  margin:0 12px!important;
  padding:7px 12px!important;
  background:#ffffff!important;
  color:#658178!important;
  font-size:12px!important;
  font-weight:800!important;
  border-left:1px solid #dce5e0!important;
  border-right:1px solid #dce5e0!important;
  border-bottom:0!important;
}
.street-page .scroll{
  margin:0 12px 0!important;
  background:#ffffff!important;
  border:1px solid #dce5e0!important;
  border-top:none!important;
  border-radius:0 14px 14px 14px!important;
  box-shadow:0 8px 18px rgba(0,0,0,.05)!important;
  overflow:hidden!important;
}
.street-page .page-head + .last-preached-row{
  margin-left:12px!important;
  margin-right:12px!important;
}
.street-page .add-number-bar,
.street-page .street-admin-bar{
  margin:0 12px 10px!important;
  border-left:1px solid #dce5e0!important;
  border-right:1px solid #dce5e0!important;
  border-bottom:1px solid #dce5e0!important;
  border-top:none!important;
  background:#f7faf8!important;
}
.street-page .add-number-bar{
  border-radius:0!important;
}
.street-page .street-admin-bar{
  margin-top:0!important;
  border-top:none!important;
  border-radius:0 0 14px 14px!important;
}
@media(max-width:600px){
  header{padding:6px 10px!important;}
  header .wrap.thin-header-inline{gap:7px!important;}
  header .wrap.thin-header-inline h1{font-size:16px!important;}
  header .wrap.thin-header-inline p{font-size:10px!important;}
  .parity-prompt{padding:7px 12px 3px!important;font-size:13px!important;}
  .parity-filter{padding:0 10px!important;}
  .parity-filter button{font-size:16px!important;min-height:42px!important;padding:9px 15px 8px!important;}
  .parity-filter-note,.street-page .scroll,.street-page .add-number-bar,.street-page .street-admin-bar,.street-page .page-head + .last-preached-row{margin-left:10px!important;margin-right:10px!important;}
}


/* Final parity tabs: active page stays one continuous white surface */
.parity-prompt{
  padding:8px 12px 4px!important;
  margin:0!important;
  background:transparent!important;
}
.parity-filter{
  display:flex!important;
  width:100%!important;
  gap:0!important;
  padding:0!important;
  margin:0!important;
  background:#ffffff!important;
  border-bottom:0!important;
  align-items:flex-end!important;
  position:relative!important;
  z-index:2!important;
}
.parity-filter::after{
  content:""!important;
  position:absolute!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  height:12px!important;
  background:#ffffff!important;
  z-index:0!important;
}
.parity-filter button{
  flex:1 1 50%!important;
  width:50%!important;
  min-width:0!important;
  min-height:50px!important;
  padding:11px 10px 10px!important;
  margin:0!important;
  border:1px solid #c7d5cf!important;
  border-bottom:none!important;
  border-radius:18px 18px 0 0!important;
  font-size:18px!important;
  font-weight:900!important;
  box-shadow:none!important;
  position:relative!important;
}
.parity-filter button + button{margin-left:-1px!important;}
.parity-filter button.active{
  background:#ffffff!important;
  color:#245b48!important;
  border-color:#dfe7e2!important;
  z-index:3!important;
  margin-top:0!important;
  box-shadow:0 -1px 0 rgba(255,255,255,1), 0 7px 18px rgba(0,0,0,.06)!important;
}
.parity-filter button.active::after{
  content:""!important;
  position:absolute!important;
  left:0!important;
  right:0!important;
  bottom:-10px!important;
  height:12px!important;
  background:#ffffff!important;
}
.parity-filter button:not(.active){
  background:#87a796!important;
  color:#eef5f1!important;
  z-index:1!important;
  margin-top:11px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18), inset 0 -8px 16px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06)!important;
  filter:saturate(.9) brightness(.98)!important;
}
.parity-filter-note{
  margin:0!important;
  padding:10px 14px!important;
  background:#ffffff!important;
  color:#5c7369!important;
  font-size:12.5px!important;
  font-weight:800!important;
  border-left:1px solid #dfe7e2!important;
  border-right:1px solid #dfe7e2!important;
  border-top:none!important;
  border-bottom:none!important;
  box-shadow:none!important;
}
.street-page .scroll{
  margin:0!important;
  background:#ffffff!important;
  border-left:1px solid #dfe7e2!important;
  border-right:1px solid #dfe7e2!important;
  border-bottom:1px solid #dfe7e2!important;
  border-top:none!important;
  border-radius:0 0 18px 18px!important;
  box-shadow:0 10px 18px rgba(0,0,0,.05)!important;
  overflow:hidden!important;
}
.street-page .scroll table,
.street-page .scroll thead,
.street-page .scroll tbody,
.street-page .scroll tr,
.street-page .scroll td,
.street-page .scroll th{
  background:#ffffff!important;
}
.street-page .scroll th{
  color:#4f655c!important;
  border-top:1px solid #edf1ef!important;
}
.street-page .scroll td{
  border-top:1px solid #edf1ef!important;
}
.street-page .add-number-bar,
.street-page .street-admin-bar{
  margin:0!important;
  background:#ffffff!important;
  border-left:1px solid #dfe7e2!important;
  border-right:1px solid #dfe7e2!important;
  border-bottom:1px solid #dfe7e2!important;
  border-top:none!important;
}
.street-page .add-number-bar{
  padding-top:10px!important;
  padding-bottom:10px!important;
}
.street-page .street-admin-bar{
  border-radius:0 0 18px 18px!important;
  padding-bottom:12px!important;
}
@media(max-width:600px){
  .parity-filter button{font-size:17px!important;min-height:48px!important;}
  .parity-filter button:not(.active){margin-top:10px!important;}
}


/* Add top line to whichever parity divider tab is active */
.parity-filter button.active::before{
  content:""!important;
  position:absolute!important;
  left:14px!important;
  right:14px!important;
  top:7px!important;
  height:4px!important;
  border-radius:999px!important;
  background:#245b48!important;
  z-index:5!important;
}


/* Collapsed street-list button: menu icon at start + down arrow at end */
.street-list-toggle:not([hidden]){
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
}
.street-list-toggle .street-toggle-label{
  flex:1!important;
  text-align:center!important;
}
.street-list-toggle .street-toggle-menu,
.street-list-toggle .street-toggle-arrow{
  flex:0 0 auto!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:24px!important;
  font-size:20px!important;
  line-height:1!important;
}
.street-list-toggle .street-toggle-arrow{font-size:17px!important;}


.live-page tbody tr td:last-child{position:relative;overflow:visible!important}
.insert-row-plus{position:absolute!important;right:0!important;bottom:-13px!important;z-index:3;width:26px!important;height:26px!important;min-width:26px!important;padding:0!important;border:1px solid #315c49!important;border-radius:50%!important;background:#e6f2e9!important;color:#315c49!important;font:500 20px/22px system-ui!important;box-shadow:none!important;touch-action:manipulation}
.insert-row-plus:before{content:'';position:absolute;inset:-7px}
.insert-row-plus:focus-visible{outline:3px solid #315c49;outline-offset:3px}
.insert-row-plus:disabled{opacity:.5}
