:root {
    --bg: #06111e;
    --bg-soft: #0d1f34;
    --surface: #ffffff;
    --surface-soft: #f7fbff;
    --surface-tint: #eef6ff;
    --text: #15263a;
    --text-soft: #5f738a;
    --line: #d9e8f5;
    --primary: #1693f3;
    --primary-deep: #0d6fce;
    --accent: #f3c316;
    --success: #14985d;
    --warning: #c28512;
    --danger: #c93636;
    --shadow: 0 18px 45px rgba(9, 20, 35, 0.12);
    --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(22, 147, 243, 0.14), transparent 26%),
        linear-gradient(180deg, #08121f 0, #0a1626 120px, #eef5fb 120px, #f5f9fd 100%);
}
a {
    color: var(--primary-deep);
    text-decoration: none;
}
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap {
    width: min(1240px, calc(100% - 2rem));
    margin: 0 auto;
}
.app-shell {
    padding: 1.5rem 0 2.5rem;
}
.site-header {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(6, 17, 30, 0.98), rgba(10, 28, 47, 0.96)),
        linear-gradient(90deg, var(--primary-deep), var(--bg));
    color: #fff;
    border-bottom: 3px solid rgba(22, 147, 243, 0.85);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}
.site-header-glow {
    position: absolute;
    inset: auto -10% -45% auto;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(22, 147, 243, 0.28), rgba(22, 147, 243, 0) 68%);
    pointer-events: none;
}
.nav-row {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0 1.15rem;
}
.brand-lockup {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}
.brand-mark-link {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.brand-mark {
    width: 34px;
    height: 34px;
    object-fit: contain;
}
.brand-copy {
    min-width: 0;
}
.brand-kicker {
    margin: 0 0 0.18rem;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #9fd8ff;
}
.app-title {
    margin: 0;
    font-size: clamp(1.3rem, 2.2vw, 1.85rem);
    line-height: 1.05;
}
.app-title a {
    color: #fff;
    text-decoration: none;
}
.app-subtitle {
    margin: 0.35rem 0 0;
    max-width: 54rem;
    color: #d3e7f8;
    font-size: 0.95rem;
    line-height: 1.45;
}
.top-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
}
.top-nav a,
.help-nav-btn {
    appearance: none;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.04);
    color: #f3f8fd;
    min-height: 42px;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    font-size: 0.95rem;
    line-height: 1;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
    cursor: pointer;
    text-decoration: none;
}
.top-nav a:hover,
.help-nav-btn:hover {
    text-decoration: none;
    background: rgba(255,255,255,0.11);
    border-color: rgba(255,255,255,0.28);
}
.hero-banner-card,
.card,
.panel {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,252,255,0.98));
    border: 1px solid rgba(199, 220, 239, 0.95);
    border-radius: var(--radius);
    padding: 1.15rem 1.2rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}
.hero-banner-card {
    overflow: hidden;
    padding: 0;
}
.hero-banner {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: stretch;
    min-height: 280px;
}
.hero-copy {
    padding: 2rem 2rem 2rem 2.1rem;
    background:
        linear-gradient(135deg, rgba(6, 17, 30, 0.98), rgba(10, 28, 47, 0.94)),
        radial-gradient(circle at top left, rgba(22,147,243,0.22), transparent 40%);
    color: #f4f8fc;
    position: relative;
}
.hero-copy::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
}
.brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    background: rgba(22, 147, 243, 0.18);
    color: #a8ddff;
    border: 1px solid rgba(22, 147, 243, 0.24);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.hero-copy h2 {
    margin: 1rem 0 0.75rem;
    font-size: clamp(1.7rem, 2.9vw, 2.55rem);
    line-height: 1.08;
}
.hero-copy p {
    margin: 0 0 1rem;
    color: #dae7f4;
    line-height: 1.6;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}
