/* SubjectLine.com Keycloak login theme — v2 split-screen (prototype-aligned) */

:root {
    --sl-blue: #4c9dff;
    --sl-orange: #ff9e1a;
    --sl-ink: #0f172a;
    --sl-muted: #64748b;
    --sl-line: #e2e8f0;
    --sl-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.sl-auth-page {
    font-family: var(--sl-font);
    background: #fff;
    color: var(--sl-ink);
    min-height: 100vh;
}

#kc-header,
#kc-header-wrapper,
#kc-locale,
.brand-logo {
    display: none !important;
}

.sl-auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sl-auth-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 1;
    min-height: 0;
}

/* ---- Left column (form) ---- */
.sl-auth-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 48px;
    background: #fff;
    border-right: 1px solid var(--sl-line);
}

.sl-auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-bottom: 36px;
}

.sl-auth-logo-link img {
    height: 38px;
    width: auto;
    display: block;
}

.sl-auth-powered {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.sl-auth-powered span {
    font-size: 11px;
    font-weight: 600;
    color: #b0b8c4;
}

.sl-auth-powered img {
    height: 16px;
    width: auto;
    filter: grayscale(100%) brightness(1.1);
    transition: filter 0.2s;
}

.sl-auth-powered:hover img {
    filter: grayscale(0) brightness(1);
}

.sl-auth-form-box {
    width: 100%;
    max-width: 420px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#kc-content,
#kc-content-wrapper,
#kc-form,
#kc-form-wrapper {
    width: 100%;
}

#kc-page-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--sl-ink);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
    text-align: left;
}

.subtitle {
    font-size: 14px;
    color: var(--sl-muted);
    margin-bottom: 28px;
    line-height: 1.5;
    text-align: left;
}

.sl-auth-icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
}

.sl-auth-icon-circle-blue {
    background: #ebf2ff;
}

/* Social */
#kc-social-providers ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sl-social-btn,
#kc-social-providers a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 20px;
    background: #fff;
    border: 1.5px solid var(--sl-line);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
    margin-bottom: 0;
}

.sl-social-btn:hover,
#kc-social-providers a:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
    background: #fff;
    color: #374151;
}

.google-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
    border: none;
}

.separator span {
    white-space: nowrap;
}

/* Form fields */
.form-group {
    margin-bottom: 16px;
}

.form-group label,
.control-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #374151;
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
#kc-form-login input[type="text"],
#kc-form-login input[type="password"] {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--sl-line);
    border-radius: 10px;
    font-size: 15px;
    color: var(--sl-ink);
    background: #f8fafc;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.form-group input:focus,
#kc-form-login input:focus {
    border-color: var(--sl-blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(76, 157, 255, 0.1);
}

.form-group input::placeholder {
    color: #b0b8c4;
}

.form-group select {
    width: 100%;
    padding: 13px 44px 13px 16px;
    border: 1.5px solid var(--sl-line);
    border-radius: 10px;
    font-size: 15px;
    color: var(--sl-ink);
    background-color: #f8fafc;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.41 0 6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    appearance: none;
    cursor: pointer;
    outline: none;
}

.form-group select:focus {
    border-color: var(--sl-blue);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(76, 157, 255, 0.1);
}

.field-hint {
    font-size: 11px;
    color: #9ca3af;
    margin: 8px 0 0;
    line-height: 1.5;
}

.password-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.password-label-row label {
    margin-bottom: 0;
}

.forgot-password-link {
    font-size: 12px;
    color: var(--sl-blue) !important;
    text-decoration: none;
    font-weight: 600;
}

.forgot-password-link:hover {
    text-decoration: underline;
    color: #2563eb !important;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 20px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--sl-blue);
    cursor: pointer;
}

.checkbox-wrapper label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    margin: 0;
    cursor: pointer;
}

#kc-login,
.btn-primary,
input[type="submit"].btn-primary {
    width: 100%;
    padding: 15px;
    background: var(--sl-orange);
    color: #000;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    box-shadow: 0 4px 14px rgba(255, 158, 26, 0.35);
    margin-top: 4px;
}

#kc-login:hover,
.btn-primary:hover {
    background: #e88a00;
    transform: translateY(-1px);
}

.sl-ghost-cta {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 13px 20px;
    text-align: center;
    background: transparent;
    color: #6b7280;
    border: 1.5px solid var(--sl-line);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.sl-ghost-cta:hover {
    background: var(--sl-orange);
    border-color: var(--sl-orange);
    color: #000 !important;
    transform: translateY(-1px);
    text-decoration: none;
}

#kc-registration {
    text-align: center;
    margin-top: 18px;
}

#kc-registration span {
    font-size: 14px;
    color: #6b7280;
}

#kc-registration a {
    color: var(--sl-blue);
    font-weight: 600;
    text-decoration: none;
}

#kc-registration a:hover {
    text-decoration: underline;
}

#kc-info {
    text-align: center;
    margin-top: 20px;
}

