/* Custom Styles for SuperAdmin */

:root {
    --primary: #0d6efd;
    --success: #198754;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #0dcaf0;
    --sidebar-width: 250px;
}

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

/* Sidebar */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    width: var(--sidebar-width);
    padding: 20px 0;
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
}

.sidebar .nav-link {
    color: #333;
    font-size: 0.95rem;
    padding: 10px 20px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    margin: 5px 0;
}

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

.sidebar .nav-link.active {
    background-color: #e7f1ff;
    border-left-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

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

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

/* Navigation Bar */
.navbar {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.navbar-brand {
    font-size: 1.3rem;
    letter-spacing: 0.5px;
}

.navbar-brand i {
    margin-right: 8px;
}

/* Cards */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: none;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    padding: 1rem;
    border-radius: 8px 8px 0 0 !important;
}

.card-header i {
    margin-right: 8px;
    color: var(--primary);
}

/* Stat Cards */
.card.text-white {
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card.text-white:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
}

.card.text-white .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
}

.card.text-white .card-text {
    font-size: 2rem;
    margin: 10px 0 0 0;
}

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

.table thead.table-dark {
    background-color: #2c3e50;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

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

.table tbody td {
    vertical-align: middle;
    padding: 12px 8px;
}

/* Badges */
.badge {
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 20px;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
}

/* Forms */
.form-control,
.form-select {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    padding: 0.6rem 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

/* Modal */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-header .modal-title {
    font-weight: 600;
    color: #333;
}

.modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Toast */
#liveToast {
    border-radius: 8px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.toast-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

/* Charts */
canvas {
    max-height: 300px;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem;
}

.alert-info {
    background-color: #cfe2ff;
    color: #084298;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: absolute;
        width: 100%;
        margin-top: -56px;
        z-index: 1000;
    }

    main {
        margin-left: 0;
    }

    .table {
        font-size: 0.85rem;
    }

    .btn-sm {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
}

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

.page-content {
    animation: fadeIn 0.3s ease;
}

/* Utility Classes */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.shadow-sm-hover:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

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

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

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

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