/**
 * NxtGateW — Login & Register (merchant / PSP)
 * Inspired layout: centered card + split register; brand purple from app theme.
 */
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css");

:root {
    --auth-primary: #c33aec;
    --auth-primary-dark: #a02bb8;
    --auth-primary-soft: #e9d5ff;
    --auth-text: #111111;
    --auth-text-muted: #6b7280;
    --auth-border: #e5e7eb;
    --auth-bg: #f3f4f6;
    --auth-card: #ffffff;
    --auth-link: #2563eb;
    --auth-radius-card: 20px;
    --auth-radius-input: 10px;
    --auth-radius-pill: 9999px;
}

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

body.auth-portal-page,
body.auth-register-page {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    color: var(--auth-text);
    background: var(--auth-bg);
}

/* ---------- Logo (placeholder wordmark) ---------- */
.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    color: inherit;
}

.auth-logo-text {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--auth-text);
}

.auth-logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    padding: 4px 10px 4px 8px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-dark));
    border-radius: 6px;
    line-height: 1;
}

/* ---------- Login ---------- */
.auth-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.auth-login-card {
    width: 100%;
    max-width: 420px;
    background: var(--auth-card);
    border-radius: var(--auth-radius-card);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    padding: 40px 36px 36px;
}

.auth-login-card .auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.auth-field {
    margin-bottom: 20px;
}

.auth-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-text);
    margin-bottom: 8px;
}

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

.auth-input-wrap input {
    width: 100%;
    padding: 14px 44px 14px 14px;
    font-size: 15px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-input);
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input-wrap input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(195, 58, 236, 0.15);
}

.auth-input-wrap input::placeholder {
    color: #9ca3af;
}

.auth-input-actions {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
}

.auth-input-actions button {
    border: none;
    background: none;
    padding: 6px;
    cursor: pointer;
    color: var(--auth-text-muted);
    font-size: 16px;
    line-height: 1;
    border-radius: 6px;
}

.auth-input-actions button:hover {
    color: var(--auth-text);
    background: #f3f4f6;
}

.auth-forgot-row {
    text-align: right;
    margin: -8px 0 24px;
}

.auth-forgot-row a {
    font-size: 14px;
    font-weight: 500;
    color: var(--auth-link);
    text-decoration: none;
}

.auth-forgot-row a:hover {
    text-decoration: underline;
}

.auth-btn-primary {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-dark));
    border: none;
    border-radius: var(--auth-radius-pill);
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.auth-btn-primary:hover {
    opacity: 0.95;
}

.auth-btn-primary:active {
    transform: scale(0.99);
}

a.auth-btn-primary {
    box-sizing: border-box;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--auth-text-muted);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.auth-btn-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    color: var(--auth-text);
    background: #fff;
    border: 2px solid var(--auth-text);
    border-radius: var(--auth-radius-pill);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.auth-btn-outline:hover {
    background: #fafafa;
    border-color: #374151;
}

.auth-alert {
    padding: 12px 14px;
    border-radius: var(--auth-radius-input);
    font-size: 14px;
    margin-bottom: 20px;
}

.auth-alert--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.auth-alert--success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

/* ---------- Register layout ---------- */
.auth-reg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    background: #fff;
    border-bottom: 1px solid var(--auth-border);
}

.auth-reg-header .auth-logo-badge {
    font-size: 0.65rem;
    padding: 3px 8px;
}

.auth-reg-header-link {
    font-size: 15px;
    font-weight: 600;
    color: var(--auth-primary);
    text-decoration: none;
}

.auth-reg-header-link:hover {
    text-decoration: underline;
}

.auth-reg-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - 73px);
    max-width: 1100px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .auth-reg-body {
        grid-template-columns: 1fr;
    }
    .auth-reg-aside {
        display: none;
    }
}

.auth-reg-aside {
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-right: 1px solid var(--auth-border);
    background: linear-gradient(180deg, #fafafa 0%, #f3f4f6 100%);
}

.auth-reg-avatars {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 28px;
}

.auth-reg-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--auth-primary-soft), var(--auth-primary));
    color: #fff;
    font-weight: 800;
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(195, 58, 236, 0.25);
}

.auth-reg-aside p {
    max-width: 280px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--auth-text-muted);
}

.auth-reg-main {
    padding: 48px 40px 60px;
    background: #fff;
}

.auth-reg-main h1 {
    margin: 0 0 10px;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.auth-reg-main .auth-reg-sub {
    margin: 0 0 28px;
    font-size: 15px;
    color: var(--auth-text-muted);
}

.auth-account-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
}

.auth-account-card {
    position: relative;
    display: block;
    padding: 18px 18px 18px 52px;
    border: 2px solid var(--auth-border);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.auth-account-card:hover {
    border-color: #d1d5db;
}

.auth-account-card.is-selected {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 1px var(--auth-primary);
}

.auth-account-card input[type="radio"] {
    position: absolute;
    left: 20px;
    top: 50%;
    margin-top: -9px;
    width: 18px;
    height: 18px;
    accent-color: var(--auth-primary);
}

.auth-account-card h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 700;
}

.auth-account-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--auth-text-muted);
}

.auth-reg-footer-brand {
    position: fixed;
    bottom: 16px;
    left: 24px;
    font-size: 12px;
    color: var(--auth-text-muted);
}

@media (max-width: 900px) {
    .auth-reg-footer-brand {
        position: static;
        padding: 16px;
        text-align: center;
    }
}
