/*
 * sso.grey.ooo, the "corpo" look: sso-theme.css with the colour taken out.
 * Dull, grey and non-descript. The same layout and the same flowing flag, but
 * in steel greys with a single quiet accent.
 *
 * It does nothing alone. Every rule sits under html[data-sso-look="corpo"],
 * which sso-look.js sets from the choice that the visitor saved (and the
 * toggle in sso-theme.js changes). Linked after sso-theme.css, and the extra
 * selector makes these rules win.
 */

html[data-sso-look="corpo"][data-theme],
html[data-sso-look="corpo"] [data-theme] {
    --sso-flag-palette: corpo;

    --background: #101112;
    --foreground: #c9cccf;
    --card: #17181a;
    --card-foreground: #d4d7da;
    --popover: #1c1d1f;
    --popover-foreground: #d4d7da;

    --primary: #9aa0a6;
    --primary-foreground: #101112;
    --ring: #9aa0a6;
    --secondary: #6b7075;
    --secondary-foreground: #101112;

    --muted: #1c1d1f;
    --muted-foreground: #8b9096;
    --accent: rgba(154, 160, 166, 0.14);
    --accent-foreground: #c9cccf;

    --border: #2a2c2e;
    --input: #34373a;
    --divider: rgba(154, 160, 166, 0.18);

    --destructive: #a8a2a2;
    --destructive-foreground: #101112;
    --success: #a3a8a5;
    --success-foreground: #101112;
    --info: #9aa0a6;
    --info-foreground: #101112;

    --custom-icon: #9aa0a6;
    --custom-loading-bar: #9aa0a6;
}

html[data-sso-look="corpo"] {
    background-color: #101112;

    body { color: #c9cccf; }

    body::before {
        background:
            radial-gradient(60rem 38rem at 12% -8%, rgba(160, 165, 170, 0.07), transparent 62%),
            radial-gradient(56rem 38rem at 55% 112%, rgba(160, 165, 170, 0.05), transparent 62%),
            radial-gradient(rgba(148, 152, 156, 0.10) 1px, transparent 1.5px) 0 0 / 22px 22px,
            #101112;
    }

    #first-factor-stage > div,
    #authenticated-view .border-border {
        background: rgba(23, 24, 26, 0.78);
        border-color: #2a2c2e;
        box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
    }

    #first-factor-stage > div::before {
        background: linear-gradient(90deg, #4a4d50, #8b9096 50%, #4a4d50);
        opacity: 0.9;
    }

    #first-factor-stage h5 { color: #d4d7da; }

    #form-login input {
        background-color: rgba(16, 17, 18, 0.6);
        border-color: #34373a;
        color: #d4d7da;
    }

    #form-login input:focus {
        border-color: #9aa0a6;
        box-shadow: 0 0 0 3px rgba(154, 160, 166, 0.2);
    }

    #form-login label { color: #8b9096; }

    #form-login button[type="submit"],
    #form-login button[id="sign-in-button"] {
        background-color: #9aa0a6;
        color: #101112;
        box-shadow: none;
    }

    a { color: #aab0b6; }

    /* Fallback gradients, for a page where the script did not run. */
    body::after {
        background: linear-gradient(135deg, #6b7075, #8b9096 55%, #4a4d50);
        opacity: 0.08;
    }

    .p-2:has(> #UserSvg)::before {
        background: linear-gradient(135deg, #6b7075, #8b9096 60%, #4a4d50);
        filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5));
    }

    .p-2 > canvas.sso-flag { filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5)); }

    canvas#sso-flag-screen { opacity: 0.22; }
    canvas#sso-flag-bg { opacity: 0.4; }

    .success-icon {
        color: #a3a8a5;
        filter: none;
    }

    [data-slot="avatar-fallback"] {
        background: linear-gradient(135deg, #6b7075, #8b9096);
        color: #101112;
    }

    #account-menu { box-shadow: 0 0 0 1px rgba(154, 160, 166, 0.4); }

    nav.fixed.top-0 {
        background: rgba(23, 24, 26, 0.85);
        border-bottom-color: #2a2c2e;
        color: #c9cccf;
    }

    nav.fixed.top-0 .text-primary-foreground { color: #c9cccf; }
    nav.fixed.top-0 svg { color: #9aa0a6; }
}

/* The rocker switch, in grey. */
html[data-sso-look="corpo"] #sso-look-toggle {
    background: #1c1d1f;
    border-color: #34373a;
    color: #6b7075;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

html[data-sso-look="corpo"] #sso-look-toggle[aria-checked="true"] .sso-rocker-colour {
    background: linear-gradient(#2a2c2e, #232426);
    color: #6b7075;
}
