/* Project Cockpit components. Plain CSS on the design tokens; no JavaScript required.
   Every rule references a semantic token (var(--surface), var(--accent), var(--urgency-*-fg) ...), never a raw colour.
   Class prefix: pc-. States: :hover, :focus-visible, :active, [disabled] / [aria-disabled], [aria-busy], [aria-invalid], .is-empty. */

.pc { font-family: var(--font-sans); color: var(--text-primary); font-size: 16px; line-height: 24px; }
.pc-dense { font-size: 14px; line-height: 20px; }
.pc-mono { font-family: var(--font-mono); font-size: 13px; line-height: 20px; }
.pc-figure { font-variant-numeric: tabular-nums lining-nums; text-align: right; }
.pc-muted { color: var(--text-muted); }
.pc-caption { font-size: 12px; line-height: 16px; color: var(--text-muted); }
.pc-overline { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.pc-icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.pc-icon-sm { width: 16px; height: 16px; }
.pc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Focus: one rule for everything interactive. */
.pc :where(a, button, input, select, textarea, [tabindex]):focus-visible,
.pc-btn:focus-visible, .pc-input:focus-visible, .pc-row:focus-visible, .pc-node:focus-visible, .pc-palette-item:focus-visible {
  outline: var(--stroke-focus) solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--surface-raised);
}

/* ---------- Buttons ---------- */
.pc-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 40px; padding: 0 var(--space-4);
  border-radius: var(--radius-md); border: 1px solid transparent; font: inherit; font-size: 14px; line-height: 20px; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color 150ms, border-color 150ms, color 150ms; }
.pc-btn .pc-icon { width: 18px; height: 18px; }
.pc-btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.pc-btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.pc-btn-primary:active { background: var(--accent-hover); box-shadow: inset 0 2px 0 rgba(0,0,0,0.15); }
.pc-btn-secondary { background: var(--surface-raised); color: var(--accent); border-color: var(--border-strong); }
.pc-btn-secondary:hover { background: var(--accent-subtle); border-color: var(--accent); }
.pc-btn-secondary:active { background: var(--accent-subtle); box-shadow: inset 0 2px 0 rgba(0,0,0,0.08); }
.pc-btn-quiet { background: transparent; color: var(--accent); }
.pc-btn-quiet:hover { background: var(--accent-subtle); }
.pc-btn-quiet:active { background: var(--accent-subtle); box-shadow: inset 0 2px 0 rgba(0,0,0,0.08); }
.pc-btn-destructive { background: var(--surface-raised); color: var(--danger-fg); border-color: var(--danger-border); }
.pc-btn-destructive:hover { background: var(--danger-bg); }
.pc-btn-destructive.is-armed { background: var(--danger-fg); color: var(--text-inverse); border-color: var(--danger-fg); }
.pc-btn[disabled], .pc-btn[aria-disabled="true"] { background: var(--surface-sunken); color: var(--text-disabled); border-color: var(--border); cursor: not-allowed; box-shadow: none; }
.pc-btn[aria-busy="true"] { color: transparent; position: relative; pointer-events: none; }
.pc-btn[aria-busy="true"]::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  color: var(--on-accent); animation: pc-spin 0.8s linear infinite; }
.pc-btn-secondary[aria-busy="true"]::after, .pc-btn-quiet[aria-busy="true"]::after { color: var(--accent); }
.pc-btn-sm { min-height: 32px; padding: 0 var(--space-3); }
@keyframes pc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pc-btn[aria-busy="true"]::after { animation: none; border-right-color: currentColor; opacity: 0.5; } }

/* ---------- Fields ---------- */
.pc-field { display: flex; flex-direction: column; gap: var(--space-1); }
.pc-label { font-size: 14px; line-height: 20px; font-weight: 600; }
.pc-label .pc-optional { font-weight: 400; color: var(--text-muted); }
.pc-hint { font-size: 12px; line-height: 16px; color: var(--text-muted); }
.pc-error { display: flex; align-items: flex-start; gap: var(--space-1); font-size: 12px; line-height: 16px; color: var(--danger-fg); }
.pc-error .pc-icon { width: 16px; height: 16px; }
.pc-input { display: block; width: 100%; box-sizing: border-box; min-height: 40px; padding: 0 var(--space-3); font: inherit; font-size: 16px; line-height: 24px;
  color: var(--text-primary); background: var(--surface-raised); border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); transition: border-color 150ms; }
