/* =========================
   TIPOGRAFÍA PRO
========================= */
body{
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial;
}

/* =========================
   RESET
========================= */
*{box-sizing:border-box;margin:0;padding:0;}

body{
font-family:Arial, sans-serif;
background:#f4f6f9;
color:#333;
}

/* =========================
   LAYOUT
========================= */
main{
padding:20px;
max-width:1100px;
margin:auto;
}

h1{margin-bottom:15px;}

/* =========================
   HEADER
========================= */
.app-header{
background:#0d3c5f;
color:white;
padding:10px 15px;
display:flex;
align-items:center;
justify-content:space-between;
position:sticky;
top:0;
z-index:1000;
}

.logo{
display:flex;
align-items:center;
gap:10px;
font-weight:bold;
}

.logo img{
height:32px;
background:white;
padding:5px;
border-radius:8px;
}

/* MENU */
#menu{
display:flex;
gap:15px;
align-items:center;
}

#menu a{
color:white;
text-decoration:none;
padding:6px 10px;
border-radius:6px;
}

#menu a:hover{
background:rgba(255,255,255,0.2);
}

/* USER */
.menu-user{
display:flex;
align-items:center;
gap:10px;
margin-left:auto;
}

.logout{
background:#e74c3c;
padding:6px 10px;
border-radius:6px;
color:white;
}

/* BADGE */
.badge{
background:#e74c3c;
color:white;
font-size:11px;
padding:3px 6px;
border-radius:10px;
margin-left:5px;
}

/* MENU TOGGLE FIX */
.menu-toggle{display:none;}

@media (max-width:768px){

.menu-toggle{display:block;}

#menu{
display:none;
flex-direction:column;
position:absolute;
top:60px;
left:0;
width:100%;
background:#0d3c5f;
padding:10px;
}

#menu.show{display:flex;}

}

/* =========================
   TABLAS
========================= */
.tabla{
width:100%;
border-collapse:collapse;
background:white;
border-radius:10px;
overflow:hidden;
box-shadow:0 2px 8px rgba(0,0,0,0.05);
}

.tabla th{
background:#eef2f7;
padding:12px;
}

.tabla td{
padding:12px;
border-bottom:1px solid #eee;
}

