﻿/* sso-login.css - SSO Portal Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --sso-dark-bg: #0e0e0e;
    --sso-accent-blue: #ffffff;
    --sso-accent-hover: #e4e4e7;
    --sso-text-light: #ffffff;
    --sso-text-muted: #a1a1aa;
    /* zinc-400 */
    --sso-text-darker: #71717a;
    /* zinc-500 */
    --sso-border: #27272a;
    /* zinc-800 */
    --sso-input-bg: #0d0d0d;
    /* zinc-950 */
}

/*
 * These pages carry their own box model.
 *
 * The sign-in page loaded the whole Tailwind build and inherited its
 * preflight; the sign-up page did not, so the same markup produced a Google
 * button wider than the inputs beneath it -- padding added to the width on
 * one page and included in it on the other. Neither page needs Tailwind now,
 * so the reset lives here, where the rest of these styles are.
 */
.sso-body,
.sso-body *,
.sso-body *::before,
.sso-body *::after {
    box-sizing: border-box;
}

body.sso-body {
    margin: 0;
    padding: 0;
    font-family: 'Aeonik', 'Inter', sans-serif;
    background-color: var(--sso-dark-bg);
    overflow: hidden;
    height: 100vh;
}

.sso-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* Left Showcase Area */
.sso-showcase {
    flex: 6;
    background: var(--sso-dark-bg);
    border-right: 1px solid var(--sso-border);
    position: relative;
    padding: 4rem 4rem 4rem 5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--sso-text-light);
}

/* Background subtle glow */
.sso-showcase::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.sso-logo-wrapper {
    display: block;
    margin-bottom: 3rem;
    z-index: 10;
    text-decoration: none;
    width: fit-content;
}

.sso-logo-img {
    height: 28px;
    width: auto;
    object-fit: contain;
}

/*
 * The heading and its subtitle share one measure.
 *
 * They did not: the block was full-width and centred, while the paragraph
 * inside it was capped at 520px and left-aligned within that width. So the
 * headline centred on the column and the line under it centred on a box
 * pinned to the left, and the two never lined up. Same max-width, both
 * centred, and the card below uses the same 520px -- so all three share an
 * edge instead of three different ones.
 */
.sso-header {
    z-index: 10;
    position: relative;
    margin: 0 auto 2rem;
    text-align: center;
    max-width: 520px;
    width: 100%;
}

.sso-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    letter-spacing: -0.03em;
}

.sso-header p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--sso-text-muted);
    margin: 0;
}

/* Latest article card */
.sso-article-card {
    display: flex;
    flex-direction: column;
    z-index: 10;
    position: relative;
    max-width: 520px;
    width: 100%;
    align-self: center;
    text-decoration: none;
    border: 1px solid var(--sso-border);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.sso-article-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.sso-article-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
}

.sso-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sso-article-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sso-article-meta {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--sso-text-muted);
}

.sso-article-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--sso-text-light);
    margin: 0;
}

.sso-article-excerpt {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--sso-text-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Static Product List */
.sso-product-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 10;
    position: relative;
    max-width: 400px;
}

.sso-category {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sso-category-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--sso-text-light);
    margin: 0;
    letter-spacing: -0.01em;
}

.sso-category-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sso-category-items li {
    font-size: 0.95rem;
    color: var(--sso-text-darker);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.sso-category-items li::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background-color: var(--sso-accent-blue);
    border-radius: 50%;
    opacity: 0.7;
}

.sso-category-items li:hover {
    color: var(--sso-text-muted);
}

/* Graphic Presentation (pow.jpg) */
.sso-graphic-container {
    position: absolute;
    right: -15%;
    top: 50%;
    transform: translateY(-50%);
    width: 75%;
    max-width: 900px;
    aspect-ratio: 16/9;
    z-index: 1;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Glow behind the image */
.sso-graphic-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: var(--sso-accent-blue);
    filter: blur(120px);
    opacity: 0.15;
    z-index: 0;
    border-radius: 50%;
}

.sso-pow-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    /* Creative 3D styling */
    transform: perspective(1200px) rotateY(-20deg) rotateX(10deg);
    box-shadow:
        -20px 30px 60px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        -5px 5px 20px rgba(255, 255, 255, 0.06);
    /* Adding a subtle gradient overlay to blend it into the dark theme */
    -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 80%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 80%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
    position: relative;
    transition: transform 0.5s ease;
}

