/* =========================================================
   AUTH PAGES (Login + Register)
   Parent: .auth-page   |   Themes: .auth-login, .auth-register
   Units: px only
========================================================= */

/* ---------- Themes ---------- */
.auth-login,
.auth-register {
    --primary: #be5b22;
    --primary-dark: #a84917;
    --accent: #f2a06f;
    --ring: rgba(190, 91, 34, .12);
    --page-bg: #f6f3f0;
    --brand-bg: linear-gradient(145deg, #21150f 0%, #2c1b12 50%, #160f0b 100%);
}

/* ---------- Page ---------- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    position: relative;
    overflow: hidden;
    background: var(--page-bg);
    color: #1f2937;
    font-family: Inter, Arial, Helvetica, sans-serif;
}

.auth-page *,
.auth-page *::before,
.auth-page *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.auth-page::before,
.auth-page::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: var(--ring);
    pointer-events: none;
}

.auth-page::before { width: 420px; height: 420px; top: -210px; right: -170px; }
.auth-page::after  { width: 340px; height: 340px; bottom: -170px; left: -140px; }

.auth-page button,
.auth-page input { font-family: inherit; }

/* ---------- Card ---------- */
.auth-page .auth-card {
    width: 100%;
    max-width: 1040px;
    min-height: 620px;
    display: grid;
    grid-template-columns: 44% 56%;
    position: relative;
    z-index: 2;
    overflow: hidden;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .14), 0 8px 25px rgba(15, 23, 42, .05);
}

/* ---------- Brand panel ---------- */
.auth-page .auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 45px 38px;
    overflow: hidden;
    color: #fff;
    background: var(--brand-bg);
}

.auth-page .auth-brand::before,
.auth-page .auth-brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .12);
    pointer-events: none;
}

.auth-page .auth-brand::before { width: 380px; height: 380px; top: -190px; right: -160px; }
.auth-page .auth-brand::after  { width: 280px; height: 280px; bottom: -160px; left: -130px; }

.auth-page .brand-top,
.auth-page .brand-footer { position: relative; z-index: 2; }

.auth-page .brand-logo { display: flex; justify-content: center; margin-bottom: 30px; }

.auth-page .brand-logo img {
    width: 100px;
    height: auto;
    display: block;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}

.auth-page .brand-body { text-align: center; }

.auth-page .brand-badge {
    display: inline-block;
    margin-bottom: 16px;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 50px;
    background: rgba(255, 255, 255, .08);
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.auth-page .brand-body h2 {
    margin-bottom: 14px;
    font-size: 32px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.6px;
}

.auth-page .brand-body h2 span { color: var(--accent); }

.auth-page .brand-body p {
    max-width: 320px;
    margin: 0 auto;
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
    line-height: 1.75;
}

.auth-page .brand-features { display: grid; gap: 12px; margin-top: 30px; }

.auth-page .feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    background: rgba(255, 255, 255, .05);
    color: rgba(255, 255, 255, .88);
    font-size: 13px;
}

.auth-page .feature-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, .12);
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
}

.auth-page .brand-footer {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .5);
    text-align: center;
    font-size: 11px;
}

/* ---------- Form panel ---------- */
.auth-page .auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 55px;
}

.auth-page .auth-form-wrap { width: 100%; max-width: 410px; }

.auth-page .form-head { margin-bottom: 28px; }

.auth-page .form-head .eyebrow {
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.auth-page .form-head h1 {
    margin-bottom: 8px;
    color: #111827;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.7px;
}

.auth-page .form-head p { color: #6b7280; font-size: 13px; line-height: 1.6; }

/* ---------- Alert ---------- */
.auth-page .auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 13px;
    line-height: 1.5;
}

.auth-page .auth-alert b {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fee2e2;
    font-size: 12px;
}

/* ---------- Fields ---------- */
.auth-page .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.auth-page .form-group { margin-bottom: 17px; }

.auth-page .form-group label {
    display: block;
    margin-bottom: 7px;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
}

.auth-page .form-group label i { color: var(--primary); font-style: normal; }

.auth-page .input-wrap { position: relative; }

.auth-page .input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
    background: #f9fafb;
    color: #111827;
    font-size: 13px;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.auth-page .input::placeholder { color: #a1a1aa; }
.auth-page .input:hover { border-color: #cbd5e1; background: #fff; }

.auth-page .input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--ring);
}

.auth-page .has-icon .input { padding-left: 42px; }
.auth-page .has-toggle .input { padding-right: 62px; }

.auth-page .input-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 15px;
    pointer-events: none;
}

