/* ========================================
   VARIABLES
======================================== */
:root {
    --morado-base: #5d2773;
    --morado-dark: #4a1f5c;
    --morado-darker: #381745;
    --morado-hover: #6e2f88;
    --morado-light: #7e3a99;
    --morado-lighter: #a06bb3;
    --morado-soft: #f3e9f7;
    --morado-shadow: rgba(93, 39, 115, 0.25);

    --gris-azulado: #7e6b80;
    --gris-footer: #614b63;
    --fondo-claro: #faf8fc;
    --blanco: #ffffff;
    --gris-borde: #e5e7eb;
    --texto-suave: #e9dff0;
    --texto-oscuro: #3f2a48;

    --sombra: 0 10px 25px rgba(93, 39, 115, 0.12);
}

/* ========================================
   RESET + BASE
======================================== */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--fondo-claro);
    color: var(--texto-oscuro);
}

/* Layout FLEX para footer */
.layout-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================
   SUPER HEADER
======================================== */
.super-header {
    width: 100%;
    height: 35px;
    background: var(--morado-base);
    color: #f7f1fa;
    font-size: 13px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1100;
}

.super-header-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.super-left,
.super-right {
    display: flex;
    gap: 18px;
}

/* ========================================
   NAVBAR
======================================== */
.main-navbar {
    width: 100%;
    height: 78px;
    background: #fcf9fe;
    border-bottom: 1px solid var(--gris-borde);
    position: fixed;
    top: 35px;
    left: 0;
    z-index: 1050;
}

.main-navbar-container {
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.navbar-brand img {
    width: 90px;
}

/* MENÚ */
.navbar-menu {
    display: flex;
    gap: 12px;
    flex: 1;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--morado-base);
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
}

.nav-link:hover {
    background: var(--morado-soft);
    color: var(--morado-dark);
}

.nav-link.active {
    background: var(--morado-base);
    color: white;
}

/* SUBMENU */
.nav-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: var(--sombra);
    padding: 10px;
}

.nav-item:hover .nav-submenu {
    display: block;
}

/* ========================================
   USER / ACTIONS
======================================== */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--morado-base);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-login-top,
.btn-logout-top {
    background: var(--morado-base);
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    border: none;
    text-decoration: none;
}

.btn-login-top:hover,
.btn-logout-top:hover {
    background: var(--morado-dark);
}

/* ========================================
   CONTENIDO
======================================== */
.main-content {
    margin-top: 113px;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

/* ========================================
   FOOTER (FIX DEFINITIVO)
======================================== */
.footer {
    background: var(--gris-footer);
    color: #f3f4f6;
    text-align: center;
    padding: 20px 10px;
    font-size: 14px;
    margin-top: auto;
}

.footer a {
    color: #ede9fe;
    font-weight: bold;
    text-decoration: none;
}

.footer a:hover {
    color: white;
}

/* ========================================
   BOTONES
======================================== */
.btn-main {
    background: var(--morado-base);
    color: white;
    padding: 12px 32px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
}

.btn-main:hover {
    background: var(--morado-dark);
}

/* ========================================
   HEADER FORMULARIO
======================================== */
.form-header-main {
    background: linear-gradient(135deg, var(--morado-hover), var(--morado-base));
    padding: 24px 32px;
    color: white;
}

.form-header-main p {
    opacity: 0.85;
}

/* ========================================
   TARJETAS
======================================== */
.select-card {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: 0.25s;
}

.select-card:hover {
    border-color: var(--morado-light);
}

.select-card.is-active {
    border-color: var(--morado-base);
    box-shadow: 0 0 0 3px var(--morado-shadow);
}

/* ========================================
   RESPONSIVE
======================================== */
.mobile-toggle {
    display: none;
}

@media (max-width: 992px) {
    .main-content {
        margin-top: 140px;
    }

    .mobile-toggle {
        display: block;
    }

    .navbar-menu {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    .navbar-menu.mobile-active {
        display: flex;
    }
}