.tabla tr:hover{background:#f8fafc;}

/* =========================
   BOTONES
========================= */
.btn{
background:#1f7a9c;
color:white;
padding:10px 16px;
border-radius:8px;
text-decoration:none;
display:inline-block;
}

.btn-secondary{
background:#6c757d;
color:white;
padding:10px 16px;
border-radius:8px;
text-decoration:none;
}

/* =========================
   ACCIONES
========================= */
.acciones{
display:flex;
gap:6px;
}

.btn-action{
width:36px;
height:36px;
display:flex;
align-items:center;
justify-content:center;
border-radius:8px;
color:white;
}

.pdf{background:#e74c3c;}
.ticket{background:#8e44ad;}
.email{background:#27ae60;}
.editar{background:#3498db;}
.eliminar{background:#2c3e50;}

/* =========================
   FORMULARIOS
========================= */
input,select,textarea{
padding:10px;
border:1px solid #ccc;
border-radius:8px;
width:100%;
}

/* =========================
   ALERTAS (IMPORTANTE)
========================= */
.alerta{margin-left:6px;}

.alerta-roja{color:#e74c3c;}
.alerta-amarilla{color:#f39c12;}

/* =========================
   DASHBOARD
========================= */
.dashboard{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
gap:15px;
margin:20px 0;
}

.card{
background:white;
padding:20px;
border-radius:12px;
text-align:center;
box-shadow:0 2px 8px rgba(0,0,0,0.08);
}

/* =========================
   LOGIN
========================= */
.login-page{
height:100vh;
display:flex;
justify-content:center;
align-items:center;
background:linear-gradient(135deg,#0d3c5f,#1f7a9c);
}

.login-card{
width:320px;
background:rgba(255,255,255,0.1);
padding:30px;
border-radius:20px;
text-align:center;
}

.login-logo img{
width:120px;
background:white;
padding:10px;
border-radius:12px;
margin-bottom:15px;
}

.login-page h2{
color:white;
margin-bottom:20px;
}

.login-page .input-group{
display:flex;
align-items:center;
background:rgba(255,255,255,0.2);
border-radius:12px;
padding:10px;
margin-bottom:15px;
}

.login-page input{
background:none;
border:none;
color:white;
flex:1;
outline:none;
}

.toggle-pass{color:white;cursor:pointer;}

.remember-row{
display:flex;
align-items:center;
justify-content:center;
gap:10px;
color:white;
margin:10px 0;
}

.btn-login{
width:100%;
padding:12px;
border:none;
border-radius:25px;
background:#1f7a9c;
color:white;
}

/* =========================
   LOGS (BONITO Y AISLADO)
========================= */
.logs-page{padding:20px;}

.logs-container{
display:flex;
flex-direction:column;
gap:10px;
max-width:900px;
margin:auto;
}

.log-card{
display:flex;
justify-content:space-between;
align-items:center;
background:white;
padding:12px 15px;
border-radius:12px;
box-shadow:0 2px 8px rgba(0,0,0,0.08);
}

.log-left{
display:flex;
flex-direction:column;
gap:4px;
}

.log-user{
font-weight:600;
color:#1f7a9c;
}

.log-accion{
font-size:13px;
background:#eef3f7;
padding:4px 8px;
border-radius:6px;
}

.log-right{
text-align:right;
font-size:12px;
}

/* =========================
   FOOTER
========================= */
.footer{
background:#1e3a5f;
color:white;
padding:20px;
margin-top:40px;
}

.footer-container{
display:flex;
justify-content:space-between;
flex-wrap:wrap;
}

/* =========================
   FIX LINKS GLOBAL
========================= */
a{
text-decoration:none;
color:inherit;
}

a:hover{
text-decoration:none;
}

/* =========================
   DASHBOARD PRO
========================= */
.dashboard{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
gap:20px;
margin:20px 0;
}

.card{
background:white;
padding:25px;
border-radius:16px;
text-align:center;
box-shadow:0 4px 12px rgba(0,0,0,0.08);
transition:0.2s;
}

.card.action{
display:block;
cursor:pointer;
color:#6c2eb9;
}

.card.action:hover{
transform:translateY(-4px);
box-shadow:0 8px 20px rgba(0,0,0,0.12);
}

/* =========================
   BOTONES ACCIONES FIX
========================= */
.btn-action{
width:36px;
height:36px;
display:flex;
align-items:center;
justify-content:center;
border-radius:8px;
color:white !important;
text-decoration:none !important;
}

.btn-action i{
pointer-events:none;
}

/* =========================
   PERFIL
========================= */
.perfil-container{
max-width:500px;
margin:auto;
background:white;
padding:25px;
border-radius:16px;
box-shadow:0 4px 12px rgba(0,0,0,0.08);
}

.perfil-container h2{
margin-bottom:15px;
}

.perfil-container input{
margin-bottom:10px;
}

.logs-page .log-card{
background:white;
padding:12px 15px;
border-radius:12px;
box-shadow:0 2px 8px rgba(0,0,0,0.08);
}

/* =========================
   PERFIL PRO
========================= */

.perfil-page{
max-width:600px;
margin:30px auto;
}

.perfil-card{
background:white;
padding:25px;
border-radius:16px;
box-shadow:0 4px 12px rgba(0,0,0,0.08);
}

.perfil-header{
margin-bottom:20px;
}

.perfil-usuario{
font-size:22px;
font-weight:600;
}

.perfil-email{
color:#666;
font-size:14px;
}

.perfil-section{
margin-top:25px;
}

.perfil-section h3{
margin-bottom:10px;
font-size:18px;
}

/* INPUTS */
.perfil-group{
margin-bottom:15px;
}

.perfil-group label{
font-size:13px;
color:#666;
display:block;
margin-bottom:5px;
}

.perfil-group input{
width:100%;
padding:12px;
border:1px solid #ddd;
border-radius:10px;
}

/* BOTONES */
.btn{
background:#1f7a9c;
color:white;
padding:10px 15px;
border-radius:8px;
border:none;
cursor:pointer;
}

.btn-danger{
background:#e74c3c;
}

/* ALERTA URGENTE */
.alerta-urgente{
color:#e74c3c;
font-weight:600;
animation:parpadeo 1s infinite;
}

@keyframes parpadeo{
0%{opacity:1;}
50%{opacity:0.4;}
100%{opacity:1;}
}

/* DASHBOARD ACTION CARDS */
.card.action{
display:block;
background:white;
border-radius:16px;
padding:25px;
text-align:center;
box-shadow:0 4px 12px rgba(0,0,0,0.08);
color:#6c2eb9 !important;
transition:0.2s;
}

.card.action i{
font-size:22px;
margin-bottom:10px;
display:block;
color:#6c2eb9;
}

.card.action:hover{
transform:translateY(-5px);
box-shadow:0 8px 20px rgba(0,0,0,0.12);
}

/* KPIs */
.card h2{
font-size:26px;
margin:10px 0;
}

.card i{
font-size:22px;
color:#1f7a9c;
margin-bottom:5px;
}

/* ACCIONES FIX */
.acciones a{
text-decoration:none !important;
}

.btn-action{
text-decoration:none !important;
color:white !important;
font-size:14px;
}

/* LINKS FIX DASHBOARD */
.card.action{
text-decoration:none;
}

.card.action:visited{
color:#6c2eb9;
}

/* =========================
   ALERTA CRÍTICA PRO
========================= */

.alerta-critica{
width:100%;
padding:14px 20px;
border-radius:12px;
margin:15px 0 25px 0;

display:flex;
align-items:center;
justify-content:center;
gap:10px;

font-weight:500;
font-size:15px;

color:#7f1d1d;

/* rojo suave */
background:linear-gradient(90deg,#fde2e2,#f8caca);

/* borde elegante */
border:1px solid #f5b5b5;

cursor:pointer;
transition:0.2s;
}

/* hover */
.alerta-critica:hover{
transform:translateY(-2px);
box-shadow:0 6px 16px rgba(231,76,60,0.2);
}

/* icono */
.alerta-critica i{
color:#e74c3c;
}

/* animación suave (como antes) */
@keyframes alertaSuave{
0%{background:linear-gradient(90deg,#fde2e2,#f8caca);}
50%{background:linear-gradient(90deg,#f8caca,#f2bcbc);}
100%{background:linear-gradient(90deg,#fde2e2,#f8caca);}
}

.alerta-critica{
animation:alertaSuave 3s infinite;
}
