/* =====================================================================
 * THE SIGN-IN PAGES, REDRAWN (2026-10-13, the owner: "more beautiful, and a
 * button to the home page where people read about the tool"). Only a page
 * whose body carries .auth-v2 is touched (login.php, admin/login-admin.php):
 * the other auth pages keep admin.css as it was. Loaded after admin.css.
 * ===================================================================== */

/* ---------------------------------------------------------- the panel -- */
.auth-v2 .auth-visual {
    isolation: isolate; padding: 34px 40px 28px;
    background: linear-gradient(155deg, #0a1124 0%, #0d1733 52%, #0b1020 100%);
}
.auth-v2 .auth-visual::before { content: none; }
/* soft moving light behind everything */
.auth-v2 .av-aurora { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.auth-v2 .av-aurora i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: avFloat 18s ease-in-out infinite alternate; }
.auth-v2 .av-aurora i:nth-child(1) { width: 380px; height: 380px; background: #2563eb; top: -90px; inset-inline-end: -90px; }
.auth-v2 .av-aurora i:nth-child(2) { width: 300px; height: 300px; background: #7c3aed; bottom: 6%; inset-inline-start: -80px; animation-duration: 22s; opacity: .38; }
.auth-v2 .av-aurora i:nth-child(3) { width: 240px; height: 240px; background: #06b6d4; top: 42%; inset-inline-end: 18%; animation-duration: 26s; opacity: .28; }
.auth-v2 .av-aurora::after { content: ""; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 34px 34px; mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 78%); }
@keyframes avFloat { from { transform: translate(0, 0) scale(1); } to { transform: translate(24px, 30px) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .auth-v2 .av-aurora i { animation: none; } }

.auth-v2 .av-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; z-index: 2; }
.auth-v2 .av-home { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; text-decoration: none;
    color: #fff; font-size: 12.5px; font-weight: 800; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(6px); transition: .18s; }
.auth-v2 .av-home:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); }
.auth-v2 .av-home svg { width: 15px; height: 15px; }

.auth-v2 .av-copy { margin: auto 0 22px; max-width: 470px; }
.auth-v2 .av-secure { padding: 5px 11px 5px 9px; border-radius: 999px; background: rgba(84,208,167,.10); border: 1px solid rgba(84,208,167,.25); }
.auth-v2 .av-copy h1 { font-size: clamp(30px, 3.4vw, 44px); margin: 18px 0 12px; line-height: 1.12;
    background: linear-gradient(120deg, #fff 30%, #a5c8ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-v2 .av-copy > p { color: rgba(255,255,255,.68); font-size: 13.5px; }
.auth-v2 .av-points { gap: 10px; margin-top: 4px; }
.auth-v2 .av-points li { gap: 12px; padding: 11px 14px; border-radius: 14px; background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.085); backdrop-filter: blur(4px); color: rgba(255,255,255,.9); }
.auth-v2 .av-points .av-ic { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center;
    background: linear-gradient(135deg, rgba(37,99,235,.9), rgba(124,58,237,.85)); box-shadow: 0 6px 16px -6px rgba(37,99,235,.7); }
.auth-v2 .av-points .av-ic svg { width: 18px; height: 18px; color: #fff; }
.auth-v2 .av-cta { display: inline-flex; align-items: center; gap: 9px; margin-top: 20px; padding: 11px 18px; border-radius: 12px;
    color: #0b1020; background: #fff; font-weight: 800; font-size: 13.5px; text-decoration: none;
    box-shadow: 0 10px 24px -10px rgba(255,255,255,.55); transition: transform .18s, box-shadow .18s; }
.auth-v2 .av-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(255,255,255,.7); }
.auth-v2 .av-cta svg { width: 16px; height: 16px; }
[dir="rtl"] .auth-v2 .av-cta svg, [dir="rtl"] .auth-v2 .auth-btn svg { transform: scaleX(-1); }
.auth-v2 .av-foot { border-top-color: rgba(255,255,255,.09); }

/* the staff door: the same, in its own colours */
.auth-v2 .auth-visual.av-admin { background: linear-gradient(155deg, #0a1416 0%, #0d2226 55%, #0a1215 100%); }
.auth-v2 .av-admin .av-aurora i:nth-child(1) { background: #0d9488; }
.auth-v2 .av-admin .av-aurora i:nth-child(2) { background: #f59e0b; opacity: .22; }
.auth-v2 .av-admin .av-aurora i:nth-child(3) { background: #2563eb; }
.auth-v2 .av-admin .av-copy h1 { background: linear-gradient(120deg, #fff 35%, #9ff0e2 100%); -webkit-background-clip: text; background-clip: text; }
.auth-v2 .av-admin .av-lock { background: rgba(13,148,136,.16); border-color: rgba(13,148,136,.4); color: #5eead4; }
.auth-v2 .av-admin .av-cta { color: #0a1416; }

/* ---------------------------------------------------------- the form side -- */
.auth-v2 .auth-form-side { position: relative; flex-direction: column; justify-content: center; justify-content: safe center; gap: 16px; padding: 76px 22px 30px;
    background: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--text-mute) 22%, transparent) 1px, transparent 0) 0 0 / 22px 22px,
                radial-gradient(circle at 70% 20%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 55%),
                var(--bg-root); }
.auth-v2 .auth-top-float { position: absolute; top: 18px; inset-inline: 22px; display: flex; align-items: center; gap: 8px; z-index: 5; }
.auth-v2 .auth-top-float .auth-homebtn { margin-inline-end: auto; }
.auth-v2 .auth-homebtn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; text-decoration: none;
    font-size: 12.5px; font-weight: 800; color: var(--text); background: var(--bg-panel); border: 1px solid var(--border-2);
    box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: .15s; }
.auth-v2 .auth-homebtn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.auth-v2 .auth-homebtn svg { width: 15px; height: 15px; }
.auth-v2 .auth-mwrap { display: none; }

.auth-v2 .auth-card { position: relative; width: 440px; max-width: 100%; padding: 34px 32px 24px; border-radius: 22px;
    background: var(--bg-panel); border: 1px solid var(--border);
    box-shadow: 0 30px 60px -32px rgba(15,23,42,.35), 0 2px 6px rgba(15,23,42,.05); }
.auth-v2 .auth-card::before { content: ""; position: absolute; top: -1px; inset-inline: 26px; height: 3px; border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, #2563eb, #7c3aed, #06b6d4); }
.auth-v2.auth-staff .auth-card::before { background: linear-gradient(90deg, #0d9488, #22d3ee, #f59e0b); }
.auth-v2 .auth-brand { gap: 13px; margin-bottom: 20px; }
.auth-v2 .auth-brand svg, .auth-v2 .auth-brand img { width: 42px; height: 42px; }
.auth-v2 .auth-title { font-size: 20px; letter-spacing: -.01em; }
.auth-v2 .auth-sub { font-size: 12.5px; margin-top: 4px; }
.auth-v2 .auth-head h2 { font-size: 22px; margin: 0 0 6px; }
.auth-v2 .auth-head p { margin: 0 0 18px; color: var(--text-mute); font-size: 13px; }
.auth-v2 .auth-chip { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; padding: 4px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 800; white-space: nowrap; color: #b45309; background: color-mix(in srgb, #f59e0b 14%, transparent); border: 1px solid color-mix(in srgb, #f59e0b 35%, transparent); }
.auth-v2 .auth-chip svg { width: 13px; height: 13px; flex-shrink: 0; }
[data-theme="dark"] .auth-v2 .auth-chip { color: #fbbf24; }

.auth-v2 .auth-form label { font-size: 12.5px; color: var(--text); margin: 14px 0 7px; }
.auth-v2 .in-wrap { position: relative; display: block; }
.auth-v2 .in-wrap > svg { position: absolute; top: 50%; inset-inline-start: 14px; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-mute); pointer-events: none; transition: color .15s; }
.auth-v2 .in-wrap input { height: 50px; padding-inline-start: 44px; border-radius: 13px; background: var(--bg-card); font-size: 14.5px; }
.auth-v2 .in-wrap input[type="password"], .auth-v2 .in-wrap input.has-eye { padding-inline-end: 48px; }
.auth-v2 .in-wrap:focus-within > svg { color: var(--accent); }
.auth-v2 .auth-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.auth-v2 .pw-toggle { position: absolute; top: 50%; inset-inline-end: 7px; transform: translateY(-50%); width: 36px; height: 36px;
    border: 0; border-radius: 10px; background: transparent; color: var(--text-mute); cursor: pointer; display: grid; place-items: center; }
.auth-v2 .pw-toggle:hover { background: var(--accent-soft); color: var(--accent); }
.auth-v2 .pw-toggle svg { width: 18px; height: 18px; }
.auth-v2 .pw-toggle .ic-eye-off { display: none; }
.auth-v2 .pw-toggle[aria-pressed="true"] .ic-eye { display: none; }
.auth-v2 .pw-toggle[aria-pressed="true"] .ic-eye-off { display: block; }

.auth-v2 .auth-btn:not(.ghost) { color: #fff; }
.auth-v2 .auth-btn { height: 50px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    box-shadow: 0 12px 24px -12px rgba(37,99,235,.75); transition: transform .15s, box-shadow .15s, filter .15s; }
.auth-v2 .auth-btn:not(.ghost) { background: linear-gradient(135deg, #2563eb, #4f46e5); }
.auth-v2 .auth-btn:hover { transform: translateY(-1px); box-shadow: 0 16px 28px -12px rgba(37,99,235,.85); filter: brightness(1.05); }
.auth-v2 .auth-btn svg { width: 17px; height: 17px; }
.auth-v2.auth-staff .auth-btn:not(.ghost) { background: linear-gradient(135deg, #0f766e, #0d9488); box-shadow: 0 12px 24px -12px rgba(13,148,136,.75); }
.auth-v2 .auth-btn.ghost { background: var(--bg-card); color: var(--text); border: 1px solid var(--border-2); box-shadow: none; }
.auth-v2 .auth-btn.ghost:hover { transform: none; color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.auth-v2 .auth-actions { margin-top: 22px; }
.auth-v2 .auth-alt { margin-top: 14px; }
.auth-v2 .auth-sep { display: flex; align-items: center; gap: 10px; margin: 20px 0 4px; color: var(--text-mute); font-size: 11.5px; }
.auth-v2 .auth-sep::before, .auth-v2 .auth-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-v2 .auth-foot { align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border); }
.auth-v2 .auth-foot a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.auth-v2 .auth-foot svg { width: 14px; height: 14px; }
.auth-v2 .auth-error { border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); border-radius: 12px; }

/* ---------------------------------------------------------- phones -- */
@media (max-width: 900px) {
    .auth-v2 .auth-form-side { padding: 70px 14px 24px; }
    .auth-v2 .auth-mbrand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: var(--text); }
    .auth-v2 .auth-mbrand svg, .auth-v2 .auth-mbrand img { width: 36px; height: 36px; }
    .auth-v2 .auth-mbrand b { font-size: 15px; display: block; }
    .auth-v2 .auth-mbrand small { display: block; color: var(--text-mute); font-size: 11px; }
    .auth-v2 .auth-mbrand-cta { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; padding: 7px 11px; border-radius: 999px;
        color: var(--accent); background: var(--accent-soft); font-size: 12px; font-weight: 800; text-decoration: none; }
    .auth-v2 .auth-mbrand-cta svg { width: 14px; height: 14px; }
    [dir="rtl"] .auth-v2 .auth-mbrand-cta svg { transform: scaleX(-1); }
    .auth-v2 .auth-mwrap { width: 440px; max-width: 100%; display: flex; align-items: center; gap: 10px; }
    .auth-v2 .auth-card { margin-top: 0; padding: 28px 20px 20px; }
    .auth-v2 .auth-top-float { top: 14px; inset-inline: 14px; }
}
@media (max-width: 420px) {
    .auth-v2 .auth-actions { flex-direction: column; }
    .auth-v2 .auth-mbrand-cta span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* only the narrowest phones lose the word Home, never the button */
@media (max-width: 340px) {
    .auth-v2 .auth-homebtn span { display: none; }
    .auth-v2 .auth-homebtn { padding: 8px 10px; }
}