.pc-input::placeholder { color: var(--text-muted); }
.pc-input:hover { border-color: var(--text-muted); }
.pc-input:focus, .pc-input:focus-visible { border-color: var(--accent); }
.pc-input[aria-invalid="true"] { border-color: var(--danger-border); }
.pc-input[disabled] { background: var(--surface-sunken); color: var(--text-disabled); border-color: var(--border); cursor: not-allowed; }
.pc-input[readonly] { background: var(--surface-sunken); }
textarea.pc-input { min-height: 96px; padding: var(--space-2) var(--space-3); resize: vertical; }
select.pc-input { appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d8a99' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 20px; }
.pc-input-group { display: flex; align-items: stretch; }
.pc-input-group .pc-input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); font-variant-numeric: tabular-nums lining-nums; text-align: right; }
.pc-input-unit { display: flex; align-items: center; padding: 0 var(--space-3); border: 1.5px solid var(--border-strong); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-sunken); color: var(--text-muted); font-size: 14px; white-space: nowrap; }
.pc-input-group:focus-within .pc-input-unit { border-color: var(--accent); }
.pc-input-date { font-variant-numeric: tabular-nums; }

/* File upload */
.pc-upload { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); border: 1.5px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface-raised); text-align: center; }
.pc-upload:hover, .pc-upload.is-dragover { border-color: var(--accent); background: var(--accent-subtle); }
.pc-upload > .pc-icon { width: 24px; height: 24px; margin: 0 auto; color: var(--text-muted); }
.pc-upload-name { display: flex; align-items: center; gap: var(--space-2); text-align: left; font-size: 14px; line-height: 20px; }
.pc-upload-name .pc-mono { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-progress { height: 8px; border-radius: 4px; background: var(--surface-sunken); border: 1px solid var(--border); overflow: hidden; }
.pc-progress > div { height: 100%; background: var(--accent); }
.pc-upload.is-error { border-color: var(--danger-border); border-style: solid; }
.pc-upload.is-done { border-style: solid; border-color: var(--success-border); }
.pc-upload.is-done .pc-upload-name .pc-icon { color: var(--success-fg); }
.pc-upload.is-error .pc-upload-name .pc-icon { color: var(--danger-fg); }

/* ---------- Badges ---------- */
.pc-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 6px; border-radius: var(--radius-sm); border: 1px solid; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; vertical-align: middle; }
.pc-badge .pc-icon { width: 16px; height: 16px; }
.pc-urgency-calm      { color: var(--urgency-calm-fg);      background: var(--urgency-calm-bg);      border-color: var(--urgency-calm-border); }
.pc-urgency-attention { color: var(--urgency-attention-fg); background: var(--urgency-attention-bg); border-color: var(--urgency-attention-border); }
.pc-urgency-soon      { color: var(--urgency-soon-fg);      background: var(--urgency-soon-bg);      border-color: var(--urgency-soon-border); }
.pc-urgency-overdue   { color: var(--urgency-overdue-fg);   background: var(--urgency-overdue-bg);   border-color: var(--urgency-overdue-border); }
.pc-stage-idle     { color: var(--stage-idle-fg);     background: var(--stage-idle-bg);     border-color: var(--stage-idle-border); border-style: dashed; }
.pc-stage-active   { color: var(--stage-active-fg);   background: var(--stage-active-bg);   border-color: var(--stage-active-border); }
.pc-stage-parked   { color: var(--stage-parked-fg);   background: var(--stage-parked-bg);   border-color: var(--stage-parked-border); }
.pc-stage-approved { color: var(--stage-approved-fg); background: var(--stage-approved-bg); border-color: var(--stage-approved-border); }
.pc-stage-revise   { color: var(--stage-revise-fg);   background: var(--stage-revise-bg);   border-color: var(--stage-revise-border); }
.pc-stage-rejected { color: var(--stage-rejected-fg); background: var(--stage-rejected-bg); border-color: var(--stage-rejected-border); }
.pc-stage-closed   { color: var(--stage-closed-fg);   background: var(--stage-closed-bg);   border-color: var(--stage-closed-border); }
.pc-badge-success { color: var(--success-fg); background: var(--success-bg); border-color: var(--success-border); }
.pc-badge-danger  { color: var(--danger-fg);  background: var(--danger-bg);  border-color: var(--danger-border); }
.pc-badge-info    { color: var(--info-fg);    background: var(--info-bg);    border-color: var(--info-border); }

