/* Sign in / register / paused: dark Etanb Exchange look, built to fit one phone screen. */

.au {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 20px 18px calc(20px + var(--safe-b));
    background:
        radial-gradient(80% 38% at 50% 0%, rgba(138, 180, 255, .18), transparent 70%),
        radial-gradient(70% 30% at 100% 100%, rgba(95, 143, 232, .12), transparent 70%);
}

/* brand */
.au-brand { display: grid; justify-items: center; text-align: center; gap: 4px; }
.au-mark { width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55)); }
.au-name {
    margin-top: 2px;
    font: 800 2.1rem/1.05 var(--font-display);
    letter-spacing: -.03em;
    background: linear-gradient(180deg, #ffffff 30%, #8ab4ff 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.au-tag { max-width: 300px; color: var(--muted); font-size: .82rem; line-height: 1.45; }

/* compact (registration): logo and name on one row */
.au--compact {
    gap: 12px; justify-content: flex-start; padding-top: 18px;
    /* Some Android WebView builds (the APK) mis-report vh/dvh once the on-screen
       keyboard opens, which can make the page think it already "fits" and suppress
       scrolling. Size to natural content height here instead of the viewport, so
       the page is unambiguously scrollable no matter what the keyboard is doing. */
    min-height: 0;
    height: auto;
    overflow-y: visible;
}
.au--compact .au-brand { grid-template-columns: auto auto; justify-content: center; align-items: center; column-gap: 10px; }
.au--compact .au-mark { width: 52px; height: 52px; }
.au--compact .au-name { margin: 0; font-size: 1.7rem; }

/* card */
.au-card {
    padding: 20px 18px 18px;
    border-radius: var(--r-lg);
    background: linear-gradient(180deg, #1c2946 0%, #131d33 100%);
    border: 1px solid rgba(255, 255, 255, .09);
    box-shadow: 0 5px 0 #060a14, 0 14px 20px -8px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.au-card h2 { font: 700 1.3rem/1.2 var(--font-display); letter-spacing: -.01em; }
.au-sub { margin: 3px 0 14px; color: var(--muted); font-size: .8rem; }

.au-field { display: grid; gap: 6px; margin-bottom: 12px; }
.au-label { color: #c3cce3; font-size: .74rem; font-weight: 600; letter-spacing: .02em; }
.au-label em { font-style: normal; color: var(--sky); }

.au-control { position: relative; display: flex; align-items: center; }
.au-control input {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 44px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 12px;
    background: var(--bg-2);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, .55);
    color: var(--text);
    font-size: .95rem;
    outline: 0;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.au-control input::placeholder { color: var(--faint); }
.au-control input:focus { border-color: var(--sky); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .55), 0 0 0 3px var(--sky-soft); }
.au-control .lead { position: absolute; left: 15px; color: var(--faint); font-size: 1rem; pointer-events: none; }
.au-control:focus-within .lead { color: var(--sky); }
.au-control.has-trail input { padding-right: 48px; }
.au-trail { position: absolute; right: 4px; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 1.05rem; }

input:-webkit-autofill, input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 100px #0b1120 inset;
    transition: background-color 9999s ease 0s;
}

.au-err { margin-top: 2px; color: var(--down); font-size: .76rem; font-weight: 500; line-height: 1.35; }
.au-err small { display: block; font-size: inherit; }
.au-alert { display: flex; gap: 8px; margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; background: var(--down-soft); border: 1px solid rgba(255, 107, 129, .3); color: #ffc2cb; font-size: .8rem; line-height: 1.4; }
.au-alert--ok { background: var(--up-soft); border-color: rgba(52, 211, 153, .3); color: #aef0d6; }

.au-forgot { justify-self: start; color: var(--sky); font-size: .74rem; font-weight: 600; }

.au-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; height: 50px; margin-top: 6px;
    border: 0; border-radius: 12px;
    background: linear-gradient(180deg, #a9c8ff 0%, var(--sky) 100%);
    box-shadow: 0 4px 0 #3c5fa3, 0 12px 22px -8px rgba(138, 180, 255, .45);
    color: #0a1226;
    font: 700 1rem var(--font-display);
    letter-spacing: .01em;
    transition: transform .12s ease, box-shadow .12s ease;
}
.au-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #3c5fa3, 0 6px 12px -6px rgba(138, 180, 255, .45); }

.au-switch { margin-top: 16px; text-align: center; color: var(--muted); font-size: .86rem; }
.au-switch a { margin-left: 4px; color: var(--sky); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* paused */
.au-paused { text-align: center; padding-top: 26px; padding-bottom: 22px; }
.au-paused-ic { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 50%; background: var(--amber-soft); color: var(--amber); font-size: 1.8rem; }
.au-paused p { margin: 8px 0 22px; color: var(--muted); font-size: .88rem; line-height: 1.6; }

/* shorter phones: tighten so the form stays on one screen */
@media (max-height: 740px) {
    .au { gap: 12px; padding-top: 14px; padding-bottom: 14px; }
    .au-mark { width: 64px; height: 64px; }
    .au-name { font-size: 1.8rem; }
    .au-card { padding: 16px 16px 14px; }
    .au-sub { display: none; }
    .au-card h2 { margin-bottom: 10px; }
    .au-field { gap: 4px; margin-bottom: 9px; }
    .au-control input { height: 44px; }
    .au-btn { height: 46px; }
    .au-switch { margin-top: 12px; }
}
@media (max-height: 620px) {
    .au-tag { display: none; }
    .au-mark { width: 52px; height: 52px; }
    .au--compact .au-mark { width: 40px; height: 40px; }
    .au-control input { height: 42px; }
    .au-field { margin-bottom: 7px; }
}
@media (max-width: 340px) {
    .au { padding-left: 12px; padding-right: 12px; }
    .au-card { padding-left: 14px; padding-right: 14px; }
}
