html, body{
  margin:0;
  height:100%;
  overflow:hidden;
  font-family:Arial, Helvetica, sans-serif;
  background:#eef2f5;
}

.top-header{
  height:100px;
  background:#fff;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:0 25px;
  border-bottom:5px solid #9d8717;
  box-sizing:border-box;
}

.brand{
  display:flex;
  align-items:center;
  gap:18px;
}

.logo-titanes{width:75px;height:75px;object-fit:contain;}
.logo-escudo{width:65px;height:65px;object-fit:contain;}

.brand h1{
  margin:0;
  color:#0B5E3B;
  font-size:30px;
}

.brand p{
  margin:5px 0 0;
  color:#555;
}

.system-tag{
  display:inline-block;
  background:#9d8717;
  color:white;
  padding:5px 14px;
  border-radius:20px;
  font-size:12px;
  font-weight:bold;
}

.kpi-bar{
  height:85px;
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:12px;
  padding:12px;
  background:#eef2f5;
  box-sizing:border-box;
}

.kpi-card{
  background:white;
  border-radius:14px;
  text-align:center;
  padding:10px;
  box-shadow:0 4px 12px rgba(0,0,0,.12);
  border-top:5px solid #0B5E3B;
}

.kpi-card span{
  font-size:26px;
  font-weight:bold;
  color:#0B5E3B;
}

.kpi-card p{
  margin:4px 0 0;
  font-size:12px;
  color:#555;
  text-transform:uppercase;
}

#container{
  display:flex;
  height:calc(100vh - 175px);
  width:100%;
  overflow:hidden;
}

#sidebar{
  width:370px;
  min-width:370px;
  height:100%;
  overflow-y:auto;
  background:#f8fafc;
  padding:16px;
  box-sizing:border-box;
  border-right:4px solid #0B5E3B;
}

#map{
  flex:1;
  height:100%;
}

.card, .projection-box, .barrio-stat, .legend{
  background:white;
  border-radius:12px;
  padding:12px;
  margin-bottom:12px;
  box-shadow:0 3px 10px rgba(0,0,0,.08);
  border-left:5px solid #0B5E3B;
}

.search-box{
  width:100%;
  box-sizing:border-box;
  padding:12px;
  margin-bottom:14px;
  border:2px solid #0B5E3B;
  border-radius:10px;
  font-size:14px;
}

.project-item{
  background:white;
  border-radius:12px;
  padding:14px;
  margin-bottom:12px;
  box-shadow:0 3px 10px rgba(0,0,0,.08);
  border-left:6px solid #0B5E3B;
  cursor:pointer;
}

.project-header{
  display:flex;
  justify-content:space-between;
  gap:8px;
}

.project-header h3{
  margin:0;
  color:#0B5E3B;
  font-size:15px;
}

.project-meta{
  font-size:13px;
  color:#555;
}

.progress-bar{
  height:8px;
  background:#ddd;
  border-radius:20px;
  overflow:hidden;
}

.progress-fill{
  height:100%;
  background:#198754;
}

.progress-text{
  font-size:12px;
  text-align:right;
}

.status-badge{
  padding:4px 10px;
  border-radius:20px;
  font-size:11px;
  font-weight:bold;
}

