/* ============================================================
   Login + Brand-select design
   ============================================================ */

.login-page {
    background: var(--bg);
    min-height: 100vh;
}

.login-shell {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 100vh;
}

/* ---------- Left brand panel ---------- */
.login-brand {
    position: relative;
    padding: 3rem;
    color: #fff;
    background:
        radial-gradient(1200px 600px at -10% -20%, #6a5cff 0%, transparent 60%),
        radial-gradient(1000px 500px at 120% 120%, #4f46e5 0%, transparent 55%),
        linear-gradient(135deg, #4f46e5 0%, #312e81 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}
.login-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-weight: 700;
    letter-spacing: -.01em;
    font-size: 1.05rem;
    position: relative;
    z-index: 1;
}
.brand-mark img { filter: drop-shadow(0 2px 8px rgba(0,0,0,.25)); }

.brand-copy {
    position: relative;
    z-index: 1;
    margin: 3rem 0;
}
.brand-copy h2 {
    font-size: 2.3rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0 0 1rem;
}
.brand-copy p {
    color: rgba(255,255,255,.82);
    font-size: 1rem;
    max-width: 34ch;
    margin: 0;
}

.brand-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .65rem;
    position: relative;
    z-index: 1;
}
.brand-points li {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: rgba(255,255,255,.88);
    font-size: .95rem;
}
.brand-points .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #a5f3d0;
    box-shadow: 0 0 0 4px rgba(165,243,208,.18);
}

.brand-foot {
    position: relative;
    z-index: 1;
    font-size: .8rem;
    color: rgba(255,255,255,.6);
}

/* ---------- Right form panel ---------- */
.login-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: #fff;
}
.login-form-wrap {
    width: 100%;
    max-width: 380px;
}

.login-head h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0 0 .35rem;
}
.login-head p { margin: 0 0 1.5rem; }

.pw-wrap {
    position: relative;
}
.pw-wrap .input { padding-right: 4rem; }
.pw-toggle {
    position: absolute;
    top: 50%;
    right: .6rem;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: var(--primary);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    padding: .35rem .5rem;
    border-radius: 6px;
}
.pw-toggle:hover { background: var(--primary-50); }

.btn-block {
    width: 100%;
    justify-content: center;
    padding: .8rem 1rem;
    font-size: .95rem;
    margin-top: .25rem;
}

.login-foot {
    margin-top: 1.5rem;
    font-size: .85rem;
    text-align: center;
}

/* ---------- Brand select page ---------- */
.select-page {
    min-height: 100vh;
    background:
        radial-gradient(1200px 500px at 20% -10%, #eef2ff 0%, transparent 60%),
        var(--bg);
    padding: 3rem 2rem;
}
.select-wrap {
    max-width: 1080px;
    margin: 0 auto;
}
.select-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.brand-grid form { display: contents; }

.brand-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: left;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: .5rem;
    min-height: 180px;
    font-family: inherit;
}
.brand-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: #c7d2fe;
}
.brand-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .5rem;
}
.brand-logo {
    width: 44px; height: 44px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--surface-2);
    padding: 4px;
}
.brand-card h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}
.brand-card p { margin: 0; font-size: .85rem; }
.brand-open {
    margin-top: auto;
    font-size: .85rem;
    font-weight: 600;
    color: var(--primary);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-brand { display: none; }
    .login-form-side { padding: 2rem 1.25rem; }
}