/* ── ViewSonic Login Page Theme ─────────────────────────────────────── */
/* Scoped to login page only: .fi-simple-layout only exists on auth pages  */

/* ── Page wrapper ── */
body.fi-body.fi-panel-admin:has(.fi-simple-layout) {
    position: relative !important;
}

/* Light mode: ViewSonic gray page background */
html:not(.dark) body.fi-body.fi-panel-admin:has(.fi-simple-layout) {
    background-color: #f0f0f0 !important;
}

/* ViewSonic red top bar — both modes */
body.fi-body.fi-panel-admin:has(.fi-simple-layout)::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: #c8102e;
    z-index: 9999;
    pointer-events: none;
}

/* ── Layout decorations ── */
.fi-simple-layout {
    position: relative !important;
    overflow: hidden !important;
    padding-top: 5px !important;
    min-height: 100vh;
}

/* Diagonal red accent — top-right corner */
.fi-simple-layout::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 55vw; height: 55vw;
    background: linear-gradient(135deg, transparent 55%, rgba(200, 16, 46, 0.07) 55%);
    pointer-events: none;
    z-index: 0;
}

/* Diagonal dark accent — bottom-left corner */
.fi-simple-layout::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 40vw; height: 40vw;
    background: linear-gradient(315deg, transparent 60%, rgba(26, 35, 64, 0.05) 60%);
    pointer-events: none;
    z-index: 0;
}

.fi-simple-layout > * { position: relative; z-index: 1; }

/* ── Login card ── */
.fi-simple-main {
    border-radius: 0.75rem !important;
    overflow: hidden !important;
    position: relative !important;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.06),
        0 8px 32px rgba(0, 0, 0, 0.09),
        0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

/* Light mode: force white card */
html:not(.dark) .fi-simple-main {
    background: #ffffff !important;
}

/* ViewSonic red accent line pinned to top edge of card */
.fi-simple-main::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #c8102e 18%, #c8102e 82%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* ── Feature Videos component ──────────────────────────────────────── */

.fv-list-item {
    border-radius: 0.5rem;
    border: 1px solid;
}
html:not(.dark) .fv-list-item { border-color: #e5e7eb; background: #f9fafb; }
html.dark .fv-list-item { border-color: rgb(51 65 85); background: rgb(30 41 59 / 0.5); }

.fv-embed { border: 1px solid; }
html:not(.dark) .fv-embed { border-color: #e5e7eb; }
html.dark .fv-embed { border-color: rgb(51 65 85); }

/* ── SSO section ────────────────────────────────────────────────────── */

.sso-section { display: flex; flex-direction: column; gap: 1rem; width: 100%; }

.sso-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    border: 1px solid;
}

/* SSO button — light mode */
html:not(.dark) .sso-button {
    background-color: #ffffff;
    border-color: #e5e7eb;
    color: #111827;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
html:not(.dark) .sso-button:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

/* SSO button — dark mode */
html.dark .sso-button {
    background-color: rgb(30 41 59 / 0.6);
    border-color: rgb(51 65 85);
    color: rgb(203 213 225);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
}
html.dark .sso-button:hover {
    background-color: rgb(51 65 85);
    border-color: rgb(100 116 139);
    color: rgb(226 232 240);
}

.sso-button:focus-visible {
    outline: 2px solid #c8102e;
    outline-offset: 2px;
}

.sso-badge {
    text-align: center;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: -0.25rem;
    line-height: 1.4;
}

.sso-divider { display: flex; align-items: center; gap: 0.75rem; }

.sso-divider-line {
    flex: 1;
    height: 1px;
}
html:not(.dark) .sso-divider-line { background-color: #e5e7eb; }
html.dark .sso-divider-line { background-color: rgb(51 65 85); }

.sso-divider-text {
    font-size: 0.75rem;
    color: #9ca3af;
    white-space: nowrap;
    flex-shrink: 0;
}

.sso-toggle { text-align: center; }

.sso-toggle-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 0.8125rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s;
}
html:not(.dark) .sso-toggle-btn { color: #6b7280; }
html:not(.dark) .sso-toggle-btn:hover { color: #374151; }
html.dark .sso-toggle-btn { color: #9ca3af; }
html.dark .sso-toggle-btn:hover { color: #d1d5db; }