.status-construction{background:#ffc107;color:#000;}
.status-completed{background:#198754;color:white;}
.status-pending{background:#dc3545;color:white;}
.status-design{background:#0d6efd;color:white;}

.legend-item{
  display:flex;
  align-items:center;
  gap:10px;
  margin:8px 0;
}

.legend-color{
  width:16px;
  height:16px;
  border-radius:50%;
}

.green{background:#28a745;}
.yellow{background:#ffc107;}
.red{background:#dc3545;}
.blue{background:#007bff;}
html, body{
  height:100%;
  overflow:hidden;
}

.kpi-bar{
    height:75px;
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:10px;
    padding:6px 12px;
    background:#eef2f5;
    box-sizing:border-box;
}

.kpi-card{
    background:white;
    border-radius:12px;
    padding:6px;
    text-align:center;
    border-top:4px solid #0B5E3B;
    box-shadow:0 2px 8px rgba(0,0,0,.10);
}

.kpi-card span{
    font-size:20px;
    font-weight:bold;
    color:#0B5E3B;
}

.kpi-card p{
    margin-top:2px;
    font-size:11px;
    color:#555;
    text-transform:uppercase;
}

#main-layout{
    display:grid;
    grid-template-columns:360px 1fr 330px;
    height:calc(100vh - 150px);
}

#projects-panel{
  overflow-y:auto;
  background:#f8fafc;
  padding:14px;
  border-right:4px solid #0B5E3B;
  box-sizing:border-box;
}

#map{
  height:100%;
  width:100%;
}

#info-panel{
  overflow-y:auto;
  background:#f8fafc;
  padding:14px;
  border-left:4px solid #0B5E3B;
  box-sizing:border-box;
}

.panel{
  background:white;
  border-radius:14px;
  padding:12px;
  margin-bottom:12px;
  box-shadow:0 4px 12px rgba(0,0,0,.10);
  border-left:5px solid #0B5E3B;
}

.panel h3{
  margin:0 0 8px;
  color:#0B5E3B;
  font-size:16px;
}

.search-box{
  width:100%;
  box-sizing:border-box;
  padding:12px;
  margin-bottom:14px;
  border:2px solid #0B5E3B;
  border-radius:10px;
}

.legend div{
  margin:8px 0;
}

.legend-color{
  display:inline-block;
  width:14px;
  height:14px;
  border-radius:50%;
  margin-right:8px;
}

.green{background:#28a745;}
.yellow{background:#ffc107;}
.red{background:#dc3545;}
.blue{background:#007bff;}
#map{
    position:relative;
}

#mapLegend{

    position:absolute;

    top:250px;

    right:350px;

    z-index:999;

    background:white;

    padding:10px 12px;

    border-radius:10px;

    box-shadow:0 3px 12px rgba(0,0,0,.20);

    font-size:12px;

    line-height:18px;

    width:155px;

}

#mapLegend div{

    display:flex;

    align-items:center;

    gap:8px;

}

#mapLegend .legend-color{

    width:12px;

    height:12px;

    border-radius:50%;

}
#loginScreen{
  position:fixed;
  inset:0;
  background:linear-gradient(135deg,#0B5E3B,#123524);
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
}

.login-card{
  width:360px;
  background:white;
  padding:30px;
  border-radius:18px;
  text-align:center;
  box-shadow:0 20px 45px rgba(0,0,0,.35);
}

.login-logo{
  width:90px;
  margin-bottom:10px;
}

.login-card h1{
  color:#0B5E3B;
  font-size:24px;
  margin:10px 0;
}

.login-card p{
  color:#555;
  margin-bottom:20px;
}

.login-card input{
  width:100%;
  box-sizing:border-box;
  padding:12px;
  margin-bottom:12px;
  border:2px solid #0B5E3B;
  border-radius:10px;
  font-size:15px;
}

.login-card button{
  width:100%;
  padding:12px;
  border:none;
  border-radius:10px;
  background:#0B5E3B;
  color:white;
  font-weight:bold;
  cursor:pointer;
}

#loginError{
  display:block;
  color:#dc3545;
  margin-top:12px;
}
.header-user{
    display:flex;
    align-items:center;
    gap:18px;
}

.system-status{
    text-align:right;
    font-size:12px;
    color:#666;
}

.status-online{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:6px;
    color:#0B5E3B;
    font-weight:bold;
}

.status-dot{
    width:10px;
    height:10px;
    border-radius:50%;
    background:#28a745;
}

#lastSync{
    color:#0B5E3B;
    font-weight:bold;
    margin-top:2px;
}

#userButton{
    background:#0B5E3B;
    color:white;
    border:none;
    border-radius:25px;
    padding:10px 16px;
    cursor:pointer;
    font-weight:bold;
}

#userButton:hover{
    background:#09492e;
}
.user-menu{
    position:relative;
}

.dropdown-menu{
    display:none;
    position:absolute;
    top:55px;
    right:0;
    width:220px;
    background:#fff;
    border-radius:12px;
    box-shadow:0 10px 25px rgba(0,0,0,.25);
    z-index:99999;
}

.dropdown-menu.show{
    display:block;
}

