:root {
    --bg-page: #f6f7fb;
    --bg-card: rgba(255, 255, 255, 0.92);
    --border: #e2e8f0;
    --accent: #0ea5a4;
    --accent-soft: #e6fffb;
    --accent-hover: #0f766e;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --danger-text: #b91c1c;
    --success-bg: #ecfdf3;
    --success-border: #bbf7d0;
    --success-text: #166534;
}

/* Reset ringan */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Layout umum */
body {
    margin: 0;
    min-height: 100vh;
    font-family: "Space Grotesk", "Sora", "Poppins", "Segoe UI", sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
}

/* Wrapper auth */
.auth-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1200px 600px at -10% -20%, #d1fae5 0%, rgba(209, 250, 229, 0) 60%),
        radial-gradient(900px 500px at 110% 10%, #cffafe 0%, rgba(207, 250, 254, 0) 55%),
        linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.auth-layout::before,
.auth-layout::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.45;
    pointer-events: none;
}
.auth-layout::before {
    left: -140px;
    bottom: -160px;
    background: radial-gradient(circle, #99f6e4 0%, rgba(153, 246, 228, 0) 70%);
}
.auth-layout::after {
    right: -160px;
    top: -140px;
    background: radial-gradient(circle, #fde68a 0%, rgba(253, 230, 138, 0) 70%);
}

/* Container utama login */
.login-shell {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

/* Card login */
.login-card {
    background-color: var(--bg-card);
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow:
        0 28px 60px rgba(15, 23, 42, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    padding: 26px 26px 22px;
    backdrop-filter: blur(8px);
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 20px;
}

.login-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 0;
    background: transparent;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: none;
}

.login-logo-wrap img {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
}

.login-logo-fallback {
    font-weight: 600;
    font-size: 1.3rem;
    color: #eff6ff;
}

.login-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    margin-bottom: 4px;
    color: var(--text-main);
}

.login-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Form */
.login-form {
    margin-top: 6px;
}

.form-group {
    margin-bottom: 14px;
}

label {
    display: block;
    font-size: 0.78rem;
    margin-bottom: 4px;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.02em;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background-color: #f8fafc;
    color: var(--text-main);
    padding: 0 10px;
    font-size: 0.95rem;
    outline: none;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease;
}

input::placeholder {
    color: #9ca3af;
}

input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(14, 165, 164, 0.15);
    background-color: #ffffff;
}

/* Password group dengan icon eye */
.password-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-group input[type="password"],
.password-group input[type="text"] {
    padding-right: 42px;
}

.password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    padding: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.password-toggle:hover {
    color: #6b7280;
}

.password-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Icon SVG eye */
.password-toggle svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

/* Eye default (show) */
.password-toggle .icon-eye {
    display: inline-block;
}

/* Eye off (hide) */
.password-toggle .icon-eye-off {
    display: none;
}

/* Saat visible: ganti icon */
.password-toggle.is-visible .icon-eye {
    display: none;
}

.password-toggle.is-visible .icon-eye-off {
    display: inline-block;
}

/* Row bawah (remember me + lupa password) */
.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    margin-bottom: 14px;
    gap: 8px;
    flex-wrap: wrap;
}

.remember-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}

.remember-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
}

.forgot-link {
    color: var(--accent);
    text-decoration: none;
    margin-left: auto;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Tombol login */
.login-btn {
    width: 100%;
    height: 44px;
    border-radius: 14px;
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 0.98rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #0ea5a4 0%, #22c55e 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease,
        background-color 0.12s ease;
    box-shadow:
        0 16px 30px rgba(14, 165, 164, 0.25);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: default;
    box-shadow: none;
}

.login-btn:not(:disabled):hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #0f766e 0%, #16a34a 100%);
    box-shadow:
        0 18px 36px rgba(14, 165, 164, 0.3);
}

/* Loader di dalam tombol */
.login-btn .loader {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid rgba(239, 246, 255, 0.7);
    border-top-color: #ffffff;
    animation: auth-spin 0.6s linear infinite;
}

/* Footer */
.login-footer {
    margin-top: 14px;
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Alert */
.alert {
    font-size: 0.8rem;
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.alert-error {
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid var(--danger-border);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

/* Animasi loader */
@keyframes auth-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile friendly */
@media (max-width: 480px) {
    .login-card {
        padding: 20px 18px 18px;
        border-radius: 14px;
    }

    .login-title {
        font-size: 1.15rem;
    }

    .login-shell {
        max-width: 100%;
    }
}
