/**
 * Login / register, in the Pixel True kit's dark language with the kit's amber
 * as the Golden Village accent.
 *
 * These two pages are self-contained: they do not load the legacy theme sheets,
 * so sizes here are plain px and there is no rem-scaling to work around.
 */
:root {
    --a-bg:       #0e1012;
    --a-surface:  #1b1e20;
    --a-surface-2:#23262a;
    --a-line:     rgba(255, 255, 255, 0.09);
    --a-text:     #ffffff;
    --a-muted:    #86848f;
    --a-amber:    #ffad1d;
    --a-amber-2:  #ffc668;
    --a-on-amber: #1a1200;
    --a-tint:     rgba(255, 173, 29, 0.14);
}

* { box-sizing: border-box; }

body.auth-body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(760px 420px at 50% -8%, rgba(255, 173, 29, 0.12), transparent 60%),
        var(--a-bg);
    color: var(--a-text);
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 22px 22px 34px;
}

/* ------------------------------------------------------------- header */
.auth-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 26px;
}

.auth-logo { height: 42px; width: auto; max-width: 62%; object-fit: contain; }

/* Language dropdown — built rather than a native <select>, which opens the
   OS picker wheel on mobile and cannot be styled. */
.lang { position: relative; flex: none; }

.lang-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--a-surface);
    color: var(--a-muted);
    border: 1px solid var(--a-line);
    border-radius: 999px;
    padding: 8px 12px;
    font: inherit;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.lang-btn:hover,
.lang.is-open .lang-btn { color: var(--a-text); border-color: rgba(255, 173, 29, 0.45); }

.lang-globe { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.lang-caret {
    width: 13px; height: 13px; fill: none; stroke: currentColor;
    stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
    transition: transform 0.18s ease;
}
.lang.is-open .lang-caret { transform: rotate(180deg); }

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 50;
    min-width: 168px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--a-surface-2);
    border: 1px solid var(--a-line);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    animation: lang-in 0.16s ease;
}

@keyframes lang-in {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lang-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13.5px;
    color: var(--a-muted);
    cursor: pointer;
    outline: none;
    transition: background 0.14s ease, color 0.14s ease;
}

.lang-item:hover,
.lang-item:focus-visible { background: rgba(255, 255, 255, 0.06); color: var(--a-text); }

.lang-item.is-active { color: var(--a-amber); font-weight: 600; }

.lang-tick {
    width: 15px; height: 15px; flex: none;
    fill: none; stroke: var(--a-amber); stroke-width: 2.4;
    stroke-linecap: round; stroke-linejoin: round;
    opacity: 0;
}

.lang-item.is-active .lang-tick { opacity: 1; }


/* ------------------------------------------------------------- headings */
.auth-main { flex: 1; display: flex; flex-direction: column; }

.auth-title {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.6px;
}

.auth-sub {
    margin: 0 0 22px;
    color: var(--a-muted);
    font-size: 14px;
}

/* ------------------------------------------------------------- tabs */
.auth-tabs {
    display: flex;
    gap: 6px;
    background: var(--a-surface);
    border: 1px solid var(--a-line);
    border-radius: 999px;
    padding: 5px;
    margin-bottom: 26px;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--a-muted);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.auth-tab.is-active {
    background: var(--a-tint);
    color: var(--a-amber);
    font-weight: 600;
}

/* ------------------------------------------------------------- fields */
.auth-form { display: flex; flex-direction: column; gap: 16px; }

.field { display: block; }

.field-label {
    display: block;
    margin-bottom: 7px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--a-muted);
}

.field-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--a-surface-2);
    border: 1px solid var(--a-line);
    border-radius: 14px;
    padding: 0 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-control:focus-within {
    border-color: var(--a-amber);
    box-shadow: 0 0 0 3px rgba(255, 173, 29, 0.15);
}

.field-ico { width: 19px; height: 19px; fill: var(--a-muted); flex: none; }

.field-control input {
    flex: 1;
    min-width: 0;
    background: none;
    border: 0;
    outline: none;
    color: var(--a-text);
    font: inherit;
    font-size: 15px;
    padding: 14px 0;
}

.field-control input::placeholder { color: #5f646b; }

.field-eye {
    background: none;
    border: 0;
    padding: 4px;
    cursor: pointer;
    line-height: 0;
}

.field-eye svg { width: 20px; height: 20px; fill: #5f646b; transition: fill 0.15s ease; }
.field-eye.is-on svg { fill: var(--a-amber); }

/* ------------------------------------------------------------- misc */
.auth-remember {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: var(--a-muted);
    cursor: pointer;
    user-select: none;
}

.auth-remember input { accent-color: var(--a-amber); width: 16px; height: 16px; }

.btn-primary {
    margin-top: 6px;
    width: 100%;
    border: 0;
    border-radius: 999px;
    padding: 16px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--a-on-amber);
    background: linear-gradient(180deg, var(--a-amber-2), var(--a-amber));
    box-shadow: 0 10px 26px rgba(255, 173, 29, 0.22);
    cursor: pointer;
    transition: transform 0.12s ease, filter 0.15s ease;
}

.btn-primary:active { transform: translateY(1px); filter: brightness(0.95); }

.btn-ghost {
    margin-top: 12px;
    width: 100%;
    border: 1px solid var(--a-line);
    border-radius: 999px;
    padding: 14px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--a-text);
    background: var(--a-surface);
    cursor: pointer;
}

.auth-alt {
    margin: 20px 0 0;
    text-align: center;
    font-size: 13.5px;
    color: var(--a-muted);
}

.auth-alt a { color: var(--a-amber); text-decoration: none; font-weight: 600; }

/* ------------------------------------------------------------- captcha */
/* 60 / 40 split between the input and the captcha. flex-basis 0 so the two
   share the row by the ratio alone and the input's intrinsic width does not
   skew it. */
.field-captcha { display: flex; gap: 12px; align-items: flex-end; }
.field-captcha .field { flex: 6 1 0; min-width: 0; }

.captcha-img {
    flex: 4 1 0;
    min-width: 0;
    height: 52px;
    border-radius: 14px;
    border: 1px solid var(--a-line);
    background: #fff;
    /* The image is generated at 130x50; `cover` would crop the characters now
       that the box is wider than it used to be. */
    object-fit: contain;
    cursor: pointer;
}

.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--a-muted);
    cursor: pointer;
}

.auth-terms input { accent-color: var(--a-amber); width: 16px; height: 16px; margin-top: 2px; flex: none; }

/* On a desktop monitor these pages sit in the same centred frame as the app. */
@media (min-width: 601px) {
    .auth-shell { max-width: 600px; margin-inline: auto; }
}
