@font-face {
  font-family: 'Metropolis';
  src: url('../assets/fonts/Metropolis-Regular.otf');
  font-weight: 400;
}

@font-face {
  font-family: 'Metropolis';
  src: url('../assets/fonts/Metropolis-Medium.otf');
  font-weight: 500;
}

@font-face {
  font-family: 'Metropolis';
  src: url('../assets/fonts/Metropolis-SemiBold.otf');
  font-weight: 600;
}

@font-face {
  font-family: 'Metropolis';
  src: url('../assets/fonts/Metropolis-Bold.otf');
  font-weight: 700;
}

@font-face {
  font-family: 'Metropolis';
  src: url('../assets/fonts/Metropolis-ExtraBold.otf');
  font-weight: 800;
}

:root{
  --verde-netandino:#046B3B;
  --verde-secundario:#32B474;
  --verde-claro:#8BC540;
  --cafe:#3E2517;
  --blanco:#ffffff;
  --gris-fondo:#f5f7f6;
  --gris-texto:#5f5f5f;
  --gris-borde:#dfe5e1;
  --sombra:0 18px 45px rgba(0,0,0,0.10);
}

*{
  box-sizing:border-box;
}

body{
  margin:0;
  font-family:'Metropolis', sans-serif;
  background:var(--gris-fondo);
}

.contenedor-login{
  display:flex;
  min-height:100vh;
}

.lado-imagen{
  width:50%;
  background:
  linear-gradient(rgba(4,107,59,0.55), rgba(4,107,59,0.55)),
  url("../assets/CONJUNTO_INDEX.png");
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  display:flex;
  align-items:flex-end;
  padding:70px;
}

.capa-oscura{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,0.08);
  pointer-events:none;
}

