/**
 * CRM ADMIN STYLES - Estilos del Módulo Administrativo
 * Compatible con Bootstrap 5 y diseño responsivo
 */

/* === VARIABLES CSS === */
:root {
    --crmadm-primary: #007cba;
    --crmadm-accent: #fdb913;
    --crmadm-success: #28a745;
    --crmadm-danger: #dc3545;
    --crmadm-warning: #ffc107;
    --crmadm-info: #17a2b8;
    --crmadm-light: #f8f9fa;
    --crmadm-dark: #343a40;
    --crmadm-gray: #6c757d;
    --crmadm-gray-light: #e9ecef;
    --crmadm-white: #ffffff;
    --crmadm-border-radius: 8px;
    --crmadm-transition: all 0.3s ease;
    --crmadm-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --crmadm-shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
    --crmadm-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* === RESET Y ESTILOS BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--crmadm-font-family);
    background-color: var(--crmadm-light);
    color: var(--crmadm-dark);
    line-height: 1.6;
    font-size: 16px;
}

/* === LAYOUT BÁSICO === */
.crmadm-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.crmadm-container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* === COMPONENTES PRINCIPALES === */

/* === HEADER === */
.crmadm-header {
    background: var(--crmadm-white);
    color: var(--crmadm-dark);
    box-shadow: var(--crmadm-shadow);
    border-bottom: 3px solid var(--crmadm-primary);
    padding: 1rem 0;
}

.crmadm-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.crmadm-header-left {
    flex: 1;
}

.crmadm-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.crmadm-header-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.crmadm-header-icon {
    font-size: 2rem;
    color: var(--crmadm-primary);
}

.crmadm-header-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--crmadm-primary);
    margin: 0;
}

.crmadm-header-text p {
    font-size: 0.9rem;
    color: var(--crmadm-gray);
    margin: 0.25rem 0 0 0;
}

/* Breadcrumb */
.crmadm-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.crmadm-breadcrumb a {
    color: var(--crmadm-primary);
    text-decoration: none;
}

.crmadm-breadcrumb a:hover {
    color: var(--crmadm-dark);
    text-decoration: underline;
}

.crmadm-breadcrumb-separator {
    color: var(--crmadm-gray);
}

.crmadm-breadcrumb-current {
    color: var(--crmadm-gray);
}

/* Main Content */
.crmadm-main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Cards */
.crmadm-card {
    background: var(--crmadm-white);
    border-radius: var(--crmadm-border-radius);
    box-shadow: var(--crmadm-shadow);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: var(--crmadm-transition);
}

.crmadm-card:hover {
    box-shadow: var(--crmadm-shadow-hover);
    transform: translateY(-2px);
}

.crmadm-card-header {
    background: linear-gradient(135deg, var(--crmadm-light), #e9ecef);
    padding: 1.5rem;
    border-bottom: 1px solid var(--crmadm-gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crmadm-card-header h3 {
    margin: 0;
    font-weight: 600;
    color: var(--crmadm-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.crmadm-card-body {
    padding: 2rem;
}

.crmadm-card-footer {
    background: var(--crmadm-light);
    padding: 1rem 2rem;
    border-top: 1px solid var(--crmadm-gray-light);
}

/* Botones */
.crmadm-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--crmadm-border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--crmadm-transition);
    white-space: nowrap;
}

.crmadm-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--crmadm-shadow);
    text-decoration: none;
}

.crmadm-btn-primary {
    background: linear-gradient(135deg, var(--crmadm-primary), #0056b3);
    color: var(--crmadm-white);
}

.crmadm-btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, var(--crmadm-primary));
    color: var(--crmadm-white);
}

.crmadm-btn-secondary {
    background: var(--crmadm-gray);
    color: var(--crmadm-white);
}

.crmadm-btn-success {
    background: var(--crmadm-success);
    color: var(--crmadm-white);
}

