.sp-page {
    --sp-radius: 8px;
    --sp-line: var(--b2c-line, #e6e8ec);
    --sp-line-soft: var(--b2c-line-soft, #eef0f3);
    --sp-muted: var(--b2c-steel, #6b7280);
    --sp-ink: var(--b2c-ink, #171a1f);
    --sp-ink-soft: var(--b2c-ink-soft, #4b5160);
    --sp-surface: var(--b2c-surface, #fff);
    --sp-soft: var(--b2c-surface-muted, #f6f7f9);
    --sp-primary: var(--b2c-primary, #1d4ed8);
    color: var(--sp-ink);
    padding: 1.25rem 0 3rem;
}

.sp-page .btn { border-radius: 6px; font-weight: 600; }
.sp-page .btn-lg { font-size: 1rem; padding: .6rem 1.25rem; }
.sp-page .form-control,
.sp-page .form-select { border-radius: 6px; }
.sp-page .form-label { font-size: .85rem; font-weight: 600; margin-bottom: .3rem; color: var(--sp-ink); }

.sp-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: 1.25rem; color: var(--sp-muted); font-size: .82rem; }
.sp-breadcrumb a { color: var(--sp-muted); text-decoration: none; }
.sp-breadcrumb a:hover { color: var(--sp-ink); text-decoration: underline; }
.sp-breadcrumb .is-current { color: var(--sp-ink-soft); }

.sp-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1.75rem; align-items: start; }

.sp-side { position: sticky; top: 1rem; min-width: 0; }
.sp-nav { border: 1px solid var(--sp-line); border-radius: var(--sp-radius); background: var(--sp-surface); }
.sp-nav-group { display: flex; flex-direction: column; padding: .5rem 0; }
.sp-nav-group + .sp-nav-group { border-top: 1px solid var(--sp-line); }
.sp-nav-title { padding: .55rem 1rem .35rem; color: var(--sp-muted); font-size: .75rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.sp-nav-link { display: block; padding: .5rem 1rem; border-left: 3px solid transparent; color: var(--sp-ink-soft); font-size: .9rem; text-decoration: none; }
.sp-nav-link:hover { color: var(--sp-ink); background: var(--sp-soft); }
.sp-nav-link.is-active { border-left-color: var(--sp-primary); color: var(--sp-ink); font-weight: 600; background: var(--sp-soft); }
.sp-nav-user { display: flex; flex-direction: column; gap: .1rem; padding: .5rem 1rem .75rem; margin-bottom: .25rem; border-bottom: 1px solid var(--sp-line-soft); min-width: 0; }
.sp-nav-user strong { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-nav-user span { color: var(--sp-muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-nav-logout { margin-top: .25rem; border-top: 1px solid var(--sp-line-soft); padding-top: .65rem; color: var(--sp-muted); }

.sp-main { min-width: 0; }
.sp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.sp-title { font-size: 1.5rem; font-weight: 700; margin: 0; }
.sp-lead { margin: .35rem 0 0; color: var(--sp-ink-soft); max-width: 680px; }
.sp-card { background: var(--sp-surface); border: 1px solid var(--sp-line); border-radius: var(--sp-radius); }
.sp-card + .sp-card { margin-top: 1.25rem; }
.sp-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.25rem; border-bottom: 1px solid var(--sp-line); }
.sp-card-title { font-size: 1rem; font-weight: 700; margin: 0; }
.sp-card-body { padding: 1.25rem; }
.sp-empty { padding: 2.5rem 1rem; text-align: center; color: var(--sp-muted); }
.sp-empty p { margin-bottom: .75rem; }
.sp-empty p:last-child { margin-bottom: 0; }
.sp-note { color: var(--sp-muted); font-size: .85rem; }
.sp-note a,
.sp-link { color: var(--sp-ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.sp-note a:hover,
.sp-link:hover { color: var(--sp-ink); }

.sp-table { width: 100%; margin: 0; border-collapse: collapse; font-size: .9rem; }
.sp-table th { padding: .65rem 1rem; background: var(--sp-soft); border-bottom: 1px solid var(--sp-line); color: var(--sp-muted); font-size: .78rem; font-weight: 600; text-align: left; white-space: nowrap; }
.sp-table td { padding: .85rem 1rem; border-bottom: 1px solid var(--sp-line-soft); vertical-align: middle; }
.sp-table tr:last-child td { border-bottom: 0; }
.sp-table .is-num { text-align: right; white-space: nowrap; }

.sp-badge { display: inline-block; padding: .2rem .5rem; border-radius: 4px; font-size: .78rem; font-weight: 600; line-height: 1.4; white-space: nowrap; background: var(--sp-soft); color: var(--sp-ink-soft); }
.sp-badge.is-warning { background: var(--b2c-warning-soft, #fdf1e0); color: var(--b2c-warning, #b45309); }
.sp-badge.is-success { background: var(--b2c-success-soft, #e7f6ec); color: var(--b2c-success, #15803d); }
.sp-badge.is-danger { background: var(--b2c-danger-soft, #fbe8e8); color: var(--b2c-danger, #c0272d); }
.sp-badge.is-info { background: var(--b2c-primary-soft, #e8eefd); color: var(--sp-primary); }

.sp-doc { padding: 1.5rem 1.75rem; line-height: 1.7; color: var(--sp-ink-soft); }
.sp-doc > :first-child { margin-top: 0; }
.sp-doc h1,
.sp-doc h2 { font-size: 1.15rem; font-weight: 700; color: var(--sp-ink); margin: 1.75rem 0 .6rem; }
.sp-doc h3,
.sp-doc h4 { font-size: 1.02rem; font-weight: 700; color: var(--sp-ink); margin: 1.6rem 0 .5rem; }
.sp-doc h5,
.sp-doc h6 { font-size: .95rem; font-weight: 700; color: var(--sp-ink); margin: 1.25rem 0 .4rem; }
.sp-doc section { margin-bottom: 0 !important; }
.sp-doc section + section { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--sp-line-soft); }
.sp-doc section > h4:first-child,
.sp-doc section > h5:first-child { margin-top: 0; }
.sp-doc p { margin-bottom: .75rem; }
.sp-doc ul,
.sp-doc ol { padding-left: 1.25rem; margin-bottom: .75rem; }
.sp-doc li { margin-bottom: .3rem; }
.sp-doc strong { color: var(--sp-ink); }
.sp-doc hr { display: none; }
.sp-doc .text-primary { color: var(--sp-ink) !important; }
.sp-doc .list-group-item { padding: .2rem 0 !important; }
.sp-doc .bg-light { background: var(--sp-soft) !important; }
.sp-doc .rounded-4,
.sp-doc .rounded-3 { border-radius: 6px !important; }
.sp-doc .border-primary { border-color: var(--sp-line) !important; border-width: 1px !important; }
.sp-doc .shadow-sm,
.sp-doc .shadow { box-shadow: none !important; }
.sp-doc .card { border: 1px solid var(--sp-line); border-radius: 6px; }
.sp-doc .table { font-size: .88rem; }
.sp-doc .table thead th { background: var(--sp-soft); color: var(--sp-ink); font-weight: 600; }
.sp-doc a { color: var(--sp-primary); }
.sp-doc.is-partial > h1:first-of-type { display: none; }
.sp-doc.is-partial > section:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }

@media (max-width: 991.98px) {
    .sp-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .sp-side { display: none; }
}

@media (max-width: 767.98px) {
    .sp-page { padding: 1rem 0 2rem; }
    .sp-breadcrumb { margin-bottom: .85rem; }
    .sp-title { font-size: 1.3rem; }
    .sp-card-head { padding: .85rem 1rem; }
    .sp-card-body { padding: 1rem; }
    .sp-doc { padding: 1.1rem 1rem; }
    .sp-table th,
    .sp-table td { padding: .7rem .75rem; }
}
