body {
    background: #f5f6fa;
    min-height: 100vh;
}

.app-shell {
    min-height: 100vh;
    align-items: stretch;
}

.app-shell.has-sidebar {
    align-items: flex-start;
}

.app-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-main {
    flex: 1 0 auto;
}

.auth-shell {
    background: linear-gradient(135deg, #eef2ff, #f8fafc);
}

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrapper {
    width: 100%;
}

.brand-panel {
    padding: 2rem;
}

.brand-logo {
    max-width: 180px;
    max-height: 120px;
    object-fit: contain;
}

.app-sidebar {
    width: 195px;
    flex: 0 0 195px;
    height: 100vh;
    align-self: flex-start;
    position: sticky;
    top: 0;
    color: #fff;
    background: linear-gradient(180deg, #141E30 0%, #243B55 50%, #1f2937 100%);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.bg-gradient {
    background: transparent;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.6rem;
    margin-bottom: 0.25rem;
    border-radius: 0.55rem;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 0.86rem;
    transition: background 0.25s ease, box-shadow 0.2s;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.25);
    color: #fff;
}

.sidebar-section {
    margin-bottom: 1.25rem;
}

.sidebar-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.35rem;
}

.sidebar-section-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
}

.sidebar-list {
    margin: 0;
    padding: 0;
}

.sidebar-list li + li {
    margin-top: 0.15rem;
}

.sidebar-scroll {
    max-height: calc(100vh - 210px);
    overflow-y: auto;
    padding-bottom: 0.5rem;
}

@media (max-width: 991.98px) {
    .sidebar-scroll {
        max-height: none;
    }
}

.sidebar-icon {
    font-size: 1.1rem;
    width: 1.25rem;
    text-align: center;
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-logo img,
.sidebar-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.sidebar-logo.placeholder-logo {
    font-weight: 700;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.logo-preview {
    max-height: 140px;
    width: auto;
    object-fit: contain;
}

.sidebar-section small {
    letter-spacing: 0.08em;
    font-size: 0.65rem;
}

.sidebar-user {
    line-height: 1.2;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
    z-index: 900;
    display: none;
    pointer-events: none;
}

.mobile-menu-trigger {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1200;
    display: none;
}

body.sidebar-locked {
    overflow: hidden;
}

.app-content {
    background: #f7f9fc;
}

.card {
    border: none;
}

.summary-card {
    min-height: 140px;
}

.employee-table-card .card-header {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #fff;
    border-bottom: none;
}

.employee-table-card .card-header small {
    color: rgba(255, 255, 255, 0.85);
}

.table-modern thead th {
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #475569;
}

.table-modern tbody td {
    border-bottom: 1px solid #f1f5f9;
}

.table-modern th:first-child,
.table-modern td:first-child {
    min-width: 240px;
}

.table-modern tbody tr:hover {
    background: #f8fafc;
}

.table-modern .btn-group .btn {
    min-width: 60px;
}

@media (max-width: 991.98px) {
    .app-shell.has-sidebar {
        flex-direction: column;
    }

    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 240px;
        max-width: 80%;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1050;
        box-shadow: 0 15px 35px rgba(15, 23, 42, 0.45);
    }

    #appShell.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        display: block;
    }

    #appShell.sidebar-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .app-shell.has-sidebar .app-main {
        padding-top: 3.5rem !important;
    }

    .sidebar-link {
        padding: 0.42rem 0.6rem;
    }

    .brand-panel {
        text-align: center;
    }
    .mobile-menu-trigger {
        display: block;
    }
}

