/* Global Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f7fa;
    color: var(--dark-color);
}

/* Header Styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 600;
}

/* Active Navigation Link */
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 500;
    position: relative;
}

.navbar-dark .navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0.5rem;
    right: 0.5rem;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 10px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.card-header {
    border-bottom: none;
    padding: 1rem 1.25rem;
    border-radius: 10px 10px 0 0 !important;
}

.card-body {
    padding: 1.25rem;
}

/* Form Controls */
.form-select, .form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.form-select:focus, .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-outline-success {
    border-color: var(--success-color);
    color: var(--success-color);
}

.btn-outline-success:hover {
    background-color: var(--success-color);
    color: white;
}

/* Table Styles */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.table td {
    vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Chart Containers */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Summary Cards */
#summaryCards .card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

#summaryCards .card-body {
    padding: 1.5rem;
}

#summaryCards .card-subtitle {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

#summaryCards .card-body div {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
}

/* Toast Notifications */
.toast {
    background-color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-header {
    border-bottom: none;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .col-lg-3 {
        margin-bottom: 1.5rem;
    }
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2rem;
    height: 2rem;
    margin: -1rem 0 0 -1rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Search Bar */
.input-group {
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.input-group .form-control {
    border-right: none;
}

.input-group .btn {
    border-left: none;
}

/* Ad Placeholder */
.ad-placeholder {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
}

/* Dashboard Specific Styles */
.summary-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}

.summary-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.summary-card p {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--primary-color);
}

/* File Upload Styles */
.file-upload-container {
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    background: white;
    transition: border-color 0.2s ease-in-out;
}

.file-upload-container:hover {
    border-color: var(--primary-color);
}

.file-upload-container.dragover {
    border-color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.05);
}

/* Table Styles */
.table-container {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow-x: auto;
}

/* Loading Spinner */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1050;
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 0.5rem;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
    border-radius: 0.5rem 0.5rem 0 0;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
    border-radius: 0 0 0.5rem 0.5rem;
}