/* =============================================
   Login Page Redesign - Navy Theme
   Dompet Kota - BKAD Pemerintah Kota Medan
   ============================================= */

* { box-sizing: border-box; }

body.login-body {
    margin: 0;
    padding: 0;
    font-family: 'Rubik', 'Roboto', sans-serif;
    background: #f0f4f8;
    overflow: hidden;
}

/* ---- WRAPPER ---- */
.login-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* =====================
   LEFT PANEL
   ===================== */
.login-left {
    flex: 1;
    background: linear-gradient(135deg, #0a1929 0%, #0f2044 40%, #1565c0 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 50px;
    position: relative;
    overflow: hidden;
}

/* Decorative circles */
.login-left::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    pointer-events: none;
}
.login-left::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -80px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    pointer-events: none;
}

.deco-circle-1 {
    position: absolute;
    top: 50%;
    left: -60px;
    transform: translateY(-50%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    pointer-events: none;
}
.deco-circle-2 {
    position: absolute;
    bottom: 60px;
    right: 40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.08);
    pointer-events: none;
}
.deco-circle-3 {
    position: absolute;
    top: 60px;
    left: 40px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.08);
    pointer-events: none;
}

/* Grid dots decoration */
.deco-dots {
    position: absolute;
    top: 30px;
    right: 30px;
    display: grid;
    grid-template-columns: repeat(5, 8px);
    gap: 8px;
    pointer-events: none;
    opacity: 0.12;
}
.deco-dots span {
    width: 5px;
    height: 5px;
    background: #fff;
    border-radius: 50%;
    display: block;
}

.left-brand {
    position: relative;
    z-index: 1;
    text-align: center;
    animation: fadeInUp 0.8s ease both;
}

.left-brand img.brand-logo {
    max-height: 90px;
    margin-bottom: 40px;
    opacity: 1;
}

.left-brand .brand-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #42a5f5, #90caf9);
    margin: 0 auto 28px;
    border-radius: 2px;
}

.left-brand h1 {
    color: #ffffff;
    font-size: 2.1rem;
    font-weight: 700;
    margin: 0 0 12px;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.left-brand h1 span {
    color: #64b5f6;
}

.left-brand p {
    color: rgba(255,255,255,0.65);
    font-size: 0.97rem;
    line-height: 1.7;
    max-width: 340px;
    margin: 0 auto 36px;
}

.left-features {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 340px;
}

.left-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.left-features li:last-child { border-bottom: none; }

.left-features li .feat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

/* =====================
   RIGHT PANEL
   ===================== */
.login-right {
    width: 480px;
    min-width: 400px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 40px;
    position: relative;
    box-shadow: -8px 0 40px rgba(0,0,0,0.12);
}

.login-form-wrap {
    width: 100%;
    max-width: 380px;
    animation: fadeInRight 0.7s ease 0.1s both;
}

/* ---- Logo & Title ---- */
.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-header img.login-logo {
    max-height: 75px;
    margin-bottom: 24px;
}

.login-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f2044;
    margin: 0 0 8px;
}

.login-header p {
    color: #7b8da5;
    font-size: 0.92rem;
    margin: 0;
}

/* ---- Form ---- */
.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    font-size: 0.87rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 7px;
    letter-spacing: 0.1px;
}

.login-form .input-group-login {
    position: relative;
}

.login-form .input-group-login .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.login-form .input-group-login input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 42px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #1a202c;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.login-form .input-group-login input:focus {
    border-color: #1565c0;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
}

.login-form .input-group-login input:focus + .input-icon,
.login-form .input-group-login:focus-within .input-icon {
    color: #1565c0;
}

.login-form .input-group-login input::placeholder {
    color: #b0bec5;
}

/* Password toggle */
.btn-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #a0aec0;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 4px 6px;
    transition: color 0.2s;
    letter-spacing: 0.3px;
}
.btn-toggle-password:hover { color: #1565c0; }

/* ---- Error Area ---- */
#error-login {
    min-height: 0;
    transition: all 0.3s ease;
}

#error-login .alert {
    border-radius: 10px;
    font-size: 0.88rem;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

#error-login .alert-danger {
    background: #fef2f2;
    color: #b91c1c;
}

#error-login .alert-success {
    background: #f0fdf4;
    color: #15803d;
}

/* ---- Submit Button ---- */
.btn-login {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #0f2044 0%, #1565c0 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    box-shadow: 0 4px 15px rgba(21, 101, 192, 0.35);
}

.btn-login:hover:not(:disabled) {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(21, 101, 192, 0.45);
}

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

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none;
}
.btn-login.loading .spinner { display: block; }
.btn-login.loading .btn-text { opacity: 0.8; }

/* ---- Footer ---- */
.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #f0f4f8;
}

.login-footer p {
    font-size: 0.82rem;
    color: #9ca3af;
    margin: 0;
    line-height: 1.6;
}

.login-footer a {
    color: #1565c0;
    text-decoration: none;
    font-weight: 500;
}
.login-footer a:hover { text-decoration: underline; }

/* ---- Turnstile Widget ---- */
.turnstile-wrap {
    margin-bottom: 4px;
}

.turnstile-wrap .cf-turnstile {
    display: flex;
    justify-content: center;
}

.turnstile-note {
    font-size: 0.78rem;
    color: #9ca3af;
    text-align: center;
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* =====================
   ANIMATIONS
   ===================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shake {
    0%,100% { transform: translateX(0); }
    20%      { transform: translateX(-8px); }
    40%      { transform: translateX(8px); }
    60%      { transform: translateX(-5px); }
    80%      { transform: translateX(5px); }
}

.shake { animation: shake 0.45s ease; }

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 900px) {
    .login-left { display: none; }
    .login-right {
        width: 100%;
        min-width: unset;
        box-shadow: none;
    }
    .login-wrapper {
        background: linear-gradient(160deg, #0f2044 0%, #1565c0 100%);
        align-items: center;
        justify-content: center;
    }
    .login-right {
        background: #fff;
        border-radius: 20px;
        margin: 24px;
        padding: 40px 32px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.25);
        min-height: unset;
        height: auto;
    }
}

@media (max-width: 480px) {
    .login-right {
        margin: 16px;
        padding: 32px 24px;
        border-radius: 16px;
    }
    .login-header h2 { font-size: 1.4rem; }
    .btn-login { height: 48px; font-size: 0.95rem; }
}
