:root{
    --azul:#113B81; --azul-dark:#0c2d61; --teal:#03D0A1; --teal2:#1eaba7;
    --bg:#F7F8F4; --card:#ffffff; --txt:#171D20; --gris:#6b7280;
    --border:#E2E8F0; --radius:16px;
  }
  *{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
  html,body{height:100%}
  body{
    font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Inter,sans-serif;
    background:var(--bg); color:var(--txt); display:flex; min-height:100vh;
  }

  /* ── Login ── */
  #s-login{
    display:none; flex:1; align-items:center; justify-content:center;
    min-height:100vh; background:var(--azul); padding:24px;
  }
  .login-box{background:#fff;border-radius:20px;padding:36px 30px;max-width:380px;width:100%;text-align:center;box-shadow:0 20px 60px rgba(0,0,0,.25)}
  .login-title{font-size:22px;font-weight:800;color:var(--azul);letter-spacing:-.02em;margin-bottom:6px}
  .login-sub{font-size:14px;color:var(--gris);margin-bottom:24px;line-height:1.5}
  .login-input{width:100%;padding:13px 14px;border:1.5px solid var(--border);border-radius:11px;font-size:15px;text-align:center;letter-spacing:.03em;margin-bottom:14px;font-family:inherit}
  .login-input:focus{outline:none;border-color:var(--azul)}
  .login-err{font-size:12px;color:#a32d2d;margin-top:-4px;margin-bottom:12px;display:none}

  /* ── App shell ── */
  #s-app{display:none;flex:1;min-height:100vh}
  .sidebar{
    width:248px;background:linear-gradient(180deg,var(--azul-dark),var(--azul));
    display:flex;flex-direction:column;position:fixed;top:12px;left:12px;bottom:12px;
    border-radius:20px;overflow:hidden;z-index:100;box-shadow:0 8px 30px rgba(17,59,129,.25)
  }
  .sb-brand{display:flex;align-items:center;gap:10px;padding:24px 22px 18px}
  .sb-brand-name{color:#fff;font-weight:900;font-size:19px;letter-spacing:-.02em}
  .sb-nav{flex:1;padding:8px 12px;overflow-y:auto}
  .sb-label{color:rgba(255,255,255,.35);font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.09em;padding:16px 12px 6px}
  .nav-item{
    display:flex;align-items:center;gap:12px;padding:11px 14px;border-radius:12px;
    color:rgba(255,255,255,.7);font-size:14px;font-weight:600;cursor:pointer;margin-bottom:2px;
    transition:background .15s,color .15s
  }
  .nav-item svg{width:18px;height:18px;flex-shrink:0}
  .nav-item:hover{background:rgba(255,255,255,.08);color:#fff}
  .nav-item.active{background:rgba(255,255,255,.14);color:#fff}
  .sb-foot{padding:16px 22px;border-top:1px solid rgba(255,255,255,.1);display:flex;align-items:center;gap:10px}
  .sb-dot{width:8px;height:8px;border-radius:50%;background:var(--teal)}
  .sb-user{color:#fff;font-size:13px;font-weight:700}
  .sb-role{color:rgba(255,255,255,.45);font-size:11px}
  .sb-logout{margin-left:auto;background:none;border:none;color:rgba(255,255,255,.4);cursor:pointer;font-size:11px;font-family:inherit}

  .main{margin-left:272px;flex:1;padding:28px 32px;min-height:100vh}
  .view{display:none}
  .view.active{display:block}
  .v-head{margin-bottom:24px}
  .v-title{font-size:26px;font-weight:800;letter-spacing:-.02em;color:var(--txt)}
  .v-sub{font-size:13.5px;color:var(--gris);margin-top:4px}

  /* ── Cards / stats ── */
  .stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;margin-bottom:28px}
  .stat-card{
    background:var(--card);border-radius:var(--radius);padding:20px 22px;
    box-shadow:0 1px 2px rgba(17,29,32,.04), 0 8px 24px rgba(17,29,32,.05);
    transition:transform .15s, box-shadow .15s;
  }
  .stat-card:hover{transform:translateY(-2px);box-shadow:0 4px 10px rgba(17,29,32,.06), 0 14px 32px rgba(17,29,32,.08)}
  .stat-icon{width:34px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;margin-bottom:12px}
  .stat-icon svg{width:17px;height:17px}
  .stat-icon.i-blue{background:rgba(17,59,129,.09);color:var(--azul)}
  .stat-icon.i-amber{background:rgba(217,119,6,.11);color:#b45309}
  .stat-label{font-size:13px;color:var(--gris);margin-bottom:6px}
  .stat-val{font-size:30px;font-weight:800;color:var(--txt);letter-spacing:-.02em}
  .stat-note{font-size:12.5px;color:var(--gris);margin-top:5px}
  .stat-note b{color:var(--txt);font-weight:700}

  .dash-cols{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:0}
  .card-h{font-weight:800;font-size:15px;margin-bottom:14px}
  .quick-list{display:flex;flex-direction:column;gap:2px}
  .quick-item{padding:10px 8px;border-radius:10px;font-size:13.5px;font-weight:600;color:var(--txt);cursor:pointer;transition:background .12s}
  .quick-item:hover{background:var(--bg)}
  .atencion-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 8px;border-radius:12px;cursor:pointer;transition:background .12s}
  .atencion-item:hover{background:var(--bg)}
  .proj-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:14px}
  .proj-card{border-radius:14px;overflow:hidden;background:#fff;cursor:pointer;box-shadow:0 1px 2px rgba(17,29,32,.04), 0 8px 20px rgba(17,29,32,.05);transition:transform .15s,box-shadow .15s}
  .proj-card:hover{transform:translateY(-2px);box-shadow:0 4px 10px rgba(17,29,32,.06), 0 14px 28px rgba(17,29,32,.08)}
  .proj-card img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block}
  .proj-card .ph{width:100%;aspect-ratio:4/3;background:var(--border);display:flex;align-items:center;justify-content:center;color:#9BA8B5}
  .proj-card .ph svg{width:26px;height:26px}
  .proj-card .cap{padding:10px 12px}
  @media(max-width:860px){ .dash-cols{grid-template-columns:1fr} }

  .proy-layout{display:grid;grid-template-columns:280px 1fr;gap:16px;align-items:start}
  .proy-list-col{display:flex;flex-direction:column;gap:10px;position:sticky;top:0}
  .proy-list{display:flex;flex-direction:column;gap:6px;max-height:64vh;overflow-y:auto}
  .proy-list-item{padding:11px 13px;border-radius:12px;cursor:pointer;background:#fff;box-shadow:0 1px 2px rgba(17,29,32,.04), 0 6px 16px rgba(17,29,32,.04);transition:background .12s,box-shadow .12s}
  .proy-list-item .nom{font-weight:700;font-size:13.5px}
  .proy-list-item .sub{font-size:11.5px;color:var(--gris);margin-top:3px;display:flex;align-items:center;gap:6px}
  .proy-list-item.active{background:rgba(17,59,129,.07);box-shadow:inset 3px 0 0 var(--azul)}
  .proy-list-item.active .nom{color:var(--azul)}
  .proy-d-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:16px;gap:12px}
  .proy-d-title{font-size:20px;font-weight:800;letter-spacing:-.01em}
  .proy-d-addr{font-size:13px;color:var(--gris);margin-top:3px}
  .proy-d-meta{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:16px;padding:16px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border);margin-bottom:16px}
  .meta-item .k{font-size:10.5px;text-transform:uppercase;color:var(--gris);font-weight:700;letter-spacing:.06em;margin-bottom:5px}
  .meta-item .v{font-size:14px;font-weight:700}
  .comparador{display:grid;grid-template-columns:1fr 1fr;gap:16px}
  .comparador .col select{margin-bottom:10px}
  .comparador .col img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:12px;background:var(--border);display:block}
  @media(max-width:860px){ .proy-layout{grid-template-columns:1fr} .proy-list{max-height:none} .comparador{grid-template-columns:1fr} }

  .gal-toolbar{display:flex;gap:10px;margin-bottom:12px;flex-wrap:wrap}
  .gal-search{position:relative;flex:1;min-width:220px}
  .gal-search svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:15px;height:15px;color:var(--gris)}
  .gal-search input{width:100%;padding:10px 12px 10px 36px;border:1.5px solid var(--border);border-radius:10px;font-size:13px;font-family:inherit}
  .gal-search input:focus{outline:none;border-color:var(--azul)}

  .card{background:var(--card);border-radius:var(--radius);padding:24px;box-shadow:0 1px 2px rgba(17,29,32,.04), 0 8px 24px rgba(17,29,32,.05)}

  .map-card{border-radius:var(--radius);overflow:hidden;margin-bottom:16px;box-shadow:0 1px 2px rgba(17,29,32,.04), 0 8px 24px rgba(17,29,32,.05)}
  #mapa-proyectos{height:200px;width:100%;background:var(--border)}
  .leaflet-popup-content{font-family:inherit;font-size:12.5px}
  .leaflet-popup-content b{font-size:13px}
  .drop-zone{
    border:2px dashed var(--border);border-radius:var(--radius);padding:48px 24px;text-align:center;
    cursor:pointer;transition:all .2s;background:var(--card);margin-bottom:20px
  }
  .drop-zone:hover,.drop-zone.drag{border-color:var(--teal);background:rgba(3,208,161,.04)}
  .dz-icon{color:#9BA8B5;margin-bottom:12px}
  .dz-title{font-size:15px;font-weight:700;color:var(--txt);margin-bottom:4px}
  .dz-sub{font-size:12.5px;color:var(--gris)}

  .recent-item{display:flex;align-items:center;gap:14px;padding:11px 10px;border-radius:12px;transition:background .12s}
  .recent-item:hover{background:var(--bg)}
  .recent-thumb{width:52px;height:52px;border-radius:13px;background:var(--border);object-fit:cover;flex-shrink:0;box-shadow:0 1px 3px rgba(0,0,0,.08)}
  .recent-name{font-size:13.5px;font-weight:700}
  .recent-sub{font-size:12px;color:var(--gris);margin-top:1px}
  .pill{font-size:11px;font-weight:700;padding:5px 11px;border-radius:20px;margin-left:auto;white-space:nowrap;display:flex;align-items:center;gap:5px}
  .pill::before{content:'';width:6px;height:6px;border-radius:50%}
  .pill.m-inicial{background:rgba(17,59,129,.09);color:var(--azul)}
  .pill.m-inicial::before{background:var(--azul)}
  .pill.m-proceso{background:rgba(30,171,167,.13);color:#0f6f6c}
  .pill.m-proceso::before{background:var(--teal2)}
  .pill.m-final{background:rgba(3,208,161,.13);color:#027a5e}
  .pill.m-final::before{background:var(--teal)}

  /* ── Table ── */
  table.dt{width:100%;border-collapse:collapse}
  table.dt th{text-align:left;font-size:11.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--gris);font-weight:700;padding:10px 14px;border-bottom:1.5px solid var(--border)}
  table.dt td{padding:13px 14px;font-size:14px;border-bottom:1px solid var(--border)}
  table.dt tr:last-child td{border-bottom:none}
  .badge{font-size:11px;font-weight:700;padding:3px 9px;border-radius:8px}
  .badge-on{background:rgba(3,208,161,.13);color:#027a5e}
  .badge-off{background:#f1f2ef;color:var(--gris)}
  .toggle{width:38px;height:22px;border-radius:20px;background:var(--border);position:relative;cursor:pointer;border:none;transition:background .15s;flex-shrink:0}
  .toggle.on{background:var(--teal)}
  .toggle::after{content:'';position:absolute;width:16px;height:16px;background:#fff;border-radius:50%;top:3px;left:3px;transition:left .15s;box-shadow:0 1px 3px rgba(0,0,0,.3)}
  .toggle.on::after{left:19px}
  .row-btn{background:none;border:none;color:var(--azul);font-size:12.5px;font-weight:700;cursor:pointer;font-family:inherit}
  .eq-avatar{width:34px;height:34px;border-radius:50%;flex-shrink:0;object-fit:cover}
  .eq-avatar-init{display:flex;align-items:center;justify-content:center;font-size:12.5px;font-weight:800}
  .eq-avatar-lg{width:48px;height:48px;font-size:16px}
  .eq-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px}
  .eq-card{background:var(--card);border-radius:var(--radius);padding:18px;box-shadow:0 1px 2px rgba(17,29,32,.04), 0 8px 24px rgba(17,29,32,.05)}
  .eq-card-top{display:flex;align-items:center;gap:12px;margin-bottom:16px}
  .eq-card-name{font-weight:800;font-size:14.5px}
  .eq-card-role{font-size:12px;color:var(--gris);margin-top:1px}
  .eq-card-foot{display:flex;align-items:center;justify-content:space-between}
  .rep-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
  .rep-grid .card:first-child{grid-column:1/-1}
  @media(max-width:860px){ .rep-grid{grid-template-columns:1fr} }

  /* ── Gallery grid ── */
  .filters{display:flex;align-items:center;gap:10px;margin-bottom:14px;flex-wrap:wrap}
  .filters select{padding:9px 12px;border:1.5px solid var(--border);border-radius:10px;font-size:13px;font-family:inherit;background:#fff}
  .seg{display:inline-flex;background:var(--bg);border-radius:11px;padding:3px;gap:2px}
  .seg-btn{padding:7px 13px;border-radius:8px;border:none;background:none;font-size:12.5px;font-weight:600;font-family:inherit;color:var(--gris);cursor:pointer;white-space:nowrap;transition:background .15s,color .15s}
  .seg-btn.active{background:#fff;color:var(--txt);box-shadow:0 1px 2px rgba(17,29,32,.08)}
  .seg-btn.active[data-m="estado-inicial"]{color:var(--azul)}
  .seg-btn.active[data-m="proceso-obra"]{color:#0f6f6c}
  .seg-btn.active[data-m="final-obra"]{color:#027a5e}
  .gal-summary{font-size:12.5px;color:var(--gris);margin:0 0 14px}
  .gal-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px}
  .gal-item{border-radius:14px;overflow:hidden;background:#fff;cursor:pointer;box-shadow:0 1px 2px rgba(17,29,32,.04), 0 8px 20px rgba(17,29,32,.05);transition:transform .15s,box-shadow .15s}
  .gal-item:hover{transform:translateY(-2px);box-shadow:0 4px 10px rgba(17,29,32,.06), 0 14px 28px rgba(17,29,32,.08)}
  .gal-item img{width:100%;aspect-ratio:1;object-fit:cover;display:block}
  .gal-cap{padding:10px 12px;display:flex;align-items:center;gap:8px}
  .gal-proj{font-size:12.5px;font-weight:700;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .gal-mom{font-size:10px;font-weight:700;padding:4px 8px;border-radius:14px;white-space:nowrap;display:flex;align-items:center;gap:4px}
  .gal-mom::before{content:'';width:5px;height:5px;border-radius:50%}
  .gal-mom.m-inicial{background:rgba(17,59,129,.09);color:var(--azul)}
  .gal-mom.m-inicial::before{background:var(--azul)}
  .gal-mom.m-proceso{background:rgba(30,171,167,.13);color:#0f6f6c}
  .gal-mom.m-proceso::before{background:var(--teal2)}
  .gal-mom.m-final{background:rgba(3,208,161,.13);color:#027a5e}
  .gal-mom.m-final::before{background:var(--teal)}

  /* ── Buttons / forms ── */
  .btn{padding:11px 20px;border:none;border-radius:11px;font-size:14px;font-weight:700;font-family:inherit;cursor:pointer;transition:all .15s}
  .btn-p{background:var(--azul);color:#fff}
  .btn-p:hover{background:var(--azul-dark)}
  .btn-t{background:var(--teal);color:#052b1f}
  .btn-ghost{background:none;color:var(--gris);border:1.5px solid var(--border)}
  label{display:block;font-size:11px;font-weight:700;color:var(--gris);text-transform:uppercase;letter-spacing:.06em;margin-bottom:5px;margin-top:14px}
  input[type=text],select.f{width:100%;padding:11px 13px;border:1.5px solid var(--border);border-radius:10px;font-size:14px;font-family:inherit}

  .modal-bg{display:none;position:fixed;inset:0;background:rgba(15,25,40,.45);z-index:200;align-items:center;justify-content:center}
  .modal-bg.show{display:flex}
  .modal{background:#fff;border-radius:18px;padding:28px;max-width:400px;width:92%;box-shadow:0 20px 60px rgba(0,0,0,.3)}
  .modal h3{font-size:18px;font-weight:800;color:var(--azul);margin-bottom:4px}

  .toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#171D20;color:#fff;padding:11px 20px;border-radius:24px;font-size:13px;opacity:0;transition:opacity .3s;pointer-events:none;z-index:300}
  .toast.show{opacity:1}
  .toast.ok{background:#027a5e}
  .toast.err{background:#a32d2d}
  .empty{text-align:center;padding:40px 20px;color:var(--gris);font-size:14px}
  #up-lbl{font-size:12.5px;color:var(--gris);text-align:center;transition:all .2s}
  #up-lbl.up-lbl-ok{font-size:14.5px;font-weight:700;color:var(--teal)}
  .spinner{width:26px;height:26px;border:3px solid var(--border);border-top-color:var(--azul);border-radius:50%;animation:spin .7s linear infinite;margin:30px auto}
  @keyframes spin{to{transform:rotate(360deg)}}

  @media(max-width:860px){
    .sidebar{position:static;width:100%;border-radius:0;height:auto;top:0;left:0;bottom:auto}
    .main{margin-left:0;padding:20px}
    #s-app{flex-direction:column}
  }


/* ── Dashboard v1.0 · mockup-aligned, real data only ─────────── */
.dash-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:24px
}
.dash-head-actions{display:flex;align-items:center;gap:10px}
.dash-search{position:relative;width:min(360px,32vw)}
.dash-search svg{position:absolute;left:13px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:#94A3B8}
.dash-search input{
  width:100%;height:42px;padding:0 14px 0 40px;border:1px solid var(--border);border-radius:10px;
  background:#fff;font:inherit;font-size:13px;color:var(--txt);box-shadow:0 1px 2px rgba(17,29,32,.03)
}
.dash-search input:focus{outline:none;border-color:rgba(17,59,129,.45);box-shadow:0 0 0 3px rgba(17,59,129,.08)}
.sync-state{
  height:42px;padding:0 12px;border:1px solid var(--border);border-radius:10px;background:#fff;
  display:flex;align-items:center;gap:7px;font-size:12px;color:var(--gris);white-space:nowrap
}
.sync-dot{width:7px;height:7px;border-radius:50%;background:var(--teal);box-shadow:0 0 0 4px rgba(3,208,161,.10)}
.sync-state.offline .sync-dot{background:#D97706;box-shadow:0 0 0 4px rgba(217,119,6,.10)}
.sync-state.offline{color:#9A5A0A}
.dash-upload-btn{height:42px;padding:0 17px;white-space:nowrap}
.dash-primary{grid-template-columns:1.08fr 1.08fr .84fr;align-items:stretch}
.dash-card{min-height:248px;padding:20px}
.dash-card-head,.dash-section-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
.text-link{
  border:0;background:none;color:var(--azul);font:inherit;font-size:11.5px;font-weight:700;cursor:pointer;padding:3px 0
}
.text-link:hover{text-decoration:underline}
.card-h{margin-bottom:0}
.dash-card > .card-h,.dash-card-head{margin-bottom:14px}
.quick-list{gap:4px}
.quick-item{
  width:100%;border:0;background:transparent;display:flex;align-items:center;justify-content:space-between;
  padding:11px 8px;border-radius:9px;font:inherit;font-size:13px;font-weight:650;color:var(--txt);cursor:pointer;text-align:left
}
.quick-item:hover{background:var(--bg)}
.dash-activity,.dash-attention{
  width:100%;border:0;background:transparent;text-align:left;font:inherit;color:inherit
}
.dash-activity{display:grid;grid-template-columns:44px 1fr 18px;align-items:center;gap:11px;padding:9px 8px}
.dash-activity .recent-thumb{width:44px;height:44px;border-radius:9px}
.dash-activity-copy,.dash-attention-copy{display:flex;flex-direction:column;min-width:0}
.dash-chevron{font-size:13px;color:#A0AEC0}
.dash-attention{
  display:grid;grid-template-columns:10px 1fr auto;align-items:center;gap:10px;padding:11px 8px;border-radius:10px;cursor:pointer
}
.dash-attention:hover,.dash-activity:hover{background:var(--bg)}
.attention-mark{width:8px;height:8px;border-radius:50%;background:#F59E0B}
.dash-section{
  background:#fff;border-radius:var(--radius);padding:18px 18px 16px;margin-top:16px;
  box-shadow:0 1px 2px rgba(17,29,32,.04),0 8px 24px rgba(17,29,32,.05)
}
.dash-section-head{margin-bottom:13px}
.dash-projects{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.dash-project-card{
  width:100%;border:1px solid rgba(226,232,240,.95);padding:0;text-align:left;font:inherit;color:inherit;box-shadow:none
}
.dash-project-card:hover{box-shadow:0 8px 24px rgba(17,29,32,.08)}
.project-media{position:relative;display:block}
.dash-project-card img,.dash-project-card .ph{aspect-ratio:16/10}
.project-status{
  position:absolute;left:9px;top:9px;background:rgba(3,208,161,.92);color:#063F36;border-radius:999px;
  padding:4px 8px;font-size:10px;font-weight:800;line-height:1
}
.dash-project-card .cap{display:flex;flex-direction:column;gap:3px;padding:10px 11px 11px}
.project-meta{font-size:10.5px;color:#8B98A7;margin-top:3px}
.dash-map-section{padding-bottom:14px}
.dash-map-wrap{overflow:hidden;border-radius:12px;border:1px solid var(--border)}
#mapa-dashboard{height:210px;width:100%;background:#E9ECE5}
.empty.compact{min-height:130px;display:flex;align-items:center;justify-content:center;text-align:center;padding:22px;color:var(--gris)}
@media(max-width:1180px){
  .dash-head{flex-direction:column}
  .dash-head-actions{width:100%}
  .dash-search{width:auto;flex:1}
  .dash-primary{grid-template-columns:1fr 1fr}
  .dash-quick-card{grid-column:1/-1;min-height:auto}
  .dash-projects{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  .dash-head-actions{flex-wrap:wrap}
  .dash-search{flex:1 1 100%;width:100%}
  .sync-state{flex:1}
  .dash-upload-btn{flex:1}
  .dash-primary{grid-template-columns:1fr}
  .dash-quick-card{grid-column:auto}
  .dash-projects{grid-template-columns:1fr 1fr}
  #mapa-dashboard{height:240px}
}
@media(max-width:520px){
  .dash-projects{grid-template-columns:1fr}
  .sync-state span:last-child{display:none}
}


/* ── Proyectos v1.0 · mockup-aligned ────────────────────────── */
.projects-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:18px}
.projects-head-actions{display:flex;align-items:center;gap:10px}
.projects-search{position:relative;width:min(340px,31vw)}
.projects-search svg{position:absolute;left:13px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:#94A3B8}
.projects-search input{
  width:100%;height:42px;padding:0 14px 0 40px;border:1px solid var(--border);border-radius:10px;background:#fff;
  font:inherit;font-size:13px;color:var(--txt);box-shadow:0 1px 2px rgba(17,29,32,.03)
}
.projects-search input:focus{outline:none;border-color:rgba(17,59,129,.45);box-shadow:0 0 0 3px rgba(17,59,129,.08)}
.projects-tabs{display:flex;gap:28px;border-bottom:1px solid var(--border);margin-bottom:14px}
.project-tab{
  position:relative;border:0;background:none;padding:0 0 12px;font:inherit;font-size:12px;font-weight:700;color:#718096;cursor:pointer
}
.project-tab.active{color:var(--txt)}
.project-tab.active:after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--teal);border-radius:2px}
.projects-workspace{display:grid;grid-template-columns:minmax(290px,.78fr) minmax(0,1.52fr);gap:14px;align-items:start}
.projects-list-panel,.projects-detail-panel{min-width:0}
.projects-list-toolbar{
  min-height:42px;display:flex;align-items:center;justify-content:space-between;padding:0 4px 8px;
  font-size:11.5px;color:var(--gris)
}
.proy-list-v2{display:flex;flex-direction:column;gap:8px;max-height:680px;overflow:auto;padding-right:3px}
.project-list-row{
  width:100%;display:grid;grid-template-columns:64px minmax(0,1fr) auto;gap:11px;align-items:center;
  border:1px solid var(--border);background:#fff;border-radius:12px;padding:8px;text-align:left;font:inherit;color:inherit;
  cursor:pointer;transition:border-color .16s,box-shadow .16s,transform .16s
}
.project-list-row:hover{border-color:#CAD5E1;box-shadow:0 5px 18px rgba(17,29,32,.06)}
.project-list-row.active{border-color:rgba(17,59,129,.45);box-shadow:0 0 0 2px rgba(17,59,129,.07)}
.project-list-thumb{
  width:64px;height:54px;border-radius:9px;background:linear-gradient(145deg,#EEF4F8,#E2EAF0);
  display:flex;align-items:center;justify-content:center;color:var(--azul)
}
.project-list-thumb svg{width:24px;height:24px}
.project-list-copy{display:flex;flex-direction:column;min-width:0;gap:2px}
.project-list-title{font-size:13px;font-weight:800;color:var(--txt);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.project-list-sub{font-size:10.8px;color:var(--gris);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.project-list-service{font-size:10px;color:#91A0AE}
.project-list-side{display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;height:48px;gap:6px}
.project-state{font-size:9.5px;font-weight:800;color:#718096;background:#EEF2F6;border-radius:999px;padding:4px 7px;text-transform:capitalize}
.project-state.on{color:#06725D;background:#DDF8F1}
.project-detail-card{padding:0;overflow:hidden;min-height:520px}
.project-hero{position:relative;height:210px;background:linear-gradient(135deg,#DCE7EF,#EEF3F7);overflow:hidden}
.project-hero-placeholder{height:100%;display:flex;align-items:center;justify-content:center;color:#8093A6}
.project-hero-placeholder svg{width:76px;height:76px;opacity:.28}
.project-hero-overlay{position:absolute;inset:0;display:flex;align-items:flex-start;justify-content:flex-end;padding:14px}
.project-hero-badge{background:rgba(255,255,255,.94);color:#087763;border:1px solid rgba(3,208,161,.25);font-size:10.5px;font-weight:800;padding:6px 9px;border-radius:999px}
.project-detail-body{padding:18px}
.project-title-row{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}
.project-meta-grid{margin-top:15px;grid-template-columns:repeat(4,minmax(0,1fr))}
.project-tabs-inner{display:flex;gap:22px;border-bottom:1px solid var(--border);margin:16px 0 14px}
.project-tabs-inner .seg-btn{
  border:0;background:none;border-radius:0;padding:0 0 10px;color:#718096;font-weight:700;font-size:11.5px;position:relative
}
.project-tabs-inner .seg-btn.active{color:var(--txt);background:none}
.project-tabs-inner .seg-btn.active:after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--teal)}
.project-description{font-size:12.5px;color:var(--gris);line-height:1.55;margin-bottom:14px;max-width:760px}
.projects-map-section{
  background:#fff;border-radius:var(--radius);padding:16px;margin-top:14px;
  box-shadow:0 1px 2px rgba(17,29,32,.04),0 8px 24px rgba(17,29,32,.05)
}
.project-section-sub{font-size:11px;color:var(--gris);margin-top:3px}
#mapa-proyectos{height:240px;width:100%}
@media(max-width:1100px){
  .projects-head{flex-direction:column}
  .projects-head-actions{width:100%}
  .projects-search{flex:1;width:auto}
  .projects-workspace{grid-template-columns:1fr}
  .proy-list-v2{max-height:340px}
}
@media(max-width:720px){
  .projects-head-actions{flex-wrap:wrap}
  .projects-search{flex:1 1 100%;width:100%}
  .projects-tabs{gap:18px;overflow:auto}
  .project-meta-grid{grid-template-columns:1fr 1fr}
  .project-hero{height:180px}
}
@media(max-width:520px){
  .project-list-row{grid-template-columns:54px minmax(0,1fr)}
  .project-list-thumb{width:54px;height:50px}
  .project-list-side{grid-column:2;flex-direction:row;align-items:center;height:auto}
  .project-title-row{flex-direction:column}
}

