/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: #0f172a;
    color: #e2e8f0;
    padding: 20px;
    min-height: 100vh;
}

/* ===== TIPOGRAFÍA ===== */
h1, h2, h3 {
    color: #f8fafc;
    margin-bottom: 1rem;
}

h2 {
    color: #38bdf8;
    border-bottom: 2px solid #334155;
    padding-bottom: 0.5rem;
}

/* ===== ENLACES ===== */
a {
    color: #38bdf8;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

/* ===== FORMULARIOS ===== */
form {
    background: #1e293b;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid #334155;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

input, select, textarea, button {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border-radius: 8px;
    border: 2px solid #334155;
    background: #0f172a;
    color: #f8fafc;
    font-size: 16px;
    transition: all 0.2s;
}

input:focus, select:focus, textarea:focus {
    border-color: #38bdf8;
    outline: none;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

button {
    background: #38bdf8;
    color: #0f172a;
    font-weight: 700;
    cursor: pointer;
    border: none;
}

button:hover {
    background: #0284c7;
    transform: translateY(-2px);
}

/* ===== LISTAS ===== */
ul {
    list-style: none;
    margin: 1rem 0;
}

li {
    background: #1e293b;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    border: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===== TABLAS ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #334155;
}

th {
    background: #0f172a;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #334155;
}

tr:hover {
    background: #2d3a4f;
}

/* ===== TARJETAS ===== */
.card {
    background: #1e293b;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #334155;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* ===== BOTONES DE ACCIÓN ===== */
.btn-small {
    padding: 6px 12px;
    font-size: 14px;
    margin-left: 8px;
    background: #334155;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-small:hover {
    background: #475569;
}

.btn-danger {
    background: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* ===== MENSAJES ===== */
.mensaje-exito {
    background: #059669;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 6px solid #10b981;
}

.mensaje-error {
    background: #b91c1c;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 6px solid #ef4444;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    table {
        display: block;
        overflow-x: auto;
    }

    li {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .btn-small {
        margin-left: 0;
        margin-right: 8px;
    }
}

.badge {
    background: #1e293b;
    color: #94a3b8;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-left: 10px;
}

/* ===== VISTA FIJA PARA CELULAR (SIN ZOOM) ===== */
@media screen and (max-width: 768px) {
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding: 10px;
        margin: 0;
        font-size: 16px;
    }

    .contenedor, .card, form, ul, table, .dashboard {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    input, select, textarea, button {
        width: 100%;
        font-size: 16px;
        padding: 12px;
        margin: 5px 0;
        box-sizing: border-box;
    }

    h1, h2, h3 {
        font-size: 1.2em;
        word-wrap: break-word;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    img {
        max-width: 100%;
        height: auto;
    }
}