/* Custom modern UI enhancements */
body.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 10%, rgba(63, 255, 139, 0.16), transparent 40%),
        radial-gradient(circle at 80% 0%, rgba(124, 58, 237, 0.22), transparent 36%),
        radial-gradient(circle at 50% 100%, rgba(13, 110, 253, 0.2), transparent 44%),
        linear-gradient(180deg, #04101a 0%, #03131f 55%, #020a11 100%) !important;
}

html,
body.login-page {
    height: 100%;
}

body.login-page .container-fluid {
    min-height: 100vh;
    padding: 0 !important;
    margin: 0;
    background:
        radial-gradient(circle at 20% 10%, rgba(63, 255, 139, 0.16), transparent 40%),
        radial-gradient(circle at 80% 0%, rgba(124, 58, 237, 0.22), transparent 36%),
        radial-gradient(circle at 50% 100%, rgba(13, 110, 253, 0.2), transparent 44%),
        linear-gradient(180deg, #04101a 0%, #03131f 55%, #020a11 100%) !important;
}

body.login-page .login-shell {
    width: 100%;
    min-height: 100vh;
    padding: 2rem 1rem;
}

body.login-page .login-legal-links {
    width: min(720px, calc(100% - 1.5rem));
    margin: 0 auto 1rem;
}

body.login-page .login-legal-links__items {
    justify-content: center;
}

@media (max-width: 767.98px) {
    body.login-page .login-shell {
        min-height: auto;
        padding: 1rem 0.75rem;
    }

    body.login-page .login-legal-links {
        width: calc(100% - 1rem);
        margin: 0 auto 0.75rem;
    }

    body.login-page .login-legal-links__items {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }
}

.login-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 1.75rem;
    border: 1px solid rgba(226, 232, 240, 0.75);
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.12);
    padding: 2rem;
}

.login-card .form-label {
    color: #475569;
}

.login-card .form-control {
    border-radius: 1rem;
    border: 1px solid #dbeafe;
    background: #f8fbff;
    padding: 1rem 1.1rem;
}

.login-card .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.12);
}

.login-card .btn-primary {
    border-radius: 1rem;
    border: none;
    background: linear-gradient(135deg, #0d6efd 0%, #4338ca 100%);
    box-shadow: 0 16px 30px rgba(13, 110, 253, 0.2);
    padding: 0.95rem 1.25rem;
}

.login-card .btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3730a3 100%);
}

.login-logo-container {
    width: 108px;
    height: 108px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd 0%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 24px 52px rgba(15, 23, 42, 0.16);
}

.login-logo-container img {
    max-width: 55%;
}

.login-caption {
    color: #64748b;
}

body.login-page .alert {
    border-radius: 1rem;
    border: 1px solid rgba(248, 113, 113, 0.18);
    background: #fff1f2;
}

body:not(.login-page) .wrapper {
    min-height: 100vh;
    background: #f4f7fb;
}

.page-wrapper .page-content {
    padding: 2rem 1.5rem 3rem;
}

.page-wrapper .card {
    border: none !important;
    border-radius: 1.4rem;
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.98);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-wrapper .card:hover {
    transform: translateY(-2px);
}

.card-header {
    border-bottom: none;
    background: transparent;
    padding-bottom: 0;
}

.card-body {
    padding: 1.75rem;
}

.dashboard-kpi-card {
    background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
}

.dashboard-kpi-card .icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.1);
}

.dashboard-kpi-card .fw-bold.fs-6 {
    font-size: 1.35rem;
}

.topbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.topbar .navbar {
    padding: 0.95rem 1.25rem;
}

.user-box .user-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #0f172a;
}

.sidebar-wrapper {
    background: #0f172a;
}

.sidebar-wrapper .sidebar-header {
    padding: 1.15rem 1.25rem;
}

.sidebar-wrapper .logo-text {
    color: #f8fafc;
    letter-spacing: 0.08em;
    font-size: 1rem;
    font-weight: 700;
}

.sidebar-wrapper .metismenu > li > a {
    color: #cbd5e1;
    border-radius: 0.95rem;
    padding: 0.85rem 1rem;
    margin: 0.25rem 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-wrapper .metismenu > li > a:hover,
.sidebar-wrapper .metismenu > li > a.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-wrapper .parent-icon {
    width: 38px;
    height: 38px;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-wrapper .menu-title {
    font-size: 0.95rem;
}

.table thead th {
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

.table-striped>tbody>tr:nth-of-type(odd) {
    background-color: #f8fafc;
}

.table-responsive {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-radius: 1rem;
}

.theme-switcher .form-check {
    font-size: 0.9rem;
}

.theme-switcher .form-check-input {
    width: 2.4rem;
    height: 1.3rem;
    margin-top: 0.15rem;
}

.theme-switcher .form-check-label {
    color: #64748b;
    margin-left: 0.5rem;
}

html.dark-theme .theme-switcher .form-check-label,
html.semi-dark .theme-switcher .form-check-label {
    color: #e2e8f0;
}
