/* Workspace appearance only. Contract/PDF profile snapshots are not theme inputs. */
.sipre-shell--modern {
  --sipre-workspace-primary: #123056;
  --sipre-workspace-accent: #087da6;
  --sipre-workspace-soft: #eaf3fc;
  --sipre-workspace-ink: #172c37;
  --sipre-workspace-muted: #62717d;
  --sipre-sidebar-width: 248px;
  background: #f6f8fa;
}
.sipre-shell--modern .sipre-shell__sidebar {
  background: #fff;
  color: var(--sipre-workspace-ink);
  border-right: 1px solid #e4e9ed;
}
.sipre-shell--modern .sipre-shell__brand {
  color: inherit;
  text-decoration: none;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid #edf0f2;
}
.sipre-shell--modern .sipre-shell__brand img { flex-shrink: 0; width: 52px; height: 52px; border-radius: 10px; object-fit: contain; }
.sipre-shell--modern .sipre-shell__brand-text { letter-spacing: -.02em; font-size: 1rem; }
.sipre-shell--modern .sipre-shell__nav { padding: 18px 12px; }
.sipre-shell--modern .sipre-nav-link {
  min-height: 46px;
  margin-bottom: 6px;
  border-radius: 10px;
  color: var(--sipre-workspace-muted);
}
.sipre-shell--modern .sipre-nav-link:hover {
  background: #f4f7f8;
  color: var(--sipre-workspace-primary);
}
.sipre-shell--modern .sipre-nav-link.active {
  background: var(--sipre-workspace-soft);
  color: var(--sipre-workspace-primary);
  box-shadow: none;
  font-weight: 700;
}
.sipre-shell--modern .sipre-nav-link:focus-visible,
.sipre-shell--modern .sipre-shell__brand:focus-visible,
.sipre-shell--modern .sipre-desktop-menu:focus-visible {
  outline: 3px solid var(--sipre-workspace-accent);
  outline-offset: 2px;
}
/* Unavailable features are not navigation destinations. Catalog stays unchanged. */
.sipre-shell--modern .sipre-nav-soon { display: none; }
.sipre-shell--modern .sipre-shell__topbar {
  background: #fff;
  border-bottom: 1px solid #e4e9ed;
}
.sipre-shell--modern .sipre-shell__title { color: var(--sipre-workspace-ink); font-weight: 650; }
.sipre-shell--modern .sipre-shell__content { padding: clamp(16px, 2.5vw, 36px); }
.sipre-shell--modern .sipre-shell__org { border-radius: 9px; }
.sipre-desktop-menu { display: none; }
@media (min-width: 1025px) {
  /* overflow-x:hidden computes overflow-y:auto and traps sticky against a
     non-scrolling html/body ancestor. Clip horizontally without that scrollport. */
  html:has(.sipre-shell--modern), body:has(.sipre-shell--modern) { overflow-x: clip; }
  .sipre-shell--modern { grid-template-columns: var(--sipre-sidebar-width) minmax(0, 1fr); }
  .sipre-desktop-menu { display: inline-flex; flex-shrink: 0; }
  .sipre-shell--modern[data-sidebar-compact="true"] { grid-template-columns: 78px minmax(0, 1fr); }
  .sipre-shell--modern[data-sidebar-compact="true"] .sipre-shell__brand { justify-content: center; padding: 24px 8px; }
  .sipre-shell--modern[data-sidebar-compact="true"] .sipre-shell__brand-text,
  .sipre-shell--modern[data-sidebar-compact="true"] .sipre-nav-label { display: none; }
  .sipre-shell--modern[data-sidebar-compact="true"] .sipre-nav-link { justify-content: center; padding: 12px 0; gap: 0; }
}
/* Keep the existing <=1024 drawer and Safari visualViewport/safe-area rules. */
.sipre-nav-guide { margin-top: 20px; }
.sipre-workspace-guide { max-width: 900px; margin: 0 auto; }
.sipre-workspace-guide header { margin-bottom: 24px; }
.sipre-workspace-guide h2 { font-size: 1.6rem; margin: 0 0 10px; }
.sipre-workspace-guide p { color: var(--sipre-text-secondary); line-height: 1.7; }
.sipre-workspace-guide details { background: white; border: 1px solid var(--sipre-border); border-radius: 14px; padding: 20px 24px; margin: 12px 0; }
.sipre-workspace-guide summary { cursor: pointer; font-weight: 650; min-height: 24px; }
.sipre-workspace-guide summary:focus-visible { outline: 3px solid var(--sipre-workspace-accent); outline-offset: 5px; }

