@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; }

body.login-body {
    margin: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    min-height: 100vh;
    overflow: hidden;
}

.login-split {
    display: flex;
    min-height: 100vh;
}

/* ─── Left panel ─── */
.login-left {
    flex: 1 1 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 60px;
}

.login-admin .login-left {
    background: linear-gradient(160deg, #071f18 0%, #0d3d2e 40%, #11866a 100%);
}

.login-branch .login-left {
    background: linear-gradient(160deg, #0d1525 0%, #142644 40%, #1d4ed8 100%);
}

.login-left .bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.login-left .bg-shapes span {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .035);
}

.login-left .bg-shapes span:nth-child(1) { width: 420px; height: 420px; top: -100px; right: -80px; }
.login-left .bg-shapes span:nth-child(2) { width: 280px; height: 280px; bottom: -60px; left: -60px; }
.login-left .bg-shapes span:nth-child(3) { width: 140px; height: 140px; top: 45%; right: 10%; background: rgba(255,255,255,.025); }

.login-left-inner {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

.login-left-inner .brand-logo {
    max-width: 200px;
    max-height: 60px;
    object-fit: contain;
    margin-bottom: 40px;
    filter: brightness(0) invert(1);
    opacity: .9;
}

.login-left-inner h1 {
    color: #fff;
    font-size: 42px;
    font-weight: 300;
    line-height: 1.25;
    margin: 0 0 16px;
    letter-spacing: -.5px;
}

.login-left-inner h1 strong {
    font-weight: 800;
    display: block;
}

.login-admin .login-left-inner h1 .accent {
    color: #34d399;
    font-weight: 700;
}

.login-branch .login-left-inner h1 .accent {
    color: #93c5fd;
    font-weight: 700;
}

.login-left-inner .tagline {
    color: rgba(255, 255, 255, .45);
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

/* ─── Right panel ─── */
.login-right {
    width: 100%;
    max-width: 520px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 56px;
    position: relative;
}

.login-right::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: linear-gradient(180deg, transparent, #e5e7eb, transparent);
}

.login-form-area {
    width: 100%;
    max-width: 380px;
}

/* Mobile logo */
.mobile-brand {
    display: none;
    text-align: center;
    margin-bottom: 28px;
}

.mobile-brand img {
    max-width: 150px;
    max-height: 48px;
    object-fit: contain;
}

/* ─── Role switcher ─── */
.role-switcher {
    display: flex;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 28px;
}

.role-switcher a,
.role-switcher .active-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    border-radius: 9px;
    text-decoration: none;
    transition: all .2s;
    cursor: pointer;
    border: none;
    position: relative;
}

.role-switcher a {
    color: #9ca3af;
    background: transparent;
}

.role-switcher a:hover {
    color: #6b7280;
    background: rgba(0, 0, 0, .02);
}

.role-switcher a i,
.role-switcher .active-tab i {
    font-size: 16px;
}

.login-admin .role-switcher .active-tab {
    background: #11866a;
    color: #fff;
    box-shadow: 0 2px 8px rgba(17, 134, 106, .3);
}

.login-branch .role-switcher .active-tab {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, .3);
}

/* ─── Form header ─── */
.form-head {
    margin-bottom: 24px;
}

.form-head h2 {
    font-size: 24px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 4px;
    letter-spacing: -.3px;
}

.form-head .sub {
    font-size: 14px;
    color: #9ca3af;
    margin: 0;
    line-height: 1.5;
}

/* ─── Form fields ─── */
.l-field {
    margin-bottom: 18px;
}

.l-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    text-transform: capitalize;
}

.l-input {
    width: 100%;
    height: 46px;
    padding: 0 15px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #111827;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
    transition: all .2s;
}

.l-input::placeholder { color: #9ca3af; }

.login-admin .l-input:focus {
    background: #fff;
    border-color: #11866a;
    box-shadow: 0 0 0 3px rgba(17, 134, 106, .08);
}

.login-branch .l-input:focus {
    background: #fff;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

.pw-wrap {
    position: relative;
}

.pw-wrap .l-input { padding-right: 46px; }

.pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #9ca3af;
    font-size: 18px;
    display: flex;
    transition: color .2s;
}

.pw-toggle:hover { color: #374151; }

.remember-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.remember-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    cursor: pointer;
}

.login-admin .remember-row input[type="checkbox"] { accent-color: #11866a; }
.login-branch .remember-row input[type="checkbox"] { accent-color: #2563eb; }

.remember-row label {
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    margin: 0;
    user-select: none;
}

/* ─── Captcha ─── */
.captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

.captcha-row .l-input { flex: 1; }

.captcha-box {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
    height: 46px;
    flex-shrink: 0;
}

.captcha-box img {
    height: 34px;
    border-radius: 6px;
}

.captcha-box .captcha-refresh {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 17px;
    padding: 4px;
    border-radius: 6px;
    transition: all .2s;
    display: flex;
}

.captcha-box .captcha-refresh:hover {
    background: rgba(0, 0, 0, .04);
    color: #111;
}

/* ─── Submit button ─── */
.login-submit {
    width: 100%;
    height: 46px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
    letter-spacing: .2px;
}

.login-admin .login-submit {
    background: #11866a;
    box-shadow: 0 1px 3px rgba(17, 134, 106, .25);
}

.login-admin .login-submit:hover {
    background: #0d6b52;
    box-shadow: 0 4px 14px rgba(17, 134, 106, .3);
    transform: translateY(-1px);
}

.login-branch .login-submit {
    background: #2563eb;
    box-shadow: 0 1px 3px rgba(37, 99, 235, .25);
}

.login-branch .login-submit:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 14px rgba(37, 99, 235, .3);
    transform: translateY(-1px);
}

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

/* ─── Demo credentials ─── */
.demo-cred {
    margin-top: 20px;
    padding: 14px 16px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.demo-cred .cred-text {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.7;
}

.demo-cred .cred-text strong { color: #111827; }

.demo-cred .cred-copy {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    flex-shrink: 0;
    transition: all .15s;
}

.login-admin .demo-cred .cred-copy { background: #11866a; }
.login-admin .demo-cred .cred-copy:hover { background: #0d6b52; }
.login-branch .demo-cred .cred-copy { background: #2563eb; }
.login-branch .demo-cred .cred-copy:hover { background: #1d4ed8; }

/* ─── Responsive ─── */
@media (max-width: 1300px) {
    .login-right { max-width: 480px; padding: 40px; }
    .login-left-inner h1 { font-size: 36px; }
    .form-head h2 { font-size: 24px; }
    .form-head { margin-bottom: 24px; }
}

@media (max-width: 991px) {
    .login-left { display: none; }
    .login-right {
        max-width: 100%;
        padding: 40px;
    }
    .login-right::before { display: none; }
    .login-form-area { max-width: 420px; margin: 0 auto; }
    .mobile-brand { display: block; }

    .login-admin .login-right {
        background: linear-gradient(180deg, #f0fdf4 0%, #fff 25%);
    }
    .login-branch .login-right {
        background: linear-gradient(180deg, #eff6ff 0%, #fff 25%);
    }
}

@media (max-width: 480px) {
    .login-right { padding: 24px 20px; }
    .form-head h2 { font-size: 22px; }
    .form-head .sub { font-size: 13px; }
}
