/* SorinFlow Divar Scraper - Dashboard Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    min-height: 100vh;
}

/* Navbar */
.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
}

.navbar-brand i {
    margin-left: 0.5rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    padding: 1rem;
}

.card-header i {
    margin-left: 0.5rem;
}

/* Stat Cards */
.card.bg-primary,
.card.bg-success,
.card.bg-info,
.card.bg-warning {
    transition: transform 0.2s;
}

.card.bg-primary:hover,
.card.bg-success:hover,
.card.bg-info:hover,
.card.bg-warning:hover {
    transform: translateY(-5px);
}

.card h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
}

.card h5 {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.table td {
    vertical-align: middle;
}

/* Health Items */
.health-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.health-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* Badges */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Forms */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Progress */
.progress {
    height: 20px;
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Status Badges */
.status-pending {
    background-color: var(--warning-color);
    color: var(--dark-color);
}

.status-running {
    background-color: var(--info-color);
    color: var(--dark-color);
}

.status-completed {
    background-color: var(--success-color);
}

.status-failed {
    background-color: var(--danger-color);
}

.status-cancelled {
    background-color: var(--secondary-color);
}

/* Property Card */
.property-detail {
    padding: 1rem;
}

.property-detail .images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 1rem;
}

.property-detail .images img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.property-detail .info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.property-detail .info-item {
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.property-detail .info-item label {
    font-size: 0.8rem;
    color: #6c757d;
    display: block;
}

.property-detail .info-item span {
    font-weight: 600;
}

/* Pagination */
.pagination {
    margin-top: 1rem;
}

.page-link {
    border-radius: 8px;
    margin: 0 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .card h2 {
        font-size: 1.8rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .property-detail .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Loading Spinner */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Toast customization */
.toast {
    min-width: 300px;
}

/* Section transitions */
.section-content {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Cookie status indicator */
#cookie-status i {
    font-size: 0.6rem;
    margin-left: 0.3rem;
}

/* RTL specific adjustments */
.me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

.gap-2 > * {
    margin-right: 0.5rem;
}

.gap-2 > *:last-child {
    margin-right: 0;
}
