/* ==========================================================
   Reserve V2 - Custom Styles
   ========================================================== */

/* --- Variables --- */
:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 0px;
    --navbar-height: 56px;
    --primary-color: #0d6efd;
    --sidebar-bg: #212529;
    --sidebar-text: #adb5bd;
    --sidebar-active: #ffffff;
    --sidebar-hover-bg: #343a40;
}

/* --- Layout --- */
.wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.content-wrapper {
    flex: 1;
}

.footer {
    font-size: 0.85rem;
}

/* --- Sidebar --- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    overflow-y: auto;
    z-index: 1040;
    transition: transform 0.3s ease;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-brand:hover {
    color: #fff;
}

.sidebar-brand i {
    font-size: 1.35rem;
}

.sidebar-toggle {
    color: var(--sidebar-text);
    padding: 0;
    font-size: 1.25rem;
}

.sidebar-section {
    padding: 0.5rem 0;
}

.sidebar-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.4);
    padding: 0.75rem 1.25rem 0.25rem;
    margin: 0;
}

.sidebar-nav .nav-link {
    color: var(--sidebar-text);
    padding: 0.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    border-radius: 0;
    transition: background-color 0.2s, color 0.2s;
}

.sidebar-nav .nav-link:hover {
    color: var(--sidebar-active);
    background-color: var(--sidebar-hover-bg);
}

.sidebar-nav .nav-link.active {
    color: var(--sidebar-active);
    background-color: var(--primary-color);
    font-weight: 600;
}

.sidebar-nav .nav-link i {
    font-size: 1.1rem;
    width: 1.25rem;
    text-align: center;
}

/* --- Sidebar Overlay (Mobile) --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1030;
}

/* --- Navbar --- */
.top-navbar {
    height: var(--navbar-height);
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
}

.top-navbar .navbar-toggler {
    border: none;
    font-size: 1.25rem;
    color: #495057;
}

/* --- Cards --- */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
}

.card-header {
    border-radius: 0.5rem 0.5rem 0 0 !important;
}

/* --- Tables --- */
.table th {
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
}

.table td {
    font-size: 0.875rem;
    vertical-align: middle;
}

/* --- Breadcrumb --- */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
}

/* --- Quick Action Cards (Dashboard) --- */
.quick-action-card {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.quick-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1);
}

/* --- Calendar Grid --- */
#monthCalendar td {
    padding: 0.4rem;
    min-width: 40px;
    height: 50px;
    vertical-align: top;
}

#monthCalendar td:hover {
    background-color: #e2e6ea !important;
}

/* --- Modal Enhancements --- */
.modal-content {
    border-radius: 0.75rem;
}

/* --- Badge Enhancements --- */
.badge {
    font-weight: 500;
}

/* --- Scrollbar (Webkit) --- */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

/* --- Print --- */
@media print {
    .sidebar,
    .top-navbar,
    .sidebar-overlay {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
    }
}

/* --- Responsive --- */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar-overlay.show {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }
}