.texto-imagen{
  position:relative;
  z-index:2;
  color:white;
  max-width:520px;
  pointer-events:none;
  transform:translateX(-40px);
  opacity:0;
  animation-name: aparecerIzquierda;
  animation-duration: 1.2s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.texto-imagen h2{
  margin:0 0 12px 0;
  font-size:58px;
  line-height:1.05;
  font-weight:700;
  letter-spacing:-1px;
}

.lado-formulario{
  width:50%;
  display:flex;
  justify-content:center;
  align-items:center;
  background:linear-gradient(to bottom, #ffffff, #f7faf8);
  padding:40px;
  position:relative;
  z-index:5;
}

.caja-login{
  width:100%;
  max-width:360px;
  background:rgba(255,255,255,0.88);
  padding:30px 28px;
  border-radius:18px;
  box-shadow:var(--sombra);
  border:1px solid rgba(255,255,255,0.55);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  position:relative;
  z-index:6;
}

.logo{
  width:150px;
  margin-bottom:10px;
  animation:logoEntrada 1s ease;
}

h1{
  color:var(--verde-netandino);
  margin:0 0 2px 0;
  font-size:38px;
  font-weight:700;
  line-height:1.1;
}

p{
  color:var(--gris-texto);
  margin-bottom:26px;
  font-size:16px;
}

form{
  display:flex;
  flex-direction:column;
  gap:14px;
}

input{
  padding:12px 14px;
  border:1px solid var(--gris-borde);
  border-radius:12px;
  font-size:15px;
  outline:none;
  transition:0.2s ease;
  background:#fff;
}

.campo-password{
  position:relative;
}

.campo-password input{
  width:100%;
  padding-right:48px;
}

.toggle-password{
  position:absolute;
  right:16px;
  top:50%;
  transform:translateY(-50%);
  cursor:pointer;
  font-size:18px;
  user-select:none;
}

input:focus{
  border-color:var(--verde-secundario);
  box-shadow:0 0 0 4px rgba(50,180,116,0.12);
}

button{
  padding:15px;
  border:none;
  border-radius:12px;
  background:linear-gradient(135deg, var(--verde-netandino), var(--verde-secundario));
  color:var(--blanco);
  font-size:16px;
  font-weight:700;
  cursor:pointer;
  transition:all 0.25s ease;
}

button:hover{
  transform:translateY(-2px) scale(1.01);
  box-shadow:0 12px 24px rgba(4,107,59,0.22);
}

button:active{
  transform:scale(0.98);
}

.olvide{
  display:inline-block;
  margin-top:18px;
  color:var(--verde-netandino);
  text-decoration:none;
  font-size:14px;
}

.olvide:hover{
  text-decoration:underline;
}

@media (max-width: 768px){
  .contenedor-login{
    flex-direction:column;
  }

  .lado-imagen,
  .lado-formulario{
    width:100%;
  }

  .lado-imagen{
    min-height:200px;
    padding:24px 20px;
  }

  .texto-imagen h2{
    font-size:22px;
    letter-spacing:-0.5px;
  }

  .lado-formulario{
    padding:24px 16px;
    align-items:flex-start;
  }

  .caja-login{
    padding:24px 20px;
    border-radius:16px;
    max-width:100%;
  }

  .logo{
    width:120px;
  }

  h1{
    font-size:26px;
  }

  /* Modal OTP responsive */
  #modal-otp > div {
    padding:22px 18px !important;
    border-radius:16px !important;
    margin:0 8px !important;
  }
}

@media (max-width: 420px){
  .lado-imagen{
    min-height:160px;
  }
  .texto-imagen h2{
    font-size:18px;
  }
  .caja-login{
    padding:20px 16px;
  }
  h1{ font-size:22px; }

  /* Inputs más grandes para dedos */
  input[type=text], input[type=password]{
    padding:14px 13px !important;
    font-size:16px !important; /* Evita zoom automático en iOS */
  }
  button#btn-login{
    padding:14px !important;
    font-size:15px !important;
  }
}
  @keyframes aparecerIzquierda {
  0% {
    opacity: 0;
    transform: translateX(-150px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes logoEntrada{
  from{
    opacity:0;
    transform:scale(0.9);
  }
  to{
    opacity:1;
    transform:scale(1);
  }
}

.firma-netandino{
  position:fixed;
  bottom:14px;
  right:20px;
  font-size:12px;
  color:rgba(0,0,0,0.45);
  font-weight:500;
  font-family:Metropolis, sans-serif;
}

.firma-netandino strong{
  color:#0b6b3a;
}

.dashboard-body{
  margin:0;
  background:#f3f5f4;
  font-family:'Metropolis', sans-serif;
}

.dashboard-layout{
  display:flex;
  min-height:100vh;
}

.dashboard-main{
  flex:1;
  padding:24px;
}

.dashboard-header{
  height:150px;
  border-radius:24px;
  background-size:cover;
  background-position:center;
  display:flex;
  align-items:flex-end;
  padding:28px;
  color:white;
  margin-bottom:24px;
}

.dashboard-header-content h1{
  margin:0 0 8px 0;
  color:white;
  font-size:38px;
}

.dashboard-header-content p{
  margin:0;
  color:rgba(255,255,255,0.92);
}

.cards-resumen{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:18px;
  margin-bottom:24px;
}

.card-mini{
  background:white;
  border-radius:18px;
  padding:20px;
  box-shadow:0 10px 25px rgba(0,0,0,0.05);
}

.card-mini h3{
  margin:0 0 10px 0;
  font-size:15px;
  color:#666;
}

.card-mini span{
  font-size:30px;
  font-weight:700;
  color:#046B3B;
}

.dashboard-contenido{
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:20px;
}

.feed-panel,
.widget{
  background:white;
  border-radius:20px;
  padding:22px;
  box-shadow:0 10px 25px rgba(0,0,0,0.05);
}

.feed-panel h2,
.widget h3{
  margin-top:0;
  color:#3E2517;
}

.post-card{
  border:1px solid #e7ece8;
  border-radius:16px;
  padding:18px;
  margin-top:16px;
}

.post-card h3{
  margin:0 0 10px 0;
  color:#046B3B;
}

.post-card p{
  margin:0 0 10px 0;
  color:#555;
}

.post-meta{
  font-size:13px;
  color:#888;
}

.widget ul{
  padding-left:18px;
  color:#555;
}

.boton-secundario{
  width:100%;
  margin-top:10px;
  padding:13px;
  border:none;
  border-radius:12px;
  background:#eef6f0;
  color:#046B3B;
  font-weight:600;
  cursor:pointer;
}

.boton-secundario:hover{
  background:#dff0e3;
}

@media (max-width: 1100px){
  .cards-resumen{
    grid-template-columns:repeat(2, 1fr);
  }

  .dashboard-contenido{
    grid-template-columns:1fr;
  }
}

@media (max-width: 768px){
  .dashboard-layout{
    flex-direction:column;
  }

  .sidebar{
    width:100%;
  }

  .cards-resumen{
    grid-template-columns:1fr;
  }

  .dashboard-header-content h1{
    font-size:30px;
  }
}

.estado{
  display:inline-block;
  padding:4px 10px;
  border-radius:20px;
  font-size:12px;
  font-weight:600;
  margin-left:6px;
}

.estado-pendiente{
  background:#fff3cd;
  color:#856404;
}

.estado-visita{
  background:#d4edda;
  color:#155724;
}

.estado-revision{
  background:#d1ecf1;
  color:#0c5460;
}

.acciones-rapidas{
  display:flex;
  gap:14px;
  margin-bottom:22px;
  flex-wrap:wrap;
}

.accion-btn{
  background:#046B3B;
  color:white;
  border:none;
  padding:12px 18px;
  border-radius:12px;
  font-weight:600;
  cursor:pointer;
  transition:all 0.2s ease;
}

.accion-btn:hover{
  background:#03522d;
  transform:translateY(-2px);
}

.barra-presupuesto{
  width:100%;
  height:14px;
  background:#e9eceb;
  border-radius:10px;
  margin:12px 0 16px 0;
  overflow:hidden;
}

.barra-ejecutado{
  width:27%;
  height:100%;
  background:#046B3B;
  border-radius:10px;
}

.presupuesto-info p{
  margin:6px 0;
  font-size:14px;
  color:#555;
}

.estado-item{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
}

.estado-item p{
  margin:0;
  font-size:14px;
  color:#555;
}

.estado-dot{
  width:12px;
  height:12px;
  border-radius:50%;
  flex-shrink:0;
}

.dot-verde{
  background:#28a745;
}

.dot-azul{
  background:#17a2b8;
}

.dot-amarillo{
  background:#ffc107;
}

.dot-rojo{
  background:#dc3545;
}

.buscador-constructora{
  display:flex;
  gap:12px;
  align-items:center;
  margin-bottom:22px;
  flex-wrap:wrap;
}

.input-buscador{
  flex:1;
  min-width:280px;
  padding:14px 16px;
  border:1px solid #d9e2dc;
  border-radius:14px;
  font-family:'Metropolis', sans-serif;
  font-size:15px;
  background:white;
  outline:none;
}

.input-buscador:focus{
  border-color:#32B474;
  box-shadow:0 0 0 4px rgba(50,180,116,0.12);
}

.buscar-btn{
  min-width:130px;
}

.feed-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.filtros-tickets{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.filtro-btn{
  border:none;
  padding:9px 14px;
  border-radius:999px;
  background:#eef4ef;
  color:#046B3B;
  font-weight:600;
  cursor:pointer;
  transition:all 0.2s ease;
}

.filtro-btn:hover{
  background:#dff0e3;
}

.filtro-btn.activo{
  background:#046B3B;
  color:white;
}

.estado-emergencia{
  background:#f8d7da;
  color:#842029;
  animation:alertaSuave 1.4s infinite;
}

.ticket-emergencia{
  border:1px solid #f1b0b7;
  box-shadow:0 0 0 1px rgba(220,53,69,0.08);
}

@keyframes alertaSuave{
  0%{
    transform:scale(1);
    box-shadow:0 0 0 0 rgba(220,53,69,0.18);
  }
  50%{
    transform:scale(1.03);
    box-shadow:0 0 0 6px rgba(220,53,69,0.08);
  }
  100%{
    transform:scale(1);
    box-shadow:0 0 0 0 rgba(220,53,69,0.18);
  }
}

.categoria-resumen{
  margin-top:18px;
}

.categoria-linea{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
}

.categoria-linea span{
  font-size:15px;
  color:#444;
  font-weight:600;
}

.categoria-linea strong{
  font-size:14px;
  color:#046B3B;
}

.barra-categoria{
  width:100%;
  height:12px;
  background:#e8ece9;
  border-radius:999px;
  overflow:hidden;
}

.barra-categoria-fill{
  height:100%;
  border-radius:999px;
}

.fill-humedad{
  width:35%;
  background:#046B3B;
}

.fill-plomeria{
  width:22%;
  background:#32B474;
}

.fill-filtracion{
  width:18%;
  background:#8BC540;
}

.fill-electricidad{
  width:12%;
  background:#17a2b8;
}

.fill-ventaneria{
  width:8%;
  background:#764C2A;
}

.fill-otros{
  width:5%;
  background:#BF9467;
}

.estado-operativo{
display:flex;
gap:16px;
flex-wrap:wrap;
margin-top:12px;
}

.estado-item{
flex:1;
min-width:90px;
background:#f5f7f6;
border-radius:12px;
padding:12px;
text-align:center;
}

.estado-numero{
display:block;
font-size:22px;
font-weight:700;
color:#046B3B;
}

.estado-texto{
font-size:13px;
color:#555;
}

.estado-item.alerta{
background:#ffe8e8;
}

.estado-item.alerta .estado-numero{
color:#d93636;
}

.firma-netandino{
  position:fixed;
  bottom:18px;
  right:24px;
  font-size:12px;
  color:rgba(0,0,0,0.42);
  font-weight:500;
  z-index:9999;
  font-family:'Metropolis', sans-serif;
}

.firma-netandino strong{
  color:#046B3B;
  font-weight:600;
}

.selector-proyecto{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:18px;
}

.selector-proyecto label{
  font-size:14px;
  font-weight:600;
  color:#444;
}

.select-proyecto{
  padding:10px 14px;
  border:1px solid #d9e2dc;
  border-radius:12px;
  font-family:'Metropolis', sans-serif;
  font-size:14px;
  background:white;
  color:#333;
  outline:none;
}

.select-proyecto:focus{
  border-color:#32B474;
  box-shadow:0 0 0 4px rgba(50,180,116,0.12);
}

.sidebar{
  width:250px;
  background:linear-gradient(180deg, #046B3B, #03522d);
  color:white;
  padding:20px 14px;
  transition:width 0.28s ease;
  overflow:hidden;
  position:relative;
  flex-shrink:0;
}

.sidebar-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.sidebar-logo{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  width:100%;
  min-width:0;
  overflow:hidden;
}

.logo-icono{
  width:55px;
  height:55px;
  object-fit:contain;
  flex-shrink:0;
}

.logo-texto{
  height:35px;
  width:auto;
  max-width:92px;
  object-fit:contain;
  transition:opacity 0.2s ease, width 0.2s ease;
  display:block;
}

.sidebar-toggle{
  border:none;
  background:rgba(255,255,255,0.15);
  color:white;
  width:42px;
  height:42px;
  border-radius:10px;
  cursor:pointer;
  font-size:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}

.sidebar-toggle:hover{
  background:rgba(255,255,255,0.22);
}

.sidebar-divider{
  height:1px;
  background:rgba(255,255,255,0.16);
  margin:18px 0 16px 0;
}

.sidebar-menu{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.sidebar-menu a{
  color:rgba(255,255,255,0.92);
  text-decoration:none;
  padding:12px 14px;
  border-radius:12px;
  transition:all 0.2s ease;
  white-space:nowrap;
  display:flex;
  align-items:center;
  gap:12px;
}

.sidebar-menu a:hover,
.sidebar-menu a.activo{
  background:rgba(255,255,255,0.12);
  color:white;
}

.menu-icon{
  width:22px;
  min-width:22px;
  text-align:center;
  font-size:18px;
}

.menu-text{
  transition:opacity 0.2s ease, width 0.2s ease;
  overflow:hidden;
}

/* modo colapsado */
.sidebar.collapsed{
  width:88px;
}

.sidebar.collapsed .sidebar-top{
  justify-content:center;
}

.sidebar.collapsed .sidebar-logo{
  justify-content:center;
  width:100%;
  gap:0;
  padding:0;
}

.sidebar.collapsed .logo-texto{
  opacity:0;
  width:0;
  margin:0;
  overflow:hidden;
}

.sidebar.collapsed .sidebar-menu a{
  justify-content:center;
  padding:12px 10px;
}

.sidebar.collapsed .menu-text{
  opacity:0;
  width:0;
}

.sidebar.collapsed:hover{
  width:250px;
}

.sidebar.collapsed:hover .sidebar-logo{
  justify-content:flex-start;
}

.sidebar.collapsed:hover .logo-texto{
  opacity:1;
  width:auto;
}

.sidebar.collapsed:hover .sidebar-menu a{
  justify-content:flex-start;
  padding:12px 14px;
}

.sidebar.collapsed:hover .menu-text{
  opacity:1;
  width:auto;
}

.sidebar.collapsed .logo-icono{
  margin:0 auto;
}

.sidebar.collapsed .sidebar-toggle{
  opacity:0;
  pointer-events:none;
  width:0;
  overflow:hidden;
}

.sidebar.collapsed:hover .sidebar-toggle{
  opacity:1;
  pointer-events:auto;
  width:42px;
}