/* ─────────────────────────────────────────────────────────────
   Samla Auth Pages — shared styles (Login, ForgotPassword, etc.)
   ───────────────────────────────────────────────────────────── */

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

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    background: #fff;
}

/* ── Layout ───────────────────────────────────────────────── */
.sl-layout {
    display: flex;
    min-height: 100vh;
}

/* ── Left brand panel ─────────────────────────────────────── */
.sl-brand {
    width: 42%;
    background: linear-gradient(155deg, #1677ff 0%, #003eb3 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 56px;
    position: relative;
    overflow: hidden;
}

.sl-brand::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 440px; height: 440px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}

.sl-brand::after {
    content: '';
    position: absolute;
    bottom: -100px; left: -100px;
    width: 340px; height: 340px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

.sl-brand-logo {
    font-size: 30px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1.5px;
    margin-bottom: 56px;
    position: relative; z-index: 1;
}

.sl-brand-headline {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
    margin-bottom: 14px;
    position: relative; z-index: 1;
}

.sl-brand-sub {
    font-size: 15px;
    color: rgba(255,255,255,0.72);
    line-height: 1.65;
    margin-bottom: 48px;
    position: relative; z-index: 1;
}

.sl-features {
    list-style: none;
    position: relative; z-index: 1;
}

.sl-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.88);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 14px;
}

.sl-check {
    width: 22px; height: 22px;
    background: rgba(255,255,255,0.18);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: #fff;
}

.sl-brand-footer {
    position: absolute;
    bottom: 28px; left: 56px;
    color: rgba(255,255,255,0.35);
    font-size: 12px;
    z-index: 1;
}

/* ── Right form panel ─────────────────────────────────────── */
.sl-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background: #fff;
    overflow-y: auto;
}

.sl-form-box {
    width: 100%;
    max-width: 400px;
}

/* Mobile logo */
.sl-mobile-header {
    display: none;
    align-items: center;
    margin-bottom: 36px;
}

.sl-mobile-logo {
    font-size: 22px;
    font-weight: 700;
    color: #1677ff;
    letter-spacing: 1px;
}

/* Tenant badge */
.sl-tenant-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e6f4ff;
    color: #1677ff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 24px;
}

/* Headings */
.sl-title {
    font-size: 28px;
    font-weight: 700;
    color: #111;
    margin-bottom: 6px;
}

.sl-subtitle {
    font-size: 15px;
    color: #666;
    margin-bottom: 32px;
    line-height: 1.6;
}

/* Info box */
.sl-info-box {
    background: #e6f4ff;
    border: 1px solid #91caff;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #0958d9;
    font-size: 13px;
    line-height: 1.6;
}

/* Validation */
.validation-summary-valid { display: none; }

.validation-summary-errors {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #cf1322;
    font-size: 13px;
}

.validation-summary-errors ul { margin: 0; padding-left: 16px; }

.field-validation-error {
    font-size: 12px;
    color: #ff4d4f;
    margin-top: 4px;
    display: block;
}

.field-validation-valid { display: none; }

/* Form elements */
.sl-group { margin-bottom: 18px; }

.sl-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #222;
    margin-bottom: 6px;
}

.sl-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #111;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.sl-input:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 3px rgba(22,119,255,0.12);
}

.sl-input.input-validation-error {
    border-color: #ff4d4f;
    box-shadow: 0 0 0 3px rgba(255,77,79,0.1);
}

/* Password toggle */
.sl-pw-wrap { position: relative; }

.sl-pw-toggle {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    cursor: pointer;
    color: #aaa;
    padding: 4px;
    display: flex; align-items: center;
    transition: color 0.15s;
}

.sl-pw-toggle:hover { color: #1677ff; }

/* Remember me row */
.sl-inline-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.sl-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    user-select: none;
}

.sl-checkbox-label input[type="checkbox"] {
    width: 15px; height: 15px;
    accent-color: #1677ff;
    cursor: pointer;
}

.sl-forgot {
    font-size: 14px;
    color: #1677ff;
    text-decoration: none;
    font-weight: 500;
}

.sl-forgot:hover { text-decoration: underline; }

/* Primary button */
.sl-btn-primary {
    width: 100%;
    padding: 11px;
    background: #1677ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
    letter-spacing: 0.2px;
}

.sl-btn-primary:hover { background: #0958d9; }
.sl-btn-primary:active { transform: scale(0.99); }

/* Divider */
.sl-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: #bbb;
    font-size: 13px;
}

.sl-divider::before,
.sl-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #f0f0f0;
}

/* External provider buttons */
.sl-btn-ext {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
    font-family: inherit;
    margin-bottom: 10px;
}

.sl-btn-ext:hover {
    border-color: #1677ff;
    background: #f0f7ff;
}

/* Bottom CTA / back link */
.sl-bottom-cta {
    text-align: center;
    margin-top: 28px;
    font-size: 14px;
    color: #666;
}

.sl-bottom-cta a {
    color: #1677ff;
    text-decoration: none;
    font-weight: 600;
}

.sl-bottom-cta a:hover { text-decoration: underline; }

/* Back link (arrow) */
.sl-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #1677ff;
    text-decoration: none;
    font-weight: 500;
    margin-top: 20px;
}

.sl-back-link:hover { text-decoration: underline; }

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sl-brand { display: none; }

    .sl-form-panel {
        padding: 36px 20px;
        justify-content: flex-start;
    }

    .sl-mobile-header { display: flex; }

    .sl-title { font-size: 24px; }
}