/* ---------- Cards ---------- */
.pc-card { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-1); }
.pc-partner-card { border-radius: var(--radius-lg); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
@media (min-width: 640px) { .pc-partner-card { padding: var(--space-5); } }
.pc-partner-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-2); }
.pc-partner-card h2 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; }
.pc-partner-card-body { font-size: 16px; line-height: 24px; }
.pc-partner-card-body p { margin: 0 0 var(--space-2); }
.pc-partner-card-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; padding-top: var(--space-2); border-top: 1px solid var(--border); }
.pc-partner-card.is-done { border-color: var(--success-border); }
.pc-partner-card.is-done .pc-partner-card-actions { color: var(--success-fg); font-weight: 600; font-size: 14px; }

/* ---------- Case row (dashboard) ---------- */
.pc-case-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-raised); overflow: hidden; }
.pc-case-head, .pc-row { display: grid; grid-template-columns: 4px minmax(220px, 2fr) 120px 150px 140px 1fr 120px; align-items: center; gap: var(--space-3); }
.pc-case-head { padding: var(--space-2) var(--space-3) var(--space-2) 0; background: var(--surface-sunken); border-bottom: 1px solid var(--border); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.pc-row { padding: var(--space-3) var(--space-3) var(--space-3) 0; border-bottom: 1px solid var(--border); font-size: 14px; line-height: 20px; color: inherit; text-decoration: none; cursor: pointer; }
.pc-row:last-child { border-bottom: 0; }
.pc-row:hover { background: var(--accent-subtle); }
.pc-row:focus-visible { outline-offset: -2px; }
.pc-row.is-selected { background: var(--accent-subtle); box-shadow: inset 2px 0 0 var(--accent); }
.pc-row-mark { align-self: stretch; }
.pc-row.is-overdue .pc-row-mark { background: var(--urgency-overdue-bg); }
.pc-row-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-row-id { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.pc-row-due { font-variant-numeric: tabular-nums; }
.pc-row-wait { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-row-wait.is-me { color: var(--text-primary); font-weight: 600; }
.pc-row[aria-busy="true"] > * { opacity: 0.5; }

/* ---------- Timeline / stepper ---------- */
.pc-timeline { display: flex; flex-direction: column; gap: 0; padding-left: 0; margin: 0; list-style: none; }
.pc-step { display: grid; grid-template-columns: 32px 1fr; gap: var(--space-3); position: relative; padding-bottom: var(--space-4); }
.pc-step::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--border); }
.pc-step:last-child::before { display: none; }
.pc-step.is-done::before { background: var(--stage-approved-border); }
.pc-step-marker { width: 32px; height: 32px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; border-radius: var(--radius-md); background: var(--surface-raised); }
.pc-step-marker .pc-icon { width: 16px; height: 16px; stroke-width: 2; }
.pc-step.is-gate .pc-step-marker { border-radius: 0; transform: rotate(45deg); width: 24px; height: 24px; margin: 4px; }
.pc-step.is-gate .pc-step-marker .pc-icon { transform: rotate(-45deg); }
.pc-step-idle .pc-step-marker { border-style: dashed; border-color: var(--stage-idle-border); color: var(--stage-idle-fg); }
.pc-step-active .pc-step-marker { border-color: var(--stage-active-border); background: var(--stage-active-bg); color: var(--stage-active-fg); }
.pc-step-parked .pc-step-marker { border-color: var(--stage-parked-border); background: var(--stage-parked-bg); color: var(--stage-parked-fg); }
.pc-step-approved .pc-step-marker { border-color: var(--stage-approved-border); background: var(--stage-approved-bg); color: var(--stage-approved-fg); }
.pc-step-revise .pc-step-marker { border-color: var(--stage-revise-border); background: var(--stage-revise-bg); color: var(--stage-revise-fg); }
.pc-step-rejected .pc-step-marker { border-color: var(--stage-rejected-border); background: var(--stage-rejected-bg); color: var(--stage-rejected-fg); }
.pc-step-closed .pc-step-marker { border-color: var(--stage-closed-border); background: var(--stage-closed-bg); color: var(--stage-closed-fg); }
.pc-step-body { min-width: 0; padding-top: 4px; }
.pc-step-title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: 16px; line-height: 24px; font-weight: 600; }
.pc-step-meta { font-size: 12px; line-height: 16px; color: var(--text-muted); }
.pc-step-docs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.pc-doc-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; line-height: 16px; color: var(--accent); text-decoration: none; background: var(--surface-raised); }
.pc-doc-chip:hover { border-color: var(--accent); }
.pc-doc-chip .pc-icon { width: 14px; height: 14px; }

