/* Smaht Cloud website: readable, accessible, light and dark; MudBlazor supplies its own component styles. */
:root { --bg: #f5f7fa; --card: #ffffff; --text: #1b2430; --muted: #5a6573; --line: #d5dbe3; --accent: #0b6bcb; --accent-text: #ffffff;
        --ok: #1e7d3a; --warn: #9a6200; --bad: #b42318; --notice: #e8f1fb; color-scheme: light dark; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #11161c; --card: #1a2129; --text: #e6ebf1; --muted: #a3adb9; --line: #33404d; --accent: #5aa9f5; --accent-text: #0b1520;
          --ok: #7bd88f; --warn: #f2c14e; --bad: #ff8a80; --notice: #17324d; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 8px; background: var(--card); padding: 4px 8px; z-index: 10; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1 { font-size: 2rem; line-height: 1.25; margin: 16px 0; } h2 { font-size: 1.3rem; margin: 28px 0 10px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }
.muted { color: var(--muted); } .small { font-size: 0.9rem; }
.button, button { display: inline-block; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.button.primary, button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
button.small { padding: 4px 10px; font-size: 0.9rem; } button.link { background: none; border: none; padding: 0 4px; color: var(--accent); text-decoration: underline; font-weight: 400; }
button.danger { color: var(--bad); border-color: var(--bad); }
.cta { background: var(--accent); color: var(--accent-text) !important; padding: 6px 14px; border-radius: 8px; }
form.inline { display: inline; }
.hero { padding: 32px 0 16px; } .hero h1 { font-size: 2.4rem; max-width: 46rem; } .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 24px 0; }
.cards article, .band, .link-card, .empty, .release { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.band { margin: 24px 0; }
.prose { max-width: 48rem; } .prose pre, pre { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow-x: auto; }
.prose table, table { border-collapse: collapse; width: 100%; } th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap { overflow-x: auto; }
code.hash { font-size: 0.75rem; word-break: break-all; } code.big { font-size: 1.4rem; letter-spacing: 0.08em; }
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 32px; } .docs-nav ul { list-style: none; padding: 0; } .docs-nav li { margin: 6px 0; }
.docs-nav a[aria-current="page"] { font-weight: 700; }
@media (max-width: 760px) { .docs { grid-template-columns: 1fr; } .hero h1 { font-size: 1.8rem; } }
.notice { background: var(--notice); border-radius: 8px; padding: 12px 16px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.85rem; border: 1px solid var(--line); }
.chip.healthy { color: var(--ok); border-color: var(--ok); } .chip.degraded { color: var(--warn); border-color: var(--warn); }
.chip.unhealthy { color: var(--bad); border-color: var(--bad); } .chip.off, .chip.unknown { color: var(--muted); }
td.actions { display: table-cell; white-space: nowrap; } .confirm { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; white-space: normal; }
.inline-edit { display: flex; gap: 6px; align-items: center; }
input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }
.code-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; } .code-form label { width: 100%; font-weight: 600; }
.link-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; } .link-card dt { color: var(--muted); }
.link-card label { display: block; font-weight: 600; margin-top: 12px; } .link-card input { width: 100%; max-width: 28rem; }
details { margin: 8px 0; }

