
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --background-color: #f8fafc;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    color: var(--secondary-color);
    background:
        radial-gradient(
            circle at top left,
            rgba(37, 99, 235, 0.16),
            transparent 32%
        ),
        radial-gradient(
            circle at bottom right,
            rgba(14, 165, 233, 0.14),
            transparent 30%
        ),
        var(--background-color);
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-container {
    width: 100%;
    max-width: 1050px;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.12),
        0 8px 20px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(12px);
}

.branding-panel {
    position: relative;
    min-height: 680px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 56px;
    color: #ffffff;
    overflow: hidden;
    background:
        linear-gradient(
            145deg,
            rgba(15, 23, 42, 0.98),
            rgba(30, 64, 175, 0.94)
        );
}

.branding-panel::before,
.branding-panel::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.branding-panel::before {
    width: 280px;
    height: 280px;
    top: -100px;
    right: -100px;
}

.branding-panel::after {
    width: 220px;
    height: 220px;
    bottom: -90px;
    left: -80px;
}

.brand-content,
.brand-footer {
    position: relative;
    z-index: 1;
}

.brand-logo {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    font-size: 27px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.brand-title {
    margin-bottom: 18px;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 750;
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.brand-description {
    max-width: 460px;
    margin-bottom: 0;
    font-size: 1rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.78);
}

.feature-list {
    display: grid;
    gap: 16px;
    margin-top: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.feature-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.brand-footer {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.58);
}

.form-panel {
    min-height: 620px;
    display: flex;
    align-items: center;
    padding: 56px;
    background: rgba(255, 255, 255, 0.96);
}

.form-content {
    width: 100%;
    max-width: 390px;
    margin: 0 auto;
}

.mobile-logo {
    width: 52px;
    height: 52px;
    display: none;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    border-radius: 15px;
    font-size: 25px;
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            var(--primary-color),
            var(--primary-dark)
        );
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.25);
}

.form-title {
    margin-bottom: 8px;
    font-size: 2rem;
    font-weight: 750;
    letter-spacing: -0.035em;
}

.form-subtitle {
    margin-bottom: 32px;
    color: var(--text-muted);
    line-height: 1.6;
}

.form-label {
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
}

.input-group-modern {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 4;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.form-control-modern {
    height: 52px;
    padding: 12px 48px 12px 46px;
    border: 1px solid var(--border-color);
    border-radius: 13px;
    font-size: 0.95rem;
    color: var(--secondary-color);
    background: #ffffff;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.form-control-modern:hover {
    border-color: #cbd5e1;
}

.form-control-modern:focus {
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.11);
}

.form-control-modern::placeholder {
    color: #a3afc0;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    z-index: 5;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 9px;
    color: #64748b;
    background: transparent;
    transform: translateY(-50%);
    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.password-toggle:hover {
    color: var(--primary-color);
    background: #eff6ff;
}

.btn-login {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 13px;
    font-weight: 650;
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            var(--primary-color),
            var(--primary-dark)
        );
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.23);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.btn-login:hover {
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.75;
    transform: none;
    cursor: not-allowed;
}

.alert-modern {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px 16px;
    border: 1px solid #fecaca;
    border-radius: 13px;
    font-size: 0.9rem;
    color: #991b1b;
    background: #fef2f2;
}

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 24px;
    font-size: 0.82rem;
    color: #94a3b8;
}

@media (max-width: 991.98px) {
    .login-container {
        max-width: 520px;
    }

    .branding-panel {
        display: none;
    }

    .form-panel {
        min-height: auto;
        padding: 48px 40px;
    }

    .mobile-logo {
        display: inline-flex;
    }
}

@media (max-width: 575.98px) {
    .login-wrapper {
        padding: 16px;
    }

    .login-container {
        border-radius: 20px;
    }

    .form-panel {
        padding: 38px 24px;
    }

    .form-title {
        font-size: 1.75rem;
    }
}


