* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;   /* 🔒 evita el scroll horizontal */
}


/* ====== Base general: fondo morado glassmorphism ====== */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    padding: 30px;
    min-height: 100vh;
    background:
        radial-gradient(circle at 0% 0%, #5220a8 0, transparent 50%),
        radial-gradient(circle at 100% 0%, #b561ff 0, transparent 55%),
        radial-gradient(circle at 50% 100%, #1a0b3a 0, #05020d 70%);
    color: #f5f0ff;
    box-sizing: border-box;
}

/* Contenedor principal */
.container {
    max-width: 1800px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 28px;
    border-radius: 20px;
    background: rgba(15, 8, 32, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

/* Titulares */
h1, h2 {
    margin-top: 0;
    color: #ffffff;
    letter-spacing: 0.03em;
}

h1 {
    font-size: 1.8rem;
}
h2 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

/* ====== Barra de navegación glass ====== */
nav {
    margin-bottom: 20px;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 12px;
    align-items: center;
}

nav a {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: #f5f0ff;
    background: radial-gradient(circle at 0% 0%, #b561ff 0, #6e3aff 40%, #3b1a93 100%);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

nav a:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.6);
    background: radial-gradient(circle at 100% 0%, #cf7aff 0, #8450ff 40%, #3b1a93 100%);
}

nav a:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6);
}

/* Si tienes el bloque "Usuario: XXX | Cerrar sesión" */
.nav-user {
    font-size: 0.9rem;
    color: #d1c8ff;
}

.nav-user a {
    color: #f2e6ff;
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

/* ====== Layouts (grid y tarjetas) ====== */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.card {
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(86, 52, 154, 0.22));
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

/* ====== Filtros (inputs y select arriba de tablas) ====== */

.filters {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filters input,
.filters select {
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(9, 5, 23, 0.7);
    color: #f5f0ff;
    font-size: 0.9rem;
    outline: none;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.filters input::placeholder {
    color: #a99acb;
}

/* ====== Formularios (labels + inputs generales) ====== */

label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 0.88rem;
    color: #e2dcff;
}

input[type="number"],
input[type="text"],
input[type="tel"] {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(14, 8, 34, 0.75);
    color: #f5f0ff;
    box-sizing: border-box;
    outline: none;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-size: 0.9rem;
}

input[type="number"]:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
.filters input:focus,
.filters select:focus {
    border-color: #cf7aff;
    box-shadow: 0 0 0 1px rgba(207, 122, 255, 0.5);
}

/* ====== Botones ====== */

button {
    padding: 10px 18px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: #f5f0ff;
    background: linear-gradient(135deg, #9b5bff, #d16bff);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.6);
    filter: brightness(1.05);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 9px 20px rgba(0, 0, 0, 0.65);
}

button.secondary {
    background: linear-gradient(135deg, rgba(148, 148, 148, 0.9), rgba(90, 90, 90, 0.95));
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

/* ====== Tablas ====== */

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-top: 10px;
}

th,
td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    text-align: left;
}

th {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08),
        rgba(132, 95, 209, 0.3)
    );
    color: #f5f0ff;
}

tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* ====== Badges (COP / BS) ====== */

.badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    color: #fff;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

.badge.cop {
    background: linear-gradient(135deg, #7a5cff, #c27bff);
}

.badge.bs {
    background: linear-gradient(135deg, #38b485, #78ffd4);
}

/* ====== Resumenes, info, mensajes ====== */

.summary,
.info-bar,
.message {
    margin-top: 12px;
    padding: 10px 15px;
    border-radius: 14px;
    font-size: 0.9rem;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.06),
        rgba(140, 101, 235, 0.22)
    );
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* Mensajes específicos */
.message.ok {
    background: linear-gradient(
        135deg,
        rgba(46, 181, 125, 0.1),
        rgba(46, 181, 125, 0.22)
    );
    border-color: rgba(129, 230, 171, 0.6);
}

.message.error {
    background: linear-gradient(
        135deg,
        rgba(204, 63, 97, 0.12),
        rgba(204, 63, 97, 0.3)
    );
    border-color: rgba(250, 152, 174, 0.8);
}

.info-bar span {
    display: inline-block;
    margin-right: 15px;
}

/* Pequeños textos/ayudas */
.small {
    font-size: 0.85rem;
    color: #c1b7ee;
}

/* Resultados / bloques monospace */
.result {
    margin-top: 10px;
    font-family: monospace;
    white-space: pre-line;
    font-size: 0.9rem;
    color: #efe9ff;
}

/* Contenedor de resultados/aprobación */
#resultsContainer {
    margin-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 16px;
}

#approvalForm {
    margin-top: 10px;
}

#approvalMessage {
    margin-top: 8px;
}
.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(32, 0, 60, 0.65), rgba(100, 0, 150, 0.35));
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Menú de la izquierda */
.admin-nav .nav-left {
    list-style: none;
    display: flex;
    gap: 16px;
    padding: 0;
    margin: 0;
}

.admin-nav .nav-left a {
    padding: 10px 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(200, 140, 255, 0.25), rgba(120, 70, 255, 0.25));
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease-in-out;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.admin-nav .nav-left a:hover {
    background: linear-gradient(135deg, #b974ff, #7b3cff);
    box-shadow: 0 0 14px rgba(160, 100, 255, 0.6);
    transform: translateY(-1px);
}

/* Sección derecha (usuario y logout) */
.admin-nav .nav-right {
    font-size: 0.9rem;
    color: #d7cfff;
}

.admin-nav .logout-btn {
    margin-left: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    text-decoration: none;
    background: linear-gradient(135deg, #a050ff, #5b17d8);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease-in-out;
}

.admin-nav .logout-btn:hover {
    background: linear-gradient(135deg, #c278ff, #823bff);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.result-box {
    white-space: pre-line;
    margin-top: 12px;
}

/* Contenedor responsive para tablas grandes (dashboard) */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* scroll suave en móviles */
}

.table-responsive table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px; /* fuerza scroll en móviles en lugar de romper el layout */
}

/* Opcional: hacer la tabla un poco más compacta en pantallas pequeñas */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    table th,
    table td {
        padding: 6px 8px;
        font-size: 0.8rem;
        white-space: nowrap; /* evita que se rompa en varias líneas y crezca de alto */
    }

    .filters {
        flex-wrap: wrap;
        gap: 8px;
    }

    .filters select,
    .filters input[type="text"],
    .filters button {
        width: 100%;
        max-width: 100%;
    }
}
