*{
  box-sizing:border-box;
}

body{
  margin:0;
  font-family:'Segoe UI', Arial, sans-serif;
  background:linear-gradient(180deg,#f1f5f9,#ffffff);
  color:#0f172a;
}

.login-page{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:linear-gradient(135deg,#0f172a,#1e293b);
}

.login-shell{
  width:100%;
  display:flex;
  justify-content:center;
}

.login-card{
  width:420px;
  max-width:95%;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.1);
  border-radius:24px;
  padding:34px 28px;
  text-align:center;
  box-shadow:0 20px 60px rgba(0,0,0,.35);
  backdrop-filter:blur(10px);
}

.login-logo{
  width:140px;
  height:auto;
  margin:0 auto 20px auto;
  display:block;
}

.login-title{
  margin:0;
  font-size:28px;
  color:#fff;
  font-weight:900;
}

.login-subtitle{
  margin-top:6px;
  color:#22c55e;
  font-weight:700;
}

.login-slogan{
  margin:14px 0 18px;
  color:rgba(255,255,255,.8);
  font-size:13px;
}

input, select, textarea{
  width:100%;
  padding:14px;
  margin:8px 0 14px;
  border-radius:12px;
  border:1px solid #dbe2ea;
  background:#fff;
  font-size:14px;
}

input:focus, select:focus, textarea:focus{
  outline:none;
  border-color:#16a34a;
}

button{
  border:none;
  border-radius:12px;
  padding:14px 16px;
  cursor:pointer;
  font-weight:700;
}

.btn-primary{
  width:100%;
  background:linear-gradient(135deg,#16a34a,#15803d);
  color:#fff;
}

.btn-danger{
  background:#dc2626;
  color:#fff;
}

.login-footer{
  margin-top:16px;
  color:#e2e8f0;
  font-size:12px;
  line-height:1.5;
}

.topbar{
  background:linear-gradient(135deg,#0f172a,#1e293b);
  color:#fff;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:16px 22px;
  box-shadow:0 8px 20px rgba(0,0,0,.1);
}

.topbar-left{
  display:flex;
  align-items:center;
  gap:14px;
}

.topbar-logo{
  width:52px;
  height:52px;
  object-fit:contain;
}

.empresa-nome{
  font-size:12px;
  font-weight:800;
  letter-spacing:.8px;
}

.sistema-nome{
  font-size:18px;
  font-weight:900;
}

.slogan-sistema{
  font-size:12px;
  color:#22c55e;
  margin-top:2px;
}

.topbar-right{
  display:flex;
  align-items:center;
  gap:12px;
}

.usuario-box{
  text-align:right;
  display:flex;
  flex-direction:column;
}

.layout{
  display:flex;
  min-height:calc(100vh - 84px);
}

.sidebar{
  width:240px;
  background:#0f172a;
  padding:18px 14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.sidebar button{
  background:transparent;
  color:#fff;
  text-align:left;
  padding:12px 14px;
  border-radius:10px;
}

.sidebar button:hover{
  background:#16a34a;
}

.main-content{
  flex:1;
  padding:18px;
  padding-bottom:90px;
}

.status-bar{
  margin-bottom:16px;
  background:#e2e8f0;
  color:#0f172a;
  border-radius:12px;
  padding:10px 14px;
  font-size:13px;
  font-weight:700;
}

.card{
  background:#fff;
  border-radius:18px;
  padding:22px;
  box-shadow:0 8px 25px rgba(0,0,0,.06);
  margin-bottom:18px;
}

.card h2{
  margin-top:0;
  text-align:center;
  font-size:22px;
  font-weight:900;
}

.card small{
  display:block;
  text-align:center;
  color:#64748b;
  margin-bottom:16px;
}

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:12px;
}

.table-wrapper{
  overflow:auto;
}

table{
  width:100%;
  border-collapse:collapse;
  font-size:14px;
}

th{
  background:#0f172a;
  color:#fff;
  padding:10px;
  text-align:left;
}

td{
  padding:10px;
  border-bottom:1px solid #e2e8f0;
}

.loading-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.85);
  z-index:99999;
  color:#fff;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:14px;
}

.spinner{
  width:58px;
  height:58px;
  border:6px solid #334155;
  border-top:6px solid #22c55e;
  border-radius:50%;
  animation:gira 1s linear infinite;
}

.bottom-nav{
  display:none;
}

@keyframes gira{
  from{ transform:rotate(0deg); }
  to{ transform:rotate(360deg); }
}

@media (max-width:900px){
  .topbar{
    flex-direction:column;
    align-items:flex-start;
  }

  .topbar-right{
    width:100%;
    justify-content:space-between;
  }

  .layout{
    display:block;
  }

  .sidebar{
    display:none;
  }

  .bottom-nav{
    display:flex;
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    height:72px;
    background:#0f172a;
    z-index:9999;
    align-items:center;
    overflow-x:auto;
    white-space:nowrap;
  }

  .bottom-nav div{
    flex:0 0 auto;
    width:90px;
    text-align:center;
    color:#fff;
    font-size:12px;
    cursor:pointer;
  }

  .bottom-nav div span{
    display:block;
    font-size:10px;
    margin-top:4px;
  }

  .main-content{
    padding-bottom:100px;
  }
}
.dashboard-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
gap:16px;
margin-top:20px;
}

.cardDash{
background:white;
border-radius:10px;
padding:20px;
box-shadow:0 2px 6px rgba(0,0,0,0.1);
text-align:center;
font-size:18px;
}

.cardDash span{
display:block;
font-size:26px;
font-weight:bold;
margin-top:10px;
}

.alerta{
padding:12px;
margin-top:12px;
border-radius:6px;
font-weight:bold;
}

.alerta-vermelho{
background:#fee2e2;
color:#991b1b;
}

.alerta-amarelo{
background:#fef3c7;
color:#92400e;
}
.btnLogout{
background:#ef4444;
color:white;
border:none;
padding:8px 14px;
border-radius:6px;
cursor:pointer;
margin-left:10px;
font-weight:600;
}

.btnLogout:hover{
background:#dc2626;
}
/* =========================
📱 RESPONSIVO PROFISSIONAL
========================= */

.btn-group{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}

.btn-group button{
  flex:1;
  min-width:140px;
}

/* MOBILE AJUSTE FORTE */
@media (max-width:768px){

  .grid{
    grid-template-columns:1fr !important;
  }

  .card{
    padding:16px;
  }

  h2{
    font-size:18px;
  }

  button{
    width:100%;
  }

  .topbar{
    padding:12px;
  }

  .topbar-left{
    flex-direction:column;
    align-items:flex-start;
  }

  .topbar-logo{
    width:40px;
  }

}
.mobile-nav{
  display:none;
}

@media(max-width:768px){

  .sidebar{
    display:none;
  }

  .mobile-nav{
    display:flex;
    position:fixed;
    bottom:0;
    left:0;
    width:100%;
    background:#0f172a;
    justify-content:space-around;
    padding:10px 0;
    z-index:9999;
  }

  .mobile-nav button{
    background:none;
    border:none;
    color:white;
    font-size:20px;
  }

  .main-content{
    padding-bottom:70px;
  }
}
