/* ===== RESET GENERAL ===== */

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


/* ===== BODY ===== */

body{

background:#0f172a;
color:#e5e7eb;
min-height:100vh;

}


/* ===== TOPBAR ===== */

.topbar{

width:100%;
height:60px;
background:#111827;
display:flex;
align-items:center;
justify-content:space-between;
padding:0 30px;
box-shadow:0 2px 8px rgba(0,0,0,0.3);
position:fixed;
top:0;
z-index:100;

}

.logo{

font-size:20px;
font-weight:bold;
color:#38bdf8;

}

.menu{

display:flex;
align-items:center;
gap:25px;

}

.menu a{

color:#e5e7eb;
text-decoration:none;
font-size:15px;
transition:0.2s;

}

.menu a:hover{

color:#38bdf8;

}


/* ===== CONTENEDOR GENERAL ===== */

.container{

max-width:1300px;
margin:auto;
padding:100px 30px 40px 30px;

}


/* ===== TITULOS ===== */

h1{

font-size:28px;
margin-bottom:20px;
color:#38bdf8;

}

h2{

font-size:22px;
margin-bottom:15px;

}


/* ===== CARDS ===== */

.cards{

display:grid;
grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
gap:20px;
margin-bottom:30px;

}

.card{

background:#1e293b;
padding:25px;
border-radius:10px;
box-shadow:0 3px 10px rgba(0,0,0,0.25);
transition:0.2s;

}

.card:hover{

transform:translateY(-3px);

}

.card-title{

font-size:15px;
color:#94a3b8;
margin-bottom:10px;

}

.card-value{

font-size:28px;
font-weight:bold;
color:#38bdf8;

}


/* ===== TABLAS ===== */

.table-container{

background:#1e293b;
border-radius:10px;
padding:20px;
box-shadow:0 3px 10px rgba(0,0,0,0.25);
overflow-x:auto;

}

table{

width:100%;
border-collapse:collapse;

}

thead{

background:#0f172a;

}

th{

padding:12px;
text-align:left;
font-size:14px;
color:#38bdf8;

}

td{

padding:12px;
border-top:1px solid #334155;
font-size:14px;

}

tr:hover{

background:#334155;

}


/* ===== BOTONES ===== */

button{

background:#38bdf8;
border:none;
color:white;
padding:10px 18px;
border-radius:6px;
cursor:pointer;
font-size:14px;
transition:0.2s;

}

button:hover{

background:#0ea5e9;

}

.btn-danger{

background:#ef4444;

}

.btn-danger:hover{

background:#dc2626;

}

.btn-success{

background:#22c55e;

}

.btn-success:hover{

background:#16a34a;

}


/* ===== FORMULARIOS ===== */

.form-container{

background:#1e293b;
padding:25px;
border-radius:10px;
box-shadow:0 3px 10px rgba(0,0,0,0.25);
max-width:500px;

}

.form-group{

margin-bottom:15px;

}

label{

display:block;
margin-bottom:6px;
font-size:14px;
color:#cbd5f5;

}

input,select{

width:100%;
padding:10px;
border-radius:6px;
border:1px solid #334155;
background:#0f172a;
color:white;
font-size:14px;

}

input:focus,select:focus{

outline:none;
border-color:#38bdf8;

}


/* ===== LOGIN ===== */

.login-container{

display:flex;
align-items:center;
justify-content:center;
height:100vh;

}

.login-box{

background:#1e293b;
padding:40px;
border-radius:12px;
width:350px;
box-shadow:0 5px 20px rgba(0,0,0,0.4);

}

.login-box h1{

text-align:center;
margin-bottom:25px;

}

.login-box button{

width:100%;
margin-top:10px;

}


/* ===== ALERTAS ===== */

.alert{

padding:12px;
border-radius:6px;
margin-bottom:15px;

}

.alert-success{

background:#14532d;
color:#bbf7d0;

}

.alert-error{

background:#7f1d1d;
color:#fecaca;

}


/* ===== FOOTER ===== */

.footer{

margin-top:40px;
text-align:center;
font-size:13px;
color:#64748b;

}


/* ===== SCROLLBAR ===== */

::-webkit-scrollbar{

width:8px;

}

::-webkit-scrollbar-track{

background:#0f172a;

}

::-webkit-scrollbar-thumb{

background:#334155;
border-radius:10px;

}

::-webkit-scrollbar-thumb:hover{

background:#475569;

}


/* ===== RESPONSIVE ===== */

@media(max-width:900px){

.menu{

gap:10px;
font-size:13px;

}

.container{

padding:90px 15px 30px 15px;

}

.cards{

grid-template-columns:1fr;

}

}
/* ===== ACCIONES FORMULARIO ===== */

.acciones-formulario{
display:flex;
gap:10px;
margin-top:15px;
flex-wrap:wrap;
}

/* ===== ACCIONES TABLA ===== */

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

/* ===== MODAL ===== */

.modal{
display:none;
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,0.65);
align-items:center;
justify-content:center;
padding:20px;
z-index:9999;
}

.modal.activo{
display:flex;
}

.modal-contenido{
background:#1e293b;
color:#e5e7eb;
width:100%;
max-width:520px;
padding:25px;
border-radius:12px;
box-shadow:0 10px 30px rgba(0,0,0,0.45);
}

.modal-contenido h3{
margin-bottom:15px;
color:#38bdf8;
}

.modal-contenido input{
margin-bottom:12px;
}

.modal-acciones{
display:flex;
justify-content:flex-end;
gap:10px;
margin-top:10px;
flex-wrap:wrap;
}

.modal[hidden]{
display:none !important;
}

