/* ============================================
   BIVID CLUB - Modern CSS Framework
   Version: 2.0
   ============================================ */

/* === CSS VARIABLES === */
:root {
    /* Brand Colors */
    --color-primary: #EC008C;
    --color-secondary: #FF6D00;
    --color-tertiary: #7938AD;

    /* Neutrals */
    --color-text: #2d3748;
    --color-text-light: #718096;
    --color-heading: #1a202c;
    --color-bg: #f7fafc;
    --color-container: #ffffff;
    --color-border: #e2e8f0;

    /* UI Colors */
    --color-success: #48bb78;
    --color-warning: #ecc94b;
    --color-error: #f56565;
    --color-info: #4299e1;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    --gradient-purple: linear-gradient(135deg, var(--color-tertiary) 0%, var(--color-primary) 100%);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
}

/* === RESET & BASE === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-heading);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--space-md);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); text-align: center; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin-bottom: var(--space-md); }

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover { color: var(--color-secondary); }

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* === LAYOUT === */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-md);
}

.container_email {
    max-width: 1200px;
    margin: 0 auto;
}

/* === LOGIN PAGE === */
body.login {
    background: var(--gradient-primary);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--space-md);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.login-container {
    background: var(--color-container);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 420px;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.6s ease-out forwards;
}

.login-container img.logo {
    max-width: 140px;
    margin-bottom: var(--space-lg);
}

.login-container h2 {
    color: var(--color-heading);
    font-weight: 800;
    font-size: clamp(1.5rem, 5vw, 1.875rem);
    margin-bottom: var(--space-sm);
}

.login-container p.tagline {
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
    font-size: 0.95rem;
}

.login-container input {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: var(--space-md);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-fast);
    background: var(--color-bg);
}

.login-container input:focus {
    border-color: var(--color-primary);
    outline: none;
    background: var(--color-container);
    box-shadow: 0 0 0 3px rgba(236, 0, 140, 0.1);
}

.login-container button {
    width: 100%;
    padding: 14px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.login-container button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.login-container button:hover:not(:disabled)::before {
    left: 100%;
}

.login-container button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.login-container button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-container .register {
    margin-top: var(--space-lg);
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.login-container .register a {
    color: var(--color-primary);
    font-weight: 600;
}

/* === HEADER & NAVIGATION === */
.top-header {
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    width: 80px;
    height: auto;
    transition: transform var(--transition-fast);
}

.logo:hover {
    transform: scale(1.05);
}

.nav-top-header {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.nav-top-header a {
    color: white;
    font-size: 1.1rem;
    transition: all var(--transition-fast);
    opacity: 0.9;
}

.nav-top-header a:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Footer Navigation (Mobile Bottom Bar) */
.main-header {
    background: var(--color-container);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-md);
    position: sticky;
    top: 60px;
    z-index: 999;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--color-border);
}

.nav {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    max-width: 100%;
}

.nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--color-text);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    min-width: 70px;
}

.nav a:hover {
    background: rgba(236, 0, 140, 0.1);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.nav a i {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.nav a span {
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

/* === MAIN CONTENT === */
main.container {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-2xl);
}

/* === DASHBOARD METRICS === */
.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.metric-card {
    background: var(--color-container);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.metric-card h3 {
    font-size: 0.75rem;
    color: var(--color-text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-sm);
}

.metric-card p {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-heading);
    margin: 0;
}

/* === CARDS & GRIDS === */
.cards-grid, .ofertas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.oferta-card {
    display: flex;
    flex-direction: column;
    background: var(--color-container);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--color-border);
}

.oferta-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.oferta-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.oferta-card:hover .oferta-img img {
    transform: scale(1.05);
}

.oferta-info {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.oferta-info h4 {
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
    color: var(--color-heading);
}

.oferta-eslogan {
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.oferta-desc {
    flex-grow: 1;
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

.oferta-precio {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.oferta-caducidad {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

/* === PLAN CARDS === */
.planes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-xl) auto;
    max-width: 1000px;
}

.plan-card {
    background: var(--color-container);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
    border: 2px solid transparent;
}

.plan-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary);
}

.plan-card.destacado {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, rgba(236, 0, 140, 0.05) 0%, rgba(255, 109, 0, 0.05) 100%);
}

.plan-card.destacado::before {
    content: 'Recomendado';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
}

.plan-card h3 {
    font-size: 1.375rem;
    margin-bottom: var(--space-xs);
}

.plan-card .precio {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.plan-card .detalles {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: var(--space-lg);
}

.plan-card .badge {
    background: var(--color-success);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    display: inline-block;
}

/* === LINEA CARD === */
.linea-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-container);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    margin-bottom: var(--space-md);
}