.crmadm-btn-danger {
    background: var(--crmadm-danger);
    color: var(--crmadm-white);
}

.crmadm-btn-warning {
    background: var(--crmadm-warning);
    color: var(--crmadm-dark);
}

.crmadm-btn-info {
    background: var(--crmadm-info);
    color: var(--crmadm-white);
}

.crmadm-btn-outline {
    background: transparent;
    color: var(--crmadm-primary);
    border: 2px solid var(--crmadm-primary);
}

.crmadm-btn-outline:hover {
    background: var(--crmadm-primary);
    color: var(--crmadm-white);
}

.crmadm-btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.crmadm-btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Formularios */
.crmadm-form-group {
    margin-bottom: 1.5rem;
}

.crmadm-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--crmadm-dark);
}

.crmadm-input,
.crmadm-select,
.crmadm-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--crmadm-gray-light);
    border-radius: var(--crmadm-border-radius);
    font-size: 0.9rem;
    transition: var(--crmadm-transition);
    background: var(--crmadm-white);
}

.crmadm-input:focus,
.crmadm-select:focus,
.crmadm-textarea:focus {
    outline: none;
    border-color: var(--crmadm-accent);
    box-shadow: 0 0 0 3px rgba(253, 185, 19, 0.1);
}

.crmadm-input-error {
    border-color: var(--crmadm-danger);
}

.crmadm-input-success {
    border-color: var(--crmadm-success);
}

.crmadm-input-help {
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--crmadm-gray);
}

/* Tablas */
.crmadm-table-responsive {
    overflow-x: auto;
    border-radius: var(--crmadm-border-radius);
}

.crmadm-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--crmadm-white);
}

.crmadm-table th,
.crmadm-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--crmadm-gray-light);
}

.crmadm-table th {
    background: linear-gradient(135deg, var(--crmadm-dark), #495057);
    color: var(--crmadm-white);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.crmadm-table tbody tr:hover {
    background: rgba(0, 124, 186, 0.05);
}

.crmadm-table tbody tr:nth-child(even) {
    background: rgba(248, 249, 250, 0.5);
}

/* Mensajes */
.crmadm-message {
    padding: 1rem 1.5rem;
    border-radius: var(--crmadm-border-radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.crmadm-message-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--crmadm-success);
    border-left: 4px solid var(--crmadm-success);
}

.crmadm-message-error {
    background: rgba(220, 53, 69, 0.1);
    color: var(--crmadm-danger);
    border-left: 4px solid var(--crmadm-danger);
}

.crmadm-message-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
    border-left: 4px solid var(--crmadm-warning);
}

.crmadm-message-info {
    background: rgba(23, 162, 184, 0.1);
    color: var(--crmadm-info);
    border-left: 4px solid var(--crmadm-info);
}

/* Estados Vacíos */
.crmadm-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--crmadm-gray);
}

.crmadm-empty-state i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.crmadm-empty-state h4 {
    margin-bottom: 1rem;
    color: var(--crmadm-dark);
}

/* Badges y Etiquetas */
.crmadm-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.crmadm-badge-primary {
    background: var(--crmadm-primary);
    color: var(--crmadm-white);
}

.crmadm-badge-success {
    background: var(--crmadm-success);
    color: var(--crmadm-white);
}

.crmadm-badge-warning {
    background: var(--crmadm-warning);
    color: var(--crmadm-dark);
}

.crmadm-badge-danger {
    background: var(--crmadm-danger);
    color: var(--crmadm-white);
}