/* ===== SERVICES PAGE ===== */

.services-page .container{
max-width:1700px;
}

.services-page .service-form-card,
.services-page .services-list-card{
overflow:hidden;
}

.services-page .form-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
gap:12px;
margin-bottom:16px;
}

.services-page .form-actions{
display:flex;
flex-wrap:wrap;
gap:10px;
}

.services-page .edit-banner{
display:none;
margin-bottom:12px;
padding:10px 12px;
border-radius:8px;
background:#3b320f;
color:#fde68a;
border:1px solid #66571a;
}

.services-page .table-container.services-table-container{
padding:0;
overflow-x:auto;
overflow-y:hidden;
border-radius:10px;
}

.services-page .services-table{
min-width:1850px;
table-layout:auto;
}

.services-page .services-table thead th{
position:sticky;
top:0;
z-index:2;
background:#0f172a;
white-space:nowrap;
font-size:13px;
padding:12px 10px;
}

.services-page .services-table td{
padding:12px 10px;
vertical-align:top;
line-height:1.35;
}

.services-page .services-table th:nth-child(1),
.services-page .services-table td:nth-child(1){
width:60px;
min-width:60px;
text-align:center;
}

.services-page .services-table th:nth-child(2),
.services-page .services-table td:nth-child(2){
min-width:170px;
max-width:190px;
}

.services-page .services-table th:nth-child(3),
.services-page .services-table td:nth-child(3){
min-width:160px;
max-width:180px;
}

.services-page .services-table th:nth-child(4),
.services-page .services-table td:nth-child(4),
.services-page .services-table th:nth-child(6),
.services-page .services-table td:nth-child(6),
.services-page .services-table th:nth-child(10),
.services-page .services-table td:nth-child(10),
.services-page .services-table th:nth-child(12),
.services-page .services-table td:nth-child(12),
.services-page .services-table th:nth-child(15),
.services-page .services-table td:nth-child(15),
.services-page .services-table th:nth-child(16),
.services-page .services-table td:nth-child(16){
white-space:nowrap;
}

.services-page .services-table th:nth-child(5),
.services-page .services-table td:nth-child(5){
width:70px;
min-width:70px;
text-align:center;
}

.services-page .services-table th:nth-child(7),
.services-page .services-table td:nth-child(7),
.services-page .services-table th:nth-child(8),
.services-page .services-table td:nth-child(8){
white-space:nowrap;
min-width:95px;
}

.services-page .services-table th:nth-child(17),
.services-page .services-table td:nth-child(17){
min-width:220px;
max-width:260px;
}

.services-page .services-table th:last-child,
.services-page .services-table td:last-child{
min-width:170px;
width:170px;
}

.services-page .actions{
display:grid;
grid-template-columns:repeat(2,minmax(72px,1fr));
gap:6px;
align-items:start;
}

.services-page .actions button{
width:100%;
padding:8px 10px;
font-size:13px;
border-radius:8px;
}

.services-page .mono{
font-family:Consolas, "Courier New", monospace;
font-size:12px;
letter-spacing:0.2px;
white-space:nowrap;
}

.services-page .error-cell{
max-width:260px;
white-space:normal;
word-break:break-word;
font-size:12px;
color:#fca5a5;
}

.services-page .status-badge{
display:inline-flex;
align-items:center;
justify-content:center;
padding:4px 10px;
border-radius:999px;
font-size:12px;
font-weight:700;
white-space:nowrap;
}

.services-page .status-active{
background:#14532d;
color:#bbf7d0;
}

.services-page .status-suspended{
background:#7f1d1d;
color:#fecaca;
}

.services-page .badge-ok{
background:#14532d;
color:#bbf7d0;
}

.services-page .badge-no{
background:#7f1d1d;
color:#fecaca;
}

.services-page .badge-warn{
background:#78350f;
color:#fde68a;
}

.services-page .badge-muted{
background:#334155;
color:#e2e8f0;
}

.services-page #mikrotikResult{
white-space:pre-wrap;
background:#111827;
color:#86efac;
padding:14px;
border-radius:10px;
overflow:auto;
font-size:13px;
line-height:1.45;
}

@media(max-width:1200px){
.services-page .container{
padding-left:15px;
padding-right:15px;
}
}

@media(max-width:900px){
.services-page .actions{
grid-template-columns:1fr;
}
}

/* ===== SERVICES ACTION BUTTONS ===== */

.services-page .btn-edit{
background:#f59e0b;
color:#111827;
}

.services-page .btn-edit:hover{
background:#d97706;
color:#ffffff;
}

.services-page .btn-sync{
background:#06b6d4;
color:#ffffff;
}

.services-page .btn-sync:hover{
background:#0891b2;
}

.services-page .btn-status{
background:#6366f1;
color:#ffffff;
}

.services-page .btn-status:hover{
background:#4f46e5;
}

.services-page .btn-suspend{
background:#ef4444;
color:#ffffff;
}

.services-page .btn-suspend:hover{
background:#dc2626;
}

.services-page .btn-activate{
background:#22c55e;
color:#ffffff;
}

.services-page .btn-activate:hover{
background:#16a34a;
}

.services-page .btn-delete{
background:#7c3aed;
color:#ffffff;
}

.services-page .btn-delete:hover{
background:#6d28d9;
}

.services-page .btn-sync-error{
background:#b91c1c;
color:#ffffff;
}

.services-page .btn-sync-error:hover{
background:#991b1b;
}

.services-page .btn-status-warn{
background:#f59e0b;
color:#111827;
}

.services-page .btn-status-warn:hover{
background:#d97706;
color:#ffffff;
}
