/* ==========================================================================
   Login & register: split screen, form on the left, brand panel on the right
   Colors come from the --ms-* variables of landing.css (light + dark).
   ========================================================================== */

.au-page { display: flex; background: var(--ms-bg-pink); padding: 2rem 1rem; }
.au-shell {
    width: 100%; max-width: 1120px; margin: auto;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    background: var(--ms-card); border: 1px solid var(--ms-line); border-radius: 24px;
    box-shadow: var(--ms-shadow-lg); overflow: hidden;
}

/* Form */
.au-main { display: flex; align-items: center; justify-content: center; padding: 3rem 2.5rem; }
.au-form-wrap { width: 100%; max-width: 400px; }
.au-head h1 { font-size: 1.85rem; font-weight: 700; color: var(--ms-ink); letter-spacing: -.02em; margin: 0 0 .4rem; }
.au-head p { color: var(--ms-text); margin: 0 0 1.75rem; }

.au-form { display: grid; gap: 1.1rem; }
.au-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.au-field { display: grid; grid-template-columns: minmax(0, 1fr); gap: .4rem; min-width: 0; }
.au-field label, .au-label-row label { font-size: .875rem; font-weight: 600; color: var(--ms-ink); margin: 0; }
.au-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }

.au-input {
    display: flex; align-items: center; gap: .6rem; height: 48px; padding: 0 .9rem;
    border: 1.5px solid var(--ms-line); border-radius: 12px; background: var(--ms-card);
    transition: border-color .2s, box-shadow .2s;
}
.au-input > svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--ms-muted); }
.au-input input { flex: 1 1 auto; width: 100%; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ms-ink); font-size: .95rem; }
.au-input input::placeholder { color: var(--ms-muted); opacity: .8; }
.au-input:focus-within { border-color: var(--ms-red); box-shadow: 0 0 0 4px rgba(239, 43, 75, .12); }
.au-input:focus-within > svg { color: var(--ms-red); }
.au-input.is-invalid { border-color: var(--ms-red); }
.au-reveal { display: flex; padding: .25rem; border: 0; background: none; color: var(--ms-muted); border-radius: 6px; }
.au-reveal:hover { color: var(--ms-ink); }
.au-reveal svg { width: 18px; height: 18px; }
.au-error { font-size: .82rem; color: var(--ms-red); }