/* ---------- Decision record ---------- */
.pc-decision { display: grid; grid-template-columns: 32px 1fr; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-raised); }
.pc-avatar { width: 32px; height: 32px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; background: var(--surface-sunken); color: var(--text-muted); border: 1px solid var(--border); letter-spacing: 0.02em; }
.pc-decision-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: 14px; line-height: 20px; }
.pc-decision-who { font-weight: 600; }
.pc-decision-org { color: var(--text-muted); }
.pc-decision-when { font-size: 12px; line-height: 16px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.pc-decision-comment { margin: var(--space-2) 0 0; font-family: var(--font-serif); font-size: 15px; line-height: 24px; }
.pc-decision-ledger { margin-top: var(--space-2); font-family: var(--font-mono); font-size: 11px; line-height: 16px; color: var(--text-muted); }

/* ---------- Toast ---------- */
.pc-toast { display: flex; align-items: flex-start; gap: var(--space-3); width: 360px; max-width: 100%; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--surface-raised); border: 1px solid var(--border); border-left-width: 1px; box-shadow: var(--shadow-3); font-size: 14px; line-height: 20px; }
.pc-toast .pc-icon { width: 20px; height: 20px; margin-top: 0; }
.pc-toast-success .pc-icon { color: var(--success-fg); }
.pc-toast-danger .pc-icon { color: var(--danger-fg); }
.pc-toast-info .pc-icon { color: var(--info-fg); }
.pc-toast-body { flex: 1; }
.pc-toast-title { font-weight: 600; }
.pc-toast-close { background: none; border: 0; padding: 2px; color: var(--text-muted); cursor: pointer; border-radius: var(--radius-sm); }
.pc-toast-close:hover { color: var(--text-primary); background: var(--surface-sunken); }

/* ---------- Empty state ---------- */
.pc-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-2); padding: var(--space-10) var(--space-5); border: 1px dashed var(--border-strong); border-radius: var(--radius-md); color: var(--text-muted); }
.pc-empty .pc-icon { width: 32px; height: 32px; }
.pc-empty-title { font-size: 16px; line-height: 24px; font-weight: 600; color: var(--text-primary); }
.pc-empty p { margin: 0; max-width: 44ch; font-size: 14px; line-height: 20px; }

