@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; }

html, body {
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

body.bg-gradient-primary {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%) !important;
    height: 100vh;
    font-family: 'Plus Jakarta Sans', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.body-sign { width: 100%; }

.center-sign {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.login-card {
    display: flex;
    width: 100%;
    max-width: 1000px;
    height: min(620px, calc(100vh - 3rem));
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.06);
    animation: cardReveal 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardReveal {
    from { opacity: 0; transform: translateY(28px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Left panel ── */
.login-left {
    flex: 1;
    background: linear-gradient(145deg, #1d4ed8 0%, #1e40af 45%, #1e3a8a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -70px; right: -70px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

.login-left::after {
    content: '';
    position: absolute;
    bottom: -90px; left: -50px;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}

.login-left-brand {
    font-size: 1.625rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    margin-bottom: 0.4rem;
    position: relative; z-index: 1;
}

.login-left-tagline {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 2.5rem;
    position: relative; z-index: 1;
    letter-spacing: 0.02em;
}

.login-left img {
    max-width: 82%;
    height: auto;
    position: relative; z-index: 1;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.25));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-12px); }
}

/* ── Right panel ── */
.login-right {
    width: 440px;
    flex-shrink: 0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3.5rem 3.5rem;
}

.login-right h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.035em;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.login-subtitle {
    font-size: 0.9375rem;
    color: #64748b;
    margin: 0 0 2rem;
}

/* ── Inputs ── */
.login-field {
    margin-bottom: 1.375rem;
}

.login-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.login-input {
    width: 100%;
    padding: 0.875rem 1.125rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem;
    color: #0f172a;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    -webkit-appearance: none;
}

.login-input:focus {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3.5px rgba(59,130,246,0.13);
}

.login-input.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

.login-input::placeholder { color: #94a3b8; }

.input-wrapper { position: relative; }

.toggle-password {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    padding: 4px;
    transition: color 0.2s;
    line-height: 1;
}

.toggle-password:hover { color: #3b82f6; }

.error-text {
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 0.375rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Remember ── */
.login-meta {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.remember-label input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: #3b82f6;
    cursor: pointer;
    margin: 0;
}

/* ── Submit ── */
.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    letter-spacing: 0.015em;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    box-shadow: 0 4px 18px rgba(37,99,235,0.38);
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 22px rgba(37,99,235,0.48);
    filter: brightness(1.05);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

.login-footer {
    text-align: center;
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 2rem;
    letter-spacing: 0.01em;
}

/* ── Responsive ── */
@media (max-width: 720px) {
    html, body { overflow: auto; }
    body.bg-gradient-primary { padding: 1rem; height: auto; min-height: 100vh; }
    .login-card { flex-direction: column; max-width: 440px; height: auto; }
    .login-left { display: none !important; }
    .login-right { width: 100%; padding: 2.5rem 2rem; }
}
