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

/* -------------------------------------------------------
   FONDO GLOBAL
---------------------------------------------------------*/
body {
    background: linear-gradient(135deg, #e6eeff 0%, #f7f9ff 100%);
    min-height: 100vh;
    padding: 25px 10px;
    display: block;          /* 🔥 antes: flex → causaba el hueco en móvil */
    overflow-y: auto;
}

/* -------------------------------------------------------
   TARJETA PRINCIPAL
---------------------------------------------------------*/
.card {
    background: #fff;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 28px;
    border-radius: 22px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    animation: fadeIn .4s ease;
    text-align: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* -------------------------------------------------------
   TÍTULOS Y TEXTOS
---------------------------------------------------------*/
h1, h2, h3 {
    color: #222;
    margin-bottom: 15px;
}

.subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 22px;
}

/* -------------------------------------------------------
   ICONO SUPERIOR
---------------------------------------------------------*/
.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #0066ff;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 16px;
    font-size: 35px;
    color: #fff;
}

/* -------------------------------------------------------
   BOTONES
---------------------------------------------------------*/
.btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    color: white;
    transition: 0.2s;
    text-align: center;
}

.btn-blue   { background: #007bff; }
.btn-green  { background: #28a745; }
.btn-orange { background: #ff9800; }
.btn-red    { background: #dc3545; }

.btn:hover { filter: brightness(0.92); }

/* -------------------------------------------------------
   INPUTS Y FORMULARIOS
---------------------------------------------------------*/
input, select, textarea {
    width: 100%;
    padding: 12px;
    margin: 7px 0 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 15px;
}

label {
    text-align: left;
    display: block;
    font-weight: bold;
    color: #444;
    margin-top: 12px;
}

/* -------------------------------------------------------
   MENSAJES
---------------------------------------------------------*/
.msg {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 15px;
}

.msg-ok {
    background: #d8ffd8;
    color: #1e7e34;
}

.msg-error {
    background: #ffd8d8;
    color: #b30000;
}

/* -------------------------------------------------------
   TABLAS
---------------------------------------------------------*/
.table-container {
    width: 100%;
    overflow-x: auto;   /* SOLO scroll horizontal si es necesario */
    border-radius: 10px;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

table th, table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

table th {
    background: #f3f3f3;
    font-weight: bold;
}

tr:hover {
    background: #fafafa;
}

/* -------------------------------------------------------
   ENLACES SECUNDARIOS
---------------------------------------------------------*/
.link-back {
    display: block;
    margin-top: 25px;
    text-decoration: none;
    color: #ff9800;
    font-weight: bold;
}

/* -------------------------------------------------------
   RESPONSIVE MOVIL
---------------------------------------------------------*/
@media (max-width: 600px) {

    body {
        padding: 15px 10px;
        overflow-y: auto;
    }

    .card {
        padding: 25px 20px;
        width: 100%;
        border-radius: 18px;
    }

    .icon-circle {
        width: 65px;
        height: 65px;
        font-size: 28px;
    }

    table th:nth-child(2),
    table td:nth-child(2),
    table th:nth-child(3),
    table td:nth-child(3) {
        display: none; /* Oculta columnas menos relevantes */
    }

    table th, table td {
        padding: 6px 6px;
        font-size: 13px;
    }

    .btn {
        padding: 10px;
        font-size: 14px;
    }
}
/* Botón eliminar mejorado */
.btn-dark {
    background: #333;
    color: #fff !important;
}

.btn-dark:hover {
    filter: brightness(1.15);
}

/* En móvil, aumentar tamaño un poco */
@media (max-width: 600px) {
    .btn-dark.table-btn {
        background: #222;
        padding: 6px 8px;
        font-size: 13px;
        color: #fff !important;
    }
}