/* ---------- Modal ---------- */
.pc-scrim { position: absolute; inset: 0; background: var(--scrim); display: flex; align-items: center; justify-content: center; padding: var(--space-4); }
.pc-modal { width: 100%; max-width: 480px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-3); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.pc-modal h2 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 600; }
.pc-modal p { margin: 0; font-size: 16px; line-height: 24px; }
.pc-modal-summary { display: grid; grid-template-columns: auto 1fr; gap: 4px var(--space-3); padding: var(--space-3); background: var(--surface-sunken); border-radius: var(--radius-sm); font-size: 14px; line-height: 20px; }
.pc-modal-summary dt { color: var(--text-muted); margin: 0; }
.pc-modal-summary dd { margin: 0; font-weight: 600; }
.pc-modal-actions { display: flex; justify-content: flex-end; gap: var(--space-2); }

/* ---------- Tables ---------- */
.pc-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); }
.pc-table th, .pc-table td { padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.pc-table thead th { background: var(--surface-sunken); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.pc-table .pc-figure, .pc-table th.pc-figure { text-align: right; font-variant-numeric: tabular-nums lining-nums; }
.pc-table tbody tr:hover { background: var(--accent-subtle); }
.pc-table .pc-subtotal td { font-weight: 600; background: var(--surface-sunken); border-top: 1px solid var(--border-strong); }
.pc-table .pc-total td { font-weight: 600; border-top: 2px solid var(--text-primary); border-bottom: 0; }
.pc-table td.is-warning { color: var(--warning-fg); }
.pc-table .pc-unit { color: var(--text-muted); font-weight: 400; }

/* ---------- Pack builder ---------- */
.pc-canvas { background-color: var(--surface-sunken); background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 16px 16px; border: 1px solid var(--border); border-radius: var(--radius-md); }
.pc-palette { display: flex; flex-direction: column; gap: 4px; padding: var(--space-2); background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); width: 200px; }
.pc-palette-item { display: flex; align-items: center; gap: var(--space-2); padding: 6px var(--space-2); border-radius: var(--radius-sm); border: 1px solid transparent; font-size: 14px; line-height: 20px; cursor: grab; color: var(--text-primary); background: none; width: 100%; text-align: left; font-family: inherit; }
.pc-palette-item:hover { background: var(--accent-subtle); }
.pc-palette-item.is-selected { background: var(--accent-subtle); border-color: var(--accent); }
.pc-palette-item[aria-disabled="true"] { color: var(--text-disabled); cursor: not-allowed; }
.pc-palette-item .pc-icon { color: var(--text-muted); }
.pc-palette-item.is-selected .pc-icon { color: var(--accent); }
.pc-node { position: absolute; box-sizing: border-box; display: flex; align-items: center; gap: var(--space-2); min-width: 160px; padding: var(--space-2) var(--space-3); background: var(--surface-raised); border: 1.5px solid var(--border-strong); border-radius: var(--radius-md); box-shadow: var(--shadow-1); font-size: 14px; line-height: 20px; cursor: grab; }
.pc-node .pc-node-kind { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.pc-node .pc-node-name { font-weight: 600; }
.pc-node .pc-icon { color: var(--text-muted); }
.pc-node:hover { border-color: var(--accent); }
.pc-node.is-selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-subtle), var(--shadow-1); }
.pc-node.is-selected .pc-icon { color: var(--accent); }
.pc-node.is-gate { border-radius: 0; }
.pc-node.is-gate::before { content: ""; width: 12px; height: 12px; background: var(--stage-parked-bg); border: 1.5px solid var(--stage-parked-border); transform: rotate(45deg); margin: 0 4px 0 2px; flex: none; }
.pc-node.is-invalid { border-color: var(--danger-border); }
.pc-node.is-dragging { box-shadow: var(--shadow-2); opacity: 0.9; }
.pc-node-port { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--surface-raised); border: 1.5px solid var(--border-strong); top: 50%; margin-top: -5px; }
.pc-node-port.is-in { left: -6px; } .pc-node-port.is-out { right: -6px; }
.pc-node.is-selected .pc-node-port { border-color: var(--accent); }
.pc-edge { stroke: var(--border-strong); stroke-width: 1.5; fill: none; }
.pc-edge.is-selected { stroke: var(--accent); }
.pc-panel { width: 280px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); display: flex; flex-direction: column; }
.pc-panel-head { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
.pc-panel-head .pc-icon { color: var(--accent); }
.pc-panel-head h3 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; }
.pc-panel-section { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--space-3); }
.pc-panel-section:last-child { border-bottom: 0; }
.pc-panel-section h4 { margin: 0; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.pc-panel .pc-input { min-height: 32px; font-size: 14px; line-height: 20px; }
.pc-panel .pc-label { font-size: 12px; line-height: 16px; }
.pc-switch { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 14px; line-height: 20px; cursor: pointer; }
.pc-switch input { appearance: none; width: 36px; height: 20px; border-radius: 10px; background: var(--border-strong); position: relative; margin: 0; cursor: pointer; transition: background 150ms; }
.pc-switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface-raised); transition: transform 150ms; }
.pc-switch input:checked { background: var(--accent); }
.pc-switch input:checked::after { transform: translateX(16px); }

