/* BetterWink Auth Page — Design System B&W */
:root {
    --black: #000000;
    --white: #ffffff;
    --g800: #1e1e1e;
    --g700: #333333;
    --g600: #525252;
    --g500: #737373;
    --g400: #a3a3a3;
    --g300: #c4c4c4;
    --g200: #e5e5e5;
    --g100: #f0f0f0;
    --g50:  #f7f7f7;
    --pill: 9999px;
    --r16:  16px;
    --r24:  24px;
}

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

body.bw-auth-page {
    font-family: 'Outfit', sans-serif;
    background: var(--white);
    color: var(--black);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── LAYOUT ── */
.bw-auth-wrap {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .bw-auth-wrap { grid-template-columns: 1fr; }
    .bw-auth-panel { display: none; }
}

/* ── LEFT PANEL (decorative) ── */
.bw-auth-panel {
    background: var(--black);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
}

.bw-auth-panel::before {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
    top: -100px; left: -100px;
}

.bw-auth-panel::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.05);
    bottom: -80px; right: -80px;
}

.bw-auth-panel-content { position: relative; z-index: 1; text-align: center; color: var(--white); }

.bw-auth-panel-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-bottom: 48px;
}

.bw-auth-panel-logo span {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--white);
    letter-spacing: -0.5px;
}

.bw-auth-brand-logo {
    display: block;
    margin: 0 auto 56px;
    text-align: center;
}
.bw-auth-brand-logo img {
    max-width: 180px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.bw-auth-panel h2 {
    font-family: 'Playfair Display', serif;
    font-size: 38px;
    line-height: 1.2;
    margin-bottom: 16px;
    font-style: italic;
}

.bw-auth-panel h2 em { font-style: normal; color: var(--g400); }

.bw-auth-panel p {
    color: var(--g400);
    font-size: 15px;
    line-height: 1.7;
    max-width: 340px;
}

.bw-auth-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--r16);
    overflow: hidden;
    margin-top: 48px;
    width: 100%;
    max-width: 360px;
}

.bw-auth-stat {
    background: rgba(255,255,255,0.04);
    padding: 20px;
    text-align: center;
}

.bw-auth-stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    display: block;
}

.bw-auth-stat-label {
    font-size: 12px;
    color: var(--g500);
    margin-top: 4px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── RIGHT PANEL (form) ── */
.bw-auth-form-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 48px;
    background: var(--white);
}

@media (max-width: 480px) {
    .bw-auth-form-wrap { padding: 40px 24px; }
}

.bw-auth-form-inner { width: 100%; max-width: 400px; }

/* Mobile logo */
.bw-auth-mobile-logo {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .bw-auth-mobile-logo { display: flex; }
}

.bw-auth-mobile-logo span {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--black);
}

/* ── TABS ── */
.bw-auth-tabs {
    display: flex;
    gap: 0;
    background: var(--g50);
    border-radius: var(--pill);
    padding: 4px;
    margin-bottom: 32px;
}

.bw-auth-tab {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: var(--pill);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--g500);
    cursor: pointer;
    transition: all 0.2s ease;
}

.bw-auth-tab.active {
    background: var(--white);
    color: var(--black);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* ── FORM TITLE ── */
.bw-auth-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 6px;
    line-height: 1.2;
}

.bw-auth-subtitle {
    font-size: 14px;
    color: var(--g500);
    margin-bottom: 28px;
}

/* ── ROLE SELECTOR (registro) ── */
.bw-role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.bw-role-option {
    border: 1.5px solid var(--g200);
    border-radius: var(--r16);
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.bw-role-option:hover { border-color: var(--g400); }
.bw-role-option.selected { border-color: var(--black); background: var(--g50); }

.bw-role-option-icon { font-size: 20px; margin-bottom: 6px; }

.bw-role-option-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--black);
    display: block;
}

.bw-role-option-desc {
    font-size: 11px;
    color: var(--g500);
    margin-top: 2px;
    display: block;
}

/* ── FORM FIELDS ── */
.bw-form-group { margin-bottom: 16px; }

.bw-form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--g700);
    margin-bottom: 6px;
}

.bw-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--g200);
    border-radius: var(--r16);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    color: var(--black);
    background: var(--white);
    outline: none;
    transition: border-color 0.2s;
}

.bw-form-input:focus { border-color: var(--black); }
.bw-form-input.error { border-color: #e53e3e; }

.bw-form-error {
    font-size: 12px;
    color: #e53e3e;
    margin-top: 4px;
    display: none;
}

.bw-form-error.visible { display: block; }

/* ── REMEMBER / FORGOT ── */
.bw-form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.bw-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--g600);
    cursor: pointer;
}

.bw-remember input[type="checkbox"] { accent-color: var(--black); }

.bw-forgot {
    font-size: 13px;
    color: var(--g500);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.bw-forgot:hover { border-color: var(--g500); color: var(--g500); }

/* ── SUBMIT BUTTON ── */
.bw-btn-submit {
    width: 100%;
    padding: 14px 24px;
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: var(--pill);
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-bottom: 20px;
    position: relative;
}

.bw-btn-submit:hover { opacity: 0.85; }
.bw-btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.bw-btn-submit .bw-spinner {
    display: none;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: bw-spin 0.6s linear infinite;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes bw-spin { to { transform: translateY(-50%) rotate(360deg); } }

/* ── SOCIAL DIVIDER ── */
.bw-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--g400);
    font-size: 12px;
}

.bw-divider::before, .bw-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--g200);
}

/* ── SOCIAL BUTTONS ── */
.bw-social-btns { display: flex; flex-direction: column; gap: 10px; }

.bw-btn-social {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border: 1.5px solid var(--g200);
    border-radius: var(--pill);
    background: var(--white);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--g700);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.bw-btn-social:hover { border-color: var(--g400); background: var(--g50); }

.bw-btn-social svg { flex-shrink: 0; }

/* ── SWITCH TAB LINK ── */
.bw-auth-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--g500);
}

.bw-auth-switch a {
    color: var(--black);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid var(--black);
}

/* ── GLOBAL MESSAGE ── */
.bw-auth-message {
    padding: 12px 16px;
    border-radius: var(--r16);
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

.bw-auth-message.error { background: #fff5f5; border: 1px solid #fed7d7; color: #c53030; display: block; }
.bw-auth-message.success { background: #f0fff4; border: 1px solid #9ae6b4; color: #276749; display: block; }

/* ── TERMS NOTE ── */
.bw-terms-note {
    font-size: 11px;
    color: var(--g400);
    text-align: center;
    margin-top: 16px;
    line-height: 1.6;
}

.bw-terms-note a { color: var(--g500); text-decoration: underline; }