/* Real data pages: reuse current components and controls, never fabricate metrics. */
.sipre-shell--modern .sipre-page-header { margin-bottom: 26px; gap: 24px; }
.sipre-shell--modern .sipre-page-header__title { color: var(--sipre-workspace-ink); font-size: clamp(1.5rem, 2.1vw, 2rem); letter-spacing: -.035em; }
.sipre-shell--modern .sipre-card,
.sipre-shell--modern .sipre-table-wrap,
.sipre-shell--modern .sipre-mobile-card { border-radius: 16px; box-shadow: none; border: 1px solid #e4e9ed; background: white; }
.sipre-shell--modern .sipre-stat-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,210px),1fr)); gap: 18px; }
.sipre-shell--modern .sipre-stat { padding: 24px; }
.sipre-shell--modern .sipre-stat__label { color: var(--sipre-workspace-muted); }
.sipre-shell--modern .sipre-stat__value { color: var(--sipre-workspace-ink); font-size: 2rem; font-weight: 650; }
.sipre-shell--modern .sipre-btn { border-radius: 9px; }
.sipre-shell--modern .sipre-btn--primary { background: var(--sipre-workspace-primary); color: white; }
.sipre-shell--modern .sipre-btn--primary:hover { background: var(--sipre-workspace-primary); filter: brightness(.88); }
.sipre-shell--modern .sipre-table th { background: #f8fafb; color: var(--sipre-workspace-muted); font-weight: 600; }
.sipre-shell--modern .sipre-table td { padding-top: 18px; padding-bottom: 18px; }
.workspace-customer-filters { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); align-items: end; }
.workspace-quick-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,190px),1fr)); gap: 14px; }
.workspace-quick-link { display:flex; flex-direction:column; gap:10px; border:1px solid #e4e9ed; border-radius:12px; padding:22px; color:var(--sipre-workspace-ink); text-decoration:none; }
.workspace-quick-link:hover { background: var(--sipre-workspace-soft); }
.workspace-quick-link svg { color:var(--sipre-workspace-primary); margin-bottom:10px; }
.workspace-quick-link span { font-size:.875rem; color:var(--sipre-workspace-muted); }
.workspace-admin-actions { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr)); gap:14px; }
.workspace-admin-actions .sipre-btn { min-height:64px; justify-content:flex-start; }
.workspace-context-help { margin:0 0 22px; color:var(--sipre-workspace-muted); }
.workspace-context-help summary { cursor:pointer; padding:8px 0; font-size:.875rem; }
.workspace-context-help>div { background:white; padding:16px; margin:10px 0; border-radius:12px; border:1px solid #e4e9ed; }
.workspace-filter-panel,.workspace-column-panel { border:1px solid #e4e9ed; border-radius:14px; background:white; padding:18px 20px; margin-bottom:16px; }
.workspace-filter-panel>summary,.workspace-column-panel>summary { cursor:pointer; font-weight:650; min-height:24px; }
.workspace-column-panel p,.workspace-result-count { color:var(--sipre-workspace-muted); font-size:.875rem; }
.sipre-shell--modern .operations-filters { border:0; padding:12px 0 0; display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,185px),1fr)); align-items:end; }
.sipre-shell--modern .operations-filters label { min-width:0; font-size:.875rem; }
.sipre-shell--modern .operations-filters input,.sipre-shell--modern .operations-filters select { width:100%; min-width:0; min-height:44px; padding:10px 12px; border:1px solid #cbd5e1; border-radius:9px; background:#fff; color:var(--sipre-workspace-ink); font:inherit; }
.sipre-shell--modern .operations-filters input:focus-visible,.sipre-shell--modern .operations-filters select:focus-visible { outline:3px solid var(--sipre-workspace-accent); outline-offset:2px; }
.sipre-shell--modern .operations-scroll { background:white; border:1px solid #e4e9ed; border-radius:14px; }
@media(max-width:639px) {
  .workspace-quick-grid { grid-template-columns:1fr 1fr; gap:10px; }
  .workspace-quick-link { padding:16px; }
  .workspace-quick-link strong,.workspace-quick-link span { overflow-wrap:anywhere; }
  .workspace-filter-panel,.workspace-column-panel { padding:16px; }
}
