/* components.css - VERSIÓN LIMPIA Y MEJORADA */

/* Botones y acciones */
.action-buttons {
    margin: 25px 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-buttons-small {
    display: flex;
    gap: 6px;
}

button {
    padding: 12px 18px;
    margin: 3px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', sans-serif;
}

button.small {
    padding: 8px 12px;
    font-size: 12px;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

button.primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

button.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #2573a7);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.3);
}

button.secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

button.secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6268, #495056);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(108, 117, 125, 0.3);
}

button.danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

button.danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.3);
}

button.success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

button.success:hover:not(:disabled) {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.3);
}

/* Mensajes */
.message {
    padding: 16px 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 5px solid;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background: #fff;
}

.error {
    color: #c0392b;
    background: #fdf2f2;
    border-left-color: #e74c3c;
}

.success {
    color: #27ae60;
    background: #f2fbf2;
    border-left-color: #27ae60;
}

.info {
    color: #2980b9;
    background: #e9f7fe;
    border-left-color: #3498db;
}

.warning {
    color: #d35400;
    background: #fff4ce;
    border-left-color: #f39c12;
}

/* Tablas */
#usersList {
    margin-top: 30px;
}

.users-header {
    margin-bottom: 25px;
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    background: #fff;
}

/* table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 800px;
}

th, td {
    border: 1px solid #e9ecef;
    padding: 14px;
    text-align: left;
    color: #2c3e50;
}

th {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    font-weight: 700;
    color: #2c3e50;
    position: sticky;
    top: 0;
    border-bottom: 2px solid #dee2e6;
} */

/* Tablas con texto más compacto */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 800px;
    font-size: 13px; /* ← TEXTO MÁS PEQUEÑO */
}

th, td {
    border: 1px solid #e9ecef;
    padding: 10px 12px; /* ← PADDING MÁS COMPACTO */
    text-align: left;
    color: #2c3e50;
}

th {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    font-weight: 700;
    color: #2c3e50;
    position: sticky;
    top: 0;
    border-bottom: 2px solid #dee2e6;
    font-size: 12px; /* ← HEADERS MÁS PEQUEÑOS */
    padding: 8px 12px; /* ← HEADERS MÁS COMPACTOS */
}

tr:hover {
    background-color: #f8f9fa;
}

/* Estados de expiración */
.expired {
    background: #ffe6e6 !important;
    color: #c0392b;
    font-weight: bold;
}

.active {
    background: #e6ffe6 !important;
    color: #27ae60;
}

.no-config {
    background: #f8f9fa !important;
    color: #6c757d;
}

/* Estadísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-top: 5px solid #3498db;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.total { border-top-color: #3498db; }
.stat-card.enabled { border-top-color: #27ae60; }
.stat-card.disabled { border-top-color: #e74c3c; }
.stat-card.active { border-top-color: #27ae60; }
.stat-card.expired { border-top-color: #e74c3c; }
.stat-card.no-config { border-top-color: #f39c12; }
.stat-card.admins { border-top-color: #9b59b6; }

.stat-number {
    font-size: 32px;
    font-weight: bold;
    margin: 10px 0;
    color: #2c3e50;
}

.stat-card div:last-child {
    font-size: 14px;
    color: #6c757d;
    font-weight: 600;
}

/* Sistema de búsqueda y filtrado */
.search-filters {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
    color: #2c3e50;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: #fff;
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 700;
    color: #2c3e50;
    font-size: 14px;
}

.filter-select {
    padding: 10px 14px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    transition: border-color 0.3s ease;
    color: #2c3e50;
}

.filter-select:focus {
    outline: none;
    border-color: #3498db;
}

.filter-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: flex-end;
}

