/* ==========================================================================
   MobilePower auth pages (login / forgot password)
   Shares tokens with landing.css
   ========================================================================== */

:root {
    --navy: #0c3882;
    --navy-900: #071f4a;
    --navy-700: #0a2f6e;
    --navy-50: #eef3fb;
    --navy-100: #dce6f6;
    --orange: #e59138;
    --orange-600: #cf7a20;
    --orange-50: #fdf3e8;
    --ink: #0f1a2e;
    --body: #4a5468;
    --muted: #7a8499;
    --line: #e1e6ef;
    --danger: #c63b3b;
    --danger-50: #fdeeee;
    --success: #1f9d63;
    --success-50: #e6f6ee;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--body);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; color: var(--ink); letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0; }
img { display: block; max-width: 100%; }

.auth {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100vh;
}

/* ---------- Brand panel ---------- */
.auth__brand {
    position: relative;
    overflow: hidden;
    background: var(--navy);
    color: rgba(255, 255, 255, .78);
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
}
.auth__brand-logo img { height: 44px; width: auto; }

.auth__brand-body { margin: auto 0; max-width: 460px; position: relative; z-index: 1; }
.auth__brand h2 { color: #fff; font-size: clamp(32px, 3.4vw, 46px); font-weight: 800; }
.auth__brand h2 em { font-style: normal; color: var(--orange); }
.auth__brand-lead { margin: 18px 0 36px; font-size: 17px; }

.auth__perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.auth__perks li { display: flex; align-items: center; gap: 14px; color: #fff; font-weight: 600; }
.auth__perks i {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .1);
    color: var(--orange);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.auth__brand-foot { font-size: 13px; color: rgba(255, 255, 255, .5); position: relative; z-index: 1; }

/* decorative rings + receipt card */
.auth__ring {
    position: absolute;
    border-radius: 50%;
    border: 56px solid rgba(229, 145, 56, .12);
    width: 520px; height: 520px;
    right: -220px; bottom: -220px;
}
.auth__ring--sm {
    border-width: 2px;
    border-color: rgba(255, 255, 255, .08);
    width: 360px; height: 360px;
    right: auto; bottom: auto;
    left: -140px; top: -120px;
}
.auth__card {
    position: absolute;
    right: 48px; top: 96px;
    display: flex; align-items: center; gap: 12px;
    background: #fff;
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .35);
    font-size: 13px;
    animation: float 6s ease-in-out infinite;
}
.auth__card strong { display: block; color: var(--ink); font-size: 14px; }
.auth__card small { color: var(--muted); }
.auth__card-icon {
    width: 38px; height: 38px;
    border-radius: 12px;
    background: var(--success-50);
    color: var(--success);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .auth__card { animation: none; } }

/* ---------- Form panel ---------- */
.auth__main {
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
}
.auth__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}
.auth__top-logo img { height: 36px; width: auto; }
.auth__back { font-size: 14px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.auth__back:hover { color: var(--navy); }

.auth__form-wrap { width: 100%; max-width: 440px; margin: auto; padding: 40px 0; }

.auth__title { font-size: 32px; font-weight: 800; }
.auth__sub { margin-top: 8px; color: var(--muted); font-size: 16px; }

.auth__panel[hidden] { display: none; }

.field { margin-top: 20px; }
.field label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
}
.field__control { position: relative; }
.field__control > i {
    position: absolute;
    left: 16px; top: 50%;
    transform: translateY(-50%);
    font-size: 19px;
    color: var(--muted);
    pointer-events: none;
}
.field input {
    width: 100%;
    height: 52px;
    padding: 0 48px 0 46px;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    background: #fff;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder { color: #a3abbc; }
.field input:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 4px rgba(12, 56, 130, .1);
}
.field select {
    width: 100%;
    height: 52px;
    padding: 0 40px 0 46px;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%237a8499' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field select:invalid { color: #a3abbc; }
.field select:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 4px rgba(12, 56, 130, .1);
}
.field__hint { margin-top: 6px; font-size: 12px; color: var(--muted); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

.auth__legal { margin-top: 16px; font-size: 13px; color: var(--muted); text-align: center; }
.auth__legal a { color: var(--navy); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.field__toggle {
    position: absolute;
    right: 6px; top: 50%;
    transform: translateY(-50%);
    width: 40px; height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-size: 19px;
    cursor: pointer;
}
.field__toggle:hover { color: var(--navy); background: var(--navy-50); }

.link-btn {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    font-size: 13px;
    color: var(--orange-600);
    cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 52px;
    margin-top: 28px;
    border: 0;
    border-radius: 999px;
    background: var(--navy);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--navy-700); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .7; cursor: progress; }

.auth__alt { margin-top: 28px; text-align: center; color: var(--muted); }
.auth__alt a, .auth__alt .link-btn { color: var(--orange-600); font-weight: 700; font-size: inherit; }
.auth__alt a:hover { text-decoration: underline; }

.auth__hint {
    display: flex; gap: 10px;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--navy-50);
    color: var(--navy);
    font-size: 13px;
}
.auth__hint i { font-size: 17px; }

.alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 20px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
}
.alert i { font-size: 18px; line-height: 1.3; }
.alert--error { background: var(--danger-50); color: var(--danger); }
.alert--success { background: var(--success-50); color: var(--success); }
.alert ul { margin: 0; padding: 0; list-style: none; }

.auth__secure {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: 32px;
    font-size: 13px;
    color: var(--muted);
}
.auth__secure i { color: var(--success); font-size: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .auth { grid-template-columns: 1fr; }
    .auth__brand { display: none; }
}
@media (min-width: 992px) {
    .auth__top-logo { visibility: hidden; }
}
