.check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 20px;
}

.check-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px;
  margin: 0;
  font-weight: 600;
}

.check-card input {
  width: 18px;
  height: 18px;
}

.check-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}
.check-card.disabled { background:#f8fafc; color:var(--muted); opacity:.72; cursor:not-allowed; }
.check-card span small { display:block; margin-top:2px; color:var(--warning); font-size:10px; font-weight:700; }
.sync-modal { width:min(780px,100%); }
.sync-selection-toolbar { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:12px 14px; margin-bottom:18px; border:1px solid var(--line); border-radius:10px; background:#f8fafc; }
.sync-selection-toolbar label { display:flex; flex-direction:row; align-items:center; gap:8px; margin:0; font-weight:800; }
.sync-selection-toolbar input { width:18px; height:18px; }
.sync-selection-toolbar span { color:var(--muted); font-size:11px; }
.sync-resource-groups { display:grid; gap:18px; margin-bottom:22px; }
.sync-resource-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; }
.sync-resource-heading b { font-size:13px; }
.sync-resource-heading span { color:var(--muted); font-size:11px; }
.sync-resource-group .check-grid { margin-bottom:0; }

.template-button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.template-button:hover { background: #f8fafc; }
.template-copy { flex: 1; min-width: 0; }
.template-copy b, .template-copy small { display: block; }
.template-copy small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 520px) {
  .check-grid { grid-template-columns: 1fr; }
  .sync-selection-toolbar { align-items:flex-start; flex-direction:column; }
}

.api-console { display:grid; grid-template-columns:minmax(320px,.8fr) minmax(420px,1.2fr); gap:18px; align-items:start; }
.operation-detail { text-align:left; display:flex; flex-direction:column; gap:3px; margin-top:4px; }
.operation-detail span,.operation-detail small { color:var(--muted); }
.risk-callout { padding:14px; margin:4px 0 18px; border:1px solid #f1cf8b; background:var(--warning-bg); color:#704100; border-radius:10px; }
.risk-callout>b,.risk-callout>span { display:block; }
.risk-callout>span { margin:3px 0 12px; font-size:12px; }
.risk-callout .check-card { margin:0; background:#fff; }
.json-result { min-height:180px; max-height:480px; overflow:auto; padding:16px; border-radius:10px; background:#101828; color:#d5e1f5; font:12px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace; white-space:pre-wrap; overflow-wrap:anywhere; }
.health-stack { display:grid; gap:10px; }
.health-stack>div { display:flex; justify-content:space-between; gap:18px; padding:15px; border:1px solid var(--line); background:#fafbfc; border-radius:10px; }
.health-stack span { color:var(--muted); }
.health-stack b { text-align:right; }
@media (max-width: 900px) { .api-console { grid-template-columns:1fr; } }
@media (max-width: 520px) { .health-stack>div { display:block; } .health-stack b { display:block; text-align:left; margin-top:3px; } }
.icon-btn { display:grid; place-items:center; color:var(--ink); }
.workspace-switcher { margin:0; min-width:190px; gap:2px; color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.06em; }
.workspace-switcher select { height:34px; padding:0 30px 0 10px; color:var(--ink); font-size:12px; font-weight:700; text-transform:none; letter-spacing:0; }
@media (max-width:520px) { .workspace-switcher { min-width:0; max-width:145px; } .workspace-switcher select { max-width:145px; } }

.integration-feedback { margin-bottom:16px; padding:13px 16px; border:1px solid var(--line); border-radius:10px; font-weight:700; }
.integration-feedback.success { color:#17633a; background:#ecfdf3; border-color:#a6e8c2; }
.integration-feedback.warning { color:#704100; background:var(--warning-bg); border-color:#f1cf8b; }
.integration-feedback.error { color:#9b1c1c; background:#fff1f1; border-color:#f3b4b4; }
.integration-metrics .metric-card strong { font-size:22px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.integration-account { gap:12px; }
.integration-account>div:first-child { flex:1; min-width:180px; }
.record-actions { display:flex; gap:8px; flex-wrap:wrap; }
.database-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:10px; }
.database-card { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.database-card.active { border-color:#79cf9d; background:#f2fbf6; }
.database-card b,.database-card small { display:block; }
.database-card small { color:var(--muted); margin-top:3px; }
@media (max-width:620px) { .integration-account { align-items:flex-start; flex-direction:column; } .record-actions,.record-actions .btn { width:100%; } .two-grid .panel-title { align-items:flex-start; flex-direction:column; } .two-grid .panel-title .btn { width:100%; } }

.settings-nav { position:sticky; top:82px; z-index:7; display:flex; gap:6px; padding:7px; margin-bottom:16px; overflow:auto; }
.settings-nav button { border:0; background:transparent; color:var(--muted); border-radius:8px; padding:9px 13px; font-weight:750; white-space:nowrap; cursor:pointer; }
.settings-nav button.active { color:#fff; background:var(--navy); }
.settings-metrics { margin-bottom:18px; }
.settings-section { margin-top:18px; scroll-margin-top:145px; }
.settings-section fieldset { border:0; border-top:1px solid var(--line); padding:20px 0 4px; margin:0; }
.settings-section fieldset:first-of-type { border-top:0; padding-top:0; }
.settings-section legend { padding:0 12px 0 0; margin-bottom:14px; color:var(--ink); font-size:13px; font-weight:800; }
.security-note { padding:11px 13px; border-radius:9px; background:#f8fafc; color:var(--muted); font-size:12px; }
.settings-actions { display:flex; align-items:center; justify-content:space-between; gap:18px; border-top:1px solid var(--line); padding-top:18px; margin-top:16px; }
.settings-toolbar { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.settings-toolbar .search-field { max-width:none; }
.settings-toolbar select { width:auto; min-width:150px; }
.settings-template-list { max-height:620px; }
#user-list td:first-child small { display:block; color:var(--muted); margin-top:3px; }
@media (max-width:620px) { .settings-nav { top:70px; margin-left:-15px; margin-right:-15px; border-radius:0; } .settings-actions,.settings-toolbar { align-items:stretch; flex-direction:column; } .settings-actions .button-row,.settings-actions .btn,.settings-toolbar select { width:100%; } }

.profit-nav { display:grid; grid-template-columns:1.2fr 1.5fr .7fr; gap:12px; padding:10px; margin-bottom:18px; }
.profit-nav>div { display:flex; align-items:center; gap:5px; min-width:0; }
.profit-nav>div>span { padding:0 8px; color:var(--muted); font-size:9px; font-weight:800; letter-spacing:.08em; white-space:nowrap; }
.profit-nav button { border:0; border-radius:8px; background:transparent; color:var(--muted); padding:9px 11px; font-weight:750; white-space:nowrap; cursor:pointer; }
.profit-nav button:hover { background:#f4f6fa; color:var(--ink); }
.profit-nav button.active { background:var(--navy); color:#fff; }
.profit-action { width:100%; border:0; background:transparent; text-align:left; cursor:pointer; }
.success-text { color:var(--success); }
.warning-text { color:var(--warning); }
.ingredient-row { margin-top:14px; border:1px solid var(--line); border-radius:10px; padding:14px 14px 0; }
.ingredient-row legend { padding:0 7px; font-weight:800; font-size:12px; }
.cost-breakdown { display:grid; gap:0; margin:20px 0; border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.cost-breakdown>div { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:11px 14px; border-bottom:1px solid var(--line); }
.cost-breakdown>div:last-child { border-bottom:0; }
.cost-breakdown span { color:var(--muted); }
#fnb-pricing-form fieldset { border:0; border-top:1px solid var(--line); padding:18px 0 0; margin:18px 0; }
#fnb-pricing-form legend { padding-right:10px; font-size:12px; font-weight:800; }
@media (max-width:1100px) { .profit-nav { grid-template-columns:1fr; } .profit-nav>div { overflow:auto; } }
@media (max-width:620px) { .profit-nav { margin-left:-15px; margin-right:-15px; border-radius:0; padding:8px 15px; } .profit-nav>div { align-items:flex-start; } .profit-nav>div>span { min-width:90px; padding-top:11px; } }
.sidebar nav { min-height:0; overflow-y:auto; padding-right:3px; scrollbar-width:thin; scrollbar-color:rgba(255,255,255,.2) transparent; }
.sidebar-section { display:block; padding:14px 12px 5px; color:#8195b3; font-size:10px; font-weight:800; letter-spacing:.1em; }
.sidebar nav a { min-height:36px; padding-top:8px; padding-bottom:8px; font-size:13px; }
.sidebar nav a .icon { width:18px; height:18px; }
.pricing-workspace .panel-title h2 { font-size:18px; line-height:1.35; }
.pricing-workspace .panel-title p,.pricing-workspace label,.pricing-workspace table { font-size:13px; }
.pricing-workspace .metric-card span { font-size:13px; }
.pricing-workspace .metric-card strong { font-size:24px; }
.pricing-workspace .hero-price { font-size:36px; line-height:1.15; }
.pricing-workspace .result-grid span { font-size:12px; }
.pricing-workspace .result-grid b { font-size:15px; }
.publication-summary { display:grid; grid-template-columns:1fr 1fr; gap:7px 18px; padding:14px; margin-bottom:18px; border:1px solid var(--line); border-radius:10px; background:#f8fafc; }
.publication-summary span { color:var(--muted); font-size:12px; }
.publication-summary b { text-align:right; font-size:13px; }
@media (max-width:800px) { .sidebar-section { padding-top:16px; } }
.sync-error { max-width:360px; white-space:normal!important; color:var(--muted); font-size:11px; line-height:1.45; }
.table-sort-button { display:inline-flex; align-items:center; justify-content:flex-start; gap:6px; width:100%; padding:0; border:0; background:transparent; color:inherit; font:inherit; letter-spacing:inherit; text-transform:inherit; cursor:pointer; white-space:nowrap; }
th.number .table-sort-button { justify-content:flex-end; }
.table-sort-button:hover,.table-sort-button.active { color:var(--primary); }
.sort-indicator { min-width:12px; font-size:13px; line-height:1; opacity:.55; }
.table-sort-button.active .sort-indicator { opacity:1; }
@media (max-width:520px) { #sync-run-list table { display:table; min-width:920px; } #sync-run-list thead { display:table-header-group; } #sync-run-list tbody { display:table-row-group; } #sync-run-list tr { display:table-row; padding:0; border:0; } #sync-run-list th,#sync-run-list td { display:table-cell; padding:13px 16px; border-bottom:1px solid var(--line); } }