.auth-page .toggle-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    padding: 5px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.auth-page .toggle-btn:hover { background: var(--ring); }

/* ---------- Options ---------- */
.auth-page .form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.auth-page .remember {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
}

.auth-page .remember input { width: 14px; height: 14px; accent-color: var(--primary); }

.auth-page .link { color: var(--primary); font-size: 12px; font-weight: 700; text-decoration: none; }
.auth-page .link:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
.auth-page .btn {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, background .2s;
}

.auth-page .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 10px 22px var(--ring);
}

.auth-page .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px var(--ring); }
.auth-page .btn-primary:active { transform: translateY(0); }
.auth-page .btn-primary:disabled { opacity: .65; cursor: not-allowed; transform: none; box-shadow: none; }

.auth-page .btn-outline {
    margin-top: 14px;
    border-color: var(--primary);
    background: #fff;
    color: var(--primary);
}

.auth-page .btn-outline:hover { background: var(--ring); }

/* ---------- Password strength / match ---------- */
.auth-page .strength { margin-top: 8px; }

.auth-page .strength-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; height: 4px; }

.auth-page .strength-bars span { border-radius: 10px; background: #e5e7eb; transition: background .25s; }
.auth-page .strength-bars span.on { background: var(--primary); }

.auth-page .strength-text { margin-top: 5px; color: #9ca3af; font-size: 11px; font-weight: 600; }
.auth-page .strength[data-level="1"] .strength-text { color: #c23d25; }
.auth-page .strength[data-level="2"] .strength-text { color: var(--primary); }
.auth-page .strength[data-level="3"] .strength-text { color: #a45a24; }
.auth-page .strength[data-level="4"] .strength-text { color: #23834b; }

.auth-page .match-msg { display: none; margin-top: 6px; font-size: 11px; font-weight: 700; }
.auth-page .match-msg.ok  { display: block; color: #23834b; }
.auth-page .match-msg.bad { display: block; color: #c23d25; }

/* ---------- Footer note ---------- */
.auth-page .form-foot {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #eef0f3;
    color: #9ca3af;
    text-align: center;
    font-size: 12px;
}

.auth-page .form-foot a { color: var(--primary); font-weight: 800; text-decoration: none; }
.auth-page .form-foot a:hover { text-decoration: underline; }
.auth-page .form-foot strong { color: #6b7280; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .auth-page .auth-card { max-width: 560px; grid-template-columns: 1fr; }
    .auth-page .auth-brand { padding: 32px 28px; }
    .auth-page .brand-logo { margin-bottom: 18px; }
    .auth-page .brand-body h2 { font-size: 26px; }
    .auth-page .brand-features { margin-top: 22px; gap: 10px; }
    .auth-page .brand-footer { margin-top: 22px; }
    .auth-page .auth-panel { padding: 38px 32px; }
}

@media (max-width: 620px) {
    .auth-page { padding: 15px 10px; align-items: flex-start; }
    .auth-page .auth-card { border-radius: 18px; }
    .auth-page .auth-brand { padding: 26px 20px; }
    .auth-page .brand-logo img { width: 80px; }
    .auth-page .feature { padding: 10px 12px; font-size: 12px; }
    .auth-page .brand-body h2 { font-size: 23px; }
    .auth-page .brand-body p { font-size: 12px; }
    .auth-page .auth-panel { padding: 30px 20px; }
    .auth-page .form-head h1 { font-size: 26px; }
    .auth-page .form-row { grid-template-columns: 1fr; gap: 0; }
}
