/* SignaturePier: its own look; no outside stylesheets, fonts or scripts. Class names "table table-sm align-middle" follow the
   SGU product site standard's plain tables (0-SGU_GlobalAssets\Docs\SGU_Product_Site_Standard.md), styled here. */
:root { --sp-blue: #0f4c81; --sp-link: #0b5cad; --sp-line: #e3e6ea; --sp-muted: #5b6470; --sp-bg-soft: #f6f8fa; }
html, body { margin: 0; font-family: "Segoe UI", Arial, sans-serif; color: #222; background: #fff; line-height: 1.45; }
a { color: var(--sp-link); }
h1 { font-size: 1.7rem; margin: .4em 0 .5em; }
h2 { font-size: 1.25rem; margin: 1.2em 0 .5em; }
h3 { font-size: 1.05rem; margin: .8em 0 .3em; }

.sp-page { min-height: 100vh; display: flex; flex-direction: column; }
.sp-top { padding: 10px 16px; border-bottom: 1px solid var(--sp-line); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.sp-brand { font-weight: 600; font-size: 1.1rem; color: var(--sp-blue); text-decoration: none; }
.sp-nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.sp-nav a { text-decoration: none; }
.sp-nav-strong { font-weight: 600; }
.sp-main { flex: 1; max-width: 1120px; width: 100%; margin: 0 auto; padding: 20px 16px; box-sizing: border-box; }
.sp-footer { padding: 16px; font-size: .85rem; color: var(--sp-muted); border-top: 1px solid var(--sp-line); }
.sp-footer-2 { margin-top: 4px; }
.sp-sep { margin: 0 .5em; }

.sp-lead { font-size: 1.05rem; color: #333; }
.sp-muted { color: var(--sp-muted); }
.sp-small { font-size: .85rem; color: var(--sp-muted); }
.sp-card { border: 1px solid var(--sp-line); border-radius: 8px; padding: 12px 18px; margin: 14px 0; background: #fff; }
.sp-narrow { max-width: 620px; }

.sp-btn { display: inline-block; padding: 7px 14px; border: 1px solid #b9c2cc; border-radius: 6px; background: #fff; color: #222;
          text-decoration: none; font: inherit; cursor: pointer; margin: 2px 4px 2px 0; }
.sp-btn:hover { background: var(--sp-bg-soft); }
.sp-btn:disabled { opacity: .6; cursor: default; }
.sp-btn-primary { background: var(--sp-blue); border-color: var(--sp-blue); color: #fff; }
.sp-btn-primary:hover { background: #0c3d68; }
.sp-btn-small { padding: 3px 9px; font-size: .85rem; }
.sp-inline { display: inline; }

.sp-alert { padding: 9px 13px; border-radius: 6px; margin: 10px 0; border: 1px solid; }
.sp-alert-ok { background: #edf7ee; border-color: #b7dfbb; }
.sp-alert-warn { background: #fff8e6; border-color: #f0d68a; }
.sp-alert-error { background: #fdeeee; border-color: #f0b8b8; }

.sp-subnav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 6px 0 10px; border-bottom: 1px solid var(--sp-line); margin-bottom: 12px; }
.sp-subnav a { text-decoration: none; padding: 3px 0; }
.sp-subnav a.active { font-weight: 600; border-bottom: 2px solid var(--sp-blue); }
.sp-subnav-user { margin-left: auto; font-size: .85rem; color: var(--sp-muted); }

.sp-steps { list-style: none; padding: 0; counter-reset: step; }
.sp-steps > li { counter-increment: step; border: 1px solid var(--sp-line); border-left-width: 5px; border-radius: 8px; padding: 6px 16px 10px; margin: 12px 0; }
.sp-steps > li.todo { border-left-color: #f0b429; }
.sp-steps > li.done { border-left-color: #3c9a4b; }
.sp-steps > li > h2::before { content: counter(step) ". "; }
.sp-steps > li > h2 { margin-top: .4em; }

.sp-field { margin: 8px 0 12px; display: flex; flex-direction: column; gap: 4px; }
.sp-field label { font-weight: 600; font-size: .92rem; }
.sp-field input:not([type=checkbox]):not([type=radio]):not([type=range]), .sp-field select, .sp-field textarea, .sp-override input {
    font: inherit; padding: 6px 8px; border: 1px solid #b9c2cc; border-radius: 5px; max-width: 100%; box-sizing: border-box; }
.sp-row { display: flex; flex-wrap: wrap; gap: 0 16px; }
.sp-check { display: block; margin: 4px 0; }
.sp-choice { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; cursor: pointer; }
fieldset { border: 1px solid var(--sp-line); border-radius: 8px; padding: 6px 14px 10px; margin: 0 0 14px; }
legend { font-weight: 600; padding: 0 4px; }
.sp-override { margin: 8px 0; }
.sp-colors { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }

.sp-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.sp-editor-preview { position: sticky; top: 12px; }
.sp-preview { width: 100%; min-height: 240px; border: 1px solid var(--sp-line); border-radius: 8px; background: #fff; }
.sp-pre { white-space: pre-wrap; background: var(--sp-bg-soft); padding: 10px; border-radius: 6px; font-size: .85rem; }
.sp-save { margin-top: 12px; }
.sp-logo-thumb { border: 1px dashed var(--sp-line); max-width: 100%; height: auto; }
@media (max-width: 860px) { .sp-editor { grid-template-columns: 1fr; } .sp-editor-preview { position: static; } }

.table { border-collapse: collapse; width: 100%; margin: 10px 0; }
.table th, .table td { border-bottom: 1px solid var(--sp-line); padding: 6px 8px; text-align: left; vertical-align: middle; }
.table th { background: var(--sp-bg-soft); font-weight: 600; }
.table-sm th, .table-sm td { padding: 4px 8px; }
.sp-table { font-size: .93rem; }
.sp-row-active td { background: #f2f7fc; }

.sp-hero { padding: 18px 0 8px; }
.sp-hero h1 { font-size: 2.1rem; }
.sp-howto li { margin: 6px 0; }
.sp-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px 24px; margin: 18px 0; }
.sp-legal { max-width: 860px; }
.sp-code { background: var(--sp-bg-soft); padding: 2px 6px; border-radius: 4px; word-break: break-all; }
details { margin: 6px 0; }
summary { cursor: pointer; font-weight: 600; }

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: 10px 16px; background: #fff3cd; border-top: 1px solid #f0d68a; z-index: 1000; }