/* ---------- Loading band ---------- */
.pc-band { position: relative; height: 4px; border-radius: 2px; overflow: hidden; background: var(--surface-sunken); }
.pc-band span { position: absolute; top: 0; height: 100%; width: 25%; animation: pc-slide 1.6s linear infinite; }
.pc-band .s1 { background: var(--band-1); } .pc-band .s2 { background: var(--band-2); animation-delay: -0.4s; }
.pc-band .s3 { background: var(--band-3); animation-delay: -0.8s; } .pc-band .s4 { background: var(--band-4); animation-delay: -1.2s; }
@keyframes pc-slide { from { left: -25%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .pc-band span { animation: none; } .pc-band .s1 { left: 0 } .pc-band .s2 { left: 25% } .pc-band .s3 { left: 50% } .pc-band .s4 { left: 75% } }

/* ---------- App chrome (Keycloak and partner pages) ---------- */
.pc-page { min-height: 100%; background: var(--surface); }
.pc-topbar { display: flex; align-items: center; gap: var(--space-3); height: 56px; padding: 0 var(--space-4); background: var(--surface-raised); border-bottom: 1px solid var(--border); }
.pc-topbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; color: var(--text-primary); text-decoration: none; }
.pc-topbar-brand svg { width: 24px; height: 24px; }
.pc-topbar-spacer { flex: 1; }
.pc-auth { max-width: 400px; margin: 0 auto; padding: var(--space-8) var(--space-4); }
.pc-auth-card { padding: var(--space-6); border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: var(--space-4); }
.pc-auth-card h1 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 600; }
.pc-auth-card .pc-btn { width: 100%; }
.pc-auth-foot { text-align: center; font-size: 12px; line-height: 16px; color: var(--text-muted); margin-top: var(--space-4); }
.pc-alert { display: flex; gap: var(--space-2); padding: var(--space-3); border-radius: var(--radius-sm); border: 1px solid; font-size: 14px; line-height: 20px; }
.pc-alert-danger { color: var(--danger-fg); background: var(--danger-bg); border-color: var(--danger-border); }
.pc-alert-success { color: var(--success-fg); background: var(--success-bg); border-color: var(--success-border); }
.pc-alert-info { color: var(--info-fg); background: var(--info-bg); border-color: var(--info-border); }
.pc-alert-warning { color: var(--warning-fg); background: var(--warning-bg); border-color: var(--warning-border); }
.pc-lang { display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--text-muted); }
.pc-sidenav { display: flex; flex-direction: column; gap: 2px; width: 220px; padding: var(--space-2); }
.pc-sidenav a { display: flex; align-items: center; gap: var(--space-2); padding: 8px var(--space-3); border-radius: var(--radius-sm); color: var(--text-primary); text-decoration: none; font-size: 14px; line-height: 20px; }
.pc-sidenav a:hover { background: var(--accent-subtle); }
.pc-sidenav a[aria-current="page"] { background: var(--accent-subtle); color: var(--accent); font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.pc-sidenav .pc-icon { color: var(--text-muted); }
.pc-sidenav a[aria-current="page"] .pc-icon { color: var(--accent); }
