:root {
    --sa-primary: var(--color-content-primary, #627452);
    --sa-primary-hover: #516141;
    --sa-tg-blue: #229ED9;
    --sa-text: var(--color-content-text, #3b3d40);
    --sa-text-muted: #6b7280;
    --sa-border: #e5e7eb;
    --sa-bg: #ffffff;
    --sa-bg-overlay: rgba(15, 23, 42, 0.5);
    --sa-error: #dc2626;
    --sa-error-bg: #fef2f2;
    --sa-success: #16a34a;
    --sa-radius: 8px;
    --sa-shadow: 0 20px 60px rgba(0,0,0,0.15);
    --sa-font: 'Manrope', system-ui, sans-serif;
}
#sktvd-auth-root { font-family: var(--sa-font); }
.sa-modal-overlay {
    position: fixed; inset: 0; z-index: 100000;
    background: var(--sa-bg-overlay); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
}
.sa-modal {
    background: var(--sa-bg); border-radius: var(--sa-radius);
    box-shadow: var(--sa-shadow);
    width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
    display: flex; flex-direction: column;
}
.sa-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px 0; }
.sa-modal-header h2 { margin: 0; font-size: 20px; font-weight: 700; }
.sa-modal-close { background: transparent; border: 0; padding: 8px; cursor: pointer; color: var(--sa-text-muted); font-size: 24px; }
.sa-tabs { display: flex; padding: 0 24px; border-bottom: 1px solid var(--sa-border); }
.sa-tab { flex: 1; padding: 12px 0; text-align: center; background: transparent; border: 0; font-size: 14px; font-weight: 500; color: var(--sa-text-muted); cursor: pointer; border-bottom: 2px solid transparent; }
.sa-tab[aria-selected="true"] { color: var(--sa-primary); border-bottom-color: var(--sa-primary); }
.sa-modal-body { padding: 24px; flex: 1; }
.sa-btn { width: 100%; padding: 12px 16px; border-radius: var(--sa-radius); border: 0; font-size: 16px; font-weight: 600; cursor: pointer; appearance: none; -webkit-appearance: none; }
.sa-btn-primary { background: var(--sa-primary); color: white; }
.sa-btn-primary:hover { background: var(--sa-primary-hover); }
.sa-btn-tg { background: var(--sa-tg-blue); color: white; display: flex; align-items: center; justify-content: center; gap: 8px; }
.sa-btn-secondary { background: transparent; color: var(--sa-text); border: 1px solid var(--sa-border); }
.sa-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.sa-divider { text-align: center; color: var(--sa-text-muted); font-size: 13px; margin: 20px 0; position: relative; }
.sa-divider::before, .sa-divider::after { content: ''; position: absolute; top: 50%; width: calc(50% - 30px); height: 1px; background: var(--sa-border); }
.sa-divider::before { left: 0; }
.sa-divider::after { right: 0; }
.sa-field { margin-bottom: 14px; }
.sa-field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.sa-field input[type="email"], .sa-field input[type="text"], .sa-field input[type="tel"], .sa-field input[type="password"] {
    width: 100%; padding: 10px 12px; border: 1px solid var(--sa-border); border-radius: var(--sa-radius);
    font-size: 16px; height: 44px; min-height: 44px; max-height: 44px;
    appearance: none; -webkit-appearance: none; box-sizing: border-box;
}
.sa-field input:focus { outline: 2px solid var(--sa-primary); outline-offset: -2px; }
.sa-field-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.sa-error { background: var(--sa-error-bg); color: var(--sa-error); padding: 10px 14px; border-radius: var(--sa-radius); font-size: 14px; margin-bottom: 16px; }
.sa-success-screen { text-align: center; padding: 32px 0; }
.sa-success-screen .sa-icon { font-size: 48px; color: var(--sa-success); margin-bottom: 16px; }
.sa-disclosure { margin-top: 16px; text-align: center; }
.sa-disclosure-btn { background: transparent; border: 0; color: var(--sa-text-muted); font-size: 13px; cursor: pointer; padding: 8px; }
.sa-checkbox-row { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0; font-size: 13px; }
.sa-checkbox-row a { color: var(--sa-primary); }
@media (max-width: 480px) {
    .sa-modal-overlay { align-items: flex-start; }
    .sa-modal { max-width: 100%; max-height: 100vh; height: 100vh; border-radius: 0; }
}