.user-role{
    padding:15px;
    font-weight:bold;
    color:#0B5E3B;
}

.logout-btn{
    width:100%;
    border:none;
    background:white;
    padding:14px;
    cursor:pointer;
    text-align:left;
    font-size:14px;
}

.logout-btn:hover{
    background:#f2f2f2;
}
.maps-button{
  display:block;
  background:#0d6efd;
  color:white;
  text-align:center;
  padding:10px;
  border-radius:8px;
  text-decoration:none;
  font-weight:bold;
  margin-top:8px;
}

.maps-button:hover{
  background:#084298;
}
.edit-button{
  display:block;
  width:100%;
  background:#ffc107;
  color:#000;
  text-align:center;
  padding:10px;
  border:none;
  border-radius:8px;
  font-weight:bold;
  margin-top:8px;
  cursor:pointer;
}

.modal-overlay{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  z-index:99999;
  align-items:center;
  justify-content:center;
}

.modal-card{
  width:520px;
  max-height:90vh;
  overflow-y:auto;
  background:white;
  border-radius:16px;
  padding:22px;
  box-shadow:0 20px 50px rgba(0,0,0,.35);
}

.modal-card h2{
  color:#0B5E3B;
  margin-top:0;
}

.modal-card label{
  display:block;
  font-weight:bold;
  margin-top:10px;
  font-size:13px;
}

.modal-card input,
.modal-card select,
.modal-card textarea{
  width:100%;
  box-sizing:border-box;
  padding:10px;
  border:1px solid #ccc;
  border-radius:8px;
  margin-top:4px;
}

.modal-card textarea{
  min-height:90px;
}

.modal-actions{
  display:flex;
  gap:10px;
  margin-top:18px;
}

.modal-actions button{
  flex:1;
  padding:12px;
  border:none;
  border-radius:8px;
  background:#0B5E3B;
  color:white;
  font-weight:bold;
  cursor:pointer;
}

.cancel-btn{
  background:#6c757d!important;
}
.photo-gallery{
  display:flex;
  gap:8px;
  overflow-x:auto;
  margin:8px 0;
}

.project-photo{
  width:95px;
  height:70px;
  object-fit:cover;
  border-radius:8px;
  border:2px solid #ddd;
}
.add-project-btn{
    display:none;
    width:100%;
    padding:12px;
    margin-bottom:14px;
    border:none;
    border-radius:10px;
    background:#0B5E3B;
    color:white;
    font-size:15px;
    font-weight:bold;
    cursor:pointer;
    transition:.2s;
}

.add-project-btn:hover{
    background:#08452c;
}
.admin-actions{
  display:flex;
  gap:8px;
  margin-bottom:14px;
}

.add-project-btn,
.edit-selected-btn{
  flex:1;
  display:none;
  padding:12px;
  border:none;
  border-radius:10px;
  color:white;
  font-weight:bold;
  cursor:pointer;
}

.add-project-btn{
  background:#0B5E3B;
}

.edit-selected-btn{
  background:#ffc107;
  color:#000;
}
.pick-location-btn{
  width:100%;
  padding:10px;
  margin-top:8px;
  border:none;
  border-radius:8px;
  background:#0d6efd;
  color:white;
  font-weight:bold;
  cursor:pointer;
}
.selected-project{
  outline:3px solid #ffc107;
  background:#fff8dd !important;
}
.powered-by{
    display:flex;
    align-items:center;
    gap:10px;
    margin:0 15px;
}

.powered-by small{
    display:none;
}

.powered-logo{
    width:55px;
    height:auto;
    transition:0.3s;
}

.powered-logo:hover{
    transform:scale(1.05);
}

.powered-text{
    text-decoration:none;
    color:#0B5E3B;
    font-size:11px;
    font-weight:700;
    line-height:1.2;
    white-space:nowrap;
}

.powered-text:hover{
    color:#08452c;
}
.powered-subtitle{
    display:block;
    font-size:9px;
    color:#666;
    font-weight:500;
    margin-top:2px;
}

.powered-version{
    display:block;
    font-size:9px;
    color:#999;
    font-weight:600;
    margin-top:3px;
}
.delete-btn{
  background:#dc3545 !important;
  color:white !important;
}