/* Right Login Area */
.sso-login-panel {
    flex: 4;
    background: var(--sso-dark-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    position: relative;
    z-index: 10;
}

.sso-form-wrapper {
    width: 100%;
    max-width: 380px;
}

.sso-form-wrapper h2 {
    color: var(--sso-text-light);
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.sso-form-wrapper p.sso-subtitle {
    color: var(--sso-text-muted);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}

.sso-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sso-input-group {
    display: flex;
    flex-direction: column;
}

.sso-input {
    background: var(--sso-input-bg);
    border: 1px solid var(--sso-border);
    border-radius: 8px;
    padding: 14px 16px;
    color: var(--sso-text-light);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.sso-input::placeholder {
    color: #52525b;
    /* zinc-600 */
}

.sso-input:focus {
    border-color: var(--sso-accent-blue);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.sso-forgot-link {
    text-align: right;
    color: var(--sso-accent-blue);
    text-decoration: none;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    transition: color 0.2s;
}

.sso-forgot-link:hover {
    color: var(--sso-accent-hover);
}

.sso-submit-btn {
    background: var(--sso-accent-blue);
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: background 0.2s;
}

.sso-submit-btn:hover {
    background: var(--sso-accent-hover);
}

.sso-error-alert {
    background: rgba(167, 91, 91, 0.1);
    border: 1px solid rgba(167, 91, 91, 0.3);
    color: #c05e5e;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

@media (max-width: 1024px) {
    .sso-layout {
        flex-direction: column;
    }

    .sso-showcase {
        flex: auto;
        padding: 2rem;
        border-right: none;
        border-bottom: 1px solid var(--sso-border);
    }

    .sso-graphic-container {
        display: none;
    }

    .sso-product-list {
        max-width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 3rem;
    }

    .sso-login-panel {
        flex: auto;
        min-height: 100vh;
    }
}
/* ---------------- Sign-up, Google button, verification ---------------- */

.sso-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 48px;
    text-decoration: none;
}

.sso-brand-logo { height: 28px; width: auto; object-fit: contain; }
.sso-brand-name { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; color: #fff; }

/*
 * Google's button, to Google's shape.
 *
 * People recognise this control by its look, and a restyled one reads as a
 * phishing page. White surface, their mark, their wording.
 */
.sso-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #1f1f1f;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}

.sso-google-btn:hover { background: #f7f8f8; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16); }

.sso-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
}

.sso-divider::before,
.sso-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.sso-notice-alert {
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.6;
    color: #8eafc2;
    background: rgba(126, 167, 186, 0.1);
    border: 1px solid rgba(126, 167, 186, 0.28);
    margin-bottom: 18px;
}

.sso-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin: -4px 0 16px;
}

/*
 * The other door, in a box and without colour.
 *
 * Blue link text next to a white submit button reads as a second call to
 * action competing with the first. Grey label, plain white link, one border:
 * findable when looked for, quiet when not.
 */
.sso-alt {
    margin-top: 24px;
    padding: 14px 16px;
    border: 1px solid var(--sso-border);
    border-radius: 10px;
    font-size: 13px;
    color: var(--sso-text-muted);
    text-align: center;
}

.sso-alt a {
    color: var(--sso-text-light);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
}

.sso-alt a:hover { color: var(--sso-text-light); opacity: 0.75; }

/* ---------------- The rotating article ---------------- */

/*
 * The showcase is a column with the logo pinned to the top and the reading
 * material centred in what is left, so the card sits on the same line as the
 * form beside it rather than floating near the top of a tall empty panel.
 */
.sso-showcase-inner {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    position: relative;
}

/*
 * Every slide occupies the same grid cell, so the carousel is as tall as its
 * tallest article and holds that height while they cross-fade. Sized to the
 * visible slide instead, the panel would jump each rotation and drag the
 * dots up and down with it.
 */
.sso-carousel {
    display: grid;
    width: 100%;
    max-width: 520px;
}

/*
 * The slide is opaque, and the active one is on top.
 *
 * Both matter because the slides are stacked. A translucent card lets the
 * one underneath read through it, and during a cross-fade there are always
 * two of them painted -- so the excerpt of the outgoing article shows
 * through the bottom of the incoming one as grey ghost text. Stacking order
 * alone is not enough while the surface is see-through, and opacity alone is
 * not enough while the outgoing slide can paint last.
 *
 * The colour is the same as before: a flat background plus the 3% white wash
 * as an image layer, which composites identically over the panel but stops
 * at this element rather than letting the stack behind it through.
 */
.sso-slide {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border: 1px solid var(--sso-border);
    border-radius: 14px;
    overflow: hidden;
    background-color: var(--sso-dark-bg);
    background-image: linear-gradient(rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03));
    opacity: 0;
    visibility: hidden;
    z-index: 0;
    transition: opacity 0.45s ease, visibility 0.45s, border-color 0.2s ease;
}

.sso-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.sso-slide.is-active:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05));
}

/* A slide fading out must not intercept the click meant for the one arriving. */
.sso-slide:not(.is-active) { pointer-events: none; }

.sso-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
}

.sso-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.sso-dot:hover { background: rgba(255, 255, 255, 0.45); }
.sso-dot.is-active { background: #fff; }

/* The dot is 8px of paint; the thing you can hit is a comfortable 24px. */
.sso-dot::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    margin: -8px;
}
.sso-dot { position: relative; }

.sso-dot:focus-visible {
    outline: 2px solid var(--sso-text-light);
    outline-offset: 3px;
}

/*
 * The theme control, in the corner of the form panel.
 *
 * The sign-in page had none, so somebody arriving from a light-mode marketing
 * page with no way to change it was simply stuck with whatever they got.
 */
.sso-theme-toggle {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 20;
}

.sso-login-panel { position: relative; }

@media (max-width: 1024px) {
    .sso-carousel { max-width: 100%; }
    .sso-showcase-inner { padding-bottom: 1rem; }
}

/* ---------------- Light ---------------- */

/*
 * Hand-written rather than derived. The generator turns dark values into
 * light ones, and these are translucent whites over a dark panel -- inverted
 * mechanically they become translucent blacks that read as smudges.
 */
html[data-theme="light"] .sso-slide {
    background-color: var(--sso-dark-bg);
    background-image: linear-gradient(rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.02));
    border-color: rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .sso-slide.is-active:hover {
    background-image: linear-gradient(rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.04));
    border-color: rgba(0, 0, 0, 0.22);
}

html[data-theme="light"] .sso-dot { background: rgba(0, 0, 0, 0.2); }
html[data-theme="light"] .sso-dot:hover { background: rgba(0, 0, 0, 0.4); }
html[data-theme="light"] .sso-dot.is-active { background: #18181b; }

html[data-theme="light"] .sso-alt { border-color: rgba(0, 0, 0, 0.14); }
html[data-theme="light"] .sso-alt a { color: #18181b; }
