.auth-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    gap: 16px;
    position: relative;
    overflow: hidden;
    background-color: var(--bg);
    transition: background-color 0.3s ease;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
}

.bg-icons-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-icon {
    position: absolute;
    color: var(--primary);
    opacity: 0.14;
    display: block;
    animation: floatIcon 18s infinite ease-in-out;
}

@keyframes floatIcon {
    0%, 100% {
        transform: rotate(var(--rot, 0deg)) translate(0, 0);
    }
    25% {
        transform: rotate(var(--rot, 0deg)) translate(6px, -8px);
    }
    50% {
        transform: rotate(var(--rot, 0deg)) translate(-4px, -12px);
    }
    75% {
        transform: rotate(var(--rot, 0deg)) translate(-8px, -5px);
    }
}

.auth-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--card-shadow);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin: 0 auto 16px;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.25);
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    transition: color 0.3s ease;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    transition: color 0.3s ease;
}

.form-group input {
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--bg);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    color: var(--text);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.form-group input::placeholder {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.form-group input:focus {
    background: #E4E6E9;
}

.password-group {
    position: relative;
}

.password-group input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.password-toggle:hover {
    background: rgba(0,0,0,0.05);
    color: var(--primary);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.9);
}

.password-toggle .icon {
    width: 20px;
    height: 20px;
}

.remember-me-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
}

.remember-me-group input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.auth-download-card {
    width: 100%;
    max-width: 400px;
    margin: 0 0 16px 0;
    padding: 16px;
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    position: relative;
    z-index: 1;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-download-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-download-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(24, 119, 242, 0.25);
}

.auth-download-icon span {
    color: #fff;
    font-weight: 700;
    font-size: 20px;
    line-height: 1;
}

.auth-download-info {
    flex: 1;
    min-width: 0;
}

.auth-download-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 2px;
    transition: color 0.3s ease;
}

.auth-download-version {
    display: none;
}

.auth-download-btn {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    white-space: nowrap;
    background: var(--primary);
    color: #fff;
    border: none;
    min-height: 38px;
    transition: background-color 0.15s, transform 0.12s;
}

.auth-download-btn:hover {
    background: var(--primary-hover);
}

.auth-download-btn:active {
    transform: scale(0.94);
}

.auth-download-btn .icon {
    width: 18px;
    height: 18px;
}

.flash {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 14px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.flash-error {
    background: #FFEBEE;
    color: #C62828;
}

.flash-success {
    background: #E8F5E9;
    color: #2E7D32;
}

@media (prefers-color-scheme: dark) {
    .auth-body {
        background-color: #121212;
    }

    .bg-icon {
        opacity: 0.12;
        color: #4DABF7;
    }

    .auth-card,
    .auth-download-card {
        background: #1E1E1E;
        box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    }

    .auth-title {
        color: #E4E6E9;
    }

    .auth-subtitle,
    .form-group label,
    .remember-me-group {
        color: #B0B3B8;
    }

    .form-group input {
        background: #2A2A2A;
        color: #E4E6E9;
    }

    .form-group input::placeholder {
        color: #8A8D91;
    }

    .form-group input:focus {
        background: #333333;
    }

    .password-toggle {
        color: #B0B3B8;
    }

    .password-toggle:hover {
        background: rgba(255,255,255,0.08);
        color: #4DABF7;
    }

    .auth-download-title {
        color: #E4E6E9;
    }

    .flash-error {
        background: #3D1F1F;
        color: #FF6B6B;
    }

    .flash-success {
        background: #1F3D1F;
        color: #69DB7C;
    }
}

html.dark-mode .auth-body {
    background-color: #121212;
}

html.dark-mode .bg-icon {
    opacity: 0.12;
    color: #4DABF7;
}

html.dark-mode .auth-card,
html.dark-mode .auth-download-card {
    background: #1E1E1E;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

html.dark-mode .auth-title {
    color: #E4E6E9;
}

html.dark-mode .auth-subtitle,
html.dark-mode .form-group label,
html.dark-mode .remember-me-group {
    color: #B0B3B8;
}

html.dark-mode .form-group input {
    background: #2A2A2A;
    color: #E4E6E9;
}

html.dark-mode .form-group input::placeholder {
    color: #8A8D91;
}

html.dark-mode .form-group input:focus {
    background: #333333;
}

html.dark-mode .password-toggle {
    color: #B0B3B8;
}

html.dark-mode .password-toggle:hover {
    background: rgba(255,255,255,0.08);
    color: #4DABF7;
}

html.dark-mode .auth-download-title {
    color: #E4E6E9;
}

html.dark-mode .flash-error {
    background: #3D1F1F;
    color: #FF6B6B;
}

html.dark-mode .flash-success {
    background: #1F3D1F;
    color: #69DB7C;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 24px;
    }
}

/* ========== radius halaman Login identik card lain ========== */
.auth-card,
.auth-download-card {
    border-radius: 24px;
}

.auth-logo-icon,
.auth-download-icon {
    border-radius: 16px;
}

.form-group input,
.auth-form .btn,
.auth-download-btn,
.flash {
    border-radius: 16px;
}

/* ========== animasi tekan tombol Login ========== */
.auth-form .btn,
.auth-download-btn {
    transition: background-color 0.15s, transform 0.12s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-form .btn:active,
.auth-download-btn:active {
    transform: scale(0.94);
}