/* Niveles de Cliente */
.crmadm-level-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.crmadm-level-bronce {
    background: linear-gradient(135deg, #cd7f32, #b8722c);
    color: var(--crmadm-white);
}

.crmadm-level-plata {
    background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
    color: var(--crmadm-dark);
}

.crmadm-level-oro {
    background: linear-gradient(135deg, #ffd700, #e6c200);
    color: var(--crmadm-dark);
}

.crmadm-level-vip {
    background: linear-gradient(135deg, #8b008b, #660066);
    color: var(--crmadm-white);
}

/* Estadísticas y Métricas */
.crmadm-stat-card {
    background: var(--crmadm-white);
    border-radius: var(--crmadm-border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--crmadm-shadow);
    transition: var(--crmadm-transition);
}

.crmadm-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--crmadm-shadow-hover);
}

.crmadm-stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--crmadm-primary), var(--crmadm-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.crmadm-stat-label {
    font-size: 0.9rem;
    color: var(--crmadm-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Paginación */
.crmadm-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--crmadm-gray-light);
}

.crmadm-pagination-info {
    color: var(--crmadm-gray);
    font-size: 0.9rem;
}

.crmadm-pagination-controls {
    display: flex;
    gap: 0.25rem;
}

/* Loading y Spinners */
.crmadm-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--crmadm-gray);
}

.crmadm-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--crmadm-gray-light);
    border-top: 2px solid var(--crmadm-primary);
    border-radius: 50%;
    animation: crmadm-spin 1s linear infinite;
}

@keyframes crmadm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tooltips personalizados */
.crmadm-tooltip {
    position: relative;
    cursor: help;
}

.crmadm-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--crmadm-dark);
    color: var(--crmadm-white);
    padding: 0.5rem 0.75rem;
    border-radius: var(--crmadm-border-radius);
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--crmadm-transition);
    z-index: 1000;
}

.crmadm-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* === FOOTER === */
.crmadm-footer {
    background: var(--crmadm-white);
    border-top: 1px solid var(--crmadm-gray-light);
    margin-top: 3rem;
    padding: 1rem 0;
}

.crmadm-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.crmadm-footer-left,
.crmadm-footer-right {
    flex: 1;
}

.crmadm-footer-right {
    text-align: right;
}

.crmadm-footer p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--crmadm-gray);
}

.crmadm-footer a {
    color: var(--crmadm-gray);
    text-decoration: none;
}

.crmadm-footer a:hover {
    color: var(--crmadm-primary);
    text-decoration: underline;
}

/* === RESPONSIVE DESIGN === */

/* Tablets */
@media (max-width: 992px) {
    .crmadm-card-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .crmadm-pagination {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .crmadm-table th,
    .crmadm-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
}

/* Móviles */
@media (max-width: 768px) {
    .crmadm-main {
        padding: 1rem 0;
    }
    
    .crmadm-card-body {
        padding: 1.5rem;
    }
    
    .crmadm-btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    .crmadm-table-responsive {
        font-size: 0.8rem;
    }
    
    .crmadm-stat-value {
        font-size: 2rem;
    }
    
    .crmadm-header h1 {
        font-size: 1.5rem;
    }
}

/* Móviles pequeños */
@media (max-width: 576px) {
    .crmadm-card-body {
        padding: 1rem;
    }
    
    .crmadm-table th,
    .crmadm-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }
    
    .crmadm-stat-card {
        padding: 1.5rem 1rem;
    }
    
    .crmadm-stat-value {
        font-size: 1.75rem;
    }
}

/* === UTILIDADES === */

/* Espaciado */
.crmadm-mt-1 { margin-top: 0.25rem; }
.crmadm-mt-2 { margin-top: 0.5rem; }
.crmadm-mt-3 { margin-top: 1rem; }
.crmadm-mt-4 { margin-top: 1.5rem; }
.crmadm-mt-5 { margin-top: 3rem; }

.crmadm-mb-1 { margin-bottom: 0.25rem; }
.crmadm-mb-2 { margin-bottom: 0.5rem; }
.crmadm-mb-3 { margin-bottom: 1rem; }
.crmadm-mb-4 { margin-bottom: 1.5rem; }
.crmadm-mb-5 { margin-bottom: 3rem; }