.linea-card:hover {
    box-shadow: var(--shadow-lg);
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(236, 0, 140, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(236, 0, 140, 0.4);
    color: white;
}

.btn-secondary {
    background: var(--color-secondary);
    color: white;
    box-shadow: 0 4px 14px rgba(255, 109, 0, 0.3);
}

.btn-secondary:hover {
    box-shadow: 0 6px 20px rgba(255, 109, 0, 0.4);
    color: white;
}

.btn-success {
    background: var(--color-success);
    color: white;
}

.btn-danger {
    background: var(--color-error);
    color: white;
}

.btn-cancelar {
    background: var(--color-border);
    color: var(--color-text);
}

.btn-card {
    background: var(--gradient-primary);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
}

.btn-icon {
    background: var(--color-primary);
    color: white;
    border-radius: var(--radius-full);
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    transition: all var(--transition-normal);
}

.btn-icon:hover {
    background: var(--color-secondary);
    transform: scale(1.1);
    color: white;
}

/* === FORMS === */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.main input,
.main select,
.main textarea,
.form-grid input,
.form-grid select,
.form-grid textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    background: var(--color-container);
}

.main input:focus,
.main select:focus,
.main textarea:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(236, 0, 140, 0.1);
}

/* === TABLES === */
main table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: var(--color-container);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

main table thead {
    background: var(--gradient-primary);
    color: white;
}

main table th {
    padding: var(--space-md);
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

main table td {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
}

main table tbody tr {
    transition: background var(--transition-fast);
}

main table tbody tr:hover {
    background: rgba(236, 0, 140, 0.03);
}

main table tbody tr:last-child td {
    border-bottom: none;
}

/* === MODALS === */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.modal-contenido, .modal-content {
    background: var(--color-container);
    margin: 5vh auto;
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: fadeIn 0.3s ease;
    box-shadow: var(--shadow-xl);
}

.modal img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin-top: var(--space-md);
}

.close, .cerrar {
    position: absolute;
    right: var(--space-lg);
    top: var(--space-md);
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--color-text-light);
    transition: all var(--transition-fast);
    line-height: 1;
}

.close:hover, .cerrar:hover {
    color: var(--color-error);
    transform: scale(1.1);
}

.modal-buttons {
    margin-top: var(--space-xl);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
}

#modalCancelar { background: var(--color-border); color: var(--color-text); }
#modalAceptar { background: var(--gradient-primary); color: white; }

/* === TOAST NOTIFICATIONS === */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--gradient-primary);
    color: white;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-normal);
    z-index: 10000;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* === BADGES & STATUS === */