.hero-media {
    background: linear-gradient(135deg, #04111e, #0c2238);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.hero-media img {
    width: min(100%, 520px);
    max-height: 100%;
    object-fit: contain;
    border-radius: 18px;
}
.grid {
    display: grid;
    gap: 1rem;
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric {
    border-radius: var(--radius);
    padding: 1.15rem;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(240,248,255,0.96)),
        linear-gradient(135deg, rgba(22,147,243,0.10), rgba(243,195,22,0.06));
    border: 1px solid rgba(196, 219, 238, 0.95);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.metric::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
}
.metric h3 {
    margin: 0;
    font-size: 2rem;
    color: #0f2540;
}
.metric p {
    margin: 0.35rem 0 0;
    color: var(--text-soft);
    font-weight: 600;
}
.section-title {
    margin: 0 0 0.5rem;
    color: #0f2540;
}
.section-eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-deep);
}
.small-muted {
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.55;
}
form label {
    display: block;
    font-weight: 800;
    margin-bottom: 0.38rem;
    color: #1a3552;
}
input[type="text"], input[type="email"], input[type="password"], input[type="url"],
input[type="date"], input[type="number"], select, textarea {
    width: 100%;
    padding: 0.78rem 0.9rem;
    border: 1px solid #c9ddee;
    border-radius: 12px;
    margin-bottom: 0.95rem;
    background: #fff;
    color: var(--text);
    box-shadow: inset 0 1px 2px rgba(7, 24, 44, 0.03);
}
input:focus, select:focus, textarea:focus {
    outline: 3px solid rgba(22,147,243,0.14);
    border-color: rgba(22,147,243,0.75);
}
textarea { min-height: 120px; resize: vertical; }
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: none;
    background: linear-gradient(180deg, var(--primary), var(--primary-deep));
    color: #fff;
    padding: 0.78rem 1.05rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(13, 111, 206, 0.18);
}
button:hover, .btn:hover {
    text-decoration: none;
    filter: brightness(1.03);
}
button.secondary, .btn.secondary {
    background: linear-gradient(180deg, #20354b, #152638);
    box-shadow: 0 10px 25px rgba(21, 38, 56, 0.16);
}
button.danger, .btn.danger {
    background: linear-gradient(180deg, #d94b4b, #b62222);
}
.btn.small {
    padding: 0.52rem 0.78rem;
    font-size: 0.88rem;
    border-radius: 10px;
}
.btn.disabled, button:disabled, .btn[aria-disabled="true"] {
    background: linear-gradient(180deg, #91a5bb, #7a8fa4);
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.82;
    box-shadow: none;
}
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 1rem;
}
.table-wrap {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    overflow: hidden;
    border-radius: 16px;
}
th, td {
    padding: 0.9rem 0.85rem;
    border-bottom: 1px solid #e1edf7;
    text-align: left;
    vertical-align: top;
}
th {
    background: linear-gradient(180deg, #edf7ff, #e3f1fc);
    color: #173452;
    font-size: 0.9rem;
}
tr:nth-child(even) td {
    background: rgba(244, 249, 253, 0.75);
}
.flash {
    padding: 0.9rem 1rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    font-weight: 800;
    box-shadow: var(--shadow);
}
.flash-success { background: #dcf9ea; color: #0e6b41; border: 1px solid #b4ebce; }
.flash-error { background: #ffe5e5; color: #9e2323; border: 1px solid #f8bcbc; }
.flash-info { background: #e5f3ff; color: #11588f; border: 1px solid #b9ddff; }
.progress-wrap {
    background: #dce7f0;
    border-radius: 999px;
    height: 14px;
    overflow: hidden;
}
.progress-bar {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    height: 100%;
}
.badge {
    display: inline-block;
    padding: 0.28rem 0.62rem;
    border-radius: 999px;
    background: #e6f3ff;
    color: #124571;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}
.badge.good { background: #dcfce7; color: #166534; }
.badge.warn { background: #fff1c8; color: #8d5b00; }
.badge.bad { background: #ffe3e3; color: #9f2121; }
.inline-form { display: inline; }
.site-footer {
    padding: 0 0 2rem;
    color: #5d738a;
}
.footer-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(244,249,253,0.98));
    border: 1px solid rgba(199, 220, 239, 0.95);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    box-shadow: var(--shadow);
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.footer-brand img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}
.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    gap: 1rem;
    align-items: stretch;
}
.auth-card {
    max-width: none;
    margin: 0;
}
.auth-brand-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    min-height: 100%;
    background:
        linear-gradient(135deg, rgba(6,17,30,0.98), rgba(10,28,47,0.94)),
        radial-gradient(circle at top right, rgba(22,147,243,0.18), transparent 40%);
    color: #f4f8fc;
}
.auth-brand-card h2 {
    margin: 1rem 0 0.75rem;
    font-size: clamp(1.6rem, 2.7vw, 2.2rem);
}
.auth-brand-card p {
    color: #d7e7f7;
    line-height: 1.6;
}
.auth-brand-banner {
    margin-top: auto;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
    background: #000;
    aspect-ratio: 3.24 / 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
}
.auth-brand-banner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    image-rendering: auto;
}
.code {
    font-family: Consolas, monospace;
    background: #f8fafc;
    padding: 0.2rem 0.35rem;
    border-radius: 4px;
}
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0.5rem 0 1rem;
}
.text-right { text-align: right; }
ol { padding-left: 1.25rem; }
li { margin-bottom: 0.35rem; }
.help-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}
.help-toc a {
    display: inline-block;
    background: #eff6ff;
    color: #1e3a8a;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-weight: 700;
}
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}
.resource-card {
    background: #fff;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}
.callout {
    border-radius: 16px;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
}
.callout-info {
    background: #e0f2fe;
    color: #0c4a6e;
}
.callout-warn {
    background: #fef3c7;
    color: #92400e;
}
.help-fab {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 70;
    border-radius: 999px;
    padding: 0.95rem 1.2rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}
.help-drawer-open {
    overflow: hidden;
}
.help-drawer-shell {
    position: fixed;
    inset: 0;
    z-index: 80;
}
.help-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}
.help-drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: min(460px, 96vw);
    height: 100%;
    background: #ffffff;
    box-shadow: -10px 0 30px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
}
.help-drawer-header,
.help-drawer-footer {
    padding: 1rem 1rem 0.9rem;
    border-bottom: 1px solid #e5e7eb;
}
.help-drawer-footer {
    border-top: 1px solid #e5e7eb;
    border-bottom: none;
    margin-top: auto;
    background: #f8fafc;
}
.help-drawer-body {
    padding: 1rem;
    overflow-y: auto;
}
.help-close-btn {
    background: transparent;
    color: #0f172a;
    padding: 0.25rem 0.6rem;
    font-size: 1.6rem;
    line-height: 1;
    box-shadow: none;
}
.help-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.help-eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    font-weight: 700;
}
.help-drawer-section {
    margin-top: 1rem;
}
.help-drawer-section h3 {
    margin-bottom: 0.45rem;
}
.help-drawer ul {
    padding-left: 1.15rem;
}
.help-drawer .toolbar {
    margin-bottom: 0;
}
.inline-logo-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.inline-logo-row img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}
@media (max-width: 1040px) {
    .nav-row,
    .footer-card,
    .auth-shell,
    .hero-banner {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }
    .nav-row {
        display: flex;
    }
    .top-nav {
        justify-content: flex-start;
    }
}
@media (max-width: 900px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .brand-mark-link {
        width: 52px;
        height: 52px;
    }
    .brand-mark {
        width: 32px;
        height: 32px;
    }
    .hero-copy,
    .hero-media,
    .auth-brand-card,
    .auth-card {
        padding: 1.2rem;
    }
}
@media (max-width: 700px) {
    body {
        background: linear-gradient(180deg, #08121f 0, #0a1626 110px, #eef5fb 110px, #f5f9fd 100%);
    }
    .wrap {
        width: min(100%, calc(100% - 1rem));
    }
    .app-shell {
        padding-top: 1rem;
    }
    .top-nav a,
    .help-nav-btn {
        min-height: 40px;
        padding: 0.65rem 0.9rem;
        font-size: 0.92rem;
    }
    .help-fab {
        right: 0.75rem;
        bottom: 0.75rem;
    }
    .help-drawer {
        width: 100%;
    }
}


.template-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    background: rgba(22, 147, 243, 0.12);
    color: var(--primary-deep);
    border: 1px solid rgba(22, 147, 243, 0.18);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.prompt-card textarea.prompt-textarea,
.prompt-textarea {
    width: 100%;
    min-height: 210px;
    resize: vertical;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--text);
    padding: 0.9rem 0.95rem;
    line-height: 1.5;
    font-family: inherit;
    font-size: 0.94rem;
}