.crmadm-p-1 { padding: 0.25rem; }
.crmadm-p-2 { padding: 0.5rem; }
.crmadm-p-3 { padding: 1rem; }
.crmadm-p-4 { padding: 1.5rem; }
.crmadm-p-5 { padding: 3rem; }

/* Texto */
.crmadm-text-center { text-align: center; }
.crmadm-text-left { text-align: left; }
.crmadm-text-right { text-align: right; }

.crmadm-text-primary { color: var(--crmadm-primary); }
.crmadm-text-success { color: var(--crmadm-success); }
.crmadm-text-danger { color: var(--crmadm-danger); }
.crmadm-text-warning { color: #856404; }
.crmadm-text-info { color: var(--crmadm-info); }
.crmadm-text-muted { color: var(--crmadm-gray); }

.crmadm-fw-bold { font-weight: 700; }
.crmadm-fw-normal { font-weight: 400; }

/* Display */
.crmadm-d-none { display: none; }
.crmadm-d-block { display: block; }
.crmadm-d-flex { display: flex; }
.crmadm-d-inline-flex { display: inline-flex; }

/* Flex */
.crmadm-justify-center { justify-content: center; }
.crmadm-justify-between { justify-content: space-between; }
.crmadm-align-center { align-items: center; }

/* Bordes */
.crmadm-border { border: 1px solid var(--crmadm-gray-light); }
.crmadm-border-top { border-top: 1px solid var(--crmadm-gray-light); }
.crmadm-border-bottom { border-bottom: 1px solid var(--crmadm-gray-light); }

.crmadm-rounded { border-radius: var(--crmadm-border-radius); }
.crmadm-rounded-circle { border-radius: 50%; }

/* Sombras */
.crmadm-shadow { box-shadow: var(--crmadm-shadow); }
.crmadm-shadow-hover:hover { box-shadow: var(--crmadm-shadow-hover); }

/* === ANIMACIONES === */
@keyframes crmadm-fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes crmadm-slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.crmadm-animate-fadeIn {
    animation: crmadm-fadeIn 0.5s ease-out;
}

.crmadm-animate-slideIn {
    animation: crmadm-slideIn 0.3s ease-out;
}

/* === MODO OSCURO (OPCIONAL) === */
@media (prefers-color-scheme: dark) {
    .crmadm-dark-mode {
        --crmadm-light: #1a1a1a;
        --crmadm-white: #2d2d2d;
        --crmadm-dark: #ffffff;
        --crmadm-gray-light: #404040;
    }
    
    .crmadm-dark-mode body {
        background-color: var(--crmadm-light);
        color: var(--crmadm-dark);
    }
}

/* === IMPRESIÓN === */
@media print {
    .crmadm-btn,
    .crmadm-pagination,
    .crmadm-header,
    .crmadm-footer {
        display: none !important;
    }
    
    .crmadm-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .crmadm-table {
        font-size: 0.8rem;
    }
}
/* === 
ESTILOS ESPECÍFICOS DEL DASHBOARD === */

/* Dashboard Container */
.crmadm-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Program Info */
.crmadm-program-info {
    margin-bottom: 2rem;
}

.crmadm-program-info .crmadm-card {
    background: var(--crmadm-white);
    border: 2px solid var(--crmadm-primary);
    color: var(--crmadm-dark);
}

.crmadm-program-info .crmadm-card-header {
    background: var(--crmadm-primary);
    color: var(--crmadm-white);
}

.crmadm-program-info .crmadm-card-header h2 {
    color: var(--crmadm-white);
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.crmadm-program-info .crmadm-card-body p {
    color: var(--crmadm-dark);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Metrics Grid */
.crmadm-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.crmadm-metric-card {
    background: var(--crmadm-white);
    border-radius: var(--crmadm-border-radius);
    padding: 2rem;
    box-shadow: var(--crmadm-shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--crmadm-transition);
    border-left: 4px solid var(--crmadm-primary);
}

.crmadm-metric-card:hover {
    box-shadow: var(--crmadm-shadow-hover);
    transform: translateY(-2px);
}

.crmadm-metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--crmadm-primary), #0056b3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--crmadm-white);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.crmadm-metric-content h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--crmadm-primary);
    margin: 0;
    line-height: 1;
}

.crmadm-metric-content p {
    color: var(--crmadm-gray);
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Quick Actions */
.crmadm-quick-actions {
    margin-bottom: 2rem;
}

.crmadm-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.crmadm-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 1rem;
    background: var(--crmadm-white);
    border: 2px solid var(--crmadm-gray-light);
    border-radius: var(--crmadm-border-radius);
    text-decoration: none;
    color: var(--crmadm-dark);
    transition: var(--crmadm-transition);
    font-weight: 500;
}

.crmadm-action-btn:hover {
    border-color: var(--crmadm-primary);
    background: var(--crmadm-primary);
    color: var(--crmadm-white);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--crmadm-shadow);
}