.quick-filters {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.quick-filter-btn {
    padding: 8px 16px;
    border: 2px solid #e9ecef;
    background: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
}

.quick-filter-btn:hover {
    background: #f8f9fa;
    border-color: #3498db;
}

.quick-filter-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.results-info {
    background: #e9f7fe;
    padding: 14px 20px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 14px;
    border-left: 5px solid #3498db;
    color: #2c3e50;
}

.no-results {
    text-align: center;
    padding: 50px;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 25px 0;
}

.no-results h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

/* Columnas */
.column-controls {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 20px;
    border-radius: 12px;
    margin: 25px 0;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.column-controls label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.column-controls input[type="checkbox"] {
    margin: 0;
}

/* Operaciones masivas */
.batch-controls {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 20px;
    border-radius: 12px;
    margin: 25px 0;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.batch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.batch-header h3 {
    margin: 0;
    color: #2c3e50;
    font-weight: 700;
}

.batch-actions {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.batch-selection-info {
    margin-bottom: 20px;
    padding: 15px;
    background: #e9f7fe;
    border-radius: 8px;
    font-weight: 700;
    color: #2c3e50;
    border-left: 5px solid #3498db;
}

.batch-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.batch-buttons button {
    flex: 1;
    min-width: 220px;
}

.column-select {
    width: 50px;
    text-align: center;
}

.column-select input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Automatización */
.automation-panel {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.automation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.automation-header h3 {
    margin: 0;
    color: #2c3e50;
    font-weight: 700;
}

.automation-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.status-item:hover {
    transform: translateY(-3px);
}

.status-icon {
    font-size: 28px;
    width: 50px;
    text-align: center;
}

.status-info {
    flex: 1;
}

.status-info strong {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 16px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    border: 2px solid transparent;
}

.status-badge.active {
    background: #6c757d;
    color: green;
    border-color: #5a6268;
}

.status-badge.inactive {
    background: #6c757d;
    color: white;
    border-color: #5a6268;
}

.automation-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.automation-actions button {
    flex: 1;
    min-width: 220px;
}

.automation-info {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid #3498db;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.automation-info p {
    margin: 8px 0;
    color: #2c3e50;
    font-weight: 500;
}

/* Logs del sistema */
.logs-container {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.log-entry {
    display: flex;
    gap: 15px;
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    align-items: center;
    background: white;
    margin-bottom: 8px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.log-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.log-time {
    color: #6c757d;
    min-width: 180px;
    font-size: 12px;
    font-weight: 600;
}

.log-level {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    min-width: 70px;
    text-align: center;
}

.log-level.info {
    background: #e9f7fe;
    color: #3498db;
    border: 1px solid #3498db;
}

.log-level.success {
    background: #f2fbf2;
    color: #27ae60;
    border: 1px solid #27ae60;
}

.log-level.warning {
    background: #fff4ce;
    color: #f39c12;
    border: 1px solid #f39c12;
}

.log-level.error {
    background: #fdf2f2;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.log-message {
    flex: 1;
    color: #2c3e50;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }

    .filter-controls {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .column-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .search-box {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }

    .automation-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .automation-status {
        grid-template-columns: 1fr;
    }

    .automation-actions {
        flex-direction: column;
    }

    .automation-actions button {
        min-width: auto;
    }

    .batch-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .batch-buttons {
        flex-direction: column;
    }

    .batch-buttons button {
        min-width: auto;
    }

    .log-entry {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .log-time {
        min-width: auto;
    }
}

/* Estadísticas compactas */
.stats-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.stat-card-compact {
    background: white;
    padding: 15px 10px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    border-top: 4px solid #3498db;
    transition: transform 0.2s ease;
}

.stat-card-compact:hover {
    transform: translateY(-2px);
}

.stat-card-compact.total { border-top-color: #3498db; }
.stat-card-compact.enabled { border-top-color: #27ae60; }
.stat-card-compact.disabled { border-top-color: #e74c3c; }
.stat-card-compact.active { border-top-color: #27ae60; }
.stat-card-compact.expired { border-top-color: #e74c3c; }
.stat-card-compact.no-config { border-top-color: #f39c12; }
.stat-card-compact.admins { border-top-color: #9b59b6; }

.stat-number-compact {
    font-size: 24px;
    font-weight: bold;
    margin: 5px 0;
    color: #2c3e50;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Botón de Modo Selección Masiva - VERDE ACTIVO */
#batchModeToggle {
    color: #ffffff; /* ← TEXTO BLANCO */
    font-weight: 600;
    border: 2px solid #6c757d;
    background: #5e636e;
}

#batchModeToggle.active {
    color: #495057; /* ← TEXTO GRIS OSCURO */
    background: linear-gradient(135deg, #28a745, #20c997); /* ← VERDE */
    border-color: #20c997;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

#batchModeToggle:hover:not(.active) {
    color: #343a40; /* ← GRIS MÁS OSCURO al hover */
    border-color: #495057;
    background: #f8f9fa;
    transform: translateY(-1px);
}

/*--lt-color-gray-500: #8f96a3;
  --lt-color-gray-600: #5e636e;
  --lt-color-gray-700: #2f3237;*/
