/*
 * IBVTE Admin Panel Styles
 */

:root {
    --primary-color: #3b0b7c;
    --secondary-color: #6c4ab6;
    --accent-color: #ffd700;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

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

/* Sidebar */
.sidebar {
    position: fixed;
    top: 56px;          /* height of admin header */
    bottom: 0;
    left: 0;
    z-index: 100;
    overflow-y: auto;   /* ← KEY FIX: enables scrolling */
    overflow-x: hidden;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    padding: 0;         /* remove top padding - use margin on inner div */
    scrollbar-width: thin;
    scrollbar-color: rgba(59,11,124,0.3) transparent;
}

/* Thin scrollbar for webkit browsers */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(59,11,124,0.35); border-radius: 4px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(59,11,124,0.6); }

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 10px 20px;
    border-radius: 0;
    margin: 2px 0;
}

.sidebar .nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(59, 11, 124, 0.05);
}

.sidebar .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(59, 11, 124, 0.1);
    border-right: 3px solid var(--primary-color);
}

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

.sidebar-heading {
    font-size: .75rem;
    text-transform: uppercase;
}

/* Navbar */
.navbar-brand {
    padding-top: .75rem;
    padding-bottom: .75rem;
    font-size: 1rem;
    background-color: rgba(0, 0, 0, .25);
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25);
}

.navbar .navbar-toggler {
    top: .25rem;
    right: 1rem;
}

.navbar .form-control {
    padding: .75rem 1rem;
    border-width: 0;
    border-radius: 0;
}

.form-control-dark {
    color: #fff;
    background-color: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .1);
}

.form-control-dark:focus {
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}

/* Stat Cards */
.stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Cards */
.card {
    border-radius: 15px;
    border: none;
    transition: all 0.3s ease;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #eee;
    padding: 20px;
}

.card-header:first-child {
    border-radius: 15px 15px 0 0;
}

/* Tables */
.table {
    font-size: 14px;
}

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

.table td {
    vertical-align: middle;
}

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

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 8px 20px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 11, 124, 0.3);
}

.btn-rounded {
    border-radius: 25px;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 10px 15px;
}

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

.form-floating > .form-control {
    border-radius: 10px;
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 3px;
    border: none;
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Modals */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #eee;
}

.modal-footer {
    border-top: 1px solid #eee;
}

/* Utilities */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.shadow-soft {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05) !important;
}

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

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Dashboard specific */
.dashboard-stat {
    padding: 20px;
    border-radius: 15px;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.activity-item {
    padding: 15px;
    border-left: 3px solid var(--primary-color);
    background: #f8f9fa;
    margin-bottom: 10px;
    border-radius: 0 10px 10px 0;
}

/* Responsive */
@media (max-width: 767.98px) {
    .sidebar {
        top: 5rem;
    }
    
    .main-content {
        padding-top: 20px;
    }
}
