/* =========================
   RESET Y CONFIGURACIÓN
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

body {
    background: #f4f6f9;
    color: #333;
    min-height: 100vh;
}

/* =========================
   CONTENEDORES
========================= */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 40px auto;
}

.card {
    max-width: 650px;
    margin: 40px auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    animation: fadeIn 0.5s ease;
}

.card h2 {
    margin-bottom: 25px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1f2937;
}


/* =========================
   TÍTULOS
========================= */
h1, h2, h3 {
    margin-bottom: 20px;
    color: #1f2933;
}

h2 {
    text-align: center;
}

/* =========================
   FORMULARIOS
========================= */
form {
    display: flex;
    flex-direction: column;
}

input, textarea, select {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
}

textarea {
    resize: none;
    height: 120px;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #2563eb;
}

/* =========================
   BOTONES
========================= */
button {
    margin-top: 10px;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37,99,235,0.3);
}


.btn-secondary {
    background: #6b7280;
}

.btn-danger {
    background: #dc2626;
}

@media (max-width: 768px) {
    .card {
        margin: 20px;
        padding: 20px;
    }

    .card h2 {
        font-size: 1.3rem;
    }

    button {
        font-size: 0.95rem;
        padding: 12px;
    }
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================
   TABLAS
========================= */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

table thead {
    background: #2563eb;
    color: #fff;
}

table th, table td {
    padding: 14px;
    text-align: left;
}

table tr:nth-child(even) {
    background: #f1f5f9;
}

.estado-abierto {
    color: #2563eb;
    font-weight: bold;
}

.estado-proceso {
    color: #f59e0b;
    font-weight: bold;
}

.estado-cerrado {
    color: #16a34a;
    font-weight: bold;
}

/* =========================
   ALERTAS
========================= */
.alert {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-size: 14px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

/* =========================
   FOOTER
========================= */
footer {
    text-align: center;
    margin-top: 40px;
    color: #6b7280;
    font-size: 14px;
}

/* =========================
   TARJETAS DASHBOARD
========================= */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.card-stat {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
    text-align: center;
}

.card-stat i {
    font-size: 40px;
    margin-bottom: 10px;
}

.card-stat h3 {
    font-size: 28px;
    margin-bottom: 5px;
}

.card-stat p {
    color: #6b7280;
}

/* COLORES */
.azul i { color: #2563eb; }
.verde i { color: #16a34a; }
.rojo i { color: #dc2626; }
.naranja i { color: #f59e0b; }



label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
}


label i {
    margin-right: 5px;
    color: #2563eb;
}

.btn-secondary {
    display: inline-block;
    width: auto;
    padding: 10px 20px;
    text-decoration: none;
    color: #fff;
    border-radius: 6px;
}


input[type="text"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #f9fafb;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}



/* SOLUCIONES */

/* ===========================
   BASE DE CONOCIMIENTO (KB)
=========================== */

.kb-page {
    background: #f4f6f9;
}

/* HEADER */
.kb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 20px;
    flex-wrap: wrap;
}

.kb-header h1 {
    font-size: 1.6rem;
    margin-bottom: 5px;
    color: #111827;
}

.kb-header p {
    color: #6b7280;
    font-size: 0.95rem;
}

/* BOTÓN PRINCIPAL */
.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 12px 18px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

/* BUSCADOR */
.kb-search {
    background: white;
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.kb-search i {
    color: #9ca3af;
    font-size: 1.1rem;
}

.kb-search input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 1rem;
}

/* GRID */
.kb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

/* CARD */
.kb-card {
    background: white;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s, box-shadow 0.25s;
    position: relative;
    overflow: hidden;
}

.kb-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #22c55e);
}

.kb-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 60px rgba(0,0,0,0.15);
}

/* HEADER CARD */
.kb-card-header {
    margin-bottom: 12px;
}

.kb-category {
    background: #eef2ff;
    color: #3730a3;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* TITULO */
.kb-card h3 {
    font-size: 1.05rem;
    margin-bottom: 12px;
    color: #111827;
    line-height: 1.4;
}

/* META */
.kb-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.kb-meta i {
    margin-right: 4px;
}

/* TAGS */
.kb-tags {
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.kb-tags span {
    background: #f3f4f6;
    color: #374151;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* LINK */
.kb-link {
    margin-top: auto;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.kb-link:hover {
    text-decoration: underline;
}

/* EMPTY STATE */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* ===========================
   RESPONSIVE
=========================== */

@media (max-width: 768px) {

    .kb-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .kb-meta {
        flex-direction: column;
    }
}


.img-preview {
    max-width: 100%;
    border-radius: 10px;
    margin-top: 10px;
}

hr {
    margin: 20px 0;
}

.card h1 {
    margin-bottom: 5px;
}

.img-evidencia {
    max-width: 100%;
    margin-top: 10px;
    border-radius: 10px;
    border: 1px solid #ddd;
}





/* LOGIN */

/* ===== AUTH LAYOUT ===== */
.auth-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', sans-serif;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.auth-card {
    background: #fff;
    border-radius: 14px;
    padding: 35px 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,.2);
    animation: fadeIn .5s ease;
}

/* ===== HEADER ===== */
.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

.auth-header i {
    font-size: 40px;
    color: #2a5298;
}

.auth-header h2 {
    margin: 10px 0 5px;
    font-size: 26px;
    color: #333;
}

.auth-header p {
    color: #777;
    font-size: 14px;
}

/* ===== FORM ===== */
.auth-form {
    margin-top: 20px;
}

.input-group {
    position: relative;
    margin-bottom: 18px;
}

.input-group i {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #999;
}

.input-group input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.input-group input:focus {
    outline: none;
    border-color: #2a5298;
}

/* ===== BUTTON ===== */
.btn-primary {
    background: #2a5298;
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: .3s;
}

.btn-primary i {
    margin-right: 6px;
}

.btn-primary:hover {
    background: #1e3c72;
}

/* ===== FOOTER ===== */
.auth-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.auth-footer a {
    color: #2a5298;
    font-weight: 600;
    text-decoration: none;
}

/* ===== ALERT ===== */
.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.alert-error {
    background: #fdecea;
    color: #c0392b;
}

/* ===== ANIMATION ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .auth-card {
        padding: 25px 20px;
    }
}




/* REGISTRO */

.alert-success {
    background: #e8f8f1;
    color: #1e8449;
}



/* DASHBOARD */

/* =========================
   VARIABLES GLOBALES
========================= */
:root {
    --primary: #2563eb;
    --secondary: #1e40af;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;

    --bg: #f4f6fb;
    --card-bg: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;

    --radius: 14px;
    --shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* =========================
   RESET BÁSICO
========================= */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* =========================
   NAVBAR
========================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: var(--shadow);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
}

.navbar-links {
    display: flex;
    gap: 18px;
}

.navbar-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
}

.navbar-links a:hover {
    opacity: 0.8;
}

/* =========================
   CONTENEDORES
========================= */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* =========================
   DASHBOARD HEADER
========================= */
.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h2 {
    margin: 0;
    font-size: 26px;
}

.dashboard-header p {
    margin-top: 6px;
    color: var(--muted);
}

/* =========================
   DASHBOARD GRID
========================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.dashboard-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.dashboard-card .icon {
    font-size: 36px;
    opacity: 0.9;
}

.dashboard-card .info h3 {
    margin: 0;
    font-size: 30px;
}

.dashboard-card .info span {
    font-size: 14px;
    color: var(--muted);
}

/* =========================
   COLORES POR ESTADO
========================= */
.azul    { color: var(--primary); }
.rojo    { color: var(--danger); }
.naranja { color: var(--warning); }
.verde   { color: var(--success); }

/* =========================
   BOTONES (REUTILIZABLES)
========================= */
.btn {
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn:hover {
    opacity: 0.85;
}

/* =========================
   LOGIN (COMPATIBLE)
========================= */
.login-box {
    max-width: 380px;
    margin: 80px auto;
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 20px;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 14px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .navbar {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 500px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .navbar-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .dashboard-header h2 {
        font-size: 22px;
    }
}


/* listar tickets */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background: #f4f6f9;
    color: #1f2937;
}

/* NAVBAR */
.navbar {
    background: #111827;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar a {
    color: #e5e7eb;
    margin-left: 20px;
    text-decoration: none;
    font-weight: 500;
}

.navbar a:hover {
    color: #60a5fa;
}

/* CONTAINER */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

h2 {
    margin-bottom: 20px;
}

/* TABS */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 14px;
    background: #606267;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.tab.active {
    background: #2563eb;
    color: white;
}

/* TAB CONTENT */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* TABLE */
.tabla-tickets {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.tabla-tickets th {
    padding: 14px;
    font-size: 0.85rem;
    text-align: left;
}

.tabla-tickets td {
    padding: 14px;
    border-top: 1px solid #e5e7eb;
}



/* BADGES */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.alta { background: #fee2e2; color: #991b1b; }
.badge.media { background: #fef3c7; color: #92400e; }
.badge.baja { background: #dcfce7; color: #166534; }

/* ESTADOS */
.estado.abierto { color: #dc2626; font-weight: 600; }
.estado.en-proceso { color: #f59e0b; font-weight: 600; }
.estado.cerrado { color: #16a34a; font-weight: 600; }

/* BOTONES */
.btn {
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary {
    background: #2563eb;
    color: white;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

/* ACCIONES */
.acciones a {
    margin-right: 6px;
}

/* EMPTY */
.empty {
    text-align: center;
    padding: 30px;
    color: #6b7280;
}

/* RESPONSIVE */
@media (max-width: 768px) {

    .navbar {
        flex-direction: column;
        gap: 10px;
    }

    .tabla-tickets thead {
        display: none;
    }

    .tabla-tickets tr {
        display: block;
        margin-bottom: 15px;
    }

    .tabla-tickets td {
        display: flex;
        justify-content: space-between;
        padding: 10px;
    }
}



/* CREAR TICKETS */

/* ===== ALERTA DE ÉXITO ===== */
.alert-success {
    background: #dcfce7;
    color: #166534;
    border-left: 5px solid #22c55e;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    animation: fadeIn .3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}



/* CREAR SOLUCION */

.alert-success {
    background: #dcfce7;
    color: #166534;
    border-left: 5px solid #22c55e;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    animation: fadeIn .3s ease;
}


/*select*/

.select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    background: #fff;
}




.estado.en-atención,
.estado.en-proceso {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 600;
}

