/* Base Styles */
:root {
    --primary-color: #0d6efd;
    --sidebar-width: 240px;
    --navbar-height: 56px;
    --transition-speed: 0.2s;
}

body {
    background-color: #f0f2f5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Login View */
#login-view {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#login-view .card {
    border-radius: 16px;
}

#login-view .form-control {
    border-radius: 8px;
    padding: 12px 16px;
}

#login-view .btn-primary {
    border-radius: 8px;
    padding: 12px;
    font-weight: 600;
    transition: all var(--transition-speed);
}

#login-view .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}

/* Sidebar */
#sidebar {
    position: fixed;
    top: var(--navbar-height);
    bottom: 0;
    left: 0;
    z-index: 100;
    width: var(--sidebar-width);
    padding: 0;
    overflow-y: auto;
    border-right: 1px solid #e9ecef;
}

#sidebar .nav-link {
    color: #495057;
    padding: 12px 20px;
    margin: 4px 12px;
    border-radius: 8px;
    transition: all var(--transition-speed);
    font-weight: 500;
}

#sidebar .nav-link:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

#sidebar .nav-link.active {
    background-color: #e7f1ff;
    color: var(--primary-color);
}

#sidebar .nav-link i {
    font-size: 1.1rem;
    width: 24px;
}

/* Main Content */
main {
    margin-left: var(--sidebar-width);
    min-height: calc(100vh - var(--navbar-height));
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all var(--transition-speed);
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.card-title {
    font-weight: 600;
    color: #495057;
}

/* Stats Cards */
.stats-card {
    border-left: 4px solid var(--primary-color);
}

.stats-card .stats-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stats-card .stats-value {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
}

.stats-card .stats-label {
    color: #6c757d;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tables */
.table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #6c757d;
    padding: 16px;
}

.table tbody td {
    padding: 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f2f5;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all var(--transition-speed);
}

.btn-primary {
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8125rem;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 10px 14px;
    transition: all var(--transition-speed);
}

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

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 6px;
}

/* Progress Bar */
.progress {
    border-radius: 8px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 8px;
}

/* Badges */
.badge {
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 500;
}

/* Service Health Cards */
.service-card {
    border-left: 4px solid transparent;
}

.service-card.border-success {
    border-left-color: #198754;
}

.service-card.border-danger {
    border-left-color: #dc3545;
}

.service-card.border-secondary {
    border-left-color: #6c757d;
}

/* Toast */
.toast {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive */
@media (max-width: 767.98px) {
    #sidebar {
        position: static;
        width: 100%;
        padding-top: 0;
    }

    main {
        margin-left: 0;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Session Timer */
#session-timer {
    font-size: 0.875rem;
}

/* Page Header */
.page-header {
    margin-bottom: 24px;
}

.page-header h2 {
    font-weight: 700;
    color: #212529;
    margin-bottom: 4px;
}

.page-header .breadcrumb {
    margin-bottom: 0;
    font-size: 0.875rem;
}

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

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

.empty-state p {
    font-size: 1.125rem;
}