.crmadm-action-btn i {
    font-size: 2rem;
    opacity: 0.8;
}

.crmadm-action-btn:hover i {
    opacity: 1;
}

/* Charts Section */
.crmadm-charts-section {
    margin-bottom: 2rem;
}

.crmadm-levels-chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.crmadm-level-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--crmadm-light);
    border-radius: var(--crmadm-border-radius);
    border-left: 4px solid var(--crmadm-primary);
}

.crmadm-level-info {
    min-width: 150px;
}

.crmadm-level-name {
    font-weight: 600;
    color: var(--crmadm-dark);
    display: block;
}

.crmadm-level-count {
    font-size: 0.9rem;
    color: var(--crmadm-gray);
}

.crmadm-level-bar {
    flex: 1;
    height: 8px;
    background: var(--crmadm-gray-light);
    border-radius: 4px;
    overflow: hidden;
}

.crmadm-level-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--crmadm-primary), var(--crmadm-accent));
    transition: width 0.5s ease;
}

.crmadm-level-percentage {
    min-width: 50px;
    text-align: right;
    font-weight: 600;
    color: var(--crmadm-primary);
}

/* Popular Rewards */
.crmadm-popular-rewards {
    margin-bottom: 2rem;
}

.crmadm-rewards-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.crmadm-reward-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--crmadm-light);
    border-radius: var(--crmadm-border-radius);
    border-left: 4px solid var(--crmadm-success);
}

.crmadm-reward-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--crmadm-dark);
    font-weight: 600;
}

.crmadm-reward-info p {
    margin: 0;
    color: var(--crmadm-gray);
    font-size: 0.9rem;
}

.crmadm-reward-stats {
    text-align: right;
}