.badge, .estado {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.estado.pendiente { background: #fef3c7; color: #92400e; }
.estado.procesada, .estado.en_proceso { background: #dbeafe; color: #1e40af; }
.estado.completada, .estado.enviado { background: #d1fae5; color: #065f46; }
.estado.rechazada, .estado.cancelado { background: #fee2e2; color: #991b1b; }
.estado.entregado { background: var(--color-success); color: white; }

/* === SOLICITUD CARDS === */
.card-solicitud {
    background: var(--color-container);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--color-border);
}

.card-solicitud:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-solicitud h4 {
    font-size: 1rem;
    margin-bottom: var(--space-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-solicitud .poblacion,
.card-solicitud .fecha {
    color: var(--color-text-light);
    font-size: 0.85rem;
    margin: 4px 0;
}

.card-solicitud .productos {
    list-style: none;
    margin: var(--space-md) 0;
}

.card-solicitud .productos li {
    background: var(--color-bg);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.estado-form select {
    width: 100%;
    margin-top: var(--space-sm);
}

/* === CONTENT SPLIT & CAROUSEL === */
.content-split {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
    align-items: center;
    justify-content: center;
}

.carousel {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    aspect-ratio: 1;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    position: relative;
}

.carousel img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel img.active {
    opacity: 1;
}

.slogans {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.slogans p {
    background: var(--color-container);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-md);
    font-size: 1rem;
    font-weight: 600;
    border-left: 4px solid var(--color-primary);
}

/* === FLEX CONTAINER === */
.flex-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-lg);
    padding: var(--space-lg) 0;
    animation: fadeUp 0.8s forwards;
}

.flex-item {
    flex: 1 1 300px;
    max-width: 100%;
}

/* === MOSAICO RECURSOS === */
.mosaico {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.recurso-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/5;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.recurso-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
}

.recurso-card img,
.recurso-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recurso-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
    opacity: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: var(--space-lg);
    gap: var(--space-sm);
    transition: opacity var(--transition-normal);
}

.recurso-card:hover .recurso-overlay {
    opacity: 1;
}

.recurso-title {
    position: absolute;
    bottom: var(--space-sm);
    left: var(--space-sm);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
}

/* === REFER LINK === */
.refer-link-container {
    background: var(--color-container);
    border: 2px dashed var(--color-primary);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    margin-top: var(--space-lg);
}

.refer-link-input {
    width: 100%;
    padding: 12px;
    font-size: 0.9rem;
    margin-top: var(--space-sm);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    text-align: center;
}

.copy-btn {
    background: var(--color-success);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    margin-top: var(--space-md);
    transition: all var(--transition-normal);
}

.copy-btn:hover {
    background: #38a169;
    transform: translateY(-2px);
}

/* === CTA BUTTON === */
.cta-button {
    background: var(--gradient-primary);
    color: white;
    padding: 14px 28px;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    display: inline-block;
    margin-top: var(--space-md);
    transition: all var(--transition-normal);
    box-shadow: 0 4px 14px rgba(236, 0, 140, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(236, 0, 140, 0.4);
    color: white;
}

/* === SECTION === */
.section {
    padding: var(--space-xl);
    text-align: center;
}

/* === MENU EXPLANATION === */
.menu-explanation {
    background: var(--color-container);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: left;
}

.menu-explanation h4 {
    margin-top: var(--space-md);
    color: var(--color-primary);
}

.menu-explanation p {
    margin: 6px 0 var(--space-md);
    color: var(--color-text-light);
}

/* === PDF CONTAINER === */
#pdf-container {
    display: block;
    overflow: auto;
    border-radius: var(--radius-md);
}

#but_zoomin, #but_zoomout {
    background: transparent;
}

/* === ERROR MESSAGE === */
.error-message {
    color: var(--color-error);
    font-weight: 600;
    padding: var(--space-sm);
    background: #fee2e2;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

/* === OFERTA TITLE === */
.oferta_title {
    padding-top: var(--space-xl);
}

.mb-3 .form-label {
    font-weight: 700;
    margin-bottom: var(--space-xs);
    display: block;
}

/* === MESSAGE BADGE === */
.msg-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--color-error);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    padding: 2px 6px;
    min-width: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    line-height: 1.3;
}

.nav-top-header a.msg-link {
    position: relative;
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================ */

/* Small devices (phones, 576px and down) */
@media (max-width: 576px) {
    .container {
        padding: var(--space-sm);
    }

    .dashboard-metrics {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-sm);
    }

    .metric-card {
        padding: var(--space-sm);
    }

    .metric-card h3 {
        font-size: 0.6rem;
    }

    .metric-card p {
        font-size: 1rem;
    }

    .cards-grid, .ofertas-grid {
        grid-template-columns: 1fr;
    }

    .planes-grid {
        grid-template-columns: 1fr;
    }

    main table th, main table td {
        padding: var(--space-sm);
        font-size: 0.8rem;
    }

    .modal-contenido, .modal-content {
        margin: 2vh auto;
        padding: var(--space-md);
        width: 95%;
        max-height: 90vh;
    }
}

/* Medium devices (tablets, 768px and down) */
@media (max-width: 768px) {
    /* Top header adjustments */
    .top-header {
        padding: var(--space-sm) var(--space-md);
    }

    .logo {
        width: 70px;
    }

    .nav-top-header {
        gap: var(--space-md);
    }

    .nav-top-header a {
        font-size: 1rem;
    }

    /* Bottom navigation bar */
    .main-header {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        padding: var(--space-sm);
        border-top: 1px solid var(--color-border);
        border-bottom: none;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1001;
    }

    .nav {
        gap: 2px;
        justify-content: space-around;
        width: 100%;
    }

    .nav a {
        padding: var(--space-xs) var(--space-sm);
        min-width: auto;
        flex: 1;
        max-width: 80px;
    }

    .nav a i {
        font-size: 1.1rem;
    }

    .nav a span {
        font-size: 0.6rem;
    }

    /* Main content padding for bottom nav */
    main.container {
        padding-bottom: 80px;
    }

    /* Content adjustments */
    .content-split {
        flex-direction: column;
    }

    .carousel, .slogans {
        max-width: 100%;
    }

    .flex-container {
        flex-direction: column;
    }

    .flex-item {
        width: 100%;
        flex: none;
    }

    /* Recurso overlay always visible on mobile */
    .recurso-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 40%);
    }

    /* Tables responsive */
    main table {
        font-size: 0.8rem;
    }

    main table th, main table td {
        padding: var(--space-sm) var(--space-xs);
    }

    /* Oferta title */
    .oferta_title {
        font-size: 0.85rem;
        padding-top: var(--space-md);
    }

    .oferta_desc {
        font-size: 0.85rem;
    }

    /* Toast position */
    .toast {
        bottom: 90px;
        left: var(--space-md);
        right: var(--space-md);
        transform: translateY(20px);
        width: auto;
    }

    .toast.show {
        transform: translateY(0);
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .dashboard-metrics {
        grid-template-columns: repeat(4, 1fr);
    }

    .cards-grid, .ofertas-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .cards-grid, .ofertas-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* === UTILITY CLASSES === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

.p-1 { padding: var(--space-sm); }
.p-2 { padding: var(--space-md); }
.p-3 { padding: var(--space-lg); }
.p-4 { padding: var(--space-xl); }

.hidden { display: none !important; }
.invisible { visibility: hidden; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

.w-full { width: 100%; }
.h-full { height: 100%; }

/* Logout link style */
.logout {
    color: white;
    opacity: 0.9;
    transition: all var(--transition-fast);
}

.logout:hover {
    opacity: 1;
    color: white;
}
