/* app/static/css/auth/login.css */
/* ============================================================
   KENDALI PUPR — LOGIN PAGE
   Background image terlihat jelas, card transparan, form terbaca
   ============================================================ */

body.auth-body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    background: #0a0e27;
}

/* ============================================================
   LAYER 0 — BACKGROUND IMAGE (50% transparan)
   ============================================================ */
.login-bg-image {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: url('/static/logo/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5;
    pointer-events: none;
}

/* ============================================================
   LAYER 1 — GRADIENT SANGAT TIPIS + PARTIKEL
   Opacity gradient 0.15 agar background utama sangat terlihat
   ============================================================ */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 15% 20%, rgba(0, 198, 255, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(255, 110, 196, 0.12) 0%, transparent 50%),
        linear-gradient(135deg,
            rgba(10, 14, 39, 0.15) 0%,
            rgba(20, 33, 85, 0.15) 40%,
            rgba(42, 27, 82, 0.15) 100%);
    overflow: hidden;
}

.login-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

/* Partikel float */
.bg-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.bg-particles span {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.8);
    animation: particleFloat 16s infinite ease-in-out;
}
.bg-particles span:nth-child(1)  { top: 12%; left: 8%;  animation-delay: 0s; }
.bg-particles span:nth-child(2)  { top: 22%; left: 78%; animation-delay: 1.5s; width: 4px; height: 4px; }
.bg-particles span:nth-child(3)  { top: 68%; left: 15%; animation-delay: 3s;   width: 8px; height: 8px; }
.bg-particles span:nth-child(4)  { top: 82%; left: 68%; animation-delay: 4.5s; }
.bg-particles span:nth-child(5)  { top: 45%; left: 88%; animation-delay: 6s;   width: 5px; height: 5px; }
.bg-particles span:nth-child(6)  { top: 55%; left: 25%; animation-delay: 7.5s; width: 7px; height: 7px; }
.bg-particles span:nth-child(7)  { top: 8%;  left: 50%; animation-delay: 9s;   width: 4px; height: 4px; }
.bg-particles span:nth-child(8)  { top: 90%; left: 45%; animation-delay: 10.5s; }
.bg-particles span:nth-child(9)  { top: 35%; left: 65%; animation-delay: 12s;  width: 5px; height: 5px; }
.bg-particles span:nth-child(10) { top: 75%; left: 90%; animation-delay: 13.5s; width: 3px; height: 3px; }

@keyframes particleFloat {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    25%      { transform: translate(25px, -35px) scale(1.4); opacity: 0.9; }
    50%      { transform: translate(-20px, 25px) scale(0.8); opacity: 0.5; }
    75%      { transform: translate(35px, 20px) scale(1.2); opacity: 0.7; }
}

/* ============================================================
   LAYER 2 — WRAPPER & CARD (LEBIH TRANSPARAN)
   ============================================================ */
.login-wrapper {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 60px;
}

.login-card-glass {
    position: relative;
    width: 100%;
    max-width: 460px;
    padding: 44px 40px 34px;
    border-radius: 24px;
    background: rgba(15, 20, 55, 0.25);        /* ← lebih transparan */
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 8px 24px rgba(106, 17, 203, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    animation: cardFadeIn 0.8s ease-out;
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-card-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 216, 111, 0.9), transparent);
    border-radius: 0 0 8px 8px;
}

/* ============================================================
   HEADER
   ============================================================ */
.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

/* ============================================================
   LOGO — SIMETRIS DI DALAM LINGKARAN
   ============================================================ */

/* Wrapper: anchor posisi */
.auth-logo-wrapper {
    position: relative;
    width: 104px;
    height: 104px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ring gradient berputar — mengisi penuh wrapper */
.auth-logo-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #ffd86f, #00c6ff, #ff6ec4, #ffd86f);
    animation: rotateRing 8s linear infinite;
    opacity: 0.95;
}
@keyframes rotateRing {
    to { transform: rotate(360deg); }
}

/* Lingkaran dalam — 96px, pas di tengah wrapper */
.auth-logo-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(15, 20, 55, 0.92);
    z-index: 1;
}

/* Logo — 96px, sama persis dengan lingkaran dalam, pas di tengah */
.auth-logo {
    position: relative;
    z-index: 2;
    width: 96px;
    height: 96px;
    object-fit: contain;
    padding: 0;
    margin: 0;
    background: transparent;
    border-radius: 50%;
    display: block;
}

