:root {
  color-scheme: light;
  --ink: #101b22;
  --ink-soft: #34414a;
  --muted: #68737b;
  --line: #d8ddd9;
  --line-strong: #c8cfca;
  --base: #f7f8f5;
  --surface: #ffffff;
  --surface-soft: #f1f4f1;
  --accent: #177147;
  --accent-dark: #0e5e39;
  --accent-soft: #eaf3ee;
  --warning: #a16b08;
  --warning-soft: #fff7e7;
  --danger: #a33535;
  --danger-soft: #fff0f0;
  --sidebar-width: 240px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { background: var(--base); }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: var(--base); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }

:focus-visible { outline: 3px solid rgba(23, 113, 71, .28); outline-offset: 2px; }
input:focus-visible, select:focus-visible { border-color: var(--accent); outline-offset: 0; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1000; top: 10px; left: 10px; padding: 10px 14px; color: #fff; background: var(--ink); border-radius: 6px; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.brand-mark { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; color: #fff; background: #18201e; font-size: 13px; font-weight: 600; letter-spacing: .04em; box-shadow: 0 2px 5px rgba(16, 27, 34, .16); }
.auth-brand, .sidebar-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.auth-brand strong, .sidebar-brand strong { display: block; font-size: 16px; line-height: 1.2; letter-spacing: -.02em; }
.auth-brand small, .sidebar-brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }

