/* ============================================================
   WarunKlik — Login Modern
   File: web/assets/css/login-modern.css
   ============================================================ */

.wk-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
    background: var(--wk-grad-hero);
    background-size: 200% 200%;
    animation: wk-bg-shift 15s ease infinite;
}

@keyframes wk-bg-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ---- Blob (background shape bergerak) ---- */
.wk-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.wk-blob-1 {
    width: 400px; height: 400px;
    background: #B06BFF;
    top: -100px; left: -100px;
    animation: wk-blob-float 20s ease-in-out infinite;
}

.wk-blob-2 {
    width: 350px; height: 350px;
    background: #FF6B9D;
    bottom: -80px; right: -80px;
    animation: wk-blob-float 25s ease-in-out infinite reverse;
}

.wk-blob-3 {
    width: 300px; height: 300px;
    background: #6666FF;
    top: 50%; right: 20%;
    animation: wk-blob-float 18s ease-in-out infinite;
}

@keyframes wk-blob-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(40px, -30px) scale(1.1); }
    66%      { transform: translate(-30px, 40px) scale(0.95); }
}

/* ---- Card (glassmorphism) ---- */
.wk-login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 40px 32px 32px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--wk-r-xl);
    box-shadow: var(--wk-shadow-xl);
    animation: wk-card-in 500ms var(--wk-ease-out) both;
}

@keyframes wk-card-in {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Logo ---- */
.wk-login-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
    animation: wk-fade-up 600ms var(--wk-ease-out) 100ms both;
}

.wk-login-logo-icon {
    width: 44px; height: 44px;
    background: var(--wk-grad-primary);
    border-radius: var(--wk-r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: var(--wk-fw-black);
    font-size: 20px;
    box-shadow: var(--wk-shadow-glow);
}

.wk-login-logo-text {
    font-size: var(--wk-fs-xl);
    font-weight: var(--wk-fw-black);
    color: var(--wk-text);
    letter-spacing: -0.02em;
}

.wk-login-logo-text .accent { color: var(--wk-primary); }

/* ---- Title ---- */
.wk-login-title {
    font-size: var(--wk-fs-2xl);
    font-weight: var(--wk-fw-black);
    text-align: center;
    margin: 0 0 6px;
    color: var(--wk-text);
    letter-spacing: -0.02em;
    animation: wk-fade-up 600ms var(--wk-ease-out) 150ms both;
}

.wk-login-subtitle {
    text-align: center;
    font-size: var(--wk-fs-sm);
    color: var(--wk-text-muted);
    margin: 0 0 32px;
    animation: wk-fade-up 600ms var(--wk-ease-out) 200ms both;
}

@keyframes wk-fade-up {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Floating Label Input ---- */
.wk-float-group {
    position: relative;
    margin-bottom: 20px;
    animation: wk-fade-up 600ms var(--wk-ease-out) 250ms both;
}

.wk-float-group:nth-of-type(2) { animation-delay: 300ms; }

.wk-float-input {
    width: 100%;
    padding: 20px 16px 8px;
    font-family: var(--wk-font);
    font-size: var(--wk-fs-md);
    font-weight: var(--wk-fw-medium);
    color: var(--wk-text);
    background: var(--wk-bg-elevated);
    border: 2px solid var(--wk-border);
    border-radius: var(--wk-r-md);
    outline: none;
    transition: border-color var(--wk-t-fast) var(--wk-ease),
                box-shadow var(--wk-t-fast) var(--wk-ease);
}

.wk-float-input:focus {
    border-color: var(--wk-primary);
    box-shadow: 0 0 0 4px var(--wk-primary-soft);
}

.wk-float-input.wk-error {
    border-color: var(--wk-danger);
    animation: wk-shake 400ms var(--wk-ease);
}

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

.wk-float-label {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    font-size: var(--wk-fs-md);
    color: var(--wk-text-soft);
    pointer-events: none;
    transition: all var(--wk-t-base) var(--wk-ease-out);
    background: transparent;
    padding: 0 4px;
}

.wk-float-input:focus + .wk-float-label,
.wk-float-input:not(:placeholder-shown) + .wk-float-label {
    top: 8px;
    transform: translateY(0) scale(0.85);
    transform-origin: left top;
    color: var(--wk-primary);
    font-weight: var(--wk-fw-semi);
    background: var(--wk-bg-elevated);
}

.wk-float-input:not(:focus):not(:placeholder-shown) + .wk-float-label {
    color: var(--wk-text-muted);
}

/* Password toggle */
.wk-float-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--wk-text-muted);
    border-radius: var(--wk-r-sm);
    transition: all var(--wk-t-fast) var(--wk-ease);
}

.wk-float-toggle:hover {
    color: var(--wk-primary);
    background: var(--wk-primary-soft);
}

.wk-float-toggle svg {
    width: 18px; height: 18px;
}

/* ---- Button ---- */
.wk-btn-login {
    position: relative;
    width: 100%;
    padding: 16px 20px;
    font-family: var(--wk-font);
    font-size: var(--wk-fs-md);
    font-weight: var(--wk-fw-bold);
    color: white;
    background: var(--wk-grad-primary);
    background-size: 200% 100%;
    border: none;
    border-radius: var(--wk-r-md);
    cursor: pointer;
    box-shadow: var(--wk-shadow-glow);
    overflow: hidden;
    transition: all var(--wk-t-base) var(--wk-ease);
    animation: wk-fade-up 600ms var(--wk-ease-out) 350ms both;
}

.wk-btn-login:hover {
    background-position: 100% 0;
    transform: translateY(-2px);
    box-shadow: 0 12px 40px var(--wk-primary-glow);
}

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

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

.wk-btn-login .wk-spinner {
    display: none;
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: wk-spin 600ms linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

.wk-btn-login.wk-loading .wk-spinner { display: inline-block; }
.wk-btn-login.wk-loading .wk-btn-text { opacity: 0.7; }

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

/* ---- Footer link ---- */
.wk-login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: var(--wk-fs-sm);
    color: var(--wk-text-muted);
    animation: wk-fade-up 600ms var(--wk-ease-out) 400ms both;
}

.wk-login-footer a {
    font-weight: var(--wk-fw-bold);
    color: var(--wk-primary);
}

.wk-login-footer a:hover {
    text-decoration: underline;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .wk-login-card { padding: 32px 24px 24px; }
    .wk-login-title { font-size: var(--wk-fs-xl); }
}