:root {
    --sidebar-width: 260px;
    --primary-color: #2563eb;
    --body-bg: #f4f6f9;
    --card-border: #e5e7eb;
}

body {
    background: var(--body-bg);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: #1f2937;
}

.app-wrapper {
    min-height: 100vh;
}

.app-layout {
    display: flex;
    min-height: calc(100vh - 57px);
}

.app-sidebar {
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid var(--card-border);
    flex-shrink: 0;
}

.sidebar-inner {
    padding: 1rem 0.75rem;
    position: sticky;
    top: 57px;
    max-height: calc(100vh - 57px);
    overflow-y: auto;
}

.app-sidebar .nav-link {
    color: #374151;
    border-radius: 0.5rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.925rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.app-sidebar .nav-link:hover {
    background: #eff6ff;
    color: var(--primary-color);
}

.app-sidebar .nav-link.active {
    background: #dbeafe;
    color: var(--primary-color);
    font-weight: 600;
}

.app-sidebar .nav-link.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.sidebar-heading {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    padding-top: 0.75rem;
    padding-bottom: 0.25rem;
}

.app-content {
    flex: 1;
    padding: 1.5rem;
    min-width: 0;
}

.page-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.card {
    border: 1px solid var(--card-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--card-border);
}

.stat-card {
    border-left: 4px solid var(--primary-color);
}

.dashboard-stat {
    border: 1px solid var(--card-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.dashboard-stat .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

table.dataTable tbody td {
    vertical-align: middle;
}

table.dataTable tbody td.details-control {
    cursor: pointer;
}

.child-table-wrap {
    background: #f8fafc;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        top: 57px;
        left: 0;
        height: calc(100vh - 57px);
        z-index: 1040;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
    }

    .app-sidebar.show {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 57px 0 0 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 1035;
    }

    .sidebar-backdrop.show {
        display: block;
    }
}