.auth-shell { display: grid; align-content: center; min-height: 100vh; padding: 38px 24px 80px; }
.auth-brand { width: min(460px, 100%); margin: 0 auto 24px; }
.auth-card { width: min(460px, 100%); margin: 0 auto; padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 45px rgba(16, 27, 34, .06); }
.auth-card h1 { margin: 4px 0 8px; font-size: 29px; line-height: 1.18; letter-spacing: -.035em; }
.auth-intro { margin: 0 0 24px; color: var(--muted); }
.eyebrow { margin: 0; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.stack-form { display: grid; gap: 8px; margin: 0; }
.stack-form + .stack-form { margin-top: 20px; }
#mfa-back { margin-top: 16px; }
label { color: var(--ink-soft); font-size: 13px; font-weight: 600; }
input, select, textarea { width: 100%; min-height: 42px; padding: 9px 11px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 7px; }
input::placeholder { color: #8a9399; }
.stack-form input { margin-bottom: 7px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 16px; border: 1px solid transparent; border-radius: 7px; font-weight: 650; text-decoration: none; }
.button-primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.button-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.button-secondary { color: var(--ink); background: var(--surface); border-color: var(--line-strong); }
.button-secondary:hover { background: var(--surface-soft); }
.button-danger { color: var(--danger); background: var(--surface); border-color: #e8caca; }
.bootstrap-panel { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.bootstrap-panel summary { color: var(--muted); font-weight: 600; cursor: pointer; }
.bootstrap-panel .stack-form { margin-top: 20px; }
.secret-value, .recovery-list { display: block; margin: 12px 0 18px; padding: 13px; color: var(--ink); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 7px; white-space: pre-wrap; overflow-wrap: anywhere; }
#new-password-field { display: grid; gap: 7px; margin: 16px 0; }

.portal { min-height: 100vh; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; display: flex; flex-direction: column; width: var(--sidebar-width); background: #fbfcfa; border-right: 1px solid var(--line); }
.sidebar-brand { height: 126px; padding: 0 27px; }
.global-nav { display: grid; gap: 2px; padding: 12px 0; }
.global-nav a { position: relative; display: flex; align-items: center; gap: 15px; min-height: 52px; padding: 0 27px; color: #526069; text-decoration: none; font-size: 14px; font-weight: 500; }
.global-nav a i { width: 21px; color: #7d878d; font-size: 19px; text-align: center; }
.global-nav a:hover { color: var(--ink); background: #f3f6f3; }
.global-nav a[aria-current="page"] { color: var(--accent-dark); background: #eef4f0; font-weight: 650; }
.global-nav a[aria-current="page"]::before { position: absolute; inset: 0 auto 0 0; width: 3px; content: ""; background: var(--accent); }
.global-nav a[aria-current="page"] i { color: var(--accent); }
.sidebar-identity { display: flex; align-items: center; gap: 11px; margin-top: auto; padding: 24px 27px 30px; border-top: 1px solid #edf0ed; }
.operator-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; color: #fff; background: #25302e; border-radius: 50%; font-size: 11px; font-weight: 650; }
.sidebar-identity strong { display: block; max-width: 120px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-identity small { display: block; color: var(--muted); font-size: 12px; }
.sidebar-scrim { position: fixed; z-index: 25; inset: 0; padding: 0; background: rgba(16, 27, 34, .38); border: 0; }

.app-frame { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { position: relative; z-index: 20; height: 143px; padding: 28px 36px 20px; background: rgba(247, 248, 245, .97); border-bottom: 1px solid transparent; }
.topbar-row { display: flex; align-items: center; min-height: 34px; }
.breadcrumb { display: flex; align-items: center; min-width: 0; gap: 10px; color: var(--muted); font-size: 13px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumb .current { max-width: 420px; overflow: hidden; color: var(--ink-soft); text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb i { color: #9aa19f; font-size: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.operator-summary { min-width: 0; text-align: right; }
.operator-summary span { display: block; max-width: 180px; overflow: hidden; color: var(--ink-soft); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.operator-summary small { display: block; color: var(--muted); font-size: 11px; }
.icon-button { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; color: var(--ink-soft); background: transparent; border: 1px solid transparent; border-radius: 7px; }
.icon-button:hover { background: var(--surface-soft); border-color: var(--line); }
.menu-toggle { display: none; margin-right: 8px; }
.logout-button { color: var(--muted); }
.search-wrap { position: relative; width: min(380px, 100%); margin-top: 12px; }
.global-search { position: relative; display: flex; align-items: center; margin: 0; }
.global-search > i { position: absolute; z-index: 1; left: 13px; color: #7d878d; }
.global-search input { height: 43px; padding: 9px 42px 9px 40px; background: var(--surface); }
.search-clear { position: absolute; right: 5px; width: 34px; height: 34px; color: var(--muted); background: transparent; border: 0; border-radius: 6px; }
.search-clear:hover { background: var(--surface-soft); }
.search-results { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; width: min(500px, calc(100vw - 32px)); padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 14px 32px rgba(16, 27, 34, .12); }
.search-result { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 11px; color: var(--ink); background: transparent; border: 0; border-radius: 6px; text-align: left; }
.search-result:hover, .search-result:focus-visible { background: var(--surface-soft); }
.search-result > i { width: 18px; color: var(--accent); text-align: center; }
.search-result strong, .search-result small { display: block; }
.search-result small { margin-top: 1px; color: var(--muted); }
.search-empty { margin: 0; padding: 12px; color: var(--muted); }

.main-content { padding: 0 36px 38px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; min-height: 93px; padding: 4px 2px 18px; }
.page-heading h1 { margin: 0; font-size: 29px; line-height: 1.25; letter-spacing: -.035em; }
.heading-line { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; }
.heading-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin: 13px 0 0; color: var(--muted); font-size: 12px; }
.heading-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.heading-meta .separator { color: #a9b0ad; }
.status-badge { display: inline-flex; align-items: center; gap: 7px; min-height: 31px; padding: 5px 10px; color: var(--accent-dark); background: var(--accent-soft); border: 1px solid #cedfd5; border-radius: 6px; font-size: 12px; font-weight: 600; }
.status-badge.status-inactive { color: var(--muted); background: var(--surface-soft); border-color: var(--line); }
.status-badge.status-prospect { color: #805807; background: var(--warning-soft); border-color: #eeddb8; }
.page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.context-tabs { display: flex; gap: 2px; margin: -1px 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.context-tabs a { flex: 0 0 auto; padding: 12px 13px 13px; color: #465159; border-bottom: 2px solid transparent; text-decoration: none; font-size: 13px; }
.context-tabs a:hover { color: var(--accent); }
.context-tabs a[aria-current="page"] { color: var(--accent-dark); border-bottom-color: var(--accent); font-weight: 650; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(290px, .88fr); gap: 16px; align-items: start; }
.overview-main, .overview-rail { display: grid; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.panel-inner { padding: 20px; }
.panel h2 { margin: 0; font-size: 16px; line-height: 1.3; letter-spacing: -.02em; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.profile-list { margin: 0; }
.profile-row { display: grid; grid-template-columns: minmax(135px, .72fr) minmax(0, 1.68fr); gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.profile-row:last-child { border-bottom: 0; }
.profile-row dt { color: var(--muted); }
.profile-row dd { min-width: 0; margin: 0; color: var(--ink-soft); }
.profile-row dd strong { color: var(--ink); font-weight: 550; }
.contact-lines { display: flex; flex-wrap: wrap; gap: 3px 8px; align-items: baseline; }
.contact-lines > * { min-width: 0; overflow-wrap: anywhere; }
.contact-lines > strong { flex-basis: 100%; }
.contact-lines .supporting-note { flex-basis: 100%; margin-top: 0; }
.link-text { color: var(--accent); text-decoration: none; }
.link-text:hover { text-decoration: underline; }
.module-list { display: flex; flex-wrap: wrap; gap: 6px; }
.module-chip { padding: 3px 8px; color: #3f4b53; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; font-size: 11px; }
.supporting-note { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }

.activity-list { margin: 0; padding: 0; list-style: none; }
.activity-item { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto auto; gap: 9px; align-items: baseline; min-height: 38px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.activity-item:last-child { border-bottom: 0; }
.activity-item > i { color: var(--accent); font-size: 8px; }
.activity-item time, .activity-item .activity-actor { color: var(--muted); font-size: 11px; white-space: nowrap; }
.empty-inline { margin: 0; padding: 16px 0 4px; color: var(--muted); }

.health-banner { display: flex; gap: 13px; margin: 14px 0 18px; padding: 14px; background: var(--accent-soft); border-radius: 6px; }
.health-banner > i { display: grid; place-items: center; flex: 0 0 auto; width: 29px; height: 29px; color: #fff; background: var(--accent); border-radius: 50%; }
.health-banner strong { display: block; }
.health-banner span { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 12px; }
.health-banner.warning { background: var(--warning-soft); }
.health-banner.warning > i { background: #d99b25; }
.health-banner.neutral { background: var(--surface-soft); }
.health-banner.neutral > i { background: #718078; }
.rail-section { padding: 13px 0; border-bottom: 1px solid var(--line); }
.rail-section:last-of-type { border-bottom: 0; }
.rail-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 12px; font-weight: 700; }
.rail-title .good { color: var(--accent); font-weight: 600; }
.rail-title .muted-state { color: var(--muted); font-weight: 600; }
.rail-data { display: grid; gap: 8px; margin: 0; }
.rail-data div { display: flex; justify-content: space-between; gap: 12px; }
.rail-data dt { color: var(--muted); }
.rail-data dd { margin: 0; color: var(--ink-soft); text-align: right; }
.rail-link { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 5px; padding: 12px 0 0; color: var(--accent); background: transparent; border: 0; border-top: 1px solid var(--line); text-align: left; text-decoration: none; }
.next-step { margin-top: 14px; padding: 15px; background: var(--warning-soft); border: 1px solid #ecdfc2; border-radius: 6px; }
.next-step-head { display: flex; gap: 12px; }
.next-step-icon { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; color: #704b05; background: #ffd96d; border-radius: 50%; }
.next-step strong { display: block; }
.next-step p { margin: 2px 0 0; color: var(--ink-soft); font-size: 12px; }
.next-step .due { margin-top: 11px; padding-top: 10px; border-top: 1px solid #e5d8bc; }

.list-heading { align-items: center; }
.list-controls { display: grid; grid-template-columns: minmax(220px, 1fr) 170px 110px auto; gap: 10px; margin-bottom: 14px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.list-controls .control { display: grid; gap: 5px; }
.list-controls label { font-size: 11px; }
.list-controls input, .list-controls select { min-height: 39px; }
.list-controls .button { align-self: end; min-height: 39px; }
.table-panel { overflow: hidden; }
.customer-table { width: 100%; border-collapse: collapse; }
.customer-table th { padding: 11px 15px; color: var(--muted); background: #fafbfa; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 650; text-align: left; letter-spacing: .03em; text-transform: uppercase; }
.customer-table td { padding: 14px 15px; border-bottom: 1px solid var(--line); color: var(--ink-soft); vertical-align: middle; }
.customer-table tbody tr:last-child td { border-bottom: 0; }
.customer-table tbody tr { cursor: pointer; }
.customer-table tbody tr:hover { background: #f7faf8; }
.customer-table tbody tr:focus-visible { outline-offset: -3px; }
.customer-name { display: block; color: var(--ink); font-weight: 650; text-decoration: none; }
.customer-name:hover { color: var(--accent); text-decoration: underline; }
.customer-legal { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.table-arrow { color: var(--accent); text-align: right; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 15px; background: #fafbfa; border-top: 1px solid var(--line); }
.pagination-info { color: var(--muted); font-size: 12px; }
.pagination-actions { display: flex; gap: 6px; }
.pagination-actions .button { min-height: 34px; padding: 6px 10px; font-size: 12px; }

.state-panel { display: grid; place-items: center; min-height: 260px; padding: 38px; text-align: center; }
.state-panel > div { max-width: 440px; }
.state-panel i { margin-bottom: 14px; color: var(--accent); font-size: 30px; }
.state-panel h2 { font-size: 18px; }
.state-panel p { margin: 7px 0 18px; color: var(--muted); }
.loading-state { min-height: 220px; color: var(--muted); }
.loading-state i { font-size: 20px; }
.placeholder-page { padding-top: 20px; }
.placeholder-page .state-panel { min-height: 340px; }
.placeholder-note { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; padding: 6px 9px; color: var(--muted); background: var(--surface-soft); border-radius: 6px; font-size: 11px; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, .88fr); gap: 16px; align-items: start; }
.workspace-main, .workspace-rail { display: grid; gap: 16px; }
.panel-actions, .record-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.button-compact { min-height: 34px; padding: 6px 11px; font-size: 12px; }
.record-card { padding: 15px 0; border-top: 1px solid var(--line); }
.record-card:first-of-type { padding-top: 2px; border-top: 0; }
.record-card:last-child { padding-bottom: 0; }
.record-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.record-card-head strong, .record-card-head .record-subtitle { display: block; }
.record-card-head strong { font-size: 14px; }
.record-subtitle { margin-top: 2px; color: var(--muted); font-size: 11px; }
.record-status { flex: 0 0 auto; padding: 4px 8px; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; font-size: 10px; font-weight: 650; }
.record-status.status-active { color: var(--accent-dark); background: var(--accent-soft); border-color: #cedfd5; }
.record-status.status-pending, .record-status.status-maintenance { color: #805807; background: var(--warning-soft); border-color: #eeddb8; }
.record-status.status-revoked, .record-status.status-inactive { color: var(--danger); background: var(--danger-soft); border-color: #eccccc; }
.record-details { margin: 0 0 12px; }
.record-details .profile-row, .record-card > .profile-row { padding-block: 7px; font-size: 12px; }
.record-actions { margin-top: 12px; }
.contact-card-lines { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 7px 8px; margin: 9px 0; color: var(--ink-soft); font-size: 12px; }
.contact-card-lines i { color: var(--muted); text-align: center; }
.workspace-empty { display: grid; justify-items: center; min-height: 190px; align-content: center; padding: 28px; color: var(--muted); text-align: center; }
.workspace-empty > i { margin-bottom: 12px; color: var(--accent); font-size: 28px; }
.workspace-empty strong { color: var(--ink); font-size: 15px; }
.workspace-empty p { max-width: 430px; margin: 5px 0 0; }
.workspace-note { margin: 15px 0 0; padding-top: 13px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
.notice-banner { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; padding: 12px 13px; color: #315245; background: var(--accent-soft); border: 1px solid #d8e6dd; border-radius: 6px; font-size: 12px; }
.notice-banner i { margin-top: 2px; color: var(--accent); }
.notice-banner.warning { color: #6f4d08; background: var(--warning-soft); border-color: #eeddb8; }
.notice-banner.warning i { color: var(--warning); }
.workspace-stack { display: grid; gap: 16px; }
.installation-table td:last-child { display: flex; flex-wrap: wrap; gap: 6px; }
.installation-table tbody tr { cursor: default; }
.history-list { margin: 0; padding: 0; list-style: none; }
.history-list li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.history-list li:last-child { border-bottom: 0; }
.history-list i { color: var(--accent); }
.history-list time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.payment-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.payment-row > i { display: grid; place-items: center; width: 32px; height: 32px; color: var(--accent); background: var(--accent-soft); border-radius: 50%; }
.payment-row strong, .payment-row span, .payment-row small { display: block; }
.payment-row span, .payment-row small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.document-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.document-row > div { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 1px 8px; min-width: 0; }
.document-row i { grid-row: 1 / span 2; align-self: center; color: var(--accent); font-size: 17px; }
.document-row span { overflow: hidden; color: var(--ink); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.document-row small { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.workspace-dialog-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 12px; }
.dialog-field { display: grid; gap: 6px; }
.dialog-field-wide { grid-column: 1 / -1; }
.dialog-field textarea { resize: vertical; }
.checkbox-field { display: flex; align-items: center; gap: 9px; min-height: 42px; }
.checkbox-field input { width: 18px; min-height: 18px; margin: 0; accent-color: var(--accent); }
.field-help { color: var(--muted); font-size: 10px; }

.customer-dialog { width: min(560px, calc(100vw - 28px)); padding: 0; background: transparent; border: 0; }
.customer-dialog::backdrop { background: rgba(16, 27, 34, .42); }
.dialog-panel { display: grid; gap: 8px; margin: 0; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 24px 65px rgba(16, 27, 34, .2); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.dialog-heading h2 { margin: 2px 0 0; font-size: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid > div { display: grid; gap: 6px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: min(420px, calc(100vw - 48px)); padding: 11px 15px; color: #fff; background: var(--ink); border-radius: 7px; box-shadow: 0 12px 30px rgba(16, 27, 34, .18); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.toast.show { opacity: 1; transform: none; }
.toast.error { background: #7e2d2d; }

.updates-page { padding-top: 1px; }
.update-release-card { padding: 18px 0; border-top: 1px solid var(--line); }
.update-release-card:first-of-type { padding-top: 2px; border-top: 0; }
.update-release-card:last-child { padding-bottom: 0; }
.update-release-card h2 { margin: 0; font-size: 18px; }
.release-description { margin: 0 0 15px; color: var(--ink-soft); line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.release-facts { margin: 0; }
.release-facts .profile-row { padding-block: 7px; font-size: 12px; }
.release-facts dd { overflow-wrap: anywhere; }
.release-detail-card { padding: 0; border: 0; }
.release-detail-card > .record-card-head { margin-bottom: 15px; }
.update-process { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.update-process li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.update-process li:last-child { border-bottom: 0; }
.process-number { display: grid; place-items: center; width: 26px; height: 26px; color: var(--accent-dark); background: var(--accent-soft); border-radius: 50%; font-size: 11px; font-weight: 700; }
.update-process strong { display: block; font-size: 12px; }
.update-process p { margin: 2px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.update-target-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.update-target-row:first-of-type { border-top: 0; }
.update-target-row > i { color: var(--accent); text-align: center; }
.update-target-row strong, .update-target-row small { display: block; }
.update-target-row small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.delivery-state { color: var(--muted); font-size: 11px; white-space: nowrap; }
.delivery-state.state-danger { color: var(--danger); font-weight: 650; }
.update-list-controls { display: grid; grid-template-columns: minmax(260px, 1fr) 210px auto; gap: 12px; align-items: end; margin-bottom: 16px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.update-list-controls .button { min-height: 42px; }
.release-upload-form { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 14px; }
.release-upload-form .dialog-field-wide, .release-upload-form > .button { grid-column: 1 / -1; }
.release-upload-form > .button { justify-self: start; margin-top: 4px; }
.delivery-card { padding: 16px 0; border-top: 1px solid var(--line); }
.delivery-card:first-of-type { padding-top: 2px; border-top: 0; }
.delivery-card:last-child { padding-bottom: 0; }
.delivery-card .profile-row { padding-block: 7px; font-size: 12px; }

.operations-page, .admin-page { padding-top: 1px; }
.danger-banner { background: var(--danger-soft); }
.danger-banner > i { background: var(--danger); }
.status-component { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.status-component:first-of-type { border-top: 0; }
.status-component-icon { display: grid; place-items: center; width: 36px; height: 36px; color: var(--muted); background: var(--surface-soft); border-radius: 50%; }
.status-component-icon.status-active { color: var(--accent); background: var(--accent-soft); }
.status-component-icon.status-revoked { color: var(--danger); background: var(--danger-soft); }
.status-component strong, .status-component small { display: block; }
.status-component small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.incident-card { padding: 16px 0; border-top: 1px solid var(--line); }
.incident-card:first-of-type { padding-top: 2px; border-top: 0; }
.incident-card:last-child { padding-bottom: 0; }
.incident-title { color: var(--ink); font-size: 15px; font-weight: 650; text-decoration: none; }
.incident-title:hover { color: var(--accent); text-decoration: underline; }
.incident-card-detail { padding: 0; border: 0; }
.incident-card-detail h2 { font-size: 20px; }
.incident-facts .profile-row { padding-block: 7px; font-size: 12px; }
.incident-history { margin: 0; padding: 0; list-style: none; }
.incident-history li { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 11px; padding: 8px 0 17px; }
.incident-history li:not(:last-child)::after { position: absolute; top: 39px; bottom: -2px; left: 16px; width: 1px; content: ""; background: var(--line); }
.timeline-marker { z-index: 1; display: grid; place-items: center; width: 33px; height: 33px; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 50%; }
.timeline-marker.status-active { color: var(--accent-dark); background: var(--accent-soft); border-color: #cedfd5; }
.timeline-marker.status-pending { color: var(--warning); background: var(--warning-soft); border-color: #eeddb8; }
.incident-history strong, .incident-history small, .incident-history span { display: block; }
.incident-history small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.incident-history span { margin-top: 4px; color: var(--ink-soft); font-size: 12px; }

.audit-list { margin: 0; padding: 0; list-style: none; }
.audit-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 54px; padding: 9px 0; border-top: 1px solid var(--line); }
.audit-row:first-child { border-top: 0; }
.audit-result { display: grid; place-items: center; width: 29px; height: 29px; color: var(--accent); background: var(--accent-soft); border-radius: 50%; font-size: 11px; }
.audit-result.denied, .audit-result.failed { color: var(--danger); background: var(--danger-soft); }
.audit-row strong, .audit-row small { display: block; }
.audit-row small, .audit-row time { color: var(--muted); font-size: 11px; }
.audit-row time { white-space: nowrap; }

.credential-panel { border-color: #c5dccc; }
.credential-panel .secret-value { margin-bottom: 0; user-select: all; }
.operator-card { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.operator-card:first-of-type { border-top: 0; }
.operator-card-copy strong, .operator-card-copy small { display: block; }
.operator-card-copy small { margin-top: 2px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.operator-card-facts { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 12px; }
.operator-card .operator-avatar { width: 36px; height: 36px; background: #25302e; }
.operator-card .record-actions { justify-content: flex-end; margin-top: 0; }
.session-row { display: grid; grid-template-columns: 25px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; min-height: 56px; padding: 10px 0; border-top: 1px solid var(--line); }
.session-row:first-of-type { border-top: 0; }
.session-row > i { color: var(--accent); text-align: center; }
.session-row strong, .session-row small { display: block; }
.session-row small { margin-top: 2px; color: var(--muted); font-size: 11px; }

@media (max-width: 1050px) {
  .overview-grid { grid-template-columns: minmax(0, 1.55fr) minmax(275px, .9fr); }
  .profile-row { grid-template-columns: 130px minmax(0, 1fr); }
  .activity-item { grid-template-columns: 14px minmax(0, 1fr) auto; }
  .activity-actor { display: none; }
  .list-controls { grid-template-columns: minmax(200px, 1fr) 150px 100px; }
  .list-controls .button { grid-column: 1 / -1; justify-self: start; }
  .workspace-grid { grid-template-columns: minmax(0, 1.55fr) minmax(260px, .9fr); }
  .operator-card { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .operator-card .record-actions { grid-column: 2 / -1; justify-content: flex-start; }
}

@media (max-width: 900px) {
  :root { --sidebar-width: 232px; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 12px 0 30px rgba(16, 27, 34, .12); }
  .sidebar.open { transform: none; }
  .app-frame { margin-left: 0; }
  .menu-toggle { display: inline-grid; }
  .topbar { height: 136px; padding: 22px 24px 17px; }
  .main-content { padding: 0 24px 30px; }
  .overview-grid { grid-template-columns: 1fr; }
  .workspace-grid { grid-template-columns: 1fr; }
  .overview-rail { grid-template-columns: 1fr 1fr; }
  .workspace-rail { grid-template-columns: 1fr 1fr; }
  .page-heading { min-height: 86px; }
}

@media (max-width: 680px) {
  body { font-size: 13px; }
  .auth-shell { padding: 24px 16px 54px; }
  .auth-brand { margin-bottom: 32px; }
  .auth-card { padding: 22px; }
  .operator-summary { display: none; }
  .topbar { height: auto; min-height: 132px; padding: 18px 16px 14px; }
  .search-wrap { width: 100%; }
  .main-content { padding: 0 16px 24px; }
  .page-heading { flex-direction: column; gap: 14px; min-height: 0; padding: 17px 0 18px; }
  .page-heading h1 { font-size: 25px; }
  .page-actions { justify-content: flex-start; }
  .context-tabs { margin-bottom: 16px; }
  .context-tabs a { padding-inline: 10px; }
  .overview-rail { grid-template-columns: 1fr; }
  .workspace-rail { grid-template-columns: 1fr; }
  .panel-inner { padding: 17px; }
  .profile-row { grid-template-columns: 1fr; gap: 4px; }
  .contact-lines span { display: block; }
  .contact-lines span + span::before { display: none; }
  .activity-item { grid-template-columns: 12px minmax(0, 1fr); gap: 8px; }
  .activity-item time { grid-column: 2; }
  .list-controls { grid-template-columns: 1fr 1fr; }
  .list-controls .search-control { grid-column: 1 / -1; }
  .table-panel { overflow: visible; background: transparent; border: 0; }
  .customer-table, .customer-table tbody { display: block; }
  .customer-table thead { display: none; }
  .customer-table tr { display: grid; grid-template-columns: 1fr auto; margin-bottom: 9px; padding: 13px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
  .customer-table td { display: block; padding: 3px 0; border: 0; }
  .customer-table td[data-label="Země"]::before, .customer-table td[data-label="Změněno"]::before { margin-right: 6px; color: var(--muted); content: attr(data-label) ":"; }
  .customer-table td:first-child { grid-column: 1; }
  .customer-table td:nth-child(2), .customer-table td:nth-child(3), .customer-table td:nth-child(4) { grid-column: 1; }
  .customer-table .table-arrow { grid-column: 2; grid-row: 1 / span 4; align-self: center; padding-left: 12px; }
  .pagination { flex-direction: column; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
  .form-grid { grid-template-columns: 1fr; }
  .workspace-dialog-fields { grid-template-columns: 1fr; }
  .dialog-field-wide { grid-column: auto; }
  .record-card-head, .document-row { align-items: flex-start; }
  .document-row { flex-direction: column; }
  .history-list li { grid-template-columns: 16px minmax(0, 1fr); }
  .history-list time { grid-column: 2; }
  .update-list-controls, .release-upload-form { grid-template-columns: 1fr; }
  .release-upload-form .dialog-field-wide, .release-upload-form > .button { grid-column: auto; }
  .update-target-row { grid-template-columns: 22px minmax(0, 1fr); }
  .update-target-row .delivery-state { grid-column: 2; white-space: normal; }
  .status-component { grid-template-columns: 36px minmax(0, 1fr); }
  .status-component > .record-status { grid-column: 2; justify-self: start; }
  .audit-row { grid-template-columns: 30px minmax(0, 1fr); align-items: start; }
  .audit-row time { grid-column: 2; white-space: normal; }
  .operator-card { grid-template-columns: 38px minmax(0, 1fr); align-items: start; }
  .operator-card-facts, .operator-card .record-actions { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; }
  .session-row { grid-template-columns: 24px minmax(0, 1fr); align-items: start; }
  .session-row > .record-status, .session-row > .button { grid-column: 2; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- LS6 Roční licence (v2) — scoped to .licensing-v2 / .licensing-v2-dialog ---------- */
.licensing-v2 { display: grid; gap: 16px; min-width: 0; max-width: 100%; }
.licensing-v2 > * { min-width: 0; }
.licensing-v2 .lv2-heading { padding-bottom: 4px; }
.licensing-v2 .lv2-heading .eyebrow { margin-bottom: 6px; }
.licensing-v2 .lv2-heading h1:focus { outline: none; }
.licensing-v2 .lv2-heading h1:focus-visible { outline: 3px solid rgba(23, 113, 71, .28); outline-offset: 2px; }
.licensing-v2 .notice-banner { margin-bottom: 0; }
.licensing-v2 .lv2-block { display: block; }
.licensing-v2 .lv2-synthetic strong { display: block; color: #5d4105; }
.licensing-v2 .lv2-notice-error { color: var(--danger); background: var(--danger-soft); border-color: #eccccc; }
.licensing-v2 .lv2-notice-error i { color: var(--danger); }
.licensing-v2 .lv2-notice-info { color: var(--ink-soft); background: var(--surface-soft); border-color: var(--line); }
.licensing-v2 .lv2-notice-info i { color: var(--muted); }
.licensing-v2 .lv2-inline-notice { margin: 14px 0 0; }
.licensing-v2 .lv2-muted { margin: 0; color: var(--muted); font-size: 12px; }
.licensing-v2 .lv2-readonly { margin: 14px 0 0; padding: 10px 12px; color: var(--ink-soft); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.licensing-v2 .lv2-state { min-height: 170px; }
.licensing-v2 .lv2-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.licensing-v2 .lv2-actions-center { justify-content: center; }
.licensing-v2 .lv2-button { max-width: 100%; white-space: normal; text-align: center; }
.licensing-v2 .lv2-small-link { justify-self: start; font-size: 12px; }
.licensing-v2 code, .licensing-v2-dialog code { overflow-wrap: anywhere; }
.licensing-v2 .lv2-code, .licensing-v2-dialog .lv2-code { padding: 1px 5px; color: var(--ink); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 4px; font-size: 12px; }

/* context */
.licensing-v2 .lv2-context-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.licensing-v2 .lv2-field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.licensing-v2 .lv2-field-wide { grid-column: 1 / -1; }
.licensing-v2 .lv2-help { font-size: 11px; line-height: 1.4; }
.licensing-v2 .lv2-field textarea { min-height: 96px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.licensing-v2 .lv2-field-error { color: var(--danger); font-size: 12px; font-weight: 600; }
.licensing-v2 [aria-invalid="true"] { border-color: var(--danger); background: #fffafa; }
.licensing-v2 .lv2-form-errors { margin: 0 0 12px; padding: 9px 12px; color: var(--danger); background: var(--danger-soft); border: 1px solid #eccccc; border-radius: 6px; font-size: 12px; font-weight: 600; }
.licensing-v2 .lv2-summary { margin-top: 16px; padding-top: 6px; border-top: 1px solid var(--line); }
.licensing-v2 .lv2-tech, .licensing-v2 .lv2-register { margin-top: 14px; }
.licensing-v2 .lv2-tech summary, .licensing-v2 .lv2-register summary { width: fit-content; max-width: 100%; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.licensing-v2 .lv2-register summary { color: var(--accent-dark); font-size: 13px; }
.licensing-v2 .lv2-register[open] { padding: 14px; background: #fafbfa; border: 1px solid var(--line); border-radius: 8px; }
.licensing-v2 .lv2-register .lv2-form { margin-top: 12px; }
.licensing-v2 .lv2-tech-list .profile-row { padding-block: 6px; font-size: 12px; }

/* tabs */
.licensing-v2 .lv2-workspace { display: grid; gap: 0; min-width: 0; }
.licensing-v2 .lv2-tabs { display: flex; gap: 2px; margin-bottom: 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.licensing-v2 .lv2-tab { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; min-height: 44px; padding: 11px 13px 12px; color: #465159; background: transparent; border: 0; border-bottom: 2px solid transparent; font-size: 13px; white-space: nowrap; }
.licensing-v2 .lv2-tab:hover { color: var(--accent); }
.licensing-v2 .lv2-tab[aria-selected="true"] { color: var(--accent-dark); border-bottom-color: var(--accent); font-weight: 650; }
.licensing-v2 .lv2-tab:focus-visible { outline-offset: -3px; }
.licensing-v2 .lv2-tab-count { min-width: 20px; padding: 1px 6px; color: var(--ink-soft); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 650; text-align: center; }
.licensing-v2 .lv2-tabpanel:focus-visible { outline-offset: 4px; border-radius: 8px; }

/* forms, rules, preview */
.licensing-v2 .lv2-form { margin: 0; }
.licensing-v2 .lv2-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; max-width: 760px; }
.licensing-v2 .lv2-rules { margin: 0 0 16px; padding: 12px 14px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 6px; }
.licensing-v2 .lv2-rule-list { margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 12px; }
.licensing-v2 .lv2-rule-list li + li { margin-top: 4px; }
.licensing-v2 .lv2-form .lv2-rule-list { margin-top: 14px; max-width: 760px; }
.licensing-v2 .lv2-preview { max-width: 760px; margin-top: 20px; padding: 16px 18px; background: #fbfdfb; border: 1px solid #cedfd5; border-radius: 8px; }
.licensing-v2 .lv2-preview-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 6px; }
.licensing-v2 h3 { margin: 0; font-size: 14px; line-height: 1.35; letter-spacing: -.01em; }
.licensing-v2 .lv2-preview .profile-row, .licensing-v2 .lv2-compact .profile-row { padding-block: 7px; font-size: 12px; }
.licensing-v2 .lv2-preview > .lv2-muted { margin-top: 10px; }

/* quotes and payments */
.licensing-v2 .lv2-quotes { display: grid; margin-top: 14px; }
.licensing-v2 .lv2-quote { padding: 16px 0; border-top: 1px solid var(--line); }
.licensing-v2 .lv2-quote:first-child { border-top: 0; padding-top: 4px; }
.licensing-v2 .lv2-quote .record-card-head { flex-wrap: wrap; }
.licensing-v2 .lv2-badge { white-space: normal; text-align: left; font-size: 11px; }
.licensing-v2 .lv2-status-manual { color: var(--danger); background: var(--danger-soft); border-color: #eccccc; }
.licensing-v2 .lv2-payments { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.licensing-v2 .lv2-payment { padding: 10px 12px; background: #fafbfa; border: 1px solid var(--line); border-radius: 6px; }
.licensing-v2 .lv2-payment-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; }
.licensing-v2 .lv2-payment-head > div { min-width: 0; overflow-wrap: anywhere; }
.licensing-v2 .lv2-issues { margin: 8px 0 0; padding-left: 18px; color: var(--danger); font-size: 12px; }
.licensing-v2 .lv2-subsection { max-width: 760px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.licensing-v2 .lv2-subsection > h3 { margin-bottom: 12px; }

/* history table — scrolls locally */
.licensing-v2 .lv2-table-wrap { max-width: 100%; margin-top: 12px; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.licensing-v2 .lv2-table { min-width: 760px; }
.licensing-v2 .lv2-table tbody tr { cursor: default; }
.licensing-v2 .lv2-table td { padding: 11px 15px; font-size: 12px; vertical-align: top; }
.licensing-v2 .lv2-nowrap { white-space: nowrap; }
.licensing-v2 .lv2-table-wrap + .lv2-muted { margin-top: 10px; }

/* dialogs */
.licensing-v2-dialog { width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; background: transparent; border: 0; }
.licensing-v2-dialog::backdrop { background: rgba(16, 27, 34, .42); }
.licensing-v2-dialog .dialog-panel { max-height: calc(100vh - 24px); overflow-y: auto; }
.licensing-v2-dialog .lv2-muted { margin: 0; color: var(--muted); font-size: 12px; }
.licensing-v2-dialog .supporting-note { overflow-wrap: anywhere; }
.licensing-v2-dialog .lv2-compact .profile-row { padding-block: 7px; font-size: 12px; }
.licensing-v2-dialog .lv2-consent { align-items: flex-start; margin-top: 8px; padding: 12px; background: var(--warning-soft); border: 1px solid #eeddb8; border-radius: 6px; }
.licensing-v2-dialog .lv2-consent input { flex: 0 0 auto; margin-top: 2px; }
.licensing-v2-dialog .lv2-consent label { font-weight: 600; line-height: 1.45; }
.licensing-v2-dialog .lv2-secret { margin: 6px 0 4px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 16px; letter-spacing: .04em; user-select: all; }
.licensing-v2-dialog .lv2-copy-status { min-height: 18px; margin: 0; color: var(--accent-dark); font-size: 12px; }
.licensing-v2-dialog .lv2-dialog-actions { flex-wrap: wrap; }

@media (max-width: 1050px) {
  .licensing-v2 .lv2-context-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .licensing-v2 .lv2-context-grid > .lv2-field:last-child { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .licensing-v2 .lv2-context-grid, .licensing-v2 .lv2-form-grid { grid-template-columns: minmax(0, 1fr); }
  .licensing-v2 .lv2-context-grid > .lv2-field:last-child, .licensing-v2 .lv2-field-wide { grid-column: auto; }
  .licensing-v2 .lv2-actions .button, .licensing-v2-dialog .lv2-dialog-actions .button { width: 100%; }
  .licensing-v2 .lv2-preview { padding: 14px; }
  .licensing-v2 .lv2-register[open] { padding: 12px; }
  .licensing-v2 .lv2-tab { padding-inline: 10px; }
  .licensing-v2 .lv2-table-wrap .customer-table { display: table; }
  .licensing-v2 .lv2-table-wrap .customer-table thead { display: table-header-group; }
  .licensing-v2 .lv2-table-wrap .customer-table tbody { display: table-row-group; }
  .licensing-v2 .lv2-table-wrap .customer-table tr { display: table-row; margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0; }
  .licensing-v2 .lv2-table-wrap .customer-table td { display: table-cell; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .licensing-v2-dialog .dialog-panel { padding: 18px; }
  .licensing-v2-dialog .lv2-dialog-actions { flex-direction: column-reverse; }
}

/* ---------- SlothLicence shell + registry/detail/customer/products (.slothlicence / .sl-*) ---------- */
.sidebar { overflow-y: auto; }

.slothlicence { display: grid; gap: 16px; width: 100%; max-width: 1104px; min-width: 0; }
.slothlicence > *, .slothlicence .panel, .slothlicence .panel-inner { min-width: 0; }
.slothlicence h2, .slothlicence h3 { margin: 0; letter-spacing: -.015em; }
.slothlicence .sl-heading { flex-wrap: wrap; }
.slothlicence .sl-heading-copy { min-width: 0; flex: 1 1 320px; }
.slothlicence .sl-heading h1 { overflow-wrap: anywhere; }
.slothlicence .sl-heading h1:focus { outline: none; }
.slothlicence .sl-heading .page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.slothlicence .sl-env { display: inline-flex; padding: 2px 8px; color: #5d4105; background: var(--warning-soft); border: 1px solid #eeddb8; border-radius: 999px; font-size: 11px; font-weight: 650; }
.slothlicence .sl-kicker, .slothlicence .sl-summary-kicker { margin: 0; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.slothlicence .sl-muted { color: var(--muted); font-size: 12px; }
.slothlicence p.sl-muted { margin: 0; }
.slothlicence .sl-nowrap { white-space: nowrap; }
.slothlicence .sl-code, .slothlicence code { padding: 1px 5px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 4px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; word-break: break-word; }
.slothlicence .sl-link { color: var(--accent-dark); text-decoration: none; overflow-wrap: anywhere; }
.slothlicence .sl-link:hover { text-decoration: underline; }
.slothlicence .sl-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; margin-bottom: 12px; }
.slothlicence .sl-section-head h2 { font-size: 17px; }
.slothlicence .sl-compact-notice, .slothlicence .sl-zone-note, .slothlicence .sl-readonly, .slothlicence .sl-actions-note { margin: 0; padding: 10px 12px; color: var(--ink-soft); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.slothlicence .sl-inline-error { margin: 0; padding: 10px 12px; color: var(--danger); background: var(--danger-soft); border: 1px solid #eccccc; border-radius: 6px; font-size: 12px; font-weight: 600; }
.slothlicence .sl-refreshing { opacity: .65; transition: opacity .15s; }
.slothlicence .sl-empty-line { margin: 0; padding: 14px 0; color: var(--muted); }

/* status tones: good green, bad red, warn/unknown orange */
.slothlicence .sl-status { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 650; line-height: 1.35; white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.slothlicence .sl-tone-good { color: var(--accent-dark); background: var(--accent-soft); border-color: #c5ddcf; }
.slothlicence .sl-tone-bad { color: #8f2a2a; background: var(--danger-soft); border-color: #eccccc; }
.slothlicence .sl-tone-warn, .slothlicence .sl-tone-unknown, .slothlicence .sl-unknown { color: #7a4f00; background: var(--warning-soft); border-color: #eeddb8; }
.slothlicence .sl-tone-unknown { border-style: dashed; }
.slothlicence .sl-status-lg { padding: 6px 13px; font-size: 15px; }

/* states */
.slothlicence .sl-state { display: grid; justify-items: center; gap: 8px; padding: 34px 18px; text-align: center; }
.slothlicence .sl-state > i { color: var(--muted); font-size: 22px; }
.slothlicence .sl-state-error > i { color: var(--danger); }
.slothlicence .sl-state-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }

/* registry filters */
.slothlicence .sl-filters { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)) auto auto; align-items: end; gap: 10px 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.slothlicence .sl-control { display: grid; gap: 6px; min-width: 0; }
.slothlicence .sl-filter-submit, .slothlicence .sl-filter-reset { white-space: nowrap; }
.slothlicence .sl-filter-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 10px; color: var(--ink-soft); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; font-size: 12px; text-decoration: none; overflow-wrap: anywhere; }
.slothlicence .sl-results-title, .slothlicence .sl-results-status { margin: 0; }
.slothlicence .sl-results-status { color: var(--muted); font-size: 12px; }
.slothlicence .sl-results-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.slothlicence .sl-load-more { min-height: 44px; }

/* registry + embedded tables */
.slothlicence .sl-table-wrap { max-width: 100%; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.slothlicence .sl-table, .slothlicence .sl-history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.slothlicence .sl-table th, .slothlicence .sl-history-table th { padding: 10px 14px; color: var(--muted); background: #fafbfa; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 650; letter-spacing: .04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.slothlicence .sl-table td, .slothlicence .sl-history-table td { padding: 11px 14px; border-bottom: 1px solid #edf0ed; vertical-align: top; overflow-wrap: anywhere; }
.slothlicence .sl-table tbody tr:last-child td, .slothlicence .sl-history-table tbody tr:last-child td { border-bottom: 0; }
.slothlicence .sl-table tbody tr:hover { background: #fbfcfa; }
.slothlicence .sl-cell-primary { min-width: 160px; }
.slothlicence .sl-table td[data-label="Produkt"], .slothlicence .sl-table td[data-label="Produkt"] .sl-link { overflow-wrap: normal; word-break: normal; }
.slothlicence .sl-row-title { color: var(--ink); font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
a.sl-row-title:hover { color: var(--accent-dark); text-decoration: underline; }
.slothlicence .sl-next { color: var(--ink-soft); }
.slothlicence .sl-cell-open { width: 48px; padding-block: 6px; text-align: right; }
.slothlicence .sl-row-open { display: inline-grid; place-items: center; width: 44px; height: 44px; color: var(--muted); border-radius: 7px; }
.slothlicence .sl-row-open:hover { color: var(--accent); background: var(--surface-soft); }
.slothlicence .sl-table td > small, .slothlicence .sl-table td > .sl-muted { display: block; margin-top: 3px; }
.slothlicence .sl-embedded-table .sl-table th, .slothlicence .sl-embedded-table .sl-table td { padding-inline: 12px; }

/* detail: status panel, period cards, facts */
.slothlicence .sl-detail { display: grid; gap: 16px; min-width: 0; }
.slothlicence .sl-detail-title { overflow-wrap: anywhere; }
.slothlicence .sl-status-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px 20px; }
.slothlicence .sl-status-main { display: grid; justify-items: start; gap: 8px; flex: 1 1 300px; min-width: 0; }
.slothlicence .sl-status-hint, .slothlicence .sl-status-line { margin: 0; color: var(--ink-soft); }
.slothlicence .sl-status-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.slothlicence .sl-period-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.slothlicence .sl-period { min-width: 0; padding: 14px 16px; background: #fafbfa; border: 1px solid var(--line); border-radius: 8px; }
.slothlicence .sl-period-current { background: #fbfdfb; border-color: #cedfd5; }
.slothlicence .sl-period-next { border-style: dashed; }
.slothlicence .sl-period-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-bottom: 8px; }
.slothlicence .sl-period-data, .slothlicence .sl-summary-data, .slothlicence .sl-legacy-data { display: grid; gap: 6px; margin: 0; }
.slothlicence .sl-period-data > div, .slothlicence .sl-summary-data > div, .slothlicence .sl-legacy-data > div { display: grid; grid-template-columns: minmax(0, 120px) minmax(0, 1fr); gap: 10px; font-size: 13px; }
.slothlicence dt { color: var(--muted); font-size: 12px; }
.slothlicence dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.slothlicence .sl-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.slothlicence .sl-fact { display: grid; align-content: start; justify-items: start; gap: 5px; min-width: 0; }
.slothlicence .sl-fact-value { font-weight: 650; }
.slothlicence .sl-fact small, .slothlicence .sl-fact .sl-muted { display: block; }
.slothlicence .sl-evidence { margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.slothlicence .sl-detail-foot { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 12px; }

/* history: own local scroll */
.slothlicence .sl-history-wrap { max-width: 100%; max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.slothlicence .sl-history-table { min-width: 680px; }
.slothlicence .sl-history-table thead th { position: sticky; top: 0; z-index: 1; }
.slothlicence .sl-history-wrap:focus-visible, .slothlicence .sl-table-wrap:focus-visible { outline: 3px solid rgba(23, 113, 71, .28); outline-offset: 2px; }
.slothlicence .sl-after-table { margin-top: 10px; }

/* workflow host: embedded .licensing-v2 compact */
.slothlicence .sl-workflow { min-width: 0; }
.slothlicence .sl-workflow-host { min-width: 0; }
.slothlicence .licensing-v2.lv2-embedded, .licensing-v2.lv2-embedded { gap: 12px; }
.licensing-v2.lv2-embedded .lv2-state { min-height: 110px; }
.licensing-v2.lv2-embedded .lv2-tabs { margin-bottom: 12px; }
.licensing-v2 .lv2-import { margin-top: 4px; }
.licensing-v2 .lv2-file { min-height: 44px; padding: 8px; background: var(--surface); }
.licensing-v2 .lv2-import-preview { max-width: 100%; margin-top: 8px; }
.licensing-v2 .lv2-import-preview dl { margin: 0; }

/* customer summary + licences */
.slothlicence .sl-summary-card { display: grid; gap: 12px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.slothlicence .sl-count-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.slothlicence .sl-count-list > * { display: inline-flex; align-items: center; gap: 6px; }
.slothlicence .sl-cl-title, .slothlicence .sl-cs-title, .slothlicence .sl-list-title, .slothlicence .sl-products-title, .slothlicence .sl-history-title { font-size: 16px; }
.slothlicence .sl-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.slothlicence .sl-list-meta { color: var(--muted); font-size: 12px; }

/* products grid */
.slothlicence .sl-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.slothlicence .sl-product { display: grid; align-content: start; gap: 10px; min-width: 0; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.slothlicence .sl-product-head { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.slothlicence .sl-product-mark { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; color: var(--accent-dark); background: var(--accent-soft); border-radius: 9px; font-size: 13px; font-weight: 700; }
.slothlicence .sl-product-copy { min-width: 0; }
.slothlicence .sl-product-copy h3 { font-size: 15px; overflow-wrap: anywhere; }
.slothlicence .sl-product-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--accent-dark); font-weight: 650; text-decoration: none; }
.slothlicence .sl-product-link:hover { text-decoration: underline; }

/* legacy / technical details */
.slothlicence .sl-legacy-panel, .slothlicence .sl-tech { min-width: 0; }
.slothlicence .sl-legacy-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.slothlicence .sl-legacy-link { color: var(--accent-dark); }
.slothlicence .sl-legacy-fallback, .slothlicence .sl-partial { margin: 0; color: #7a4f00; font-size: 12px; }
.slothlicence details > summary { width: fit-content; max-width: 100%; min-height: 32px; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.slothlicence .sl-tech-list { margin: 8px 0 0; }

@media (max-width: 900px) {
  .slothlicence .sl-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slothlicence .sl-filter-search { grid-column: 1 / -1; }
  .slothlicence .sl-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .slothlicence .sl-heading-copy { flex-basis: auto; }
  .slothlicence .sl-filters { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .slothlicence .sl-filters .button { width: 100%; }
  .slothlicence .sl-period-grid, .slothlicence .sl-facts { grid-template-columns: minmax(0, 1fr); }
  .slothlicence .sl-period-data > div, .slothlicence .sl-summary-data > div, .slothlicence .sl-legacy-data > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .slothlicence .sl-status-actions, .slothlicence .sl-status-actions .button { width: 100%; }
  /* registry table becomes cards */
  .slothlicence .sl-table-wrap { overflow: visible; background: transparent; border: 0; }
  .slothlicence .sl-table, .slothlicence .sl-table tbody { display: block; }
  .slothlicence .sl-table thead { display: none; }
  .slothlicence .sl-table tr { position: relative; display: grid; gap: 4px; margin-bottom: 9px; padding: 12px 56px 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
  .slothlicence .sl-table td { display: block; padding: 2px 0; border: 0; }
  .slothlicence .sl-table td[data-label]:not(.sl-cell-primary)::before { display: block; color: var(--muted); font-size: 11px; content: attr(data-label); }
  .slothlicence .sl-cell-open { position: absolute; top: 50%; right: 6px; width: auto; padding: 0; transform: translateY(-50%); }
  .slothlicence .sl-history-wrap { max-height: 360px; }
}

/* ---------- LS10 products: catalogue terms + inline create/edit editor (.sl-product-*) ---------- */
.slothlicence .sl-product-copy { display: grid; justify-items: start; gap: 4px; }
.slothlicence .sl-product-copy h2 { font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.slothlicence .sl-product-tag { padding: 1px 8px; color: var(--accent-dark); background: var(--accent-soft); border: 1px solid #cedfd5; border-radius: 999px; font-size: 11px; font-weight: 650; }
.slothlicence .sl-product-editing { border-color: #9fc8b0; box-shadow: 0 0 0 1px #9fc8b0; }
.slothlicence .sl-product-terms { display: grid; justify-items: start; gap: 6px; min-width: 0; padding-top: 10px; border-top: 1px solid #edf0ed; }
.slothlicence .sl-product-data { display: grid; gap: 4px; width: 100%; margin: 0; }
.slothlicence .sl-product-data > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; font-size: 13px; }
.slothlicence .sl-product-data dd { text-align: right; }
.slothlicence .sl-product-unset { color: #7a4f00; font-weight: 600; }
.slothlicence .sl-product-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.slothlicence .sl-product-actions .button { min-height: 44px; }
.slothlicence .sl-product-notice { margin: 0; }

.slothlicence .sl-product-editor { border-color: #cedfd5; }
.slothlicence .sl-product-editor-head { flex-wrap: wrap; }
.slothlicence .sl-product-editor-head h2 { overflow-wrap: anywhere; }
.slothlicence .sl-product-editor-head h2:focus { outline: none; }
.slothlicence .sl-product-editor-head h2:focus-visible { outline: 3px solid rgba(23, 113, 71, .28); outline-offset: 2px; }
.slothlicence .sl-product-intro { max-width: 760px; margin: 0 0 14px; color: var(--ink-soft); font-size: 12px; }
.slothlicence .sl-product-conflict { max-width: 760px; margin: 0 0 14px; }
.slothlicence .sl-product-conflict p { margin: 2px 0 8px; }
.slothlicence .sl-product-save-error { max-width: 760px; margin-bottom: 14px; }
.slothlicence .sl-product-form { display: grid; gap: 16px; margin: 0; }
.slothlicence .sl-product-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; max-width: 760px; }
.slothlicence .sl-product-field { display: grid; align-content: start; gap: 6px; min-width: 0; }
.slothlicence .sl-product-help { font-size: 11px; line-height: 1.4; }
.slothlicence .sl-product-field-error { color: var(--danger); font-size: 12px; font-weight: 600; }
.slothlicence .sl-product-input[aria-invalid="true"] { border-color: var(--danger); background: #fffafa; }
.slothlicence .sl-product-input[readonly] { color: var(--ink-soft); background: var(--surface-soft); }
.slothlicence .sl-product-code-input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.slothlicence .sl-product-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }

@media (max-width: 680px) {
  .slothlicence .sl-product-form-grid { grid-template-columns: minmax(0, 1fr); }
  .slothlicence .sl-product-form-actions .button { width: 100%; }
  .slothlicence .sl-product-actions .button { flex: 1 1 auto; }
}

/* ---------- LS11 management (Správa) navigation + home, registration entry (.sl-mgmt-*) ---------- */
/* Topbar has a fixed height; let it grow only while the management row is shown. */
.topbar:has(> #management-navigation:not(.hidden)) { height: auto; }
#management-navigation { min-width: 0; max-width: 100%; margin-top: 14px; }
.sl-mgmt-nav { min-width: 0; max-width: 100%; }
.sl-mgmt-nav-list { display: flex; flex-wrap: nowrap; gap: 4px; margin: 0; padding: 3px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.sl-mgmt-nav-list > li { flex: 0 0 auto; }
.sl-mgmt-nav-link { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 13px; color: #465159; border: 1px solid transparent; border-radius: 7px; font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.sl-mgmt-nav-link i { color: #7d878d; font-size: 14px; }
.sl-mgmt-nav-link:hover { color: var(--ink); background: var(--surface-soft); }
.sl-mgmt-nav-link[aria-current="page"] { color: var(--accent-dark); background: var(--accent-soft); border-color: #cedfd5; font-weight: 650; }
.sl-mgmt-nav-link[aria-current="page"] i { color: var(--accent); }
.sl-mgmt-nav-link:focus-visible { outline-offset: -1px; }

.slothlicence .sl-mgmt-intro { max-width: 640px; margin: 8px 0 0; color: var(--muted); }
.slothlicence .sl-mgmt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.slothlicence .sl-mgmt-cards > li { display: flex; min-width: 0; }
.slothlicence .sl-mgmt-card { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; min-height: 96px; padding: 18px; color: var(--ink); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.slothlicence .sl-mgmt-card:hover { border-color: #9fc8b0; box-shadow: 0 6px 18px rgba(16, 27, 34, .06); }
.slothlicence .sl-mgmt-card:hover .sl-mgmt-card-title { color: var(--accent-dark); text-decoration: underline; }
.slothlicence .sl-mgmt-card-mark { display: grid; place-items: center; width: 40px; height: 40px; color: var(--accent-dark); background: var(--accent-soft); border-radius: 9px; font-size: 16px; }
.slothlicence .sl-mgmt-card-body { display: grid; gap: 3px; min-width: 0; }
.slothlicence .sl-mgmt-card-title { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.slothlicence .sl-mgmt-card-text { color: var(--muted); font-size: 12px; line-height: 1.45; }
.slothlicence .sl-mgmt-card-arrow { color: var(--accent); }

.slothlicence .sl-register-link { white-space: nowrap; }
.licensing-v2 .lv2-back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin-bottom: 6px; font-size: 13px; font-weight: 600; }

@media (max-width: 680px) {
  #management-navigation { margin-top: 12px; }
  .sl-mgmt-nav-link { padding-inline: 11px; }
  .slothlicence .sl-mgmt-card { min-height: 0; padding: 15px; gap: 12px; }
}

/* Keep the four-module white QR quiet zone intact at narrow widths. */
.totp-qr canvas { display: block; width: 280px; max-width: 100%; height: auto; margin: 16px auto; image-rendering: pixelated; }
