:root {
    color-scheme: light;
    --login-bg: #f3f6fb;
    --login-surface: #ffffff;
    --login-text: #172033;
    --login-muted: #687386;
    --login-border: #dfe5ee;
    --login-primary: #1769e0;
    --login-primary-dark: #0f55ba;
    --login-danger: #b42318;
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; }
body {
    margin: 0;
    color: var(--login-text);
    background: var(--login-bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.login-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, .95fr) minmax(430px, 1.05fr);
}

.login-brand-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(34px, 5vw, 64px);
    color: #fff;
    background:
        radial-gradient(circle at 5% 15%, rgba(59,130,246,.34), transparent 25rem),
        radial-gradient(circle at 90% 95%, rgba(45,212,191,.16), transparent 24rem),
        #111827;
}
.login-brand-panel::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -160px;
    top: 22%;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 50%;
    box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018);
}
.login-brand, .login-mobile-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 900;
}
.login-brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    color: #111827;
    background: #fff;
    font-weight: 950;
    box-shadow: 0 12px 32px rgba(0,0,0,.18);
}
.login-brand-copy { position: relative; z-index: 1; max-width: 620px; margin: 70px 0; }
.login-eyebrow {
    display: inline-block;
    color: #79aef9;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.login-brand-copy h1 {
    margin: 14px 0 18px;
    max-width: 580px;
    font-size: clamp(2.7rem, 5vw, 5rem);
    line-height: 1;
    letter-spacing: -.05em;
}
.login-brand-copy p { max-width: 560px; margin: 0; color: #c2cad6; font-size: 1.05rem; line-height: 1.7; }
.login-brand-features { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 16px 22px; color: #b8c2d1; font-size: .87rem; }
.login-brand-features span::before { content: "✓"; margin-right: 7px; color: #77dbb8; font-weight: 900; }

.login-form-panel {
    display: grid;
    place-items: center;
    padding: 32px;
    background:
        radial-gradient(circle at 85% 15%, rgba(23,105,224,.08), transparent 24rem),
        #f6f8fb;
}
.login-card { width: min(100%, 470px); padding: 38px; border: 1px solid var(--login-border); border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: 0 24px 70px rgba(31,44,72,.10); }
.login-mobile-brand { display: none; color: var(--login-text); margin-bottom: 30px; }
.login-mobile-brand .login-brand-mark { color: #fff; background: #111827; box-shadow: none; }
.login-heading { margin-bottom: 28px; }
.login-heading .login-eyebrow { color: var(--login-primary); }
.login-heading h2 { margin: 8px 0 7px; font-size: 1.75rem; letter-spacing: -.025em; }
.login-heading p { margin: 0; color: var(--login-muted); line-height: 1.55; }
#marcadin-login-form { display: grid; gap: 18px; }
.login-field { display: grid; gap: 7px; }
.login-field label { color: #344054; font-size: .84rem; font-weight: 800; }
.login-field input {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid #d7dfeb;
    border-radius: 12px;
    outline: none;
    color: var(--login-text);
    background: #fff;
    transition: .14s ease;
}
.login-field input:focus { border-color: #6ea0f8; box-shadow: 0 0 0 4px rgba(23,105,224,.10); }
.login-field input:disabled { background: #f4f6f8; }
.password-field { position: relative; }
.password-field input { padding-right: 84px; }
.password-toggle { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); min-height: 34px; padding: 0 9px; border: 0; border-radius: 8px; color: var(--login-primary); background: transparent; font-size: .76rem; font-weight: 850; }
.password-toggle:hover { background: #edf4ff; }
.login-error { padding: 11px 13px; border: 1px solid #fac7c2; border-radius: 11px; color: var(--login-danger); background: #fff3f1; font-size: .87rem; }
.login-submit { min-height: 49px; border: 0; border-radius: 12px; color: #fff; background: var(--login-primary); font-weight: 850; box-shadow: 0 10px 24px rgba(23,105,224,.20); transition: .14s ease; }
.login-submit:hover:not(:disabled) { transform: translateY(-1px); background: var(--login-primary-dark); }
.login-submit:disabled { opacity: .65; cursor: wait; }
.login-security { margin: 22px 0 0; color: #98a2b3; text-align: center; font-size: .76rem; }

@media (max-width: 900px) {
    .login-layout { grid-template-columns: 1fr; }
    .login-brand-panel { display: none; }
    .login-form-panel { min-height: 100vh; padding: 24px; }
    .login-mobile-brand { display: flex; }
}
@media (max-width: 520px) {
    .login-form-panel { padding: 0; align-items: stretch; }
    .login-card { width: 100%; min-height: 100vh; padding: 28px 22px; border: 0; border-radius: 0; box-shadow: none; }
    .login-mobile-brand { margin-bottom: 48px; }
    .login-heading h2 { font-size: 1.55rem; }
    .login-field input { min-height: 50px; font-size: 16px; }
}
