/**
 * ====================================================================
 * MASSOLACOMMERCE™ - ESTILOS GLOBALES
 * ====================================================================
 * ARCHIVO: assets/css/main.css
 * DESCRIPCIÓN: Estilos base para toda la plataforma
 * MÓDULOS:
 *   - Reset y normalización
 *   - Variables CSS
 *   - Tipografía
 *   - Componentes reutilizables
 *   - Utilidades
 * COLORES:
 *   - Primario (Azul): #3498db
 *   - Secundario (Rojo): #e74c3c
 *   - Oscuro: #2c3e50
 *   - Claro: #ecf0f1
 *   - Blanco: #ffffff
 * ====================================================================
 */

/* ====================================================================
   ROOT - Variables CSS globales
   ==================================================================== */
:root {
    /* COLORES PRINCIPALES */
    --primary: #3498db;
    --secondary: #e74c3c;
    --dark: #2c3e50;
    --light: #ecf0f1;
    --white: #ffffff;
    --gray: #95a5a6;
    --gray-light: #bdc3c7;
    
    /* COLORES DE ESTADO */
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #3498db;
    
    /* TIPOGRAFÍA */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-base: 16px;
    --font-size-sm: 14px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* ESPACIADO */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    
    /* BORDES */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 15px;
    
    /* SOMBRAS */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 5px 20px rgba(0,0,0,0.15);
    --shadow-xl: 0 10px 30px rgba(0,0,0,0.2);
    
    /* TRANSICIONES */
    --transition: all 0.3s ease;
    --transition-fast: all 0.2s ease;
    --transition-slow: all 0.5s ease;
}

/* ====================================================================
   RESET Y NORMALIZACIÓN
   ==================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
}

/* ====================================================================
   TIPOGRAFÍA
   ==================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}

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

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

a:hover {
    color: var(--dark);
    text-decoration: underline;
}

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

/* ====================================================================
   BOTONES - Componentes de acción
   MODIFICABLE: Colores, tamaños, estilos
   ==================================================================== */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    border-radius: var(--border-radius-md);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* BOTÓN PRIMARIO */
