*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    background: radial-gradient(circle at 50% 10%, #250645 0%, #07020d 75%);
    background-color: #07020d;
    color: #ffffff;
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;
}

.synthwave-grid {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48vh;
    background-image:
        linear-gradient(to right, rgba(168, 85, 247, 0.12) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(168, 85, 247, 0.12) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 15%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 15%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
    z-index: 0;
}

.login-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(168, 85, 247, 0.22) 0%, transparent 32%),
        radial-gradient(circle at 82% 18%, rgba(255, 46, 147, 0.16) 0%, transparent 28%);
}

.login-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    background: rgba(23, 7, 43, 0.88);
    border: 1px solid rgba(217, 70, 239, 0.35);
    border-radius: 22px;
    padding: 2.4rem 2.25rem 2.1rem;
    box-shadow:
        0 0 0 1px rgba(217, 70, 239, 0.12),
        0 25px 65px -10px rgba(0, 0, 0, 0.95),
        0 0 50px -10px rgba(255, 46, 147, 0.22);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    text-align: center;
}

.login-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(90deg, #ff2e93, #c084fc, #38bdf8);
}

.login-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
}
.login-logo-img {
    height: 88px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    background: transparent;
    filter: drop-shadow(0 0 22px rgba(217, 70, 239, 0.55));
    transition: transform 0.3s ease;
}
.login-logo-img:hover { transform: scale(1.04); }

.login-card h1 {
    font-family: "Syne", "Poppins", sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.2rem;
    letter-spacing: 0.12em;
    text-align: center;
    text-transform: uppercase;
    background: linear-gradient(90deg, #ffffff, #f0abfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.login-subtitle {
    color: #c084fc;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 1.75rem;
    text-transform: uppercase;
}

.login-card label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #d8b4fe;
    margin-bottom: 0.45rem;
    text-align: left;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.login-card input[type="password"],
.login-card input[type="text"] {
    width: 100%;
    background: rgba(11, 3, 26, 0.85);
    border: 1px solid rgba(217, 70, 239, 0.35);
    border-radius: 10px;
    padding: 0.8rem 1.1rem;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: "Poppins", sans-serif;
    transition: all 0.2s ease;
}
.login-card input[type="password"] {
    padding-right: 3rem;
    letter-spacing: 0.2em;
}
.login-card input::placeholder {
    letter-spacing: 0.05em;
    color: rgba(147, 129, 168, 0.5);
}
.login-card input:focus {
    outline: none;
    border-color: #ff2e93;
    background: rgba(7, 2, 13, 0.95);
    box-shadow: 0 0 0 3px rgba(255, 46, 147, 0.25), 0 0 20px rgba(217, 70, 239, 0.25);
}

.pwd-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #9381a8;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background-color 0.15s;
}
.pwd-toggle-btn:hover {
    color: #c084fc;
    background: rgba(217, 70, 239, 0.12);
}
.pwd-toggle-btn svg { width: 18px; height: 18px; }
.hidden { display: none !important; }

.field-group { margin-bottom: 1.35rem; }

.btn-action {
    width: 100%;
    background: linear-gradient(135deg, #ff2e93 0%, #a855f7 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.85rem 1.25rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    font-family: "Poppins", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(255, 46, 147, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.btn-action:hover:not(:disabled) {
    background: linear-gradient(135deg, #ff47a4 0%, #b86bfc 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(255, 46, 147, 0.5);
}
.btn-action:active { transform: translateY(0); }
.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.icon-right {
    width: 13px;
    height: 13px;
    stroke-width: 2.2;
    display: inline-block;
}

#err {
    font-size: 0.82rem;
    color: #f87171;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease, margin-top 0.3s ease;
    background: rgba(248, 113, 113, 0.1);
    border-radius: 8px;
    border: 1px solid transparent;
}
#err.has-error {
    max-height: 60px;
    opacity: 1;
    padding: 0.6rem 0.75rem;
    margin-top: 14px;
    border-color: rgba(248, 113, 113, 0.25);
}

.login-footer-info {
    display: flex;
    justify-content: space-between;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(168, 85, 247, 0.18);
    font-size: 0.72rem;
    color: #9381a8;
    letter-spacing: 0.05em;
}
.login-footer-info code {
    color: #38bdf8;
    font-family: "Poppins", sans-serif;
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.85rem 1.2rem 1.6rem;
        border-radius: 18px;
    }
    .login-card h1 { font-size: 1.65rem; }
    .login-logo-img { height: 72px; }
    .login-footer-info {
        flex-direction: column;
        gap: 0.4rem;
        text-align: center;
    }
}