/* Staff back office */
.staff-nav { display: flex; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 0 0 20px; padding-bottom: 8px; }
.staff-nav a { text-decoration: none; padding: 4px 2px; }
.staff-nav a.active { font-weight: 600; border-bottom: 2px solid var(--accent); }
.search-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.search-bar input[type=search] { flex: 1 1 260px; min-width: 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; } .facts dt { color: var(--muted); } .facts dd { margin: 0; overflow-wrap: anywhere; }
.confirm-box { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.confirm-box p { flex-basis: 100%; margin: 0 0 4px; }
td pre { white-space: pre-wrap; max-width: 40ch; font-size: 0.8rem; }
.nowrap { white-space: nowrap; }

/* Inventory (portal) */
.sync-summary { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 24px; }
.part-detail { padding: 8px 4px 12px; } .part-detail h3 { font-size: 1rem; margin: 12px 0 4px; }
.stock-list, .movements, .attachments { list-style: none; padding-left: 0; margin: 4px 0; } .attachments li { overflow-wrap: anywhere; } .movements { padding-left: 16px; font-size: 0.9rem; }
.place-tree { list-style: none; padding-left: 0; } .place-tree li { margin: 4px 0; }

/* Staff catalog */
.catalog-form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; max-width: 48rem; }
.catalog-form label { font-weight: 600; margin-top: 6px; }
.offer-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-bottom: 1px solid var(--line); padding: 6px 0; }
.offer-row input { width: 9rem; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs .tab { background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 6px 12px; color: var(--text); text-decoration: none; font-weight: 400; }
.tabs .tab.active { border-bottom-color: var(--accent); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 6px; align-items: end; border-bottom: 1px solid var(--line); padding: 6px 0; }
.field-row label { font-weight: 400; margin: 0; font-size: 0.85rem; } .field-row input, .field-row select { width: 100%; box-sizing: border-box; }
.history { list-style: none; padding-left: 0; } .history li { border-bottom: 1px solid var(--line); padding: 6px 0; }
.history dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 4px 0 0; font-size: 0.9rem; } .history dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.category-tree, .category-tree ul { list-style: none; padding-left: 1.25rem; margin: 0; } .category-tree { padding-left: 0; }
.category-tree .node { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 3px 4px; border-radius: 6px; }
.category-tree .node.drop { outline: 2px dashed var(--accent); } .category-tree .node[draggable=true] { cursor: grab; }
.tree-top { border: 2px dashed var(--line); border-radius: 8px; padding: 6px 10px; margin: 8px 0; color: var(--muted); } .tree-top.drop { border-color: var(--accent); }
.editor { border: 1px solid var(--line, #d0d7de); border-radius: 8px; padding: 12px 16px; margin: 12px 0; }
.edit-form .field { margin-bottom: 8px; max-width: 32rem; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.button.small { padding: 2px 10px; font-size: 0.85rem; }
.note { border-left: 3px solid var(--accent, #2f6fdf); padding-left: 8px; }
.edit-form .field.wide { max-width: 48rem; } .edit-form textarea { width: 100%; font-family: inherit; }
.choices { list-style: none; padding: 0; margin: 0 0 12px; } .choices li { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--line); }
.links { padding-left: 1.2rem; } .links li { margin: 4px 0; }
.file-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.file-grid li { border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.file-grid img { width: 100%; height: 150px; object-fit: cover; border-radius: 6px; display: block; }
.file-grid .doc { display: flex; align-items: center; justify-content: center; height: 150px; border: 1px dashed var(--line); border-radius: 6px; padding: 8px; text-align: center; }
.project-cover { max-width: 100%; max-height: 320px; border-radius: 12px; display: block; margin: 8px 0 16px; }
.project-cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.project-cards li { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--card); min-width: 0; overflow-wrap: anywhere; }
.project-cards a { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; }
.project-cards img, .project-cards .no-cover { width: 100%; height: 160px; object-fit: cover; border-radius: 8px; display: block; background: var(--line); }

/* Layout: a left menu on wide screens, a top bar with a menu button below 900 px */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--card); border-right: 1px solid var(--line); padding: 20px 16px; position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto; box-sizing: border-box; }
.brand { font-weight: 800; font-size: 1.5rem; text-decoration: none; color: var(--text); }
.menu-toggle, .menu-button { display: none; }
.side-heading { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 24px 0 6px; font-weight: 600; }
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav li { margin: 0; }
.side-nav a, .side-nav button.link { display: block; padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--text); width: 100%; text-align: left; box-sizing: border-box; font: inherit; }
.side-nav a:hover, .side-nav button.link:hover { background: var(--bg); }
.side-nav a[aria-current="page"] { background: var(--notice); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.side-nav a.cta { text-align: center; }
.side-nav button.link { text-decoration: none; padding-left: 10px; }
.content { min-width: 0; }
.site-main { max-width: 1100px; margin: 0 auto; padding: 24px 24px 48px; }
.site-footer { max-width: 1100px; margin: 0 auto; padding: 24px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); }
@media (max-width: 900px) {
  .shell { display: block; }
  .side { height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; overflow: visible; }
  .side { position: relative; }
  .side-top { display: flex; justify-content: space-between; align-items: center; }
  .menu-toggle { display: block; position: absolute; right: 16px; top: 12px; width: 5.5rem; height: 2.6rem; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
  .menu-button { display: inline-block; padding: 8px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-weight: 600; }
  .menu-toggle:focus-visible ~ .side-top .menu-button { outline: 3px solid var(--accent); outline-offset: 2px; }
  .menu-toggle:checked ~ .side-top .menu-button { background: var(--notice); }
  .side-nav { display: none; }
  .menu-toggle:checked ~ .side-nav { display: block; }
  .site-main { padding: 16px; }
  .site-footer { padding: 16px; }
}

/* Home, products and blog */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 40px; }
.section-head h2 { margin: 0; }
.cards a.card-link { font-weight: 600; }
.product-cards, .post-list { list-style: none; padding: 0; margin: 16px 0 24px; display: grid; gap: 16px; }
.product-cards { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.product-cards li, .post-list li { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--card); min-width: 0; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 6px; }
.product-cards img, .product-cards .no-cover { width: 100%; height: 150px; object-fit: cover; border-radius: 8px; display: block; background: var(--line); }
.product-cards a.title, .post-list a.title { font-weight: 700; text-decoration: none; color: var(--text); font-size: 1.1rem; }
.product-cards a.title:hover, .post-list a.title:hover { text-decoration: underline; }
.price { font-weight: 600; color: var(--accent); }
.post-list time, .post-meta { color: var(--muted); font-size: 0.9rem; }
.post-cover { max-width: 100%; max-height: 360px; border-radius: 12px; display: block; margin: 8px 0 16px; }
.product-head { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.product-head img { max-width: 340px; width: 100%; border-radius: 12px; }
.preview-box { border: 1px dashed var(--line); border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
.edit-form select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }
.edit-form .hint { color: var(--muted); font-size: 0.85rem; margin: 2px 0 0; }
.edit-form input:not([type=checkbox]), .edit-form select { width: 100%; box-sizing: border-box; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }

/* Parts from a web page and the wiring drawing (design section 22) */
.found-mark { font-size: 0.8rem; font-weight: 400; margin-left: 6px; } .found-mark.found { color: var(--ok); } .found-mark.missing { color: var(--muted); }
.field-error { display: block; color: var(--bad); font-size: 0.9rem; }
.draft { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 12px 0; max-width: 48rem; } .draft .field { max-width: none; } .draft input, .draft textarea { width: 100%; }
.draft-picture { display: block; max-width: 160px; max-height: 160px; margin-top: 6px; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.diagram-host { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.diagram-host .empty { border: none; margin: 0; }
svg.diagram { display: block; width: 100%; min-width: 480px; height: auto; max-height: 80vh; touch-action: manipulation; color: var(--text); }
svg.diagram .d-node rect { fill: var(--bg); stroke: var(--text); stroke-width: 1.5; }
svg.diagram .d-node.selected rect { stroke: var(--accent); stroke-width: 3; }
svg.diagram .d-title { fill: var(--text); font: 600 14px system-ui, sans-serif; } svg.diagram .d-ref { fill: var(--muted); font: 11px system-ui, sans-serif; }
svg.diagram .d-term-name, svg.diagram .d-wire-label { fill: var(--text); font: 12px system-ui, sans-serif; }
svg.diagram .d-term { fill: var(--card); stroke: var(--text); stroke-width: 1.5; } svg.diagram .d-term.pending { fill: var(--accent); }
svg.diagram .d-line { fill: none; stroke: var(--text); stroke-width: 2.5; } svg.diagram .d-hit { fill: none; stroke: transparent; stroke-width: 14; }
svg.diagram .d-wire.selected .d-line { stroke-width: 4.5; stroke-dasharray: 8 4; }
svg.diagram .d-temp { stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 6 4; pointer-events: none; }
svg.diagram.editable .d-node, svg.diagram.editable .d-term { touch-action: none; } svg.diagram.editable .d-node { cursor: grab; } svg.diagram.editable .d-term { cursor: crosshair; }
svg.diagram.editable .d-wire { cursor: pointer; }
svg.diagram :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.terminal-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; } .terminal-row input { width: 9rem; }
