/* Sign-in / sign-up / verify / onboarding. Load after brand.css (colours, buttons, background).
   Instagram-simple structure: one narrow column, a card, minimal text. */
body {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 24px 16px;
}
a { color: var(--ink); text-decoration: none; font-weight: 700; }
a:hover { text-decoration: underline; }

.auth { width: 100%; max-width: 370px; }
.card {
    background: rgba(16, 16, 25, .72);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--line); border-radius: 18px;
    padding: 36px 34px 26px; text-align: center;
}
.card + .card { margin-top: 12px; padding: 18px 34px; font-size: 15px; }
.card + .card a { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 450px) {
    body { justify-content: flex-start; padding-top: 34px; }
    .card { background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 10px 6px; }
    .card + .card { border-top: 1px solid var(--line); border-radius: 0; padding: 20px 6px; }
}

.logo { display: inline-block; margin-bottom: 26px; }
.logo img { height: 34px; width: auto; display: block; }
.subtitle { color: var(--muted); font-weight: 600; margin: -8px 0 22px; font-size: 16px; }

/* Floating-label fields */
.field { position: relative; margin-bottom: 8px; text-align: left; }
.field input, .field select {
    width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 10px; background: var(--field);
    padding: 18px 12px 4px; font-size: 15px; color: var(--ink); font-family: inherit;
}
.field select { padding: 0 12px; appearance: none; -webkit-appearance: none; }
.field select option, .field select optgroup { background: var(--surface); color: var(--ink); }
.field input:focus, .field select:focus { outline: none; border-color: #8b7bd8; background: #171724; }
.field label {
    position: absolute; left: 13px; top: 15px; font-size: 14px; color: var(--muted);
    pointer-events: none; transition: transform .12s ease, font-size .12s ease; transform-origin: left top;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label { transform: translateY(-9px); font-size: 11px; }
.field .toggle {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: none; border: 0; font-weight: 700; font-size: 14px; color: var(--ink); cursor: pointer; padding: 6px;
}
.field.invalid input, .field.invalid select { border-color: var(--error); }
.row { display: flex; gap: 8px; }
.row .field { flex: 1; }
input:-webkit-autofill { -webkit-text-fill-color: var(--ink); box-shadow: 0 0 0 1000px var(--field) inset; caret-color: var(--ink); }

.card .btn { margin-top: 12px; }
.btn-light { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-light:hover { background: rgba(255, 255, 255, .06); }

.divider { display: flex; align-items: center; gap: 16px; margin: 18px 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.message { margin: 14px 0 0; font-size: 14px; }
.message.error { color: var(--error); }
.message.ok { color: var(--ok); }
.message a { color: inherit; text-decoration: underline; }
.small { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }
.small a { font-weight: 600; color: #c9b8ff; }
.forgot { display: inline-block; margin-top: 18px; font-size: 14px; font-weight: 500; color: var(--muted); }

/* "Verify this device" dialog */
.dialog-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.dialog { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; max-width: 380px; width: 100%; padding: 26px 24px 18px; text-align: center; }
.dialog h2 { font-size: 19px; margin: 0 0 8px; }
.dialog p { color: var(--muted); margin: 0 0 10px; }

.auth-footer { margin-top: 26px; font-size: 12px; color: var(--muted); text-align: center; }
.auth-footer a { color: var(--muted); font-weight: 400; margin: 0 7px; }