.template-inline-box {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.template-inline-box h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: #0f2540;
}

.template-inline-list {
    display: grid;
    gap: 0.7rem;
}

.template-inline-link {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: start;
    padding: 0.9rem 0.95rem;
    border-radius: 14px;
    border: 1px solid rgba(196, 219, 238, 0.95);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,250,255,0.98));
    box-shadow: 0 10px 24px rgba(9, 20, 35, 0.06);
    text-decoration: none;
}

.template-inline-link:hover {
    text-decoration: none;
    border-color: rgba(22, 147, 243, 0.28);
    box-shadow: 0 14px 28px rgba(9, 20, 35, 0.09);
}

.template-inline-link strong {
    display: block;
    color: var(--text);
    margin-bottom: 0.18rem;
}

.template-inline-link small {
    display: block;
    color: var(--text-soft);
    line-height: 1.45;
}

.compact-resource-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.compact-resource-card h4 {
    margin-top: 0.2rem;
    margin-bottom: 0.45rem;
}



.sso-section {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(74, 163, 255, 0.22);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.sso-button-stack {
    display: grid;
    gap: 0.65rem;
    margin: 0.65rem 0 0.5rem;
}

.sso-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    text-decoration: none;
}

.sso-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-weight: 700;
    line-height: 1;
    flex: 0 0 1.7rem;
}

