/* Admin Panel Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Custom button styles */
.btn-group .btn + .btn {
    margin-left: 0;
}

.d-flex.gap-2 > * + * {
    margin-left: 0.5rem;
}

/* Status badges */
.badge.status-active {
    background-color: #28a745;
}

.badge.status-completed {
    background-color: #6c757d;
}

.badge.status-auto_closed {
    background-color: #ffc107;
    color: #212529;
}

/* Action buttons styling */
.btn-group .btn {
    border-radius: 0.25rem;
}

.btn-group .btn:not(:last-child) {
    margin-right: 2px;
}

/* Alert styles for notifications */
.alert-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.alert-primary {
    color: #004085;
    background-color: #cce7ff;
    border-color: #b3d9ff;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
}

.sidebar .nav {
    flex: 1;
    overflow-y: auto;
}

.sidebar .nav-link {
    color: #333;
    padding: 12px 20px;
    border-radius: 0;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    background-color: #e9ecef;
    color: #007bff;
}

.sidebar .nav-link.active {
    background-color: #007bff;
    color: white;
}

.sidebar .nav-link i {
    margin-right: 10px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #dee2e6;
    flex-shrink: 0;
}

main {
    padding-top: 20px;
}

.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 0.375rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.badge {
    font-size: 0.75em;
}

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

/* Dashboard Cards */
.bg-primary {
    background-color: #007bff !important;
}

.bg-success {
    background-color: #28a745 !important;
}

.bg-info {
    background-color: #17a2b8 !important;
}

.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

/* Modal Styles */
.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

/* Form Styles */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Status Badges */
.status-active {
    background-color: #28a745;
}

.status-inactive {
    background-color: #6c757d;
}

.status-pending {
    background-color: #ffc107;
    color: #212529;
}

.status-completed {
    background-color: #28a745;
}

.status-auto-closed {
    background-color: #dc3545;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        position: relative;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .sidebar-header {
        flex: 1 0 100%;
    }
    
    .sidebar .nav {
        flex: 1;
        overflow-y: visible;
    }
    
    .sidebar-footer {
        flex: 1 0 100%;
        border-top: 1px solid #dee2e6;
        margin-top: 10px;
    }
    
    main {
        padding-top: 10px;
    }
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

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