/* SSO login dark theme – matches reference design */
:root {
    --sso-bg: #1a1a1a;
    --sso-bg-grid: rgba(255, 255, 255, 0.02);
    --sso-accent: #ff5722;
    --sso-accent-hover: #e64a19;
    --sso-text: #ffffff;
    --sso-text-muted: #9ca3af;
    --sso-input-bg: #343434;
    --sso-input-border: rgba(255, 255, 255, 0.2);
    --sso-input-placeholder: #6b7280;
    --sso-btn-secondary: #374151;
    --sso-link: #60a5fa;
}

.sso-login-body {
    background: var(--sso-bg);
    min-height: 100vh;
    margin: 0;
}

.sso-alert {
    margin-bottom: 16px;
    border-radius: 10px;
    font-size: 14px;
}
.sso-alert.alert-danger {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.4);
    color: #f8b4c4;
}
.sso-alert.alert-info {
    background: rgba(13, 202, 240, 0.1);
    border: 1px solid rgba(13, 202, 240, 0.3);
    color: #9dd5eb;
}

.sso-auth-wrapper {
    min-height: 100vh;
    display: flex;
}

/* Left panel: dark charcoal with diagonal grid */
.auth-left-panel {
    flex: 0 0 50%;
    min-height: 100vh;
    padding: 8px 60px 8px 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--sso-bg);
    background-image:
        url("../images/95a5cf881ee07de1f3f9804a79d7fa0353fbeca8.jpg"),
        linear-gradient(135deg, var(--sso-bg-grid) 1px, transparent 1px),
        linear-gradient(-45deg, var(--sso-bg-grid) 1px, transparent 1px);
    background-repeat: no-repeat, repeat, repeat;
    background-position:
        top center,
        top left,
        top left;
    background-size:
        cover,
        28px 28px,
        28px 28px;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
}

.auth-left-panel-inner {
    flex: 1;
    display: flex;
    align-items: start;
    justify-content: center;
}

.auth-left {
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
}

/* Segmented tab bar (unified container) */
.sso-tabs {
    display: flex;
    margin-bottom: 38px;
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
    border-radius: 10px;
    border: 1px solid #2a2a2a;
    background: #3d3d3d;
    padding: 1px;
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.2);
}

.sso-tabs a {
    padding: 9px 28px;
    font-size: 14px;
    text-decoration: none;
    transition:
        background 0.2s,
        color 0.2s,
        box-shadow 0.2s,
        border-color 0.2s;
}

.sso-tabs a:first-child {
    border-radius: 8px;
}

.sso-tabs a:last-child {
    border-radius: 8px;
}

.sso-tabs a:not(.active) {
    color: #aaaaaa;
    font-weight: 400;
}

.sso-tabs a.active {
    background:
        radial-gradient(
            ellipse 100% 70% at 50% 0%,
            rgba(91, 59, 36, 0.45) 0%,
            transparent 65%
        ),
        #1a1a1a;
    color: #ffffff;
    font-weight: 600;
    border: 2px solid #888888;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.2);
}

/* Logo */
.sso-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.sso-logo img {
    height: 36px;
}

.sso-logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--sso-text);
}

.sso-logo-text .accent {
    color: var(--sso-accent);
}

/* Heading */
.sso-heading {
    font-size: 20px;
    font-weight: 700;
    color: var(--sso-text);
    margin-bottom: 20px;
    line-height: 1.3;
}

.sso-subheading {
    font-size: 16px;
    font-weight: 600;
    color: var(--sso-text);
}

/* Form */
.sso-form .form-group {
    margin-bottom: 10px;
}

.sso-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--sso-text);
    margin-bottom: 8px;
}

.sso-form .form-control {
    width: 100%;
    padding: 12px 18px;
    font-size: 15px;
    color: var(--sso-text);
    background: var(--sso-input-bg);
    border: 1px solid var(--sso-input-border);
    border-radius: 12px;
    transition: border-color 0.2s;
}

.sso-form .form-control::placeholder {
    color: var(--sso-input-placeholder);
}