.sso-google {
    border-color: rgba(74, 163, 255, 0.35);
}

.sso-microsoft {
    border-color: rgba(255, 204, 79, 0.35);
}

.sso-btn.is-disabled {
    opacity: 0.65;
}

.sso-note-box {
    border: 1px dashed rgba(46, 163, 255, 0.35);
    background: rgba(15, 28, 45, 0.65);
}

/* SSO button refresh */
.sso-section {
    margin-bottom: 1rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.sso-button-stack {
    display: grid;
    gap: 0.85rem;
    margin: 0.65rem 0 0.2rem;
}

.sso-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    width: 100%;
    border: 1px solid #cfd8e3;
    border-radius: 10px;
    background: #ffffff;
    color: #334155;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0;
    padding: 0.8rem 1.15rem;
    box-shadow: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.sso-btn:hover {
    background: #f8fafc;
    border-color: #b9c6d8;
    transform: translateY(-1px);
}

.sso-btn:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

.sso-btn .sso-label {
    display: inline-block;
    width: 100%;
    text-align: center;
}

.sso-icon-image,
.sso-icon-fallback {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.sso-icon-image {
    object-fit: contain;
}

.sso-icon-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    background: transparent;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 700;
}

.sso-google,
.sso-microsoft {
    border-color: #cfd8e3;
}

.sso-btn.is-disabled,
.sso-btn:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
}

.sso-btn.is-disabled:hover,
.sso-btn:disabled:hover {
    background: #ffffff;
    border-color: #cfd8e3;
}

/* polished SSO buttons - override prior styles */
.sso-section {
    margin-bottom: 1rem;
    padding: 0;
    border: 0;
    background: transparent;
}

.sso-button-stack {
    display: grid;
    gap: 0.75rem;
    margin: 0.7rem 0 0.9rem;
}

.sso-btn,
a.sso-btn,
button.sso-btn {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1rem;
    border: 1px solid #c9d2df;
    border-radius: 10px;
    background: #ffffff;
    color: #334155;
    text-decoration: none;
    box-shadow: none;
    cursor: pointer;
    appearance: none;
}

.sso-btn:hover,
a.sso-btn:hover,
button.sso-btn:hover {
    text-decoration: none;
    background: #fbfdff;
    border-color: #bcc8d8;
    filter: none;
}

.sso-btn:focus-visible,
a.sso-btn:focus-visible,
button.sso-btn:focus-visible {
    outline: 2px solid rgba(22, 147, 243, 0.28);
    outline-offset: 2px;
}

.sso-btn-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: auto;
    max-width: 100%;
}

