*{
margin:0;
padding:0;
box-sizing:border-box;
font-family:Segoe UI, Arial, sans-serif;
}

body{
background:#f4f6f9;
}

/* LOGIN */

.login-body{
display:flex;
justify-content:center;
align-items:center;
min-height:100vh;
background:linear-gradient(135deg,#c62828,#1565c0);
padding:20px;
}

.login-box{
background:white;
padding:30px;
border-radius:15px;
width:100%;
max-width:350px;
box-shadow:0 10px 25px rgba(0,0,0,.3);
text-align:center;
}

.login-box input,
.login-box button,
.login-box form{
width:100%;
}

.login-box form{
display:flex;
flex-direction:column;
gap:0;
}

.logo{
width:90px;
margin-bottom:15px;
}

.password-box{
position:relative;
}

.show-btn{
position:absolute;
right:5px;
top:5px;
background:none;
border:none;
font-size:18px;
cursor:pointer;
width:auto;
}

.forgot{
margin-top:10px;
color:#1565c0;
cursor:pointer;
font-size:14px;
}

/* SIDEBAR */

.sidebar{
width:250px;
height:100vh;
position:fixed;
top:0;
left:0;
background:linear-gradient(180deg,#c62828,#1565c0);
padding:20px;
color:white;
overflow:auto;
transition:transform .3s ease;
z-index:100;
}

.sidebar h2{
text-align:center;
margin-bottom:30px;
}

.sidebar a{
display:block;
color:white;
text-decoration:none;
padding:12px;
margin:10px 0;
border-radius:8px;
transition:.3s;
}

.sidebar a:hover,
.sidebar a.active{
background:rgba(255,255,255,.25);
}

/* MAIN */

.main{
margin-left:250px;
padding:20px;
}

.menu-toggle{
display:none;
position:fixed;
top:15px;
left:15px;
z-index:200;
background:#1565c0;
color:white;
border:none;
width:44px;
height:44px;
border-radius:8px;
font-size:20px;
cursor:pointer;
}

/* TABS */

.tab-section{
display:none;
}

.tab-section.active{
display:block;
animation:aparecer .2s ease;
}

@keyframes aparecer{
from{opacity:0;}
to{opacity:1;}
}

/* TOPBAR */

.topbar{
background:white;
padding:20px;
border-radius:12px;
margin-bottom:20px;
display:flex;
justify-content:space-between;
align-items:center;
flex-wrap:wrap;
gap:10px;
box-shadow:0 3px 10px rgba(0,0,0,.1);
}

/* DASHBOARD */

.dashboard{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
gap:20px;
margin-bottom:20px;
}

.stat-card{
background:white;
padding:20px;
border-radius:12px;
box-shadow:0 3px 10px rgba(0,0,0,.1);
text-align:center;
}

.stat-icon{
font-size:28px;
}

.stat-card h3{
font-size:35px;
margin:10px 0;
}

/* SECTIONS */

.section{
background:white;
padding:20px;
border-radius:12px;
margin-bottom:20px;
box-shadow:0 3px 10px rgba(0,0,0,.1);
}

/* FORMS */

.form-inline{
display:flex;
flex-wrap:wrap;
gap:10px;
align-items:center;
margin-bottom:15px;
}

.form-inline input,
.form-inline select{
flex:1 1 180px;
margin:0;
}

.form-inline button{
flex:0 0 auto;
}

input,select{
width:100%;
padding:10px;
margin:8px 0;
border-radius:8px;
border:1px solid #ccc;
font-size:15px;
}

.ayuda{
color:#666;
font-size:13px;
margin-bottom:10px;
}

/* BUTTONS */

button{
padding:10px 15px;
border:none;
border-radius:8px;
background:#2e7d32;
color:white;
cursor:pointer;
transition:.3s;
font-size:14px;
}

button:hover{
background:#1b5e20;
}

.btn-secundario{
background:#1565c0;
}

.btn-secundario:hover{
background:#0d47a1;
}

.btn-peligro{
background:#c62828;
}

.btn-peligro:hover{
background:#8e0000;
}

.oculto{
display:none !important;
}

/* CARDS */

.card{
background:white;
padding:15px;
margin:10px 0;
border-radius:10px;
box-shadow:0 3px 8px rgba(0,0,0,.1);
display:flex;
justify-content:space-between;
align-items:center;
flex-wrap:wrap;
gap:10px;
}

.acciones{
display:flex;
gap:8px;
flex-wrap:wrap;
}

.activo{
border-left:8px solid #2e7d32;
}

.proximo{
border-left:8px solid #fbc02d;
}

.vencido{
border-left:8px solid #c62828;
background:#ffebee;
}

#error{
margin-top:10px;
color:red;
font-weight:bold;
}

/* TOASTS */

.toast-container{
position:fixed;
bottom:20px;
right:20px;
display:flex;
flex-direction:column;
gap:10px;
z-index:999;
max-width:90vw;
}

.toast{
padding:14px 18px;
border-radius:10px;
color:white;
box-shadow:0 4px 12px rgba(0,0,0,.25);
font-size:14px;
animation:entrarToast .25s ease;
}

.toast-exito{
background:#2e7d32;
}

.toast-error{
background:#c62828;
}

.toast-info{
background:#1565c0;
}

.toast-salir{
opacity:0;
transform:translateX(20px);
transition:all .3s ease;
}

@keyframes entrarToast{
from{opacity:0; transform:translateX(20px);}
to{opacity:1; transform:translateX(0);}
}

/* RESPONSIVE */

@media (max-width: 900px){

.menu-toggle{
display:block;
}

.sidebar{
transform:translateX(-100%);
width:220px;
}

.sidebar.abierto{
transform:translateX(0);
}

.main{
margin-left:0;
padding:70px 15px 20px;
}

.topbar{
flex-direction:column;
align-items:flex-start;
}

.form-inline{
flex-direction:column;
align-items:stretch;
}

.form-inline input,
.form-inline select,
.form-inline button{
flex:1 1 auto;
width:100%;
}

.card{
flex-direction:column;
align-items:flex-start;
}

}

@media (max-width: 480px){

.login-box{
padding:20px;
}

.stat-card h3{
font-size:28px;
}

}