#kc-info a {
    color: var(--sl-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

#kc-info a:hover {
    text-decoration: underline;
}

.legal-text {
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.6;
    margin: 14px 0 16px;
}

.legal-text a {
    color: var(--sl-blue);
}

.input-error {
    display: block;
    color: #dc2626;
    font-size: 13px;
    margin-top: 6px;
}

.alert {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.5;
}

.alert-error,
.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-warning {
    background: #fffbeb;
    border: 1px solid #fed7aa;
    color: #d97706;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
}

.instruction {
    font-size: 14px;
    color: var(--sl-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

/* ---- Right column (marketing) ---- */
.sl-auth-right {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px;
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 55%, #0f2744 100%);
}

.sl-auth-right::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(76, 157, 255, 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
}

.sl-auth-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
}

.sl-auth-orb-a {
    width: 400px;
    height: 400px;
    background: rgba(76, 157, 255, 0.15);
    top: -100px;
    right: -100px;
}

.sl-auth-orb-b {
    width: 260px;
    height: 260px;
    background: rgba(255, 158, 26, 0.08);
    bottom: -60px;
    left: -40px;
}

.sl-auth-right-inner {
    position: relative;
    z-index: 1;
    max-width: 460px;
}

.sl-auth-right h2 {
    font-size: clamp(24px, 2.8vw, 30px);
    font-weight: 900;
    color: #fff;
    line-height: 1.25;
    letter-spacing: -0.8px;
    margin-bottom: 10px;
}

.sl-auth-right-sub {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    margin-bottom: 36px;
}

.sl-auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(76, 157, 255, 0.12);
    border: 1px solid rgba(76, 157, 255, 0.25);
    color: #93c5fd;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border-radius: 20px;
    padding: 5px 14px;
    margin-bottom: 24px;
}

.sl-auth-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sl-blue);
}

.sl-auth-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 32px;
}

.sl-auth-stat {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 18px 20px;
}

.sl-auth-stat-num {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    margin-bottom: 4px;
}

.sl-auth-stat-num span {
    font-size: 16px;
    color: var(--sl-blue);
}

.sl-auth-stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
}

.sl-auth-testimonial {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px 22px;
    margin-bottom: 24px;
}

.sl-auth-testimonial p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.65;
    margin: 0 0 14px;
    font-style: italic;
}

.sl-auth-testimonial-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sl-auth-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4c9dff, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.sl-auth-testimonial-author h5 {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.sl-auth-testimonial-author p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
    font-style: normal;
}

.sl-auth-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 40px;
}

.sl-auth-feat {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px 18px;
}

.sl-auth-feat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.sl-auth-feat-icon-blue { background: rgba(76, 157, 255, 0.15); }
.sl-auth-feat-icon-orange { background: rgba(255, 158, 26, 0.15); }
.sl-auth-feat-icon-green { background: rgba(16, 185, 129, 0.15); }
.sl-auth-feat-icon-purple { background: rgba(139, 92, 246, 0.15); }

.sl-auth-feat h4 {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 2px;
}

.sl-auth-feat p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    line-height: 1.5;
}

.sl-auth-score-preview {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.sl-auth-score-ring {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
}

.sl-auth-score-info h5 {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    margin: 0 0 2px;
    font-weight: 500;
}

.sl-auth-score-info p {
    font-size: 13px;
    color: #fff;
    margin: 0;
    font-weight: 600;
}

.sl-auth-score-badge {
    margin-left: auto;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    border: 1px solid rgba(52, 211, 153, 0.3);
    white-space: nowrap;
}

/* Footer */
.sl-auth-footer {
    background: #fff;
    border-top: 1px solid var(--sl-line);
    padding: 18px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.sl-auth-footer p {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
}

.sl-auth-footer-links {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.sl-auth-footer-links a {
    font-size: 12px;
    color: #9ca3af;
    text-decoration: none;
    padding: 3px 8px;
}

.sl-auth-footer-links a:hover {
    color: #374151;
}

.sl-auth-footer-links span {
    color: #e5e7eb;
}

/* Legacy Keycloak wrappers */
.login-pf-page,
.card-pf {
    all: unset;
}

@media (max-width: 1024px) {
    .sl-auth-wrap {
        grid-template-columns: 1fr;
    }

    .sl-auth-right {
        display: none;
    }

    .sl-auth-left {
        padding: 32px 24px;
        border-right: none;
    }
}

@media (max-width: 480px) {
    #kc-page-title {
        font-size: 22px;
    }

    .sl-auth-left {
        padding: 24px 16px 32px;
    }

    .sl-auth-form-box {
        width: 100%;
        max-width: none;
    }

    .sl-auth-logo {
        margin-bottom: 28px;
    }

    #kc-login,
    .btn-primary,
    .sl-social-btn,
    #kc-social-providers a {
        width: 100%;
        justify-content: center;
    }

    .sl-auth-footer-links {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}