.sso-form .form-control:focus {
    border-color: var(--sso-accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 87, 34, 0.2);
}

.sso-form .form-control.is-invalid {
    border-color: #ef4444;
}

.sso-form input[type="checkbox"] {
    margin-right: 6px;
}

.sso-form label.checkbox-label {
    font-weight: normal;
    font-size: 14px;
    color: var(--sso-text-muted);
}

.sso-form .form-row {
    display: flex;
    gap: 16px;
}

.sso-form .form-row .form-group {
    flex: 1;
}

/* Primary button */
.sso-btn-primary {
    width: 100%;
    padding: 12px 20px;
    font-weight: 600;
    font-style: SemiBold;
    font-size: 14px;
    line-height: 150%;
    letter-spacing: 0%;
    color: var(--sso-text);
    background: var(--sso-accent);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 14px;
}

.sso-btn-primary:hover {
    background: var(--sso-accent-hover);
    color: var(--sso-text);
}

/* Secondary (Google) button */
.sso-btn-secondary {
    width: 100%;
    padding: 14px 24px;

    font-weight: 600;
    font-style: SemiBold;
    font-size: 14px;
    line-height: 150%;
    letter-spacing: 0%;

    color: var(--sso-text);
    background: #1f1f1f;
    border: 1px solid #575659;
    border-radius: 10px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition:
        background 0.2s,
        border-color 0.2s;
}

.sso-btn-secondary:hover {
    background: #4b5563;
    border-color: #525252;
    color: var(--sso-text);
}

/* OR separator */
.sso-separator {
    text-align: center;
    margin: 16px 0 16px;
    color: var(--sso-text);
    font-size: 14px;
}

/* Footer */
.sso-footer {
    margin-top: 24px;
    font-size: 13px;
    color: var(--sso-text-muted);
    text-align: center;
}

.sso-footer-bottom {
    padding-top: 28px;
    margin-top: 0;
    margin-bottom: 0;
    flex-shrink: 0;
}

/* Last-used account card */
.last-used-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    text-decoration: none;
    color: var(--sso-text);
    margin-bottom: 2px;
}

.last-used-card:hover {
    background: #262626;
    transform: translateY(-1px);
    opacity: 0.8;
}

.last-used-avatar {
    width: 30px;
    height: 30px;
    border-radius: 9999px;
    background: #2b2b2b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.last-used-main {
    flex: 1;
    margin-left: 12px;
}

.last-used-profile {
    flex: 1;
    margin-left: 12px;
    font-weight: 100;
    color: var(--sso-text-muted);
}

.last-used-name {
    font-size: 15px;
    font-weight: 600;
}

.last-used-email {
    font-size: 13px;
    color: var(--sso-text-muted);
}

.last-used-meta {
    font-size: 12px;
    color: var(--sso-text-muted);
    font-style: italic;
}

.last-used-divider {
    margin: 10px 0 16px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.last-used-secondary {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 10px 2px 14px;
    background: transparent;
    border: none;
    color: var(--sso-text-muted);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.last-used-secondary:hover {
    color: var(--sso-text);
}

.last-used-secondary-avatar {
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    background: #2b2b2b;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.last-used-secondary-avatar .material-icons-outlined {
    font-size: 20px;
}

.last-used-secondary-label {
    font-size: 14px;
}

.sso-footer a {
    color: var(--sso-link);
    text-decoration: none;
}

.sso-footer a:hover {
    text-decoration: underline;
}

/* Right panel – video */
.video-side {
    flex: 1;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.video-side::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(31, 31, 31, 0.9) 0%,
            rgba(31, 31, 31, 0.2) 43.04%
        ),
        linear-gradient(
            0deg,
            rgba(31, 31, 31, 0.9) 0%,
            rgba(31, 31, 31, 0.2) 43.04%
        );
}

.video-side video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translateZ(0);
    z-index: 0;
}

/* Responsive: hide video, full-width form */
@media (max-width: 991px) {
    .auth-left-panel {
        flex: 1 1 100%;
        transform: none;
        box-shadow: none;
    }

    .auth-left-panel > * {
        transform: none;
    }
}