.auth-app-name {
    font-size: 1.7rem;
    font-weight: 900;
    letter-spacing: 4px;
    margin: 0 0 8px;
    line-height: 1.1;
    background: linear-gradient(90deg, #ffffff 0%, #ffd86f 50%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shine 4s linear infinite;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
@keyframes shine {
    to { background-position: 200% center; }
}

.auth-app-desc {
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 18px;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.auth-tagline {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 22px;
}
.auth-tagline span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    transition: all 0.25s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.auth-tagline span:hover {
    background: rgba(255, 216, 111, 0.2);
    border-color: rgba(255, 216, 111, 0.5);
    transform: translateY(-1px);
}
.auth-tagline span i {
    color: #ffd86f;
    font-size: 0.58rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}
.auth-divider span {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   FORM — input tetap pekat agar terbaca
   ============================================================ */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.form-label i {
    color: #ffd86f;
    font-size: 0.7rem;
}

.input-group-modern {
    position: relative;
    display: flex;
    align-items: center;
}
.input-group-modern .input-icon {
    position: absolute;
    left: 16px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.25s;
    z-index: 2;
}
.input-group-modern .form-control {
    width: 100%;
    padding: 14px 48px 14px 46px;
    font-size: 0.92rem;
    font-weight: 500;
    color: #ffffff;
    background: rgba(10, 14, 39, 0.75);        /* ← input lebih pekat */
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    transition: all 0.25s ease;
    outline: none;
    box-shadow: none;
}
.input-group-modern .form-control:hover {
    background: rgba(10, 14, 39, 0.82);
    border-color: rgba(255, 255, 255, 0.32);
}
.input-group-modern .form-control:focus {
    background: rgba(10, 14, 39, 0.9);
    border-color: rgba(255, 216, 111, 0.8);
    box-shadow:
        0 0 0 4px rgba(255, 216, 111, 0.15),
        0 8px 24px rgba(0, 0, 0, 0.3);
}
.input-group-modern:focus-within .input-icon {
    color: #ffd86f;
}
.input-group-modern .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.btn-toggle-password {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    z-index: 2;
}
.btn-toggle-password:hover {
    color: #ffd86f;
    background: rgba(255, 216, 111, 0.15);
}

.form-error {
    margin-top: 6px;
    font-size: 0.78rem;
    color: #ff9aa3;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 22px;
    font-size: 0.85rem;
}
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.form-check-input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: #ffd86f;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
}
.form-check-input:checked {
    background-color: #ffd86f;
    border-color: #ffd86f;
}
.form-check-label {
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    user-select: none;
    font-weight: 500;
    font-size: 0.85rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.link-forgot {
    color: #ffd86f;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.85rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.link-forgot:hover {
    color: #ffffff;
    text-decoration: underline;
}

.btn-auth-primary {
    width: 100%;
    padding: 14px 20px;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #0a0e27;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: linear-gradient(135deg, #ffd86f 0%, #ffb347 100%);
    box-shadow:
        0 10px 28px rgba(255, 216, 111, 0.35),
        0 4px 12px rgba(255, 179, 71, 0.25);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}
.btn-auth-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}
.btn-auth-primary:hover::before {
    left: 100%;
}
.btn-auth-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 16px 38px rgba(255, 216, 111, 0.5),
        0 6px 16px rgba(255, 179, 71, 0.35);
}
.btn-auth-primary:active {
    transform: translateY(0);
}

/* ============================================================
   CREDIT DI DALAM CARD
   ============================================================ */
.auth-credit-inline {
    text-align: center;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    letter-spacing: 0.3px;
    line-height: 1.75;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.auth-credit-inline strong {
    color: #ffd86f;
    font-weight: 700;
}
.auth-credit-inline i {
    color: #ff9aa3;
    font-size: 0.6rem;
    margin: 0 2px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .login-wrapper {
        padding: 24px 14px 40px;
        align-items: flex-start;
        padding-top: 36px;
    }
    .login-card-glass {
        padding: 34px 24px 26px;
        border-radius: 20px;
        background: rgba(15, 20, 55, 0.35);    /* ← mobile lebih transparan */
    }

    /* Logo responsive */
    .auth-logo-wrapper {
        width: 88px;
        height: 88px;
        margin-bottom: 16px;
    }
    .auth-logo-wrapper::after {
        width: 82px;
        height: 82px;
    }
    .auth-logo {
        width: 82px;
        height: 82px;
        padding: 0;
    }

    .auth-app-name {
        font-size: 1.4rem;
        letter-spacing: 3px;
    }
    .auth-app-desc {
        font-size: 0.72rem;
    }
    .auth-tagline {
        gap: 5px;
        margin-bottom: 18px;
    }
    .auth-tagline span {
        padding: 4px 9px;
        font-size: 0.56rem;
    }
    .auth-credit-inline {
        font-size: 0.65rem;
        margin-top: 20px;
        padding-top: 14px;
    }
}

@media (max-width: 420px) {
    .login-card-glass {
        padding: 28px 20px 22px;
        background: rgba(15, 20, 55, 0.4);     /* ← mobile kecil */
    }

    /* Logo responsive kecil */
    .auth-logo-wrapper {
        width: 78px;
        height: 78px;
    }
    .auth-logo-wrapper::after {
        width: 72px;
        height: 72px;
    }
    .auth-logo {
        width: 72px;
        height: 72px;
        padding: 0;
    }

    .auth-app-name {
        font-size: 1.25rem;
        letter-spacing: 2px;
    }
    .auth-tagline span {
        font-size: 0.52rem;
        padding: 4px 8px;
    }
    .auth-tagline span i {
        display: none;
    }
}