.sso-label {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    color: #344256;
    white-space: nowrap;
}

.sso-icon-image,
.sso-icon-fallback {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: static;
    transform: none;
}

.sso-icon-image {
    object-fit: contain;
}

.sso-icon-fallback {
    font-size: 0.92rem;
    font-weight: 700;
    background: transparent;
    border-radius: 0;
}

.sso-google,
.sso-microsoft {
    border-color: #c9d2df;
}

.sso-btn.is-disabled,
.sso-btn.sso-static,
button.sso-btn[aria-disabled="true"] {
    opacity: 1;
    background: #ffffff;
    color: #334155;
    border-color: #c9d2df;
    box-shadow: none;
    cursor: default;
}

.sso-btn.is-disabled:hover,
.sso-btn.sso-static:hover,
button.sso-btn[aria-disabled="true"]:hover {
    background: #ffffff;
    border-color: #c9d2df;
}

@media (max-width: 480px) {
    .sso-label {
        font-size: 0.92rem;
    }
}


/* 2026-04-29 SSO button stack/shape/icon refinement */
.sso-button-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
}

.sso-btn,
a.sso-btn,
button.sso-btn {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1rem;
    border: 1px solid #c9d2df;
    border-radius: 12px;
    background: #ffffff;
    color: #334155;
    text-decoration: none;
    box-shadow: none;
    appearance: none;
}

.sso-btn-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: auto;
    max-width: 100%;
}

.sso-icon-image,
.sso-icon-fallback {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: static;
    transform: none;
}

.sso-label {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    color: #344256;
    white-space: nowrap;
}

.sso-btn:hover,
a.sso-btn:hover,
button.sso-btn:hover {
    background: #fbfdff;
    border-color: #bcc8d8;
    text-decoration: none;
    filter: none;
}

.sso-btn.is-disabled,
.sso-btn.sso-static,
button.sso-btn[aria-disabled="true"] {
    opacity: 1;
    cursor: default;
    pointer-events: none;
}


/* 2026-04-29 hard override: auth SSO should be horizontal rectangles, not squares */
.auth-card .auth-sso-section {
    margin: 1rem 0 1rem !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.auth-card .auth-sso-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(180px, 1fr)) !important;
    gap: 12px !important;
    align-items: stretch !important;
    width: 100% !important;
}

.auth-card .auth-sso-grid .sso-btn,
.auth-card .auth-sso-grid a.sso-btn,
.auth-card .auth-sso-grid button.sso-btn {
    width: 100% !important;
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 18px !important;
    margin: 0 !important;
    border-radius: 10px !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #334155 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    filter: none !important;
    transform: none !important;
    overflow: hidden !important;
    white-space: nowrap !important;
}

.auth-card .auth-sso-grid .sso-btn:hover,
.auth-card .auth-sso-grid a.sso-btn:hover,
.auth-card .auth-sso-grid button.sso-btn:hover {
    background: #f8fafc !important;
    border-color: #c3cfdd !important;
    text-decoration: none !important;
    filter: none !important;
    transform: none !important;
}

.auth-card .auth-sso-grid .sso-btn-inner {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: auto !important;
    max-width: 100% !important;
    flex-wrap: nowrap !important;
}

.auth-card .auth-sso-grid .sso-icon-image,
.auth-card .auth-sso-grid .sso-icon-fallback {
    position: static !important;
    transform: none !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    flex: 0 0 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.auth-card .auth-sso-grid .sso-icon-image {
    object-fit: contain !important;
}

.auth-card .auth-sso-grid .sso-label {
    display: inline-block !important;
    width: auto !important;
    text-align: left !important;
    font-size: 15px !important;
    line-height: 1 !important;
    font-weight: 600 !important;
    color: #334155 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
}

.auth-card .auth-sso-grid .sso-btn.is-disabled,
.auth-card .auth-sso-grid .sso-btn.sso-static,
.auth-card .auth-sso-grid button.sso-btn[aria-disabled="true"] {
    opacity: 1 !important;
    cursor: default !important;
    pointer-events: none !important;
}

@media (max-width: 560px) {
    .auth-card .auth-sso-grid {
        grid-template-columns: 1fr !important;
    }
}