.au-strength { display: flex; align-items: center; gap: .75rem; margin-top: -.35rem; min-height: 1rem; }
.au-strength-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; flex: 1 1 auto; }
.au-strength-bar span { height: 4px; border-radius: 99px; background: var(--ms-line); transition: background .2s; }
.au-strength-text { font-size: .78rem; color: var(--ms-muted); min-width: 6rem; text-align: right; }
.au-strength[data-level="1"] .au-strength-bar span:nth-child(-n+1) { background: #ef4444; }
.au-strength[data-level="2"] .au-strength-bar span:nth-child(-n+2) { background: #f59e0b; }
.au-strength[data-level="3"] .au-strength-bar span:nth-child(-n+3) { background: #84cc16; }
.au-strength[data-level="4"] .au-strength-bar span:nth-child(-n+4) { background: #16a34a; }
.au-strength.is-mismatch .au-strength-text { color: var(--ms-red); }

.au-check { display: flex; align-items: flex-start; gap: .6rem; margin: 0; font-size: .9rem; color: var(--ms-text); cursor: pointer; }
.au-check input { width: 18px; height: 18px; margin-top: .1rem; flex-shrink: 0; accent-color: var(--ms-red); }
.au-check.is-invalid span { color: var(--ms-red); }

.au-submit {
    display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; height: 50px;
    border: 0; border-radius: 12px; background: var(--ms-red); color: #fff !important; font-weight: 700; font-size: 1rem;
    box-shadow: 0 10px 22px rgba(239, 43, 75, .28); transition: background .2s, transform .2s;
}
.au-submit:hover { background: var(--ms-red-dark); transform: translateY(-1px); }
.au-submit:disabled { opacity: .8; transform: none; }
.au-submit.is-loading::before { content: ""; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: au-spin .7s linear infinite; }
@keyframes au-spin { to { transform: rotate(360deg); } }

.au-link { color: var(--ms-red); font-weight: 600; }
.au-link:hover { color: var(--ms-red-dark); }
.au-switch { margin: 1.5rem 0 0; text-align: center; color: var(--ms-text); }
.au-guest { margin: 1rem 0 0; padding: .85rem 1rem; border-radius: 12px; background: var(--ms-bg-pink); font-size: .85rem; color: var(--ms-text); text-align: center; }

/* Social login: buttons first, then the "or" divider */
.au-social:empty { display: none; }
.au-social { display: flex; flex-direction: column-reverse; margin-bottom: .5rem; }
.au-social > .row:first-child { margin-top: .5rem !important; margin-bottom: 1rem; }
.au-social > .row:last-child { margin-top: 0 !important; }
.au-social .btn-dark {
    height: 46px; border-radius: 12px; font-weight: 600;
    background: var(--ms-card); color: var(--ms-ink); border: 1.5px solid var(--ms-line);
}
.au-social .btn-dark:hover { border-color: var(--ms-muted); background: var(--ms-bg-pink); color: var(--ms-ink); }

/* Brand panel */
.au-aside {
    position: relative; overflow: hidden; color: #fff;
    background: linear-gradient(150deg, #ef2b4b 0%, #c81e3d 45%, #6d5dfc 130%);
}
.au-aside::before, .au-aside::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.au-aside::before { width: 420px; height: 420px; top: -160px; right: -140px; }
.au-aside::after { width: 300px; height: 300px; bottom: -120px; left: -100px; }
.au-aside-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; gap: 1.75rem; padding: 2.75rem; }
.au-aside-logo img { height: 34px; width: auto; }
.au-aside-copy h2 { color: #fff; font-size: 1.9rem; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .6rem; }
.au-aside-copy p { color: rgba(255, 255, 255, .85); font-size: 1.02rem; margin: 0; }

.au-preview { background: #fff; color: #141a2b; border-radius: 16px; box-shadow: 0 30px 60px rgba(20, 10, 40, .3); overflow: hidden; transform: rotate(-1.5deg); }
.au-preview-head { display: flex; align-items: center; gap: 5px; padding: .6rem .9rem; border-bottom: 1px solid #eceef3; }
.au-preview-dot { width: 8px; height: 8px; border-radius: 50%; background: #e3e6ee; }
.au-preview-url { margin-left: .6rem; padding: .15rem .7rem; border-radius: 99px; background: #f3f4f8; font-size: .72rem; color: #5b6375; }
.au-preview-body { padding: 1.1rem 1.2rem 1.2rem; }
.au-gauges { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: 1rem; }
.au-gauge { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; }
.au-gauge svg { width: 54px; height: 54px; transform: rotate(-90deg); }
.au-gauge-track { fill: #e6f6ec; stroke: #e6f6ec; stroke-width: 3; }
.au-gauge-value { fill: none; stroke: #0c8a43; stroke-width: 3.5; stroke-linecap: round; }
.au-gauge span { position: absolute; top: 0; height: 54px; display: flex; align-items: center; font-weight: 700; font-size: .9rem; color: #0c8a43; }
.au-gauge small { font-size: .66rem; color: #5b6375; line-height: 1.2; }
.au-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: .8rem; color: #5b6375; }
.au-checks li { display: flex; align-items: center; gap: .5rem; }
.au-ok, .au-warn { width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .65rem; font-weight: 700; color: #fff; }
.au-ok { background: #16a34a; }
.au-warn { background: #f59e0b; }

.au-points { list-style: none; padding: 0; margin: auto 0 0; display: grid; gap: .6rem; }
.au-points li { display: flex; align-items: center; gap: .6rem; font-weight: 500; }
.au-points svg { width: 20px; height: 20px; padding: 5px; border-radius: 50%; background: rgba(255, 255, 255, .2); }

/* Responsive */
@media (max-width: 991.98px) {
    .au-shell { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
    .au-aside { display: none; }
    .au-main { padding: 2.25rem 1.75rem; }
}
@media (max-width: 575.98px) {
    .au-page { padding: 1rem .75rem; }
    .au-shell { border-radius: 18px; }
    .au-main { padding: 1.75rem 1.25rem; }
    .au-row { grid-template-columns: minmax(0, 1fr); }
    .au-head h1 { font-size: 1.55rem; }
}
