/* Variables */
:root {
    --primary-color: #366092;
    --success-color: #4CAF50;
    --warning-color: #FFC107;
    --danger-color: #DC3545;
    --info-color: #17A2B8;
    --dark-color: #343A40;
    --light-bg: #f5f5f5;
}

/* General */
body {
    background-color: var(--light-bg);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
}

/* Upload Zone */
.upload-zone {
    border: 3px dashed #ccc;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    background-color: #fafafa;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background-color: #f0f8ff;
}

.upload-zone.dragover {
    border-color: var(--success-color);
    background-color: #e8f5e9;
}

/* Status Items */
.status-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.status-item:last-child {
    border-bottom: none;
}

.status-item i {
    font-size: 1.2em;
    margin-right: 10px;
    width: 25px;
}

.status-item span:nth-child(2) {
    flex: 1;
    font-weight: 500;
}

/* Stat Items */
.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: 500;
    color: #666;
}

.stat-value {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--primary-color);
}

/* Progress Bar */
.progress {
    height: 25px;
    border-radius: 10px;
}

.progress-bar {
    font-weight: bold;
    font-size: 0.9em;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1.1em;
}

/* Table */
.table {
    background-color: white;
}

.table thead {
    background-color: var(--primary-color);
    color: white;
}

.table-hover tbody tr:hover {
    background-color: #f0f8ff;
}

/* Badges */
.badge {
    padding: 6px 12px;
    font-weight: 500;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
}

.alert i {
    margin-right: 8px;
}

/* Toast */
.toast {
    min-width: 300px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .container-fluid {
        padding: 10px;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    .upload-zone {
        padding: 20px;
    }
    
    .btn-lg {
        font-size: 1em;
        padding: 10px 20px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2a4d73;
}

/* Form Controls */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(54, 96, 146, 0.25);
}

/* Disabled State */
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Success State */
.success-border {
    border: 2px solid var(--success-color) !important;
}

/* Error State */
.error-border {
    border: 2px solid var(--danger-color) !important;
}

/* Resultados de búsqueda */
#search-results {
    animation: slideDown 0.3s ease-out;
}

#search-results .card {
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#search-results .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

#search-results .card-header h6 {
    font-size: 0.95rem;
    color: #495057;
}

#search-results .alert {
    font-size: 0.9rem;
    border-left: 4px solid;
}

#search-results .alert-success {
    border-left-color: var(--success-color);
    background-color: #d4edda;
}

#search-results .alert-warning {
    border-left-color: var(--warning-color);
    background-color: #fff3cd;
}

#search-results .alert-danger {
    border-left-color: var(--danger-color);
    background-color: #f8d7da;
}

#search-results .alert:last-child {
    margin-bottom: 0;
}

#search-results .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    font-weight: 600;
}

#search-results small {
    display: block;
    line-height: 1.6;
}

#search-results .bg-light {
    background-color: #f8f9fa !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
}

/* Mejoras para el campo de búsqueda */
#tmx-search-term {
    border: 2px solid #ced4da;
    transition: all 0.3s;
}

#tmx-search-term:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(54, 96, 146, 0.15);
}

#tmx-search-term::placeholder {
    color: #adb5bd;
    font-style: italic;
}