/* SIDEBAR MENU */
.main-sidebar .brand-link {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .main-sidebar .brand-icon-wrapper {
        align-items: center;
        background: rgba(255, 255, 255, 0.12);
        border-radius: 8px;
        display: inline-flex;
        height: 36px;
        justify-content: center;
        margin-right: 8px;
        width: 36px;
    }

    .main-sidebar .brand-text {
        font-size: 1.05rem;
        font-weight: 600 !important;
        letter-spacing: 0.4px;
    }

    .sidebar-user-icon {
        align-items: center;
        background: rgba(255, 255, 255, 0.12);
        border-radius: 50%;
        color: #ffffff;
        display: flex;
        justify-content: center;
        transition: all 0.25s ease;
        font-size: 28px;
        width: 52px;
        height: 52px;
    }

    .sidebar-user-name {
        color: #ffffff;
        display: block;
        font-size: 0.92rem;
        font-weight: 600;
        line-height: 1.2;
    }

    .sidebar-user-role {
        color: rgba(255, 255, 255, 0.55);
        display: block;
        font-size: 0.75rem;
        margin-top: 3px;
    }

    .nav-sidebar .nav-header {
        font-size: 0.68rem;
        font-weight: 600;
        letter-spacing: 1px;
        margin-top: 8px;
        padding-bottom: 6px;
        text-transform: uppercase;
    }

    .nav-sidebar > .nav-item > .nav-link {
        border-radius: 7px;
        margin-bottom: 3px;
        transition:
            background-color 0.2s ease,
            box-shadow 0.2s ease,
            transform 0.2s ease;
    }

    .nav-sidebar > .nav-item > .nav-link:hover {
        transform: translateX(2px);
    }

    .nav-sidebar > .nav-item > .nav-link.active {
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
        font-weight: 500;
    }

    .nav-sidebar .nav-icon {
        font-size: 0.95rem !important;
    }

    .notification-badge {
        min-width: 22px;
        padding: 4px 6px;
    }

    /* Saiz brand ketika sidebar terbuka */
    .brand-link-vertical {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 14px 10px;
        text-align: center;
        text-decoration: none !important;

        background: #1f2d3d;
        color: #ffffff !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .brand-link-vertical:hover,
    .brand-link-vertical:focus,
    .brand-link-vertical:active {
        text-decoration: none !important;
        color: #ffffff;
    }

    .brand-link-vertical .brand-text {
        display: block;
        font-size: 18px;
        font-weight: 800;
        letter-spacing: 1.5px;
        line-height: 1.2;
        text-decoration: none !important;
        color: #ffffff;
    }

    .brand-link-vertical .brand-logo {
        font-size: 64px;
        width: 90px;
        height: 90px;
        margin-bottom: 5px;
        color: #3c8dbc;
    }

    .brand-link-vertical:hover .brand-logo {
        color: #66b5e3;
    }

    /* Sidebar dalam keadaan collapsed */
    .sidebar-collapse .brand-link-vertical {
        height: 57px;
        padding: 8px 0;
    }

    .sidebar-collapse .brand-link-vertical .brand-logo {
        font-size: 24px;
        width: 40px;
        height: 46px;
        border-radius: 6px;
        margin: 0;
    }

    .sidebar-collapse .brand-link-vertical .brand-text {
        display: none;
    }


    /* User Icon */
    /* Admin */
    .role-icon-admin {
        color: #73ffa2;
        font-size: 24px;
    }

    /* Manager */
    .role-icon-manager {
        color: #ffc107;
    }

    /* Staff */
    .role-icon-staff {
        color: #ffffff;
    }
    
    /* Bila sidebar collapse */
    .sidebar-collapse .sidebar-user-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
        margin: 0;
    }

    .sidebar-collapse .role-icon-admin {
        width: 40px;
        height: 40px;
        font-size: 17px;
        margin: 0;
    }

    .sidebar-collapse:not(.sidebar-open) .sidebar-user-icon {
        width: 36px;
        height: 36px;
        font-size: 18x;
    }

    .sidebar-collapse:not(.sidebar-open) .user-panel .image {
        width: 36px;
        height: 36px;
    }