.crmadm-reward-canjes {
    background: var(--crmadm-success);
    color: var(--crmadm-white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Responsive Dashboard */
@media (max-width: 768px) {
    .crmadm-metrics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .crmadm-metric-card {
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .crmadm-metric-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .crmadm-metric-content h3 {
        font-size: 2rem;
    }
    
    .crmadm-actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .crmadm-action-btn {
        padding: 1.5rem 0.75rem;
    }
    
    .crmadm-action-btn i {
        font-size: 1.5rem;
    }
    
    .crmadm-level-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .crmadm-level-info {
        min-width: auto;
        text-align: center;
    }
    
    .crmadm-level-percentage {
        text-align: center;
    }
    
    .crmadm-reward-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .crmadm-reward-stats {
        text-align: center;
    }
}

@media (max-width: 576px) {
    .crmadm-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .crmadm-program-info .crmadm-card-header h2 {
        font-size: 1.5rem;
    }
    
    .crmadm-metric-content h3 {
        font-size: 1.75rem;
    }
}/* === VA
RIACIONES DE COLORES PARA MÉTRICAS === */

.crmadm-metric-icon-primary {
    background: linear-gradient(135deg, var(--crmadm-primary), #0056b3);
}

.crmadm-metric-icon-success {
    background: linear-gradient(135deg, var(--crmadm-success), #1e7e34);
}

.crmadm-metric-icon-warning {
    background: linear-gradient(135deg, var(--crmadm-warning), #e0a800);
}

.crmadm-metric-icon-danger {
    background: linear-gradient(135deg, var(--crmadm-danger), #bd2130);
}

.crmadm-metric-icon-info {
    background: linear-gradient(135deg, var(--crmadm-info), #138496);
}

/* === MEJORAS DE CONTRASTE === */

/* Asegurar que los textos sean legibles */
.crmadm-card-header h2,
.crmadm-card-header h3 {
    color: var(--crmadm-white) !important;
}

.crmadm-card-body p,
.crmadm-card-body span {
    color: var(--crmadm-dark) !important;
}

/* Mejorar contraste en niveles */
.crmadm-level-name {
    color: var(--crmadm-dark) !important;
    font-weight: 600;
}

.crmadm-level-count {
    color: var(--crmadm-gray) !important;
}

/* Mejorar contraste en recompensas */
.crmadm-reward-info h4 {
    color: var(--crmadm-dark) !important;
}

.crmadm-reward-info p {
    color: var(--crmadm-gray) !important;
}/
* === CORRECCIONES ESPECÍFICAS DE CONTRASTE === */

/* Header - Forzar colores correctos */
.crmadm-header * {
    color: var(--crmadm-dark) !important;
}

.crmadm-header .text-primary,
.crmadm-header h1,
.crmadm-header .fw-bold {
    color: var(--crmadm-primary) !important;
}

.crmadm-header .text-muted,
.crmadm-header .small {
    color: var(--crmadm-gray) !important;
}

.crmadm-header a {
    color: var(--crmadm-primary) !important;
    text-decoration: none !important;
}

.crmadm-header a:hover {
    color: var(--crmadm-dark) !important;
    text-decoration: underline !important;
}

.crmadm-header .breadcrumb-item.active {
    color: var(--crmadm-gray) !important;
}

.crmadm-header .btn {
    background-color: var(--crmadm-primary) !important;
    border-color: var(--crmadm-primary) !important;
    color: var(--crmadm-white) !important;
}

.crmadm-header .btn:hover {
    background-color: var(--crmadm-dark) !important;
    border-color: var(--crmadm-dark) !important;
    color: var(--crmadm-white) !important;
}

/* Iconos en el header */
.crmadm-header i {
    color: var(--crmadm-primary) !important;
}

/* Breadcrumb específico */
.crmadm-header .breadcrumb {
    background: transparent !important;
    margin-bottom: 0 !important;
}

.crmadm-header .breadcrumb-item + .breadcrumb-item::before {
    color: var(--crmadm-gray) !important;
}/* === RE
SPONSIVE DESIGN SIN BOOTSTRAP === */

/* Tablets */
@media (max-width: 992px) {
    .crmadm-container {
        padding: 0 15px;
    }
    
    .crmadm-header-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .crmadm-header-right {
        justify-content: center;
    }
    
    .crmadm-footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .crmadm-footer-right {
        text-align: center;
    }
}

/* Móviles */
@media (max-width: 768px) {
    .crmadm-container {
        padding: 0 10px;
    }
    
    .crmadm-header {
        padding: 0.75rem 0;
    }
    
    .crmadm-header-title {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .crmadm-header-text h1 {
        font-size: 1.25rem;
    }
    
    .crmadm-breadcrumb {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .crmadm-btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
    }
}

/* Móviles pequeños */
@media (max-width: 576px) {
    .crmadm-container {
        padding: 0 5px;
    }
    
    .crmadm-header-icon {
        font-size: 1.5rem;
    }
    
    .crmadm-header-text h1 {
        font-size: 1.1rem;
    }
    
    .crmadm-header-text p {
        font-size: 0.8rem;
    }
}/* === S
ISTEMA COMPLETO DE BOTONES REUTILIZABLE === */

/* Botón base */
.crmadm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: var(--crmadm-border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--crmadm-transition);
    white-space: nowrap;
    font-family: inherit;
    line-height: 1;
    user-select: none;
}

.crmadm-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--crmadm-shadow);
    text-decoration: none;
}

.crmadm-btn:active {
    transform: translateY(0);
}

.crmadm-btn:focus {
    outline: 2px solid var(--crmadm-accent);
    outline-offset: 2px;
}

/* Variantes de color */
.crmadm-btn-primary {
    background: var(--crmadm-primary);
    color: var(--crmadm-white);
    border-color: var(--crmadm-primary);
}

.crmadm-btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
    color: var(--crmadm-white);
}

.crmadm-btn-secondary {
    background: var(--crmadm-white);
    color: var(--crmadm-primary);
    border-color: var(--crmadm-primary);
}

.crmadm-btn-secondary:hover {
    background: var(--crmadm-primary);
    color: var(--crmadm-white);
    border-color: var(--crmadm-primary);
}

.crmadm-btn-success {
    background: var(--crmadm-success);
    color: var(--crmadm-white);
    border-color: var(--crmadm-success);
}

.crmadm-btn-success:hover {
    background: #1e7e34;
    border-color: #1e7e34;
    color: var(--crmadm-white);
}

.crmadm-btn-warning {
    background: var(--crmadm-warning);
    color: var(--crmadm-dark);
    border-color: var(--crmadm-warning);
}

.crmadm-btn-warning:hover {
    background: #e0a800;
    border-color: #e0a800;
    color: var(--crmadm-dark);
}

.crmadm-btn-danger {
    background: var(--crmadm-danger);
    color: var(--crmadm-white);
    border-color: var(--crmadm-danger);
}

.crmadm-btn-danger:hover {
    background: #bd2130;
    border-color: #bd2130;
    color: var(--crmadm-white);
}

.crmadm-btn-info {
    background: var(--crmadm-info);
    color: var(--crmadm-white);
    border-color: var(--crmadm-info);
}

.crmadm-btn-info:hover {
    background: #138496;
    border-color: #138496;
    color: var(--crmadm-white);
}

/* Variantes outline */
.crmadm-btn-outline-primary {
    background: transparent;
    color: var(--crmadm-primary);
    border-color: var(--crmadm-primary);
}

.crmadm-btn-outline-primary:hover {
    background: var(--crmadm-primary);
    color: var(--crmadm-white);
}

.crmadm-btn-outline-secondary {
    background: transparent;
    color: var(--crmadm-gray);
    border-color: var(--crmadm-gray);
}

.crmadm-btn-outline-secondary:hover {
    background: var(--crmadm-gray);
    color: var(--crmadm-white);
}

/* Tamaños */
.crmadm-btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.crmadm-btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.crmadm-btn-xl {
    padding: 1.25rem 2.5rem;
    font-size: 1.2rem;
}

/* Estados especiales */
.crmadm-btn-disabled,
.crmadm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.crmadm-btn-loading {
    position: relative;
    color: transparent;
}

.crmadm-btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: crmadm-spin 1s linear infinite;
}

/* Botón de bloque (ancho completo) */
.crmadm-btn-block {
    width: 100%;
}

/* Grupo de botones */
.crmadm-btn-group {
    display: inline-flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.crmadm-btn-group .crmadm-btn {
    margin: 0;
}

/* Botones flotantes */
.crmadm-btn-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 0;
    font-size: 1.5rem;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.crmadm-btn-float:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .crmadm-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .crmadm-btn-sm {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .crmadm-btn-lg {
        padding: 0.8rem 1.6rem;
        font-size: 1rem;
    }
    
    .crmadm-btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .crmadm-btn-group .crmadm-btn {
        width: 100%;
    }
}