.btn-primary {
    background: var(--primary);
    color: var(--white);
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    background: var(--dark);
    border-color: var(--dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* BOTÓN SECUNDARIO */
.btn-secondary {
    background: var(--secondary);
    color: var(--white);
    border: 2px solid var(--secondary);
}

.btn-secondary:hover {
    background: #c0392b;
    border-color: #c0392b;
    transform: translateY(-2px);
}

/* BOTÓN OUTLINE */
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* BOTÓN SUCCESS */
.btn-success {
    background: var(--success);
    color: var(--white);
    border: 2px solid var(--success);
}

.btn-success:hover {
    background: #229954;
    border-color: #229954;
}

/* TAMAÑOS DE BOTONES */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 18px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ====================================================================
   FORMULARIOS - Inputs y controles
   MODIFICABLE: Estilos, colores, validaciones
   ==================================================================== */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid #ddd;
    border-radius: var(--border-radius-md);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-control:disabled {
    background: var(--light);
    cursor: not-allowed;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%233498db' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--spacing-md) center;
    padding-right: 30px;
}

/* VALIDACIÓN DE FORMULARIOS */
.form-control.is-valid {
    border-color: var(--success);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.invalid-feedback {
    color: var(--danger);
    font-size: var(--font-size-sm);
    margin-top: 4px;
}

.valid-feedback {
    color: var(--success);
    font-size: var(--font-size-sm);
    margin-top: 4px;
}

/* ====================================================================
   ALERTAS - Mensajes y notificaciones
   MODIFICABLE: Colores, iconos, animaciones
   ==================================================================== */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.alert i {
    flex-shrink: 0;
    margin-top: 2px;
}

/* ALERTA SUCCESS */
.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* ALERTA DANGER */
.alert-danger,
.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ALERTA WARNING */
.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ALERTA INFO */
.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ====================================================================
   TARJETAS - Contenedores principales
   MODIFICABLE: Sombras, bordes, padding
   ==================================================================== */
.card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-lg);
    transition: var(--transition);
}

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

.card-header {
    border-bottom: 1px solid var(--light);
    margin: -var(--spacing-lg) -var(--spacing-lg) var(--spacing-md) -var(--spacing-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    font-weight: var(--font-weight-bold);
}

.card-body {
    padding: 0;
}

.card-footer {
    border-top: 1px solid var(--light);
    margin: var(--spacing-md) -var(--spacing-lg) -var(--spacing-lg) -var(--spacing-lg);
    padding: var(--spacing-md) var(--spacing-lg);
}

/* ====================================================================
   TABLAS - Presentación de datos
   MODIFICABLE: Colores, bordes, hover
   ==================================================================== */
table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: var(--light);
    border-bottom: 2px solid #ddd;
}

table th {
    padding: var(--spacing-md);
    text-align: left;
    font-weight: var(--font-weight-bold);
    color: var(--dark);
    font-size: var(--font-size-sm);
}

table td {
    padding: var(--spacing-md);
    border-bottom: 1px solid #eee;
}

table tbody tr:hover {
    background: var(--light);
}

/* ====================================================================
   BADGES - Etiquetas
   MODIFICABLE: Colores, tamaños
   ==================================================================== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
}

.badge-primary {
    background: rgba(52, 152, 219, 0.2);
    color: var(--primary);
}

.badge-secondary {
    background: rgba(231, 76, 60, 0.2);
    color: var(--secondary);
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

/* ====================================================================
   UTILIDADES - Clases helper
   ==================================================================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.text-muted {
    color: var(--gray);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-primary {
    color: var(--primary);
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-sm); }
.p-2 { padding: var(--spacing-md); }
.p-3 { padding: var(--spacing-lg); }

.d-flex {
    display: flex;
}

.justify-content-center {
    justify-content: center;
}

.align-items-center {
    align-items: center;
}

.gap-1 {
    gap: var(--spacing-sm);
}

.gap-2 {
    gap: var(--spacing-md);
}

/* ====================================================================
   RESPONSIVE - Breakpoints
   ==================================================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    .btn {
        width: 100%;
    }
}



/* ====================================================================
   ESTILOS PARA BLOQUEO DE ACCESO
   ==================================================================== */
.blocked-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    text-align: center;
    padding: 40px 20px;
}

.blocked-icon {
    font-size: 64px;
    color: #e74c3c;
    margin-bottom: 20px;
}

.blocked-title {
    color: #e74c3c;
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 700;
}

.blocked-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    max-width: 600px;
    margin: 20px auto;
    text-align: left;
}

.blocked-reason {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 14px;
}

.blocked-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.blocked-contact {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    max-width: 500px;
}

.blocked-contact h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

/* ====================================================================
   PLANTILLAS ESPECIALES
   ==================================================================== */
.template-navidad {
    background: linear-gradient(135deg, #c62828 0%, #2e7d32 100%);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
}

.template-blackfriday {
    background: #000;
    color: #fff;
    padding: 15px;
    text-align: center;
    font-weight: 600;
}

.template-verano {
    background: linear-gradient(135deg, #ff9800 0%, #4fc3f7 100%);
    color: #000;
    padding: 15px;
    text-align: center;
    font-weight: 600;
}

.template-minimalista {
    background: #f8f9fa;
    color: #2c3e50;
    padding: 10px;
    border-bottom: 2px solid #0044cc;
}

/* ====================================================================
   BADGES ESPECIALES PARA PLANES
   ==================================================================== */
.badge-plan-basico {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.badge-plan-profesional {
    background: #fce4ec;
    color: #c2185b;
    border: 1px solid #f8bbd9;
}

.badge-plan-empresa {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* ====================================================================
   TABLAS MEJORADAS
   ==================================================================== */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 68, 204, 0.05);
}

/* ====================================================================
   RESPONSIVE ESPECIAL
   ==================================================================== */
@media (max-width: 768px) {
    .blocked-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .blocked-contact {
        padding: 15px;
    }
}