/* ================================
   CONFIGURACIÓN GENERAL
================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #080b16;
    color: #ffffff;
}

/* ================================
   CONTENEDOR PRINCIPAL
================================ */

.panel {
    display: flex;
    min-height: 100vh;
}

/* ================================
   BARRA LATERAL
================================ */

.sidebar {
    width: 250px;
    background: #0d1222;
    border-right: 1px solid #202944;
    padding: 25px 15px;
}

.logo {
    text-align: center;
    margin-bottom: 35px;
}

.logo h2 {
    color: #ffffff;
    font-size: 24px;
}

.logo span {
    color: #00d9ff;
}

.menu {
    list-style: none;
}

.menu li {
    margin-bottom: 8px;
}

.menu a {
    display: block;
    padding: 14px 16px;
    color: #aeb7ce;
    text-decoration: none;
    border-radius: 10px;
    transition: 0.2s;
}

.menu a:hover,
.menu a.active {
    background: #17213b;
    color: #00d9ff;
}

/* ================================
   CONTENIDO
================================ */

.content {
    flex: 1;
    padding: 30px;
}

/* ================================
   CABECERA
================================ */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.topbar h1 {
    font-size: 28px;
}

.admin {
    color: #aeb7ce;
}

/* ================================
   TARJETAS
================================ */

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: #10172a;
    border: 1px solid #202944;
    border-radius: 15px;
    padding: 22px;
}

.card h3 {
    color: #8f9bb5;
    font-size: 14px;
    margin-bottom: 12px;
}

.card .number {
    font-size: 32px;
    font-weight: bold;
}

.card.blue .number {
    color: #00d9ff;
}

.card.green .number {
    color: #20e58a;
}

.card.pink .number {
    color: #ff3db8;
}

.card.yellow .number {
    color: #ffd43b;
}

/* ================================
   SECCIONES
================================ */

.section {
    background: #10172a;
    border: 1px solid #202944;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
}

.section h2 {
    margin-bottom: 20px;
}

/* ================================
   SERVICIOS
================================ */

.services {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.service {
    padding: 20px;
    border-radius: 12px;
    background: #151e35;
    text-align: center;
    border: 1px solid #263250;
}

.service h3 {
    margin-bottom: 8px;
}

.service p {
    color: #8f9bb5;
    font-size: 14px;
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 900px) {

    .sidebar {
        width: 200px;
    }

    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .services {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {

    .panel {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .services {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 20px;
    }
}

/* ================================
   USUARIOS
================================ */

.users-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.users-header p {
    color: #8f9bb5;
    margin-top: 6px;
}

.btn-primary {
    border: none;
    background: #00d9ff;
    color: #07101c;
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.btn-primary:hover {
    background: #20e5ff;
}

.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 14px;
    background: #0b1120;
    border: 1px solid #263250;
    border-radius: 8px;
    color: white;
    outline: none;
}

.search-box input:focus {
    border-color: #00d9ff;
}

.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #151e35;
}

th,
td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #202944;
    vertical-align: middle;
}

/* Alinear columnas de incidencias */

table th:nth-child(6),
table td:nth-child(6) {
    text-align: center;
    width: 120px;
}

table th:nth-child(7),
table td:nth-child(7) {
    text-align: center;
    width: 130px;
}

table th:nth-child(8),
table td:nth-child(8) {
    text-align: center;
    width: 110px;
}

th {
    color: #8f9bb5;
    font-size: 13px;
}

td {
    color: #dce3f2;
}

.btn-small {
    background: #17213b;
    color: #00d9ff;
    border: 1px solid #263250;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-small:hover {
    border-color: #00d9ff;
}

.status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.active-status {
    background: rgba(32, 229, 138, 0.15);
    color: #20e58a;
}

.inactive-status {
    background: rgba(255, 61, 184, 0.15);
    color: #ff3db8;
}

@media (max-width: 700px) {

    .users-header {
        flex-direction: column;
        align-items: stretch;
    }

}
/* ================================
   FORMULARIOS
================================ */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #aeb7ce;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 13px;
    background: #0b1120;
    border: 1px solid #263250;
    border-radius: 8px;
    color: white;
    outline: none;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #00d9ff;
}

.form-group select option {
    background: #0b1120;
    color: white;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

/* ESTADOS DE INCIDENCIAS */

.incident-status {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
}

.incident-status.pendiente {
    background: #fff3cd !important;
    color: #856404 !important;
}

.incident-status.en-proceso {
    background: #cfe2ff !important;
    color: #084298 !important;
}

.incident-status.resuelto {
    background: #d1e7dd !important;
    color: #0f5132 !important;
}

/* ================================
   TABLA DE INCIDENCIAS
================================ */

.incidents-table {
    table-layout: fixed;
    width: 100%;
}

/* ================================
   PRIORIDAD DE INCIDENCIAS
================================ */

.priority-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.priority-badge.alta {
    background: #f8d7da;
    color: #842029;
}

.priority-badge.media {
    background: #fff3cd;
    color: #856404;
}

.priority-badge.baja {
    background: #d1e7dd;
    color: #0f5132;
}

/* ================================
   ESTADOS EN REPORTES
================================ */

.pending-report {
    border-color: #856404;
}

.progress-report {
    border-color: #084298;
}

.resolved-report {
    border-color: #0f5132;
}

/* =========================
   HISTORIAL DE ACTIVIDADES
========================= */

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 14px 16px;
    border: 1px solid #27304d;
    border-radius: 8px;
    background: #151c31;
    transition: 0.2s;
}

.activity-item:hover {
    border-color: #3b4a70;
    transform: translateY(-1px);
}

.activity-item strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    color: #ffffff;
}

.activity-item p {
    margin: 0;
    color: #a7b0c3;
    font-size: 13px;
}

.activity-item span {
    color: #7f8aa3;
    font-size: 12px;
    white-space: nowrap;
}

textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    box-sizing: border-box;
}

textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    box-sizing: border-box;
    background: #0b1020;
    color: #ffffff;
    border: 1px solid #27304d;
    border-radius: 8px;
    padding: 12px;
}

/* =========================
   PANTALLA DE LOGIN
========================= */

#login-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #080d1c;
}

.login-box {

    position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);

    width: 100%;
    max-width: 420px;
    box-sizing: border-box;

    padding: 35px;
    border: 1px solid #27304d;
    border-radius: 14px;

    background: #11182c;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.login-box h1 {
    margin: 0 0 8px;
    text-align: center;

    color: #00d9ff;
    font-size: 32px;
}

.login-box > p {
    margin: 0 0 25px;
    text-align: center;

    color: #a7b0c3;
}

.login-box .form-group {
    margin-bottom: 18px;
}

.login-box label {
    display: block;
    margin-bottom: 7px;

    color: #ffffff;
    font-size: 14px;
}

.login-box input {
    width: 100%;
    box-sizing: border-box;

    padding: 12px 14px;

    border: 1px solid #27304d;
    border-radius: 8px;

    background: #0b1020;
    color: #ffffff;

    outline: none;
}

.login-box input:focus {
    border-color: #00d9ff;
}

#login-button {
    width: 100%;
    margin-top: 5px;
}

#login-error {
    margin: 12px 0 0;
    text-align: center;

    color: #ff5c8a;
    font-size: 13px;
}