:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --ink: #0f172a;
  --muted: #5f6b7a;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #dbeafe;
  --warn: #9a6700;
  --danger: #b42318;
  --success: #1f7a45;
  --charcoal: #111827;
  --charcoal-2: #1f2937;
  --berry: #80405a;
  --gold: #f2c46d;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 10px 22px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  line-height: 1.45;
}

button,
input,
textarea,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100vh;
  overflow: auto;
  padding: 20px 14px;
  background: var(--charcoal);
  color: #fff;
}

.sidebar-backdrop {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #f2c46d;
  color: #20170a;
  font-weight: 800;
}

.brand-mark.large {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  font-size: 22px;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 2px;
  color: #cbd5dc;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  width: 100%;
  border: 0;
  border-radius: 7px;
  padding: 10px 11px;
  background: transparent;
  color: #dce4ea;
  text-align: left;
  cursor: pointer;
}

.nav button:hover,
.nav button.active {
  background: var(--charcoal-2);
  color: #fff;
}

.nav button.active {
  box-shadow: inset 3px 0 0 #f2c46d;
}

.nav .icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
  font-weight: 700;
}

.sidebar-note {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  color: #d7dee5;
  font-size: 12px;
  line-height: 1.5;
}

.auth-mode {
  grid-template-columns: 1fr;
}

.auth-mode .sidebar {
  display: none;
}

.auth-mode .topbar {
  display: none;
}

.auth-mode .main {
  min-height: 100vh;
  padding: 0;
}

.public-shell {
  min-height: 100vh;
  background: #f4f6f8;
}

.public-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.brand.compact {
  padding: 0;
  border: 0;
  color: var(--ink);
}

.brand.compact span {
  color: var(--muted);
}

.public-nav nav {
  display: flex;
  gap: 18px;
}

.public-nav a {
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 420px;
  min-height: calc(100vh - 72px);
  background: radial-gradient(circle at 18% 22%, rgba(242, 196, 109, 0.28), transparent 28%), linear-gradient(135deg, #f4f6f8 0%, #eef5f4 100%);
}

.auth-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px;
}

.auth-copy h2 {
  max-width: 760px;
  margin: 0;
  color: #142129;
  font-size: 48px;
  line-height: 1.04;
}

.auth-copy p {
  max-width: 620px;
  color: var(--muted);
  font-size: 17px;
}

.auth-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.auth-points span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.startup-panel {
  display: grid;
  justify-items: start;
  align-content: center;
  min-height: 100vh;
  padding: 80px;
  background: linear-gradient(135deg, #f4f6f8 0%, #eef5f4 100%);
}

.startup-panel h2 {
  margin: 0;
  font-size: 34px;
}

.startup-panel p,
.runtime-notice {
  max-width: 640px;
  color: var(--muted);
}

.runtime-notice {
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid #d7b56a;
  border-radius: 8px;
  background: #fff8e6;
  color: #5c4312;
  font-size: 13px;
  font-weight: 600;
}

.runtime-notice code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.auth-card {
  align-self: center;
  margin-right: 70px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.public-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: 34px;
  padding: 74px 80px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.public-section.alt {
  grid-template-columns: 1fr;
  background: #f8fafb;
}

.public-section h2 {
  max-width: 720px;
  margin: 0;
  font-size: 34px;
  line-height: 1.08;
}

.public-section p {
  max-width: 680px;
  color: var(--muted);
  font-size: 16px;
}

.public-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.public-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.public-card {
  display: grid;
  gap: 8px;
  min-height: 140px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(23, 33, 43, 0.04);
}

.public-card strong {
  font-size: 16px;
}

.public-card span {
  color: var(--muted);
  font-size: 14px;
}

.contact-band {
  background: #17212b;
  color: #fff;
}

.contact-band p,
.contact-band .eyebrow {
  color: #d9e2ea;
}

.auth-card h2 {
  margin: 0 0 6px;
}

.auth-submit {
  width: 100%;
  margin-top: 14px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  max-width: 220px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #39a36f;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 246, 248, 0.96);
  backdrop-filter: blur(12px);
}

.topbar-title {
  min-width: 0;
}

.menu-toggle {
  display: none;
}

.topbar h1,
.section-title h2 {
  margin: 0;
  color: #162026;
}

.topbar h1 {
  font-size: 26px;
  line-height: 1.15;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.main {
  padding: 24px 30px 46px;
}

.button,
.icon-button {
  border: 1px solid transparent;
  border-radius: 7px;
  min-height: 38px;
  padding: 8px 13px;
  cursor: pointer;
  font-weight: 650;
  transition: .16s ease;
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.primary:hover {
  background: var(--accent-dark);
}

.button.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.button.secondary:hover,
.icon-button:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.button.danger {
  background: #fff5f3;
  color: var(--danger);
  border-color: #f2c7c2;
}

.button.text {
  background: transparent;
  color: var(--accent);
  padding-inline: 4px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  padding: 0;
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.cols-2 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.setup-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.setup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.setup-band h2,
.experience-strip h2 {
  margin: 0;
  color: #162026;
}

.setup-band p,
.experience-strip p {
  margin: 6px 0 0;
  color: var(--muted);
}

.setup-progress strong {
  display: block;
  margin-bottom: 8px;
}

.progress {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.setup-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.setup-steps span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f2f4f3;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.setup-steps span.done {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.setup-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.panel,
.metric,
.list-panel,
.editor-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.metric {
  padding: 16px;
  min-height: 108px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 25px;
  line-height: 1.1;
}

.metric small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-title.compact {
  margin-bottom: 12px;
}

.section-title.compact h2 {
  font-size: 17px;
}

.section-title p {
  margin: 4px 0 0;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 344px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.list-panel {
  overflow: hidden;
}

.list-toolbar {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.list-toolbar input {
  width: 100%;
}

.list {
  max-height: calc(100vh - 230px);
  overflow: auto;
}

.list-item {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 13px 14px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.list-item:hover,
.list-item.active {
  background: #eff8f6;
}

.list-item.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.list-item strong {
  color: var(--ink);
}

.list-item span,
.muted {
  color: var(--muted);
}

.list-item .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.editor-panel {
  padding: 0;
  min-height: calc(100vh - 170px);
  overflow: hidden;
}

.editor-heading {
  position: sticky;
  top: 82px;
  z-index: 3;
  align-items: flex-start;
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.toolbar-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  max-width: 680px;
}

.form-section {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.form-section:last-child {
  border-bottom: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field span {
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 9px 11px;
  outline: none;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline > * {
  min-width: 0;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  color: #425466;
}

.check-field.compact {
  min-height: 26px;
  margin-top: 6px;
  font-size: 12px;
}

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

.divider {
  height: 1px;
  margin: 20px 0;
  background: var(--line);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 9px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: #334155;
  background: var(--surface-soft);
  text-align: left;
  font-size: 12px;
}

td.num,
th.num {
  text-align: right;
}

tr:last-child td {
  border-bottom: 0;
}

.line-input {
  min-width: 88px;
}

.line-name {
  min-width: 220px;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: #425466;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status.paid,
.status.success {
  background: #e6f5ec;
  color: var(--success);
}

.status.overdue,
.status.danger {
  background: #fff0ef;
  color: var(--danger);
}

.status.draft {
  background: #f0edf8;
  color: #65459b;
}

.status.warn {
  background: #fff6df;
  color: var(--warn);
}

.totals {
  margin-left: auto;
  width: min(100%, 360px);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.totals div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.totals div:last-child {
  border-bottom: 0;
  background: var(--charcoal);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

.experience-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  align-items: center;
  gap: 18px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f6faf9;
}

.experience-strip > .inline {
  grid-column: 1 / -1;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.experience-metrics {
  display: grid;
  gap: 4px;
  padding-left: 16px;
  border-left: 3px solid var(--accent);
}

.experience-metrics span,
.experience-metrics small {
  color: var(--muted);
}

.experience-metrics strong {
  font-size: 22px;
}

.quality-section {
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.06), rgba(217, 150, 28, 0.08)),
    #fff;
}

.quality-panel {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.quality-summary,
.quality-check {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.quality-summary {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
}

.quality-summary h3 {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
}

.quality-summary p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.quality-score {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) var(--score-deg), #e6edf1 0);
  position: relative;
  color: var(--accent-dark);
}

.quality-score::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #fff;
}

.quality-score strong,
.quality-score span {
  position: relative;
  z-index: 1;
}

.quality-score strong {
  font-size: 25px;
  line-height: 1;
}

.quality-score span {
  margin-top: 24px;
  margin-left: 2px;
  font-size: 11px;
  font-weight: 800;
}

.quality-score.good {
  background: conic-gradient(var(--warn) var(--score-deg), #e6edf1 0);
  color: #8a5d00;
}

.quality-score.needs-work {
  background: conic-gradient(var(--danger) var(--score-deg), #e6edf1 0);
  color: var(--danger);
}

.quality-checks {
  display: grid;
  gap: 8px;
}

.quality-check {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 62px;
  padding: 10px 12px;
}

.quality-check > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #eef2f6;
  color: var(--muted);
  font-weight: 900;
}

.quality-check.ok > span {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.quality-check.warn > span {
  background: #fff6df;
  color: var(--warn);
}

.quality-check.danger > span {
  background: #fff0ef;
  color: var(--danger);
}

.quality-check strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.quality-check small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.35;
}

.logo-uploader {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.logo-uploader p {
  margin: 4px 0 10px;
}

.logo-preview {
  display: grid;
  place-items: center;
  width: 112px;
  height: 74px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.logo-preview img {
  max-width: 102px;
  max-height: 64px;
  object-fit: contain;
}

.file-input {
  max-width: 420px;
  padding: 7px;
  background: var(--surface-soft);
}

.help-text {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.empty {
  display: grid;
  place-items: center;
  min-height: 280px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  padding: 30px;
}

.activity {
  display: grid;
  gap: 10px;
}

.activity-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.activity-item:last-child {
  border-bottom: 0;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 420px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #152025;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: .18s ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.ksef-result {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0f1720;
  color: #e5edf5;
  overflow: hidden;
}

.ksef-result strong {
  display: block;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.ksef-result pre {
  max-height: 260px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  font-size: 12px;
}

.kpi-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f4efe7;
  color: #694a21;
  font-size: 12px;
  font-weight: 700;
}

.tag.teal {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.tag.berry {
  background: #f8e7ee;
  color: var(--berry);
}

.mt {
  margin-top: 16px;
}

.hidden {
  display: none !important;
}

.wrap {
  flex-wrap: wrap;
}

.portal-shell {
  min-height: 100vh;
  background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100%);
}

.portal-container {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 0 24px;
}

.portal-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.portal-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 92px;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.portal-brand strong,
.portal-brand small {
  display: block;
}

.portal-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.portal-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.portal-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.portal-nav a:hover,
.portal-nav a.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.portal-login-link {
  border: 1px solid var(--line);
  background: #fff;
}

.portal-page {
  padding-top: 24px;
  padding-bottom: 42px;
}

.product-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 22px;
  align-items: stretch;
  min-height: 560px;
  margin-bottom: 18px;
  padding: 28px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(242, 196, 109, 0.2), rgba(37, 99, 235, 0.06)),
    #ffffff;
  box-shadow: var(--shadow);
}

.hero-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  min-width: 0;
  padding: 18px 10px;
}

.hero-kicker {
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid #d7b56a;
  border-radius: 6px;
  background: #fff8e6;
  color: #5c4312;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-copy h2 {
  max-width: 720px;
  margin: 0;
  color: #101820;
  font-size: 54px;
  line-height: 1.02;
}

.hero-copy p {
  max-width: 640px;
  margin: 0;
  color: #475569;
  font-size: 17px;
}

.hero-actions,
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-strip span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.product-visual {
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
  overflow: hidden;
  min-height: 470px;
  border: 1px solid #1f2937;
  border-radius: 8px;
  background: #101820;
  color: #fff;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
}

.mock-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #16212b;
}

.mock-top span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
}

.mock-top em {
  margin-left: auto;
  color: #aebccd;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.mock-layout {
  display: grid;
  grid-template-columns: 98px 1fr;
  min-height: 0;
}

.mock-menu {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px 12px;
  background: #111827;
}

.mock-menu b {
  display: block;
  height: 30px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.11);
}

.mock-menu b:first-child {
  background: var(--gold);
}

.mock-main {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 22px;
  background: #f8fafc;
  color: var(--ink);
}

.mock-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mock-metrics span {
  min-height: 72px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #162026;
  font-size: 13px;
  font-weight: 800;
}

.mock-chart {
  display: flex;
  align-items: end;
  gap: 12px;
  min-height: 190px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.mock-chart i {
  flex: 1;
  min-width: 22px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(to top, #2563eb, #6aa8ff);
}

.mock-chart i:nth-child(even) {
  background: linear-gradient(to top, #1f7a45, #65c58b);
}

.mock-table {
  display: grid;
  gap: 8px;
}

.mock-table p {
  height: 22px;
  margin: 0;
  border-radius: 6px;
  background: #e7edf4;
}

.portal-section {
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.public-proof {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 22px;
  align-items: center;
  background: #101820;
  color: #fff;
}

.public-proof h2,
.public-proof p {
  margin: 0;
}

.public-proof p {
  color: #d8e1ea;
}

.public-proof .eyebrow {
  color: var(--gold);
}

.proof-list {
  display: grid;
  gap: 8px;
}

.proof-list span {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  font-weight: 800;
}

.public-title h2 {
  max-width: 760px;
  font-size: 30px;
  line-height: 1.1;
}

.capability-grid,
.admin-permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.capability-card {
  min-height: 170px;
  padding: 20px;
}

.capability-card h3,
.capability-card p,
.dark-card h3,
.dark-card p {
  margin: 0;
}

.capability-card p {
  color: var(--muted);
}

.dark-card {
  border-color: #16212b;
  background: #101820;
  color: #fff;
}

.dark-card p {
  color: #d8e1ea;
}

.dark-card .button.secondary {
  border-color: rgba(255, 255, 255, 0.2);
  background: #fff;
}

.portal-news {
  padding: 22px;
}

.portal-news.important {
  border-left: 5px solid var(--accent);
}

.portal-grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
}

.portal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.portal-head-card,
.page-intro,
.quick-card,
.feature-card,
.plan-card,
.auth-copy-card {
  padding: 22px;
}

.portal-head-card h2,
.page-intro h2,
.auth-copy-card h2 {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.12;
}

.portal-head-card p,
.page-intro p,
.quick-card p,
.feature-card p,
.plan-card p,
.auth-copy-card p {
  color: var(--muted);
}

.quick-card {
  display: grid;
  gap: 12px;
  align-content: center;
}

.quick-card h3,
.feature-card h3,
.plan-card h3 {
  margin: 0;
  color: var(--ink);
}

.news-list {
  display: grid;
  gap: 14px;
}

.news-item.portal-news {
  position: relative;
  margin: 0;
  padding: 18px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.news-item.portal-news.important {
  border-left: 5px solid var(--danger);
}

.news-author {
  position: absolute;
  top: 12px;
  right: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.traffic-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.date {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.feature-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-grid .portal-card {
  padding: 18px;
}

.plan-card strong {
  display: block;
  margin: 10px 0;
  color: var(--accent-dark);
  font-size: 20px;
}

.contact-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.contact-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.contact-list span {
  color: var(--muted);
}

.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: 16px;
  align-items: start;
}

.auth-page .auth-card {
  align-self: auto;
  margin: 0;
  padding: 24px;
  border-radius: 8px;
}

.auth-copy-card {
  min-height: 100%;
}

.auth-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.auth-points span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.table-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.workflow-list {
  display: grid;
  gap: 10px;
}

.workflow-list div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.workflow-list strong {
  color: #17212b;
}

.workflow-list span {
  color: var(--muted);
  font-size: 13px;
}

.command-center {
  background: #111827;
  color: #fff;
}

.compliance-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  background: #fbfcfd;
}

.compliance-strip h2,
.compliance-strip p {
  margin: 0;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.print-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-rows: auto 1fr;
  background: #eef2f6;
}

.print-modal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-strong);
  background: #fff;
  box-shadow: var(--shadow);
}

.print-modal-toolbar strong,
.print-modal-toolbar span {
  display: block;
}

.print-modal-toolbar span {
  color: var(--muted);
  font-size: 12px;
}

.print-modal iframe {
  width: min(100%, 980px);
  height: calc(100vh - 78px);
  justify-self: center;
  border: 0;
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16);
}

.command-center .section-title h2,
.command-center .section-title p {
  color: #fff;
}

.command-center .section-title p {
  color: #cbd5e1;
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.command-grid button {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.command-grid button:hover {
  border-color: rgba(242, 196, 109, 0.7);
  background: rgba(255, 255, 255, 0.1);
}

.command-grid strong {
  font-size: 20px;
}

.command-grid span {
  color: #dbe5ef;
  font-size: 13px;
}

.service-admin .sidebar {
  background: #0d1520;
}

.service-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: center;
  padding: 24px;
  border: 1px solid #1f2937;
  border-radius: 8px;
  background: linear-gradient(135deg, #111827, #182331);
  color: #fff;
  box-shadow: var(--shadow);
}

.service-hero h2 {
  margin: 0;
  font-size: 34px;
}

.service-hero p {
  max-width: 760px;
  margin: 8px 0 0;
  color: #d7e0ea;
}

.service-hero .eyebrow {
  color: var(--gold);
}

.service-status {
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.service-status span,
.service-status small {
  color: #cbd5e1;
}

.service-status strong {
  font-size: 24px;
}

.permission-card {
  min-height: 150px;
}

.permission-card h3 {
  margin: 0 0 8px;
}

.permission-card p {
  margin: 0;
  color: var(--muted);
}

.admin-flow div {
  background: var(--surface-soft);
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--surface-soft);
  color: #334155;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.portal-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.portal-footer .portal-container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 20px;
  padding-bottom: 20px;
}

@media (max-width: 1180px) {
  .grid.cols-4,
  .feature-grid.four,
  .command-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid,
  .form-grid.three,
  .capability-grid,
  .admin-permission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: min(86vw, 320px);
    transform: translateX(-105%);
    transition: transform .18s ease;
    padding: 14px;
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .app-shell.sidebar-open .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(15, 23, 42, 0.42);
  }

  .menu-toggle {
    display: inline-grid;
    flex: 0 0 auto;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .sidebar-note {
    display: none;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    grid-template-columns: auto 1fr;
    flex-wrap: wrap;
  }

  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .split,
  .portal-grid-main,
  .auth-page,
  .public-section,
  .product-hero,
  .service-hero,
  .public-proof,
  .grid.cols-2,
  .grid.cols-3,
  .feature-grid,
  .feature-grid.three,
  .compliance-strip {
    grid-template-columns: 1fr;
  }

  .list {
    max-height: none;
  }

  .editor-heading {
    position: static;
  }

  .portal-header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .portal-nav {
    justify-content: flex-start;
  }

  .product-visual {
    min-height: 430px;
  }
}

@media (max-width: 680px) {
  .main,
  .portal-container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .grid.cols-4,
  .form-grid,
  .form-grid.two,
  .form-grid.three,
  .feature-grid.four,
  .capability-grid,
  .admin-permission-grid,
  .mock-metrics,
  .command-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .section-title,
  .activity-item,
  .contact-list div,
  .portal-footer .portal-container {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-head-card h2,
  .page-intro h2,
  .auth-copy-card h2,
  .hero-copy h2,
  .service-hero h2 {
    font-size: 28px;
  }

  .product-hero {
    padding: 18px;
  }

  .mock-layout {
    grid-template-columns: 72px 1fr;
  }

  .mock-main {
    padding: 14px;
  }

  .logo-uploader,
  .experience-strip,
  .setup-band,
  .quality-panel {
    grid-template-columns: 1fr;
  }

  .quality-check {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .quality-check .button {
    grid-column: 2;
    justify-self: start;
  }

  .print-modal-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .print-modal iframe {
    width: 100%;
    height: calc(100vh - 126px);
  }
}

/* =====================================================================
   Portal redesign — public marketing pages
   Dopisana warstwa nadpisująca starsze reguły. Skupiona na:
   - paleta deep emerald + warm sand
   - hero z prawdziwym mockupem faktury
   - cennik z trzema kartami i wyróżnioną propozycją
   - footer 4-kolumnowy, sticky header, mikro-interakcje
   ===================================================================== */

.portal-shell {
  --brand: #0b6f6a;
  --brand-dark: #075953;
  --brand-2: #0d8079;
  --brand-soft: #e7f3f1;
  --sand: #efe2c7;
  --sand-deep: #d9c399;
  --ink-display: #0c1a1f;
  --ink-soft: #4a5b66;
  --line-soft: #e7ecf1;
  --paper: #fffefb;

  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(11, 111, 106, 0.10), transparent 60%),
    radial-gradient(900px 500px at 0% 8%, rgba(239, 226, 199, 0.55), transparent 55%),
    linear-gradient(to bottom, #fbfaf6 0%, #ffffff 65%);
  color: var(--ink-display);
}

.portal-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(12, 26, 31, 0.08) 1px, transparent 0);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 70%);
  z-index: 0;
}

.portal-shell > * {
  position: relative;
  z-index: 1;
}

.portal-container {
  width: min(100%, 1180px);
  padding: 0 32px;
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(12, 26, 31, 0.08);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}

.portal-header-inner {
  min-height: 76px;
  gap: 24px;
}

.portal-shell .portal-brand .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 14px rgba(7, 89, 83, 0.28);
}

.portal-shell .portal-brand strong {
  font-size: 15px;
  letter-spacing: -0.01em;
}

.portal-shell .portal-brand small {
  font-size: 11.5px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.portal-nav {
  gap: 2px;
}

.portal-nav a {
  position: relative;
  padding: 9px 13px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink-soft);
  border-radius: 7px;
  transition: color .15s ease, background .15s ease;
}

.portal-nav a:hover {
  background: transparent;
  color: var(--brand-dark);
}

.portal-nav a.active {
  background: transparent;
  color: var(--brand-dark);
}

.portal-nav a.active::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}

.portal-shell .portal-login-link {
  border: 1px solid rgba(12, 26, 31, 0.14);
  background: #fff;
  color: var(--ink-display);
  margin-left: 8px;
}

.portal-shell .portal-login-link:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: #fff;
}

.portal-shell .portal-cta-link {
  background: var(--brand);
  color: #fff !important;
  padding: 9px 16px;
  border-radius: 7px;
  box-shadow: 0 6px 16px rgba(7, 89, 83, 0.25);
}

.portal-shell .portal-cta-link::after { display: none; }

.portal-shell .portal-cta-link:hover {
  background: var(--brand-dark);
  color: #fff !important;
}

.portal-page {
  padding-top: 48px;
  padding-bottom: 80px;
  display: grid;
  gap: 64px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.portal-page > * { min-width: 0; }
.portal-page > section, .portal-page > article { max-width: 100%; }

/* Hero ----------------------------------------------------------------- */

.portal-shell .product-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  gap: 56px;
  align-items: center;
  min-height: auto;
  margin: 0;
  padding: 36px 8px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hero-copy {
  padding: 0;
  gap: 26px;
}

.hero-kicker {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border: 1px solid rgba(11, 111, 106, 0.22);
  border-radius: 999px;
  background: rgba(231, 243, 241, 0.7);
  color: var(--brand-dark);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(11, 111, 106, 0.18);
}

.hero-title {
  margin: 0;
  max-width: 660px;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--ink-display);
}

.hero-lede {
  max-width: 560px;
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.hero-actions {
  gap: 14px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 16px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(12, 26, 31, 0.08);
}

.hero-stats > div {
  padding-right: 12px;
}

.hero-stats > div + div {
  padding-left: 18px;
  border-left: 1px solid rgba(12, 26, 31, 0.08);
}

.hero-stats dt {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-soft);
}

.hero-stats dd {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-display);
}

/* Hero document mockup ------------------------------------------------- */

.hero-doc {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 24px;
}

.doc-paper {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 18px;
  width: 100%;
  max-width: 460px;
  padding: 28px 28px 24px;
  background: var(--paper);
  border: 1px solid rgba(12, 26, 31, 0.08);
  border-radius: 14px;
  box-shadow:
    0 1px 1px rgba(12, 26, 31, 0.04),
    0 16px 40px rgba(12, 26, 31, 0.10),
    0 36px 80px rgba(12, 26, 31, 0.10);
  transform: rotate(-1.2deg);
  transition: transform .35s ease, box-shadow .35s ease;
}

.doc-paper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-2) 50%, var(--sand-deep) 100%);
}

.hero-doc:hover .doc-paper {
  transform: rotate(-0.4deg) translateY(-3px);
}

.doc-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.doc-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.doc-meta strong {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 700;
  margin-bottom: 3px;
}

.doc-meta span {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-display);
  letter-spacing: -0.005em;
}

.doc-ksef {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.doc-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.doc-parties small {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-soft);
}

.doc-parties strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-display);
  letter-spacing: -0.005em;
  line-height: 1.3;
}

.doc-parties span {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--ink-soft);
}

.doc-items {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.doc-items th {
  padding: 8px 0;
  text-align: left;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 700;
  border-bottom: 1px solid var(--line-soft);
}

.doc-items th:nth-child(2),
.doc-items th:nth-child(3),
.doc-items th:nth-child(4) {
  text-align: right;
}

.doc-items td {
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-display);
}

.doc-items td:nth-child(2),
.doc-items td:nth-child(3),
.doc-items td:nth-child(4) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

.doc-items td:nth-child(4) {
  font-weight: 600;
  color: var(--ink-display);
}

.doc-summary {
  display: grid;
  gap: 6px;
  padding: 14px 12px 4px;
  margin: 0 -8px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(231, 243, 241, 0.4), rgba(231, 243, 241, 0));
}

.doc-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: var(--ink-soft);
}

.doc-summary-row strong {
  font-weight: 600;
  color: var(--ink-display);
  font-variant-numeric: tabular-nums;
}

.doc-summary-row.doc-total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed rgba(12, 26, 31, 0.18);
  font-size: 14px;
}

.doc-summary-row.doc-total span {
  color: var(--ink-display);
  font-weight: 700;
}

.doc-summary-row.doc-total strong {
  font-size: 18px;
  color: var(--brand-dark);
  letter-spacing: -0.01em;
}

.doc-floater {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -0.005em;
  box-shadow: 0 8px 20px rgba(12, 26, 31, 0.10), 0 1px 2px rgba(12, 26, 31, 0.04);
  border: 1px solid rgba(12, 26, 31, 0.06);
  white-space: nowrap;
}

.doc-floater::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.doc-floater-status {
  top: 22px;
  right: 0;
  transform: rotate(2.5deg);
}

.doc-floater-status::before {
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 111, 106, 0.2);
}

.doc-floater-payment {
  bottom: 32px;
  left: 0;
  transform: rotate(-3deg);
}

.doc-floater-payment::before {
  background: #d9961c;
  box-shadow: 0 0 0 3px rgba(217, 150, 28, 0.2);
}

/* Buttons -------------------------------------------------------------- */

.portal-shell .button {
  font-weight: 700;
  letter-spacing: -0.005em;
  border-radius: 8px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}

.portal-shell .button.primary {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 8px 18px rgba(7, 89, 83, 0.22);
}

.portal-shell .button.primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(7, 89, 83, 0.28);
}

.portal-shell .button.secondary {
  background: #fff;
  border: 1px solid rgba(12, 26, 31, 0.14);
  color: var(--ink-display);
}

.portal-shell .button.secondary:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.portal-shell .button.ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--brand-dark);
  padding-left: 4px;
  padding-right: 4px;
}

.portal-shell .button.ghost:hover {
  color: var(--brand);
  background: transparent;
  transform: translateX(2px);
}

.portal-shell .button.ghost-light {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.portal-shell .button.ghost-light:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.portal-shell .button.big {
  padding: 14px 22px;
  font-size: 15px;
  min-height: 50px;
}

.portal-shell .button.block {
  width: 100%;
  justify-content: center;
}

/* Sections ------------------------------------------------------------- */

.portal-shell .portal-section {
  margin: 0;
  padding: 40px;
  border: 1px solid rgba(12, 26, 31, 0.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(12, 26, 31, 0.03), 0 12px 32px rgba(12, 26, 31, 0.05);
}

.portal-shell .public-proof {
  background:
    radial-gradient(600px 300px at 80% 30%, rgba(217, 195, 153, 0.15), transparent 70%),
    linear-gradient(135deg, #0c1a1f 0%, #143436 100%);
  border-color: #0c1a1f;
  color: #fff;
}

.portal-shell .public-proof .eyebrow {
  color: var(--sand-deep);
}

.portal-shell .public-proof h2 {
  font-size: clamp(24px, 2.5vw, 32px);
  letter-spacing: -0.018em;
  line-height: 1.18;
  color: #fff;
  max-width: 640px;
}

.portal-shell .public-proof p {
  color: rgba(255, 255, 255, 0.78);
}

.proof-list {
  gap: 10px;
}

.proof-list span {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.92);
  transition: background .2s ease, border-color .2s ease;
}

.proof-list span:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(217, 195, 153, 0.4);
}

.eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 8px;
}

.eyebrow.eyebrow-light {
  color: var(--sand-deep);
}

.portal-shell .public-title h2 {
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink-display);
  max-width: 760px;
}

/* Capability cards ----------------------------------------------------- */

.portal-shell .capability-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.portal-shell .portal-card.capability-card {
  position: relative;
  padding: 26px 22px 22px;
  min-height: 200px;
  border: 1px solid rgba(12, 26, 31, 0.08);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 1px rgba(12, 26, 31, 0.03);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.portal-shell .portal-card.capability-card:hover {
  transform: translateY(-2px);
  border-color: rgba(11, 111, 106, 0.3);
  box-shadow: 0 1px 1px rgba(12, 26, 31, 0.04), 0 16px 36px rgba(12, 26, 31, 0.08);
}

.capability-num {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
}

.portal-shell .capability-card h3 {
  font-size: 17px;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: var(--ink-display);
}

.portal-shell .capability-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* CTA band ------------------------------------------------------------- */

.cta-band {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 44px 48px;
  border-radius: 18px;
  background:
    radial-gradient(800px 400px at 100% 0%, rgba(217, 195, 153, 0.18), transparent 60%),
    linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 60%, #0a8b81 100%);
  color: #fff;
  box-shadow: 0 24px 60px rgba(7, 89, 83, 0.28);
  overflow: hidden;
  position: relative;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.08) 1px, transparent 0);
  background-size: 22px 22px;
  pointer-events: none;
  opacity: 0.6;
}

.cta-band > * { position: relative; }

.cta-band h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  max-width: 560px;
}

.cta-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  max-width: 520px;
  font-size: 15px;
}

.cta-band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.cta-band .button.primary {
  background: #fff;
  color: var(--brand-dark);
  border-color: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.cta-band .button.primary:hover {
  background: var(--paper);
  color: var(--brand-dark);
}

/* Page intro & feature grids ------------------------------------------ */

.portal-shell .page-intro {
  padding: 36px 40px;
  border-radius: 18px;
}

.portal-shell .page-intro h2 {
  font-size: clamp(28px, 2.8vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 760px;
  color: var(--ink-display);
}

.portal-shell .page-intro p {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.55;
  max-width: 720px;
  color: var(--ink-soft);
}

.portal-shell .feature-grid .portal-card {
  padding: 22px;
  border-radius: 14px;
  border: 1px solid rgba(12, 26, 31, 0.08);
  background: #fff;
  box-shadow: 0 1px 1px rgba(12, 26, 31, 0.03);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.portal-shell .feature-grid .portal-card:hover {
  transform: translateY(-2px);
  border-color: rgba(11, 111, 106, 0.3);
  box-shadow: 0 1px 1px rgba(12, 26, 31, 0.04), 0 14px 30px rgba(12, 26, 31, 0.07);
}

.portal-shell .feature-card h3,
.portal-shell .feature-grid h3 {
  font-size: 16px;
  letter-spacing: -0.005em;
  color: var(--ink-display);
  margin: 0 0 6px;
}

.portal-shell .feature-grid p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}

/* Pricing -------------------------------------------------------------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 30px 26px;
  border: 1px solid rgba(12, 26, 31, 0.10);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(12, 26, 31, 0.03), 0 8px 22px rgba(12, 26, 31, 0.04);
  transition: transform .25s ease, box-shadow .25s ease;
}

.pricing-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 1px rgba(12, 26, 31, 0.04), 0 18px 40px rgba(12, 26, 31, 0.08);
}

.pricing-card-featured {
  border-color: var(--brand);
  background:
    linear-gradient(180deg, rgba(231, 243, 241, 0.55) 0%, #fff 22%);
  box-shadow: 0 1px 1px rgba(12, 26, 31, 0.04), 0 22px 50px rgba(7, 89, 83, 0.16);
  transform: translateY(-6px);
}

.pricing-card-featured:hover {
  transform: translateY(-9px);
}

.pricing-flag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(7, 89, 83, 0.30);
}

.pricing-card header {
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 16px;
}

.pricing-label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-dark);
  margin-bottom: 4px;
}

.pricing-tagline {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.pricing-price strong {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink-display);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.pricing-price span {
  font-size: 13px;
  color: var(--ink-soft);
}

.pricing-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  flex: 1;
}

.pricing-features li {
  position: relative;
  padding-left: 26px;
  font-size: 13.5px;
  color: var(--ink-display);
  line-height: 1.45;
}

.pricing-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
}

.pricing-features li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  width: 5px;
  height: 8px;
  border: solid #fff;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg);
}

.pricing-extra {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 18px;
}

.pricing-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 28px;
  border-radius: 18px;
}

.pricing-note h3 {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink-display);
}

.pricing-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.pricing-faq {
  padding: 24px 28px;
  border-radius: 18px;
}

.pricing-faq details {
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}

.pricing-faq details:first-of-type { border-top: 0; }

.pricing-faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--ink-display);
  font-size: 14px;
  padding-right: 24px;
  position: relative;
}

.pricing-faq summary::-webkit-details-marker { display: none; }

.pricing-faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: -1px;
  font-size: 18px;
  color: var(--brand-dark);
  font-weight: 600;
  transition: transform .15s ease;
}

.pricing-faq details[open] summary::after {
  content: "−";
}

.pricing-faq details p {
  margin: 8px 0 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* Auth ----------------------------------------------------------------- */

.portal-shell .auth-page {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 460px);
  gap: 28px;
}

.portal-shell .auth-copy-card,
.portal-shell .auth-page .auth-card {
  padding: 36px;
  border-radius: 18px;
  border: 1px solid rgba(12, 26, 31, 0.08);
  background: #fff;
  box-shadow: 0 1px 1px rgba(12, 26, 31, 0.03), 0 14px 36px rgba(12, 26, 31, 0.06);
}

.portal-shell .auth-copy-card h2 {
  font-size: clamp(26px, 2.4vw, 34px);
  letter-spacing: -0.02em;
  color: var(--ink-display);
}

.portal-shell .auth-copy-card p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.portal-shell .auth-points span {
  background: var(--brand-soft);
  border-color: rgba(11, 111, 106, 0.18);
  color: var(--brand-dark);
}

/* Footer --------------------------------------------------------------- */

.portal-shell .portal-footer {
  margin-top: 24px;
  border-top: 1px solid rgba(12, 26, 31, 0.08);
  background: #0c1a1f;
  color: rgba(255, 255, 255, 0.72);
}

.portal-shell .portal-footer .portal-container {
  padding: 0 32px;
}

.portal-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding: 56px 0 40px;
}

.portal-shell .portal-footer .portal-brand {
  color: #fff;
}

.portal-shell .portal-footer .portal-brand strong {
  color: #fff;
}

.portal-shell .portal-footer .portal-brand small {
  color: rgba(255, 255, 255, 0.55);
}

.portal-shell .portal-footer .footer-brand p {
  margin: 16px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.6);
  max-width: 320px;
}

.portal-shell .portal-footer h4 {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 700;
}

.portal-shell .portal-footer nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.portal-shell .portal-footer nav a {
  padding: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  border-radius: 0;
  min-height: 0;
  transition: color .15s ease, transform .15s ease;
}

.portal-shell .portal-footer nav a:hover,
.portal-shell .portal-footer nav a.active {
  color: #fff;
  background: transparent;
  transform: translateX(2px);
}

.portal-shell .portal-footer nav a::after { display: none; }

.portal-footer-base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.5);
}

/* Section title with eyebrow --------------------------------------- */

.portal-shell .section-title {
  margin-bottom: 24px;
}

/* Responsive ----------------------------------------------------------- */

@media (max-width: 1180px) {
  .portal-shell .product-hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 12px 0;
  }

  .hero-doc {
    padding: 8px;
    min-height: 360px;
  }

  .doc-paper {
    transform: rotate(-0.6deg);
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .pricing-card-featured {
    transform: none;
  }

  .pricing-card-featured:hover {
    transform: translateY(-3px);
  }

  .pricing-extra {
    grid-template-columns: 1fr;
  }

  .pricing-note {
    grid-template-columns: 1fr;
  }

  .cta-band {
    grid-template-columns: 1fr;
    padding: 36px;
  }

  .cta-band-actions {
    justify-content: flex-start;
  }

  .portal-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 980px) {
  .portal-shell .capability-grid {
    grid-template-columns: 1fr;
  }

  .portal-shell .public-proof {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .portal-container {
    padding-left: 18px;
    padding-right: 18px;
  }

  .portal-shell .portal-section,
  .portal-shell .page-intro {
    padding: 24px;
  }

  .portal-shell .auth-copy-card,
  .portal-shell .auth-page .auth-card {
    padding: 24px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-stats > div + div {
    padding-left: 0;
    padding-top: 12px;
    border-left: 0;
    border-top: 1px solid rgba(12, 26, 31, 0.08);
  }

  .doc-floater-payment {
    bottom: 8px;
  }

  .portal-footer-grid {
    grid-template-columns: 1fr;
    padding: 40px 0 28px;
  }

  .portal-footer-base {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .portal-page {
    gap: 40px;
    padding-top: 32px;
    padding-bottom: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-shell *,
  .portal-shell *::before,
  .portal-shell *::after {
    transition: none !important;
  }
}

/* =====================================================================
   Public announcement banner
   ===================================================================== */
.portal-announcement {
  padding: 10px 24px;
  background: #0c1a1f;
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* =====================================================================
   Superadmin Command Center
   ===================================================================== */

.admin-cmd {
  display: grid;
  gap: 18px;
}

.admin-cmd-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, auto);
  gap: 24px;
  align-items: center;
  padding: 28px 32px;
  border-radius: 16px;
  background:
    radial-gradient(800px 400px at 100% 0%, rgba(217, 195, 153, 0.16), transparent 60%),
    linear-gradient(135deg, #0c1a1f 0%, #143436 100%);
  color: #fff;
  box-shadow: 0 22px 50px rgba(7, 89, 83, 0.18);
}

.admin-cmd-hero .eyebrow {
  color: #d9c399;
  margin-bottom: 8px;
}

.admin-cmd-hero h2 {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

.admin-cmd-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14.5px;
  max-width: 720px;
}

.admin-cmd-status {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-cmd-status span {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.admin-cmd-status strong {
  font-size: 22px;
  color: #fff;
}

.admin-cmd-status small {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

.admin-cmd-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.admin-cmd-tabs button {
  padding: 9px 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #4a5b66;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.admin-cmd-tabs button:hover {
  background: #f1f5f9;
  color: #0c1a1f;
}

.admin-cmd-tabs button.active {
  background: #0b6f6a;
  color: #fff;
  box-shadow: 0 6px 14px rgba(7, 89, 83, 0.22);
}

.admin-cmd-body {
  display: grid;
  gap: 18px;
}

.admin-quick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.audit-recent {
  display: grid;
  gap: 10px;
}

.audit-recent-item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.audit-recent-item strong {
  display: block;
  font-size: 13px;
  color: #0c1a1f;
}

.audit-recent-item span {
  font-size: 12px;
  color: var(--muted);
}

.audit-detail {
  font-size: 11.5px;
  word-break: break-word;
  display: inline-block;
  max-width: 380px;
  white-space: pre-wrap;
}

.metric.metric-ok strong { color: #0b6f6a; }
.metric.metric-warn strong { color: #b76200; }

.ext-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}

.ext-row strong { font-size: 14px; }
.ext-row.ok strong { color: #0b6f6a; }
.ext-row.warn { background: #fff7ed; border-color: #fed7aa; }
.ext-row.warn strong { color: #b45309; }

.panel.inset {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  box-shadow: none;
}

.org-rename-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
}

.button.text.danger { color: #b42318; }
.button.text.danger:hover { background: #fee2e2; }

.inline.space-between { justify-content: space-between; width: 100%; }

/* Plans editor */

.plans-editor {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
}

.plan-editor-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.plan-editor-card.featured {
  border: 1px solid #0b6f6a;
  background: linear-gradient(180deg, rgba(231, 243, 241, 0.5), #fff 30%);
}

.plan-editor-card .form-grid.two {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* KSeF UI */

.ksef-session-panel { background: #fbfaf6; }

.ksef-session {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.ksef-session.active {
  border-color: #0b6f6a;
  background: rgba(231, 243, 241, 0.5);
}

.ksef-session.active strong { color: #0b6f6a; }

.ksef-session span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.ksef-session strong {
  font-size: 16px;
  color: #0c1a1f;
}

.ksef-session small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
}

.ksef-invoice-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, auto);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.ksef-invoice-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.ksef-invoice-tags .tag {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: #334155;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.ksef-invoice-tags .tag.tag-ok {
  background: rgba(11, 111, 106, 0.12);
  color: #0b6f6a;
}

.ksef-invoice-tags .tag.tag-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
}

.ksef-invoice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ksef-error {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 12.5px;
}

@media (max-width: 980px) {
  .admin-cmd-hero { grid-template-columns: 1fr; }
  .admin-quick { grid-template-columns: 1fr; }
  .ksef-invoice-row { grid-template-columns: 1fr; }
  .ksef-invoice-actions { justify-content: flex-start; }
}

/* =====================================================================
   Free mode: banner + toggle
   ===================================================================== */

.portal-announcement-free {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 24px;
  background: linear-gradient(90deg, #0b6f6a 0%, #0d8079 50%, #0b6f6a 100%);
  background-size: 200% 100%;
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.005em;
  animation: free-shine 6s linear infinite;
}

.portal-announcement-free .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #efe2c7;
  box-shadow: 0 0 0 4px rgba(239, 226, 199, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes free-shine {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.85); }
}

@media (prefers-reduced-motion: reduce) {
  .portal-announcement-free, .portal-announcement-free .dot { animation: none !important; }
}

/* Free mode panel w admin */

.free-mode-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.free-mode-panel.active {
  border-color: #0b6f6a;
  background: linear-gradient(135deg, rgba(231, 243, 241, 0.6), #fff 60%);
  box-shadow: 0 1px 1px rgba(12, 26, 31, 0.04), 0 16px 36px rgba(7, 89, 83, 0.10);
}

.free-mode-panel.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0b6f6a, #0d8079, #d9c399);
}

.toggle-large {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--surface-soft);
  cursor: pointer;
  user-select: none;
}

.toggle-large input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-large .toggle-track {
  position: relative;
  width: 52px;
  height: 28px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background .18s ease;
}

.toggle-large .toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform .18s ease;
}

.toggle-large input:checked + .toggle-track {
  background: #0b6f6a;
}

.toggle-large input:checked + .toggle-track::after {
  transform: translateX(24px);
}

.toggle-large strong {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0c1a1f;
}

/* Hero animacja: floatery */

@keyframes float-1 {
  0%, 100% { transform: rotate(2.5deg) translateY(0); }
  50% { transform: rotate(2.5deg) translateY(-6px); }
}

@keyframes float-2 {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(-3deg) translateY(8px); }
}

.doc-floater-status {
  animation: float-1 6s ease-in-out infinite;
}

.doc-floater-payment {
  animation: float-2 7s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .doc-floater-status, .doc-floater-payment { animation: none !important; }
}

/* Hero - subtelny gradient text */

.hero-title {
  background: linear-gradient(135deg, #0c1a1f 0%, #143436 60%, #0b6f6a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* KSeF init button glow */

.ksef-session.idle .button.primary {
  box-shadow: 0 0 0 0 rgba(11, 111, 106, 0.6);
  animation: ksef-pulse 2.4s ease-out infinite;
}

@keyframes ksef-pulse {
  0% { box-shadow: 0 6px 14px rgba(7, 89, 83, 0.22), 0 0 0 0 rgba(11, 111, 106, 0.45); }
  70% { box-shadow: 0 6px 14px rgba(7, 89, 83, 0.22), 0 0 0 12px rgba(11, 111, 106, 0); }
  100% { box-shadow: 0 6px 14px rgba(7, 89, 83, 0.22), 0 0 0 0 rgba(11, 111, 106, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .ksef-session.idle .button.primary { animation: none !important; }
}

/* Pricing flag pulse */

.pricing-card-featured .pricing-flag {
  animation: pricing-flag-glow 3s ease-in-out infinite;
}

@keyframes pricing-flag-glow {
  0%, 100% { box-shadow: 0 8px 18px rgba(7, 89, 83, 0.30); }
  50% { box-shadow: 0 12px 24px rgba(7, 89, 83, 0.45); }
}

@media (prefers-reduced-motion: reduce) {
  .pricing-card-featured .pricing-flag { animation: none !important; }
}

/* Cta band - subtle floating gradient */

.cta-band {
  background-size: 100% 100%, 200% 100%;
  animation: cta-shift 12s linear infinite;
}

@keyframes cta-shift {
  0% { background-position: 100% 0%, 0% 0%; }
  100% { background-position: 100% 0%, 200% 0%; }
}

@media (prefers-reduced-motion: reduce) {
  .cta-band { animation: none !important; }
}

/* =====================================================================
   Hero v3 - aurora background, rotator, shimmer button
   ===================================================================== */

.hero-v3 {
  position: relative;
  isolation: isolate;
}

.hero-aurora {
  position: absolute;
  inset: -40px -40px -120px;
  z-index: -1;
  pointer-events: none;
  filter: blur(60px);
  opacity: 0.6;
  background:
    radial-gradient(40% 50% at 12% 20%, rgba(11, 111, 106, 0.45), transparent 70%),
    radial-gradient(35% 45% at 85% 30%, rgba(217, 195, 153, 0.55), transparent 70%),
    radial-gradient(45% 55% at 60% 80%, rgba(13, 128, 121, 0.35), transparent 70%);
  animation: aurora 18s ease-in-out infinite alternate;
}

@keyframes aurora {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(40px, -20px, 0) scale(1.08); }
}

.hero-kicker .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0b6f6a;
  margin-right: 4px;
  box-shadow: 0 0 0 4px rgba(11, 111, 106, 0.18);
  animation: dot-pulse 2.4s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(11, 111, 106, 0.18); }
  50% { box-shadow: 0 0 0 7px rgba(11, 111, 106, 0); }
}

.hero-rotator {
  position: relative;
  display: inline-block;
  height: 1.55em;
  vertical-align: bottom;
  overflow: hidden;
  font-weight: 700;
  color: #0b6f6a;
}

.hero-rotator span {
  display: block;
  height: 1.55em;
  animation: rotator 9s ease-in-out infinite;
}

@keyframes rotator {
  0%, 18% { transform: translateY(0); }
  22%, 43% { transform: translateY(-1.55em); }
  47%, 68% { transform: translateY(-3.1em); }
  72%, 93% { transform: translateY(-4.65em); }
  100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-aurora, .hero-rotator span { animation: none !important; }
}

.button.shimmer {
  position: relative;
  overflow: hidden;
}

.button.shimmer::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
  transform: skewX(-20deg);
  transition: left .55s ease;
  pointer-events: none;
}

.button.shimmer:hover::after {
  left: 130%;
}

/* =====================================================================
   Counter strip
   ===================================================================== */

.counter-strip {
  margin: 0;
  padding: 0;
}

.counter-strip-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 28px 36px;
  border: 1px solid rgba(12, 26, 31, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #fbfaf6 100%);
  box-shadow: 0 1px 1px rgba(12, 26, 31, 0.03), 0 12px 30px rgba(12, 26, 31, 0.05);
}

.counter {
  text-align: center;
  position: relative;
}

.counter + .counter {
  border-left: 1px solid rgba(12, 26, 31, 0.08);
}

.counter strong {
  display: block;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #0c1a1f;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  line-height: 1.05;
  background: linear-gradient(135deg, #0c1a1f 0%, #0b6f6a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.counter span {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: #4a5b66;
  font-weight: 500;
}

@media (max-width: 980px) {
  .counter-strip-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding: 24px;
  }
  .counter + .counter { border-left: 0; }
  .counter:nth-child(odd) { border-right: 1px solid rgba(12, 26, 31, 0.08); }
}

/* =====================================================================
   Proof bar (marquee)
   ===================================================================== */

.proof-bar {
  text-align: center;
  padding: 0;
}

.proof-label {
  margin: 0 0 16px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #4a5b66;
  font-weight: 700;
}

.proof-marquee {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.proof-bar {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.proof-track {
  display: inline-flex;
  gap: 14px;
  white-space: nowrap;
  animation: proof-scroll 36s linear infinite;
  will-change: transform;
}

.proof-track span {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border: 1px solid rgba(12, 26, 31, 0.08);
  border-radius: 999px;
  background: #fff;
  color: #0c1a1f;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

@keyframes proof-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .proof-track { animation: none !important; }
}

/* =====================================================================
   Showcase (interactive product tabs)
   ===================================================================== */

.showcase {
  display: grid;
  gap: 28px;
}

.section-title.public-title.centered {
  text-align: center;
  margin: 0 auto;
  max-width: 760px;
}

.section-title.public-title.centered h2 {
  margin: 0 auto 8px;
}

.section-title.public-title.centered .eyebrow {
  text-align: center;
}

.section-title.public-title.centered p.muted {
  margin: 0 auto;
  font-size: 15px;
  color: #4a5b66;
}

.showcase-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  padding: 6px;
  margin: 0 auto;
  border: 1px solid rgba(12, 26, 31, 0.08);
  border-radius: 999px;
  background: #fff;
  width: fit-content;
  box-shadow: 0 6px 20px rgba(12, 26, 31, 0.06);
}

.showcase-tabs button {
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #4a5b66;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.showcase-tabs button:hover {
  color: #0c1a1f;
}

.showcase-tabs button.active {
  background: #0c1a1f;
  color: #fff;
  box-shadow: 0 6px 14px rgba(12, 26, 31, 0.18);
}

.showcase-stage {
  position: relative;
  border: 1px solid rgba(12, 26, 31, 0.10);
  border-radius: 18px;
  padding: 24px;
  background: linear-gradient(180deg, #fbfaf6 0%, #fff 100%);
  box-shadow: 0 1px 1px rgba(12, 26, 31, 0.04), 0 22px 50px rgba(12, 26, 31, 0.07);
  min-height: 480px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.mock-shell { width: 100%; max-width: 100%; overflow: hidden; }

.showcase-pane {
  display: none;
  animation: pane-fade .35s ease both;
}

.showcase-pane.active {
  display: block;
}

@keyframes pane-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .showcase-pane { animation: none !important; }
}

/* Mock-shell — wspólny dla wszystkich szowcase */

.mock-shell {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(12, 26, 31, 0.08);
  box-shadow: 0 1px 1px rgba(12, 26, 31, 0.03);
}

.mock-shell-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #f3f4f6;
  border-bottom: 1px solid rgba(12, 26, 31, 0.06);
}

.mock-shell-header span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #cbd5e1;
}

.mock-shell-header span:first-child { background: #ef4444; }
.mock-shell-header span:nth-child(2) { background: #f59e0b; }
.mock-shell-header span:nth-child(3) { background: #10b981; }

.mock-shell-header strong {
  margin-left: 12px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4a5b66;
  font-weight: 600;
}

.mock-shell-body {
  padding: 18px 22px 22px;
}

.mock-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}

.mock-search {
  padding: 7px 14px;
  border: 1px solid rgba(12, 26, 31, 0.10);
  border-radius: 8px;
  background: #f8fafc;
  color: #0c1a1f;
  font-size: 12.5px;
  flex: 1 0 auto;
  max-width: 260px;
}

.mock-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #4a5b66;
  font-size: 12px;
  font-weight: 600;
}

.mock-pill.mock-pill-active {
  background: #0b6f6a;
  color: #fff;
}

.mock-action {
  margin-left: auto;
  padding: 8px 14px;
  border-radius: 8px;
  background: #0b6f6a;
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
}

.mock-table-rich {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
}

.mock-table-rich td, .mock-table-rich th {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mock-table-rich th {
  padding: 10px 8px;
  text-align: left;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4a5b66;
  border-bottom: 1px solid rgba(12, 26, 31, 0.08);
  font-weight: 700;
}

.mock-table-rich th.num { text-align: right; }

.mock-table-rich td {
  padding: 11px 8px;
  border-bottom: 1px solid rgba(12, 26, 31, 0.06);
  color: #0c1a1f;
}

.mock-table-rich td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.mock-tag {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.005em;
  background: #f1f5f9;
  color: #4a5b66;
}

.mock-tag.tag-accepted { background: rgba(11, 111, 106, 0.14); color: #0b6f6a; }
.mock-tag.tag-queued { background: #fef3c7; color: #92400e; }
.mock-tag.tag-paid { background: rgba(31, 122, 69, 0.14); color: #1f7a45; }
.mock-tag.tag-sent { background: #dbeafe; color: #1d4ed8; }
.mock-tag.tag-overdue { background: #fee2e2; color: #b42318; }

.mock-link { color: #0b6f6a; font-weight: 700; cursor: default; font-size: 12.5px; }
.mock-late { color: #b42318; font-weight: 600; font-size: 12px; }

/* KSeF mockup */

.mock-ksef-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.mock-ksef-card {
  padding: 14px 16px;
  border: 1px solid rgba(12, 26, 31, 0.08);
  border-radius: 10px;
  background: #fff;
}

.mock-ksef-card.mock-ksef-card-ok {
  border-color: rgba(11, 111, 106, 0.3);
  background: linear-gradient(180deg, rgba(231, 243, 241, 0.6), #fff 60%);
}

.mock-ksef-card span {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4a5b66;
  font-weight: 700;
  margin-bottom: 6px;
}

.mock-ksef-card strong {
  display: block;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: #0c1a1f;
  margin-bottom: 2px;
}

.mock-ksef-card.mock-ksef-card-ok strong { color: #0b6f6a; }

.mock-ksef-card small {
  font-size: 11.5px;
  color: #4a5b66;
}

.mock-ksef-feed {
  display: grid;
  gap: 8px;
}

.mock-ksef-event {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  border-left: 3px solid rgba(12, 26, 31, 0.18);
  border-radius: 0 8px 8px 0;
  background: #f8fafc;
  font-size: 13px;
}

.mock-ksef-event.ok {
  border-left-color: #0b6f6a;
  background: rgba(231, 243, 241, 0.5);
}

.mock-ksef-event strong {
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: #4a5b66;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mock-ksef-event span {
  color: #0c1a1f;
}

.mock-ksef-event code {
  font-size: 11px;
  color: #4a5b66;
  background: rgba(12, 26, 31, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Payments mockup */

.mock-pay-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.mock-pay-card {
  padding: 16px;
  border: 1px solid rgba(12, 26, 31, 0.08);
  border-radius: 10px;
  background: #fff;
}

.mock-pay-card.mock-pay-card-warn {
  border-color: rgba(180, 35, 24, 0.3);
  background: linear-gradient(180deg, #fef2f2 0%, #fff 80%);
}

.mock-pay-card span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4a5b66;
  font-weight: 700;
  margin-bottom: 6px;
}

.mock-pay-card strong {
  display: block;
  font-size: 22px;
  letter-spacing: -0.015em;
  color: #0c1a1f;
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}

.mock-pay-card.mock-pay-card-warn strong { color: #b42318; }

.mock-pay-card small {
  font-size: 11.5px;
  color: #4a5b66;
}

/* Reports mockup */

.mock-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mock-report-card {
  padding: 18px 20px;
  border: 1px solid rgba(12, 26, 31, 0.08);
  border-radius: 12px;
  background: #fff;
}

.mock-report-card span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4a5b66;
  font-weight: 700;
  margin-bottom: 6px;
}

.mock-report-card strong {
  display: block;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: #0c1a1f;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.mock-report-card small {
  display: block;
  margin-top: 2px;
  margin-bottom: 14px;
  color: #1f7a45;
  font-size: 12px;
  font-weight: 600;
}

.mock-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 60px;
}

.mock-bars i {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, #0b6f6a, #0d8079);
  min-width: 6px;
  opacity: 0.85;
}

.mock-donut {
  --pct: 60%;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: conic-gradient(#0b6f6a 0 var(--pct), #e7ecf1 var(--pct) 100%);
  display: grid;
  place-items: center;
  position: relative;
}

.mock-donut::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #fff;
}

.mock-donut span {
  position: relative;
  font-size: 14px;
  font-weight: 700;
  color: #0c1a1f;
  letter-spacing: 0;
  text-transform: none;
  margin: 0;
}

.mock-stack {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #f1f5f9;
}

.mock-stack i { display: block; height: 100%; }

.mock-trend svg {
  width: 100%;
  height: 50px;
  display: block;
}

@media (max-width: 980px) {
  .mock-ksef-grid, .mock-pay-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mock-report-grid { grid-template-columns: 1fr; }
  .showcase-stage { padding: 16px; min-height: 360px; }
}

/* =====================================================================
   Comparison przed/po
   ===================================================================== */

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.comparison-card {
  padding: 32px;
  border-radius: 18px;
  border: 1px solid rgba(12, 26, 31, 0.10);
  background: #fff;
  position: relative;
}

.comparison-card.before {
  background: linear-gradient(180deg, #fafafa 0%, #fff 50%);
}

.comparison-card.before .comparison-label {
  background: #fee2e2;
  color: #991b1b;
}

.comparison-card.after {
  border-color: #0b6f6a;
  background: linear-gradient(180deg, rgba(231, 243, 241, 0.6) 0%, #fff 50%);
  box-shadow: 0 1px 1px rgba(12, 26, 31, 0.04), 0 22px 50px rgba(7, 89, 83, 0.12);
}

.comparison-card.after .comparison-label {
  background: rgba(11, 111, 106, 0.14);
  color: #0b6f6a;
}

.comparison-label {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 10px;
}

.comparison-card h3 {
  margin: 0 0 18px;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: #0c1a1f;
}

.comparison-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.comparison-card li {
  position: relative;
  padding-left: 30px;
  font-size: 14px;
  line-height: 1.5;
  color: #0c1a1f;
}

.comparison-card.before li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fee2e2;
}

.comparison-card.before li::after {
  content: "✕";
  position: absolute;
  left: 4px;
  top: 2px;
  color: #991b1b;
  font-size: 11px;
  font-weight: 700;
}

.comparison-card.before li {
  color: #4a5b66;
}

.comparison-card.after li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0b6f6a, #0d8079);
}

.comparison-card.after li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

@media (max-width: 980px) {
  .comparison-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   Testimonials
   ===================================================================== */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.testimonial {
  padding: 28px;
  border-radius: 18px;
  border: 1px solid rgba(12, 26, 31, 0.08);
  background: #fff;
  box-shadow: 0 1px 1px rgba(12, 26, 31, 0.03), 0 12px 28px rgba(12, 26, 31, 0.05);
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  transition: transform .25s ease, box-shadow .25s ease;
}

.testimonial:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 1px rgba(12, 26, 31, 0.04), 0 22px 44px rgba(12, 26, 31, 0.10);
}

.testimonial::before {
  content: "\201E";
  position: absolute;
  top: 14px;
  right: 22px;
  font-size: 70px;
  line-height: 1;
  font-family: Georgia, serif;
  color: rgba(11, 111, 106, 0.14);
  pointer-events: none;
}

.testimonial-quote {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: #0c1a1f;
  letter-spacing: -0.005em;
}

.testimonial footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.testimonial-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0b6f6a, #0d8079);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.testimonial footer strong {
  display: block;
  font-size: 14px;
  color: #0c1a1f;
}

.testimonial footer span {
  font-size: 12.5px;
  color: #4a5b66;
}

@media (max-width: 980px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   Scroll reveal
   ===================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
  will-change: opacity, transform;
}

[data-reveal].revealed,
[data-reveal].revealed * {
  /* nothing for children - just to bump specificity if needed */
}

[data-reveal].revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* =====================================================================
   Body typography upgrade
   ===================================================================== */

body {
  font-feature-settings: "ss01", "cv11";
}

.portal-shell {
  font-feature-settings: "ss01", "cv11";
}

/* =====================================================================
   ====================  DARK-FIRST MINIMAL THEME  =====================
   Overrides całej palety + redukcja ozdobników. Typografia pierwsze miejsce.
   Light mode jest opcjonalny przez [data-theme="light"].
   ===================================================================== */

:root[data-theme="dark"] {
  color-scheme: dark;

  /* Surface ladder */
  --bg: #0a0a0a;
  --surface: #0f0f0f;
  --surface-2: #141414;
  --surface-3: #1a1a1a;

  /* Lines */
  --line: #1f1f1f;
  --line-strong: #2a2a2a;
  --line-soft: #1a1a1a;

  /* Text */
  --ink: #fafafa;
  --ink-display: #ffffff;
  --ink-soft: #a1a1aa;
  --muted: #71717a;
  --dim: #52525b;

  /* Single accent (zielony, vivid na dark) */
  --brand: #10b981;
  --brand-dark: #059669;
  --brand-2: #34d399;
  --brand-soft: rgba(16, 185, 129, 0.10);
  --brand-glow: rgba(16, 185, 129, 0.3);

  /* Sand accent — neutralny */
  --sand: #d4d4d8;
  --sand-deep: #a1a1aa;

  --paper: #fafafa;

  --shadow: 0 1px 0 rgba(255,255,255,0.04);
  --shadow-lift: 0 1px 0 rgba(255,255,255,0.04), 0 12px 32px rgba(0,0,0,0.6);
}

:root[data-theme="dark"] body {
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Portal shell - usuń jasne tło i wszystkie radialne gradienty */
/* WAŻNE: portal-shell w light wersji ustawia własne CSS custom properties
   (--ink-display: #0c1a1f itp.). Musimy je nadpisać w dark, inaczej cały
   portal nadal czyta light variants mimo dark root. */
:root[data-theme="dark"] .portal-shell {
  --brand: #10b981;
  --brand-dark: #059669;
  --brand-2: #34d399;
  --brand-soft: rgba(16, 185, 129, 0.10);
  --sand: #d4d4d8;
  --sand-deep: #a1a1aa;
  --ink-display: #ffffff;
  --ink-soft: #a1a1aa;
  --line-soft: #1a1a1a;
  --paper: #fafafa;
  background: var(--bg);
  color: var(--ink);
}

:root[data-theme="dark"] .portal-shell::before {
  display: none;
}

/* Header - sticky, blur, tylko cienka linia */
:root[data-theme="dark"] .portal-header {
  background: rgba(10, 10, 10, 0.72);
  border-bottom: 1px solid var(--line);
}

:root[data-theme="dark"] .portal-shell .portal-brand {
  color: var(--ink);
}

:root[data-theme="dark"] .portal-shell .portal-brand .brand-mark {
  background: var(--ink-display);
  color: #0a0a0a;
  box-shadow: none;
  font-weight: 800;
}

:root[data-theme="dark"] .portal-shell .portal-brand strong { color: var(--ink); }
:root[data-theme="dark"] .portal-shell .portal-brand small { color: var(--muted); }

:root[data-theme="dark"] .portal-nav a {
  color: var(--ink-soft);
}

:root[data-theme="dark"] .portal-nav a:hover,
:root[data-theme="dark"] .portal-nav a.active {
  color: var(--ink);
  background: transparent;
}

:root[data-theme="dark"] .portal-nav a.active::after {
  background: var(--brand);
}

:root[data-theme="dark"] .portal-shell .portal-login-link {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

:root[data-theme="dark"] .portal-shell .portal-login-link:hover {
  border-color: var(--ink-soft);
  background: transparent;
  color: var(--ink);
}

:root[data-theme="dark"] .portal-shell .portal-cta-link {
  background: var(--ink-display);
  color: #0a0a0a !important;
  box-shadow: none;
}

:root[data-theme="dark"] .portal-shell .portal-cta-link:hover {
  background: var(--brand);
  color: var(--ink-display) !important;
}

/* Banner */
:root[data-theme="dark"] .portal-announcement {
  background: var(--surface-2);
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}

:root[data-theme="dark"] .portal-announcement-free {
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.005em;
  animation: none;
  border-bottom: 1px solid var(--line);
}

:root[data-theme="dark"] .portal-announcement-free .dot {
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

/* HERO - minimal, typografia first */

:root[data-theme="dark"] .hero-aurora {
  display: none;
}

:root[data-theme="dark"] .product-hero.hero-v3 {
  padding: 24px 0 0;
  background: transparent;
}

:root[data-theme="dark"] .hero-kicker {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  padding: 6px 12px;
}

:root[data-theme="dark"] .hero-kicker .dot {
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

:root[data-theme="dark"] .portal-shell .hero-v3 .hero-title,
:root[data-theme="dark"] .hero-title {
  background: none !important;
  -webkit-text-fill-color: var(--ink-display) !important;
  color: var(--ink-display) !important;
  letter-spacing: -0.04em;
  font-weight: 700;
}

/* Force-disable starych gradient text effects gdy dark */
:root[data-theme="dark"] .counter strong {
  background: none !important;
  -webkit-text-fill-color: var(--ink-display) !important;
}

:root[data-theme="dark"] .hero-rotator {
  color: var(--ink-display);
  font-weight: 600;
}

:root[data-theme="dark"] .portal-shell .hero-v3 .hero-lede {
  color: var(--ink-soft);
}

:root[data-theme="dark"] .hero-stats {
  border-top-color: var(--line);
}

:root[data-theme="dark"] .hero-stats > div + div {
  border-left-color: var(--line);
}

:root[data-theme="dark"] .hero-stats dt {
  color: var(--muted);
}

:root[data-theme="dark"] .hero-stats dd {
  color: var(--ink);
}

/* Document mockup w hero - na ciemnym minimalnie */

:root[data-theme="dark"] .doc-paper {
  background: var(--surface-2);
  border-color: var(--line-strong);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04),
    0 24px 60px rgba(0,0,0,0.6),
    -16px 30px 70px rgba(16, 185, 129, 0.06);
}

:root[data-theme="dark"] .doc-paper::before {
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-2) 100%);
  height: 2px;
  border-radius: 0;
}

:root[data-theme="dark"] .doc-head { border-bottom-color: var(--line); }
:root[data-theme="dark"] .doc-mark {
  background: var(--ink-display);
  color: #0a0a0a;
}

:root[data-theme="dark"] .doc-meta strong { color: var(--muted); }
:root[data-theme="dark"] .doc-meta span { color: var(--ink); }

:root[data-theme="dark"] .doc-ksef {
  background: var(--brand-soft);
  color: var(--brand-2);
}

:root[data-theme="dark"] .doc-parties small { color: var(--muted); }
:root[data-theme="dark"] .doc-parties strong { color: var(--ink); }
:root[data-theme="dark"] .doc-parties span { color: var(--ink-soft); }

:root[data-theme="dark"] .doc-items th {
  color: var(--muted);
  border-bottom-color: var(--line);
}

:root[data-theme="dark"] .doc-items td {
  color: var(--ink);
  border-bottom-color: var(--line);
}

:root[data-theme="dark"] .doc-items td:nth-child(2),
:root[data-theme="dark"] .doc-items td:nth-child(3),
:root[data-theme="dark"] .doc-items td:nth-child(4) {
  color: var(--ink-soft);
}

:root[data-theme="dark"] .doc-items td:nth-child(4) { color: var(--ink); }

:root[data-theme="dark"] .doc-summary {
  background: linear-gradient(180deg, rgba(16,185,129,0.05), transparent);
}

:root[data-theme="dark"] .doc-summary-row { color: var(--ink-soft); }
:root[data-theme="dark"] .doc-summary-row strong { color: var(--ink); }
:root[data-theme="dark"] .doc-summary-row.doc-total span { color: var(--ink); }
:root[data-theme="dark"] .doc-summary-row.doc-total strong { color: var(--brand-2); }
:root[data-theme="dark"] .doc-summary-row.doc-total { border-top-color: var(--line-strong); }

:root[data-theme="dark"] .doc-floater {
  background: var(--surface-3);
  border-color: var(--line-strong);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

/* Buttons - minimal: białe primary, outline secondary */

:root[data-theme="dark"] .portal-shell .button.primary {
  background: var(--ink-display);
  border-color: var(--ink-display);
  color: #0a0a0a;
  box-shadow: none;
  font-weight: 600;
}

:root[data-theme="dark"] .portal-shell .button.primary:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--ink-display);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--brand-glow);
}

:root[data-theme="dark"] .portal-shell .button.secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

:root[data-theme="dark"] .portal-shell .button.secondary:hover {
  border-color: var(--ink-soft);
  color: var(--ink);
  background: transparent;
}

:root[data-theme="dark"] .portal-shell .button.ghost {
  color: var(--ink-soft);
}

:root[data-theme="dark"] .portal-shell .button.ghost:hover {
  color: var(--ink);
  background: transparent;
}

:root[data-theme="dark"] .button.shimmer::after {
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
}

/* Counter strip - minimal numbers */

:root[data-theme="dark"] .counter-strip-inner {
  background: var(--surface-2);
  border-color: var(--line);
  box-shadow: none;
  border-radius: 4px;
}

:root[data-theme="dark"] .counter strong {
  background: none;
  -webkit-text-fill-color: var(--ink-display);
  color: var(--ink-display);
}

:root[data-theme="dark"] .counter span { color: var(--muted); }
:root[data-theme="dark"] .counter + .counter { border-left-color: var(--line); }

/* Proof bar */

:root[data-theme="dark"] .proof-label { color: var(--muted); }

:root[data-theme="dark"] .proof-track span {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-soft);
}

/* Showcase tabs */

:root[data-theme="dark"] .showcase-tabs {
  background: var(--surface-2);
  border-color: var(--line);
  box-shadow: none;
}

:root[data-theme="dark"] .showcase-tabs button {
  color: var(--muted);
}

:root[data-theme="dark"] .showcase-tabs button:hover { color: var(--ink); }

:root[data-theme="dark"] .showcase-tabs button.active {
  background: var(--ink-display);
  color: #0a0a0a;
  box-shadow: none;
}

:root[data-theme="dark"] .showcase-stage {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
}

:root[data-theme="dark"] .mock-shell {
  background: var(--surface-2);
  border-color: var(--line);
}

:root[data-theme="dark"] .mock-shell-header {
  background: var(--surface-3);
  border-bottom-color: var(--line);
}

:root[data-theme="dark"] .mock-shell-header strong { color: var(--muted); }

:root[data-theme="dark"] .mock-search {
  background: var(--surface-3);
  border-color: var(--line);
  color: var(--ink);
}

:root[data-theme="dark"] .mock-pill {
  background: var(--surface-3);
  color: var(--ink-soft);
}

:root[data-theme="dark"] .mock-pill.mock-pill-active {
  background: var(--brand);
  color: var(--ink-display);
}

:root[data-theme="dark"] .mock-action {
  background: var(--ink-display);
  color: #0a0a0a;
}

:root[data-theme="dark"] .mock-table-rich th {
  color: var(--muted);
  border-bottom-color: var(--line);
}

:root[data-theme="dark"] .mock-table-rich td {
  color: var(--ink);
  border-bottom-color: var(--line);
}

:root[data-theme="dark"] .mock-tag { background: var(--surface-3); color: var(--ink-soft); }
:root[data-theme="dark"] .mock-tag.tag-accepted { background: var(--brand-soft); color: var(--brand-2); }
:root[data-theme="dark"] .mock-tag.tag-queued { background: rgba(217, 119, 6, 0.16); color: #f59e0b; }
:root[data-theme="dark"] .mock-tag.tag-paid { background: var(--brand-soft); color: var(--brand-2); }
:root[data-theme="dark"] .mock-tag.tag-sent { background: rgba(59, 130, 246, 0.16); color: #60a5fa; }
:root[data-theme="dark"] .mock-tag.tag-overdue { background: rgba(239, 68, 68, 0.16); color: #f87171; }

:root[data-theme="dark"] .mock-link { color: var(--brand-2); }
:root[data-theme="dark"] .mock-late { color: #f87171; }

:root[data-theme="dark"] .mock-ksef-card {
  background: var(--surface-3);
  border-color: var(--line);
}

:root[data-theme="dark"] .mock-ksef-card.mock-ksef-card-ok {
  background: var(--surface-3);
  border-color: rgba(16, 185, 129, 0.3);
}

:root[data-theme="dark"] .mock-ksef-card span { color: var(--muted); }
:root[data-theme="dark"] .mock-ksef-card strong { color: var(--ink); }
:root[data-theme="dark"] .mock-ksef-card small { color: var(--ink-soft); }
:root[data-theme="dark"] .mock-ksef-card.mock-ksef-card-ok strong { color: var(--brand-2); }

:root[data-theme="dark"] .mock-ksef-event {
  background: var(--surface-3);
  border-left-color: var(--line-strong);
}

:root[data-theme="dark"] .mock-ksef-event.ok { border-left-color: var(--brand); }
:root[data-theme="dark"] .mock-ksef-event strong { color: var(--muted); }
:root[data-theme="dark"] .mock-ksef-event span { color: var(--ink); }
:root[data-theme="dark"] .mock-ksef-event code {
  background: rgba(255,255,255,0.04);
  color: var(--ink-soft);
}

:root[data-theme="dark"] .mock-pay-card {
  background: var(--surface-3);
  border-color: var(--line);
}

:root[data-theme="dark"] .mock-pay-card.mock-pay-card-warn {
  background: var(--surface-3);
  border-color: rgba(239, 68, 68, 0.3);
}

:root[data-theme="dark"] .mock-pay-card span { color: var(--muted); }
:root[data-theme="dark"] .mock-pay-card strong { color: var(--ink); }
:root[data-theme="dark"] .mock-pay-card.mock-pay-card-warn strong { color: #f87171; }

:root[data-theme="dark"] .mock-report-card {
  background: var(--surface-3);
  border-color: var(--line);
}

:root[data-theme="dark"] .mock-report-card span { color: var(--muted); }
:root[data-theme="dark"] .mock-report-card strong { color: var(--ink); }
:root[data-theme="dark"] .mock-report-card small { color: var(--brand-2); }

:root[data-theme="dark"] .mock-bars i { background: linear-gradient(to top, var(--brand-dark), var(--brand)); }

:root[data-theme="dark"] .mock-donut {
  background: conic-gradient(var(--brand) 0 var(--pct), var(--surface-2) var(--pct) 100%);
}

:root[data-theme="dark"] .mock-donut::before { background: var(--surface-3); }
:root[data-theme="dark"] .mock-donut span { color: var(--ink); }
:root[data-theme="dark"] .mock-stack { background: var(--surface-2); }

/* Public proof */

:root[data-theme="dark"] .portal-shell .portal-section {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
  border-radius: 8px;
}

:root[data-theme="dark"] .portal-shell .public-proof {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
}

:root[data-theme="dark"] .portal-shell .public-proof h2 { color: var(--ink-display); }
:root[data-theme="dark"] .portal-shell .public-proof p { color: var(--ink-soft); }
:root[data-theme="dark"] .portal-shell .public-proof .eyebrow { color: var(--brand-2); }

:root[data-theme="dark"] .proof-list span {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

:root[data-theme="dark"] .proof-list span:hover {
  background: var(--surface-3);
  border-color: var(--ink-soft);
}

/* Capability cards */

:root[data-theme="dark"] .portal-shell .portal-card.capability-card {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
  border-radius: 8px;
}

:root[data-theme="dark"] .portal-shell .portal-card.capability-card:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

:root[data-theme="dark"] .capability-num {
  background: var(--surface-3);
  color: var(--brand-2);
}

:root[data-theme="dark"] .portal-shell .capability-card h3 { color: var(--ink); }
:root[data-theme="dark"] .portal-shell .capability-card p { color: var(--ink-soft); }

:root[data-theme="dark"] .eyebrow { color: var(--brand-2); }
:root[data-theme="dark"] .portal-shell .public-title h2 { color: var(--ink-display); }
:root[data-theme="dark"] .section-title.public-title.centered p.muted { color: var(--ink-soft); }

/* CTA band - utrzymujemy ciemny ale bez pulsujących animacji */

:root[data-theme="dark"] .cta-band {
  background:
    linear-gradient(135deg, var(--surface-2) 0%, var(--surface-3) 100%);
  border: 1px solid var(--line);
  box-shadow: none;
  animation: none;
}

:root[data-theme="dark"] .cta-band::before { display: none; }
:root[data-theme="dark"] .cta-band h2 { color: var(--ink-display); }
:root[data-theme="dark"] .cta-band p { color: var(--ink-soft); }
:root[data-theme="dark"] .cta-band .button.primary {
  background: var(--ink-display);
  color: #0a0a0a;
  border-color: var(--ink-display);
}

:root[data-theme="dark"] .cta-band .button.primary:hover {
  background: var(--brand);
  color: var(--ink-display);
  border-color: var(--brand);
}

:root[data-theme="dark"] .portal-shell .button.ghost-light {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

:root[data-theme="dark"] .portal-shell .button.ghost-light:hover {
  border-color: var(--ink-soft);
  background: transparent;
}

/* Pricing */

:root[data-theme="dark"] .pricing-card {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
  border-radius: 8px;
}

:root[data-theme="dark"] .pricing-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
}

:root[data-theme="dark"] .pricing-card-featured {
  border-color: var(--brand);
  background: linear-gradient(180deg, rgba(16,185,129,0.06) 0%, var(--surface) 30%);
  box-shadow: 0 1px 0 var(--line), 0 16px 40px rgba(16,185,129,0.08);
}

:root[data-theme="dark"] .pricing-flag {
  background: var(--brand);
  color: var(--ink-display);
  animation: none;
  box-shadow: none;
}

:root[data-theme="dark"] .pricing-card header { border-bottom-color: var(--line); }
:root[data-theme="dark"] .pricing-label { color: var(--brand-2); }
:root[data-theme="dark"] .pricing-tagline { color: var(--ink-soft); }
:root[data-theme="dark"] .pricing-price strong { color: var(--ink-display); }
:root[data-theme="dark"] .pricing-price span { color: var(--ink-soft); }
:root[data-theme="dark"] .pricing-features li { color: var(--ink); }

:root[data-theme="dark"] .pricing-features li::before {
  background: var(--brand);
}

:root[data-theme="dark"] .pricing-features li::after { border-color: #0a0a0a; }

:root[data-theme="dark"] .pricing-extra .pricing-note,
:root[data-theme="dark"] .pricing-extra .pricing-faq {
  background: var(--surface);
  border-color: var(--line);
  border-radius: 8px;
}

:root[data-theme="dark"] .pricing-note h3 { color: var(--ink); }
:root[data-theme="dark"] .pricing-note p,
:root[data-theme="dark"] .pricing-faq summary { color: var(--ink); }
:root[data-theme="dark"] .pricing-faq details p { color: var(--ink-soft); }
:root[data-theme="dark"] .pricing-faq details { border-top-color: var(--line); }
:root[data-theme="dark"] .pricing-faq summary::after { color: var(--brand-2); }

/* How it works */

:root[data-theme="dark"] .step-card {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
  border-radius: 8px;
}

:root[data-theme="dark"] .step-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
}

:root[data-theme="dark"] .step-icon {
  background: var(--surface-3);
  color: var(--brand);
}

:root[data-theme="dark"] .step-num { color: var(--brand-2); }
:root[data-theme="dark"] .step-card h3 { color: var(--ink); }
:root[data-theme="dark"] .step-card p { color: var(--ink-soft); }

:root[data-theme="dark"] .steps-grid::before {
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 14px);
}

/* Bento - minimal, jednolity ciemny */

:root[data-theme="dark"] .bento-cell {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
  border-radius: 8px;
}

:root[data-theme="dark"] .bento-cell:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
}

:root[data-theme="dark"] .bento-tag {
  background: var(--brand-soft);
  color: var(--brand-2);
}

:root[data-theme="dark"] .bento-cell h3 { color: var(--ink-display); }
:root[data-theme="dark"] .bento-cell p { color: var(--ink-soft); }

:root[data-theme="dark"] .bento-icon {
  background: var(--surface-3);
  color: var(--brand);
}

:root[data-theme="dark"] .bento-stats {
  border-top-color: var(--line);
}

:root[data-theme="dark"] .bento-stats strong { color: var(--ink-display); }
:root[data-theme="dark"] .bento-stats span { color: var(--muted); }

/* Te warianty (warm, dark, accent) - sprowadzamy do jednolitego minimalizmu */

:root[data-theme="dark"] .bento-large.bento-accent {
  background: var(--surface);
  border-color: var(--line-strong);
}

:root[data-theme="dark"] .bento-dark {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
}

:root[data-theme="dark"] .bento-dark h3 { color: var(--ink-display); }
:root[data-theme="dark"] .bento-dark p { color: var(--ink-soft); }
:root[data-theme="dark"] .bento-dark .bento-icon {
  background: var(--surface-3);
  color: var(--brand);
}

:root[data-theme="dark"] .bento-warm {
  background: var(--surface);
  border-color: var(--line);
}

:root[data-theme="dark"] .bento-warm .bento-icon {
  background: var(--surface-3);
  color: var(--brand);
}

:root[data-theme="dark"] .ksef-visual {
  background: var(--surface-3);
  border-color: var(--line);
}

:root[data-theme="dark"] .ksef-visual-row { background: var(--surface-2); }
:root[data-theme="dark"] .ksef-visual-row strong { color: var(--ink); }
:root[data-theme="dark"] .ksef-visual-row em { color: var(--muted); }
:root[data-theme="dark"] .ksef-visual-ok span { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* Integrations */

:root[data-theme="dark"] .integration-card {
  background: var(--surface);
  border-color: var(--line);
  border-radius: 8px;
}

:root[data-theme="dark"] .integration-card:hover {
  border-color: var(--line-strong);
}

:root[data-theme="dark"] .integration-mark {
  background: var(--surface-3);
  color: var(--brand-2);
}

:root[data-theme="dark"] .integration-card strong { color: var(--ink); }
:root[data-theme="dark"] .integration-card span { color: var(--ink-soft); }

/* FAQ */

:root[data-theme="dark"] .faq-list { border-top-color: var(--line); }
:root[data-theme="dark"] .faq-item { border-bottom-color: var(--line); }
:root[data-theme="dark"] .faq-item summary { color: var(--ink-display); }
:root[data-theme="dark"] .faq-item summary::after {
  background: var(--surface-3);
  color: var(--brand-2);
}

:root[data-theme="dark"] .faq-item[open] summary::after {
  background: var(--brand);
  color: var(--ink-display);
}

:root[data-theme="dark"] .faq-item p { color: var(--ink-soft); }
:root[data-theme="dark"] .faq-header h2 { color: var(--ink-display); }
:root[data-theme="dark"] .faq-header p { color: var(--ink-soft); }
:root[data-theme="dark"] .faq-header a { color: var(--brand-2); }

/* Changelog */

:root[data-theme="dark"] .changelog-list {
  border-left-color: var(--line-strong);
}

:root[data-theme="dark"] .changelog-item { border-bottom-color: var(--line); }

:root[data-theme="dark"] .changelog-item::before {
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--brand-soft);
}

:root[data-theme="dark"] .changelog-date { color: var(--muted); }
:root[data-theme="dark"] .changelog-item h3 { color: var(--ink); }
:root[data-theme="dark"] .changelog-item p { color: var(--ink-soft); }

/* Newsletter */

:root[data-theme="dark"] .newsletter-card {
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-3) 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
}

:root[data-theme="dark"] .newsletter-card::before { display: none; }
:root[data-theme="dark"] .newsletter-card h3 { color: var(--ink-display); }
:root[data-theme="dark"] .newsletter-card p { color: var(--ink-soft); }

:root[data-theme="dark"] .newsletter-form input {
  background: var(--surface-3);
  border-color: var(--line);
  color: var(--ink);
}

:root[data-theme="dark"] .newsletter-form input:focus {
  border-color: var(--brand);
  background: var(--surface-3);
}

:root[data-theme="dark"] .newsletter-form input::placeholder { color: var(--muted); }
:root[data-theme="dark"] .newsletter-success {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--ink);
}

/* Comparison */

:root[data-theme="dark"] .comparison-card {
  background: var(--surface);
  border-color: var(--line);
  border-radius: 8px;
}

:root[data-theme="dark"] .comparison-card.before {
  background: var(--surface-2);
}

:root[data-theme="dark"] .comparison-card.after {
  background: var(--surface);
  border-color: var(--brand);
}

:root[data-theme="dark"] .comparison-card.before .comparison-label {
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
}

:root[data-theme="dark"] .comparison-card.after .comparison-label {
  background: var(--brand-soft);
  color: var(--brand-2);
}

:root[data-theme="dark"] .comparison-card h3 { color: var(--ink-display); }
:root[data-theme="dark"] .comparison-card.before li { color: var(--muted); }
:root[data-theme="dark"] .comparison-card.before li::before { background: rgba(239,68,68,0.16); }
:root[data-theme="dark"] .comparison-card.before li::after { color: #f87171; }
:root[data-theme="dark"] .comparison-card.after li { color: var(--ink); }
:root[data-theme="dark"] .comparison-card.after li::before {
  background: var(--brand);
}
:root[data-theme="dark"] .comparison-card.after li::after { border-color: #0a0a0a; }

/* Testimonials */

:root[data-theme="dark"] .testimonial {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
  border-radius: 8px;
}

:root[data-theme="dark"] .testimonial:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
}

:root[data-theme="dark"] .testimonial::before { color: var(--surface-3); }
:root[data-theme="dark"] .testimonial-quote { color: var(--ink); }
:root[data-theme="dark"] .testimonial-avatar {
  background: var(--surface-3);
  color: var(--brand-2);
  font-weight: 700;
}

:root[data-theme="dark"] .testimonial footer strong { color: var(--ink); }
:root[data-theme="dark"] .testimonial footer span { color: var(--muted); }

/* Footer */

:root[data-theme="dark"] .portal-shell .portal-footer {
  background: var(--bg);
  border-top-color: var(--line);
  color: var(--ink-soft);
}

:root[data-theme="dark"] .portal-shell .portal-footer .portal-brand .brand-mark {
  background: var(--ink-display);
  color: #0a0a0a;
}

:root[data-theme="dark"] .portal-shell .portal-footer .portal-brand strong { color: var(--ink); }
:root[data-theme="dark"] .portal-shell .portal-footer .portal-brand small { color: var(--muted); }
:root[data-theme="dark"] .portal-shell .portal-footer .footer-brand p { color: var(--ink-soft); }
:root[data-theme="dark"] .portal-shell .portal-footer h4 { color: var(--muted); }
:root[data-theme="dark"] .portal-shell .portal-footer nav a { color: var(--ink-soft); }
:root[data-theme="dark"] .portal-shell .portal-footer nav a:hover { color: var(--ink); }
:root[data-theme="dark"] .portal-footer-base {
  border-top-color: var(--line);
  color: var(--muted);
}

/* Auth */

:root[data-theme="dark"] .portal-shell .auth-copy-card,
:root[data-theme="dark"] .portal-shell .auth-page .auth-card {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
  border-radius: 8px;
}

:root[data-theme="dark"] .portal-shell .auth-copy-card h2 { color: var(--ink-display); }
:root[data-theme="dark"] .portal-shell .auth-copy-card p { color: var(--ink-soft); }
:root[data-theme="dark"] .portal-shell .auth-points span {
  background: var(--surface-3);
  border-color: var(--line);
  color: var(--ink-soft);
}

/* Inputs / fields generic */

:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field select,
:root[data-theme="dark"] .field textarea {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
}

:root[data-theme="dark"] .field input:focus,
:root[data-theme="dark"] .field select:focus,
:root[data-theme="dark"] .field textarea:focus {
  border-color: var(--brand);
  outline: 2px solid var(--brand-soft);
  outline-offset: -1px;
}

:root[data-theme="dark"] .field span { color: var(--muted); }

/* Wyłącz animacje "ozdobnikowe" */

:root[data-theme="dark"] .doc-floater-status,
:root[data-theme="dark"] .doc-floater-payment,
:root[data-theme="dark"] .pricing-card-featured .pricing-flag,
:root[data-theme="dark"] .ksef-session.idle .button.primary,
:root[data-theme="dark"] .cta-band,
:root[data-theme="dark"] .portal-announcement-free,
:root[data-theme="dark"] .proof-track {
  animation-duration: 0s, 0s;
}

:root[data-theme="dark"] .doc-floater-status,
:root[data-theme="dark"] .doc-floater-payment {
  animation: none;
}

/* Marquee proof - wolniej i subtelniej */
:root[data-theme="dark"] .proof-track {
  animation: proof-scroll 60s linear infinite;
}

/* Scrollbar (WebKit) */

:root[data-theme="dark"] ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

:root[data-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--bg);
}

:root[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}

:root[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* Reset border-radii do bardziej minimalnych (8px zamiast 18px) */
:root[data-theme="dark"] .portal-section,
:root[data-theme="dark"] .page-intro,
:root[data-theme="dark"] .pricing-card,
:root[data-theme="dark"] .testimonial,
:root[data-theme="dark"] .step-card,
:root[data-theme="dark"] .bento-cell,
:root[data-theme="dark"] .integration-card,
:root[data-theme="dark"] .pricing-faq,
:root[data-theme="dark"] .pricing-note,
:root[data-theme="dark"] .auth-card,
:root[data-theme="dark"] .auth-copy-card,
:root[data-theme="dark"] .comparison-card,
:root[data-theme="dark"] .showcase-stage,
:root[data-theme="dark"] .counter-strip-inner {
  border-radius: 8px;
}

/* ========= TOGGLE THEME ========= */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
  margin-left: 4px;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--ink-soft);
}

.theme-toggle svg {
  width: 14px;
  height: 14px;
}

/* =====================================================================
   ============  DARK THEME — APP SHELL (PO ZALOGOWANIU)  ==============
   Cały panel: sidebar, topbar, main, panele, tabele, formularze, KSeF,
   admin command center. Minimalistyczna paleta, jeden akcent emerald.
   ===================================================================== */

:root[data-theme="dark"] body { background: var(--bg); color: var(--ink); }

:root[data-theme="dark"] .app-shell {
  background: var(--bg);
  color: var(--ink);
}

/* Sidebar - czarny, emerald active marker, minimal */

:root[data-theme="dark"] .sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  color: var(--ink);
}

:root[data-theme="dark"] .brand {
  border-bottom-color: var(--line);
}

:root[data-theme="dark"] .brand-mark {
  background: var(--ink-display);
  color: #0a0a0a;
}

:root[data-theme="dark"] .brand strong { color: var(--ink); }
:root[data-theme="dark"] .brand span { color: var(--muted); }

:root[data-theme="dark"] .nav button {
  color: var(--ink-soft);
  font-weight: 500;
  letter-spacing: -0.005em;
}

:root[data-theme="dark"] .nav button:hover {
  background: var(--surface-2);
  color: var(--ink);
}

:root[data-theme="dark"] .nav button.active {
  background: var(--surface-2);
  color: var(--ink-display);
  box-shadow: inset 2px 0 0 var(--brand);
}

:root[data-theme="dark"] .nav .icon {
  background: var(--surface-3);
  color: var(--brand-2);
  font-size: 11px;
  font-weight: 700;
}

:root[data-theme="dark"] .sidebar-note {
  border-color: var(--line);
  color: var(--ink-soft);
  background: var(--surface-2);
}

:root[data-theme="dark"] .sidebar-note .dot {
  background: var(--brand);
}

/* Workspace + topbar */

:root[data-theme="dark"] .workspace {
  background: var(--bg);
}

:root[data-theme="dark"] .topbar {
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

:root[data-theme="dark"] .eyebrow {
  color: var(--muted);
}

:root[data-theme="dark"] .topbar-title h1 {
  color: var(--ink-display);
  letter-spacing: -0.015em;
  font-weight: 600;
}

:root[data-theme="dark"] .topbar-title .eyebrow {
  color: var(--brand-2);
  letter-spacing: 0.12em;
}

:root[data-theme="dark"] .icon-button {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

:root[data-theme="dark"] .icon-button:hover {
  border-color: var(--ink-soft);
}

/* Buttons w app — spójne z portalu */

:root[data-theme="dark"] .button {
  border-radius: 7px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

:root[data-theme="dark"] .button.primary {
  background: var(--ink-display);
  border-color: var(--ink-display);
  color: #0a0a0a;
  box-shadow: none;
}

:root[data-theme="dark"] .button.primary:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--ink-display);
}

:root[data-theme="dark"] .button.secondary {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--ink);
}

:root[data-theme="dark"] .button.secondary:hover {
  border-color: var(--ink-soft);
  background: var(--surface-3);
}

:root[data-theme="dark"] .button.text {
  color: var(--brand-2);
  background: transparent;
}

:root[data-theme="dark"] .button.text:hover {
  background: var(--surface-2);
  color: var(--brand);
}

:root[data-theme="dark"] .button.danger {
  background: transparent;
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

:root[data-theme="dark"] .button.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #f87171;
}

/* Main background and panels */

:root[data-theme="dark"] .main {
  background: var(--bg);
  color: var(--ink);
}

:root[data-theme="dark"] .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
  color: var(--ink);
}

:root[data-theme="dark"] .panel.inset {
  background: var(--surface-2);
}

:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] h4 {
  color: var(--ink-display);
  letter-spacing: -0.01em;
}

:root[data-theme="dark"] h2 { font-weight: 600; }

:root[data-theme="dark"] .section-title h2 { color: var(--ink-display); }
:root[data-theme="dark"] .section-title p { color: var(--ink-soft); }

:root[data-theme="dark"] .muted { color: var(--muted); }
:root[data-theme="dark"] code {
  background: var(--surface-2);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

/* Metric card - minimal */

:root[data-theme="dark"] .metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: none;
}

:root[data-theme="dark"] .metric span,
:root[data-theme="dark"] .metric small {
  color: var(--muted);
}

:root[data-theme="dark"] .metric strong {
  color: var(--ink-display);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.015em;
}

:root[data-theme="dark"] .metric.metric-ok strong { color: var(--brand-2); }
:root[data-theme="dark"] .metric.metric-warn strong { color: #f59e0b; }

/* Activity / activity-item */

:root[data-theme="dark"] .activity {
  display: grid;
  gap: 0;
}

:root[data-theme="dark"] .activity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
}

:root[data-theme="dark"] .activity-item:last-child { border-bottom: 0; }

:root[data-theme="dark"] .activity-item span {
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

:root[data-theme="dark"] .activity-item strong {
  color: var(--ink);
  font-weight: 600;
}

/* Tables */

:root[data-theme="dark"] table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
}

:root[data-theme="dark"] thead th {
  padding: 12px 14px;
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

:root[data-theme="dark"] thead th.num { text-align: right; }

:root[data-theme="dark"] tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13.5px;
}

:root[data-theme="dark"] tbody td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

:root[data-theme="dark"] tbody tr:hover {
  background: var(--surface-2);
}

:root[data-theme="dark"] tbody tr:last-child td { border-bottom: 0; }

:root[data-theme="dark"] .table-wrap {
  overflow-x: auto;
  margin: 0 -14px;
  padding: 0 14px;
}

/* Forms / fields */

:root[data-theme="dark"] .form-grid {
  display: grid;
  gap: 14px;
}

:root[data-theme="dark"] .form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:root[data-theme="dark"] .form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

:root[data-theme="dark"] .field {
  display: grid;
  gap: 6px;
}

:root[data-theme="dark"] .field.full { grid-column: 1 / -1; }

:root[data-theme="dark"] .field span {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
}

:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field select,
:root[data-theme="dark"] .field textarea,
:root[data-theme="dark"] input[type="text"],
:root[data-theme="dark"] input[type="email"],
:root[data-theme="dark"] input[type="password"],
:root[data-theme="dark"] input[type="number"],
:root[data-theme="dark"] input[type="date"],
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] select {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  font-size: 13.5px;
  font-family: inherit;
  transition: border-color .15s ease, background .15s ease;
}

:root[data-theme="dark"] .field input:focus,
:root[data-theme="dark"] .field select:focus,
:root[data-theme="dark"] .field textarea:focus,
:root[data-theme="dark"] input:focus,
:root[data-theme="dark"] textarea:focus,
:root[data-theme="dark"] select:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface-3);
}

:root[data-theme="dark"] .field input::placeholder,
:root[data-theme="dark"] .field textarea::placeholder {
  color: var(--dim);
}

:root[data-theme="dark"] .check-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}

:root[data-theme="dark"] .check-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

:root[data-theme="dark"] label.check-field.compact {
  font-size: 11.5px;
  color: var(--muted);
}

/* Status pills */

:root[data-theme="dark"] .status,
:root[data-theme="dark"] .tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--surface-3);
  color: var(--ink-soft);
}

:root[data-theme="dark"] .status.draft, :root[data-theme="dark"] .tag-draft { background: var(--surface-3); color: var(--muted); }
:root[data-theme="dark"] .status.issued, :root[data-theme="dark"] .tag-issued { background: rgba(59, 130, 246, 0.16); color: #60a5fa; }
:root[data-theme="dark"] .status.sent, :root[data-theme="dark"] .tag-sent { background: rgba(59, 130, 246, 0.16); color: #60a5fa; }
:root[data-theme="dark"] .status.paid, :root[data-theme="dark"] .tag-paid { background: var(--brand-soft); color: var(--brand-2); }
:root[data-theme="dark"] .status.overdue, :root[data-theme="dark"] .tag-overdue { background: rgba(239, 68, 68, 0.16); color: #f87171; }
:root[data-theme="dark"] .status.cancelled, :root[data-theme="dark"] .tag-cancelled { background: var(--surface-3); color: var(--muted); }
:root[data-theme="dark"] .status.queued, :root[data-theme="dark"] .tag-queued { background: rgba(217, 119, 6, 0.16); color: #f59e0b; }
:root[data-theme="dark"] .status.accepted, :root[data-theme="dark"] .tag-accepted { background: var(--brand-soft); color: var(--brand-2); }
:root[data-theme="dark"] .status.rejected, :root[data-theme="dark"] .tag-rejected { background: rgba(239, 68, 68, 0.16); color: #f87171; }

/* List / empty / toast */

:root[data-theme="dark"] .empty {
  padding: 40px 20px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
  font-size: 13.5px;
}

:root[data-theme="dark"] .toast {
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: 8px;
  padding: 14px 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}

/* Setup band - upraszczam */

:root[data-theme="dark"] .setup-band {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  margin-bottom: 18px;
}

:root[data-theme="dark"] .setup-progress { color: var(--ink-soft); font-size: 13px; }

:root[data-theme="dark"] .setup-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

:root[data-theme="dark"] .setup-steps span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 12.5px;
}

:root[data-theme="dark"] .setup-steps span.done {
  border-color: var(--brand-soft);
  background: var(--brand-soft);
  color: var(--brand-2);
}

/* KPI / metric / kpi-row */

:root[data-theme="dark"] .kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

/* Form section + heading */

:root[data-theme="dark"] .form-section {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  margin-bottom: 14px;
}

:root[data-theme="dark"] .form-section h3 {
  margin: 0 0 14px;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

/* Service hero - upraszczam */

:root[data-theme="dark"] .service-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  box-shadow: none;
}

:root[data-theme="dark"] .service-hero h2 { color: var(--ink-display); }
:root[data-theme="dark"] .service-hero p { color: var(--ink-soft); }
:root[data-theme="dark"] .service-hero .eyebrow { color: var(--brand-2); }

:root[data-theme="dark"] .service-status {
  background: var(--surface-2);
  border-color: var(--line);
}

:root[data-theme="dark"] .service-status span,
:root[data-theme="dark"] .service-status small,
:root[data-theme="dark"] .service-status strong {
  color: var(--ink);
}

:root[data-theme="dark"] .service-status span,
:root[data-theme="dark"] .service-status small {
  color: var(--muted);
}

/* Permission card - upraszczam */

:root[data-theme="dark"] .permission-card {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
  border-radius: 8px;
  min-height: auto;
  padding: 18px;
}

:root[data-theme="dark"] .permission-card h3 {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}

:root[data-theme="dark"] .permission-card p {
  color: var(--ink);
  font-size: 13.5px;
  margin: 0;
}

/* Workflow list / admin-flow */

:root[data-theme="dark"] .workflow-list { display: grid; gap: 0; }

:root[data-theme="dark"] .workflow-list div {
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
  padding: 12px 0;
}

:root[data-theme="dark"] .workflow-list div:last-child { border-bottom: 0; }

:root[data-theme="dark"] .workflow-list strong {
  color: var(--ink);
  font-weight: 600;
}

:root[data-theme="dark"] .workflow-list span {
  color: var(--ink-soft);
  font-size: 13px;
}

/* Inline / settings-grid */

:root[data-theme="dark"] .inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

:root[data-theme="dark"] .inline.wrap { flex-wrap: wrap; }

:root[data-theme="dark"] .settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

/* Print modal */

:root[data-theme="dark"] .print-modal {
  background: var(--bg);
}

:root[data-theme="dark"] .print-modal-toolbar {
  background: var(--surface);
  border-bottom-color: var(--line);
  box-shadow: none;
  color: var(--ink);
}

:root[data-theme="dark"] .print-modal-toolbar strong { color: var(--ink); }
:root[data-theme="dark"] .print-modal-toolbar span { color: var(--muted); }

:root[data-theme="dark"] .print-modal iframe {
  background: var(--paper);
  border: 0;
  box-shadow: 0 14px 36px rgba(0,0,0,0.6);
}

/* Command center w admin (już ma swoje style w dark mode wyżej, tu tylko backup) */

:root[data-theme="dark"] .admin-cmd-tabs {
  background: var(--surface);
  border-color: var(--line);
}

:root[data-theme="dark"] .admin-cmd-tabs button {
  color: var(--muted);
}

:root[data-theme="dark"] .admin-cmd-tabs button:hover {
  background: var(--surface-2);
  color: var(--ink);
}

:root[data-theme="dark"] .admin-cmd-tabs button.active {
  background: var(--ink-display);
  color: #0a0a0a;
}

:root[data-theme="dark"] .admin-cmd-hero {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line);
  box-shadow: none;
  color: var(--ink);
}

:root[data-theme="dark"] .admin-cmd-hero .eyebrow { color: var(--brand-2); }
:root[data-theme="dark"] .admin-cmd-hero h2 { color: var(--ink-display); }
:root[data-theme="dark"] .admin-cmd-hero p { color: var(--ink-soft); }

:root[data-theme="dark"] .admin-cmd-status {
  background: var(--surface-3);
  border-color: var(--line-strong);
}

:root[data-theme="dark"] .admin-cmd-status span { color: var(--muted); }
:root[data-theme="dark"] .admin-cmd-status strong { color: var(--ink); }
:root[data-theme="dark"] .admin-cmd-status small { color: var(--muted); }

:root[data-theme="dark"] .audit-recent-item {
  background: var(--surface);
  border-color: var(--line);
}

:root[data-theme="dark"] .audit-recent-item strong { color: var(--ink); }
:root[data-theme="dark"] .audit-recent-item span { color: var(--muted); }

:root[data-theme="dark"] .ext-row {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

:root[data-theme="dark"] .ext-row.ok strong { color: var(--brand-2); }
:root[data-theme="dark"] .ext-row.warn { background: rgba(217, 119, 6, 0.1); border-color: rgba(217, 119, 6, 0.3); }
:root[data-theme="dark"] .ext-row.warn strong { color: #f59e0b; }

:root[data-theme="dark"] .free-mode-panel {
  background: var(--surface);
  border-color: var(--line);
}

:root[data-theme="dark"] .free-mode-panel.active {
  background: linear-gradient(180deg, var(--brand-soft) 0%, var(--surface) 30%);
  border-color: var(--brand);
  box-shadow: 0 1px 0 var(--brand-soft);
}

:root[data-theme="dark"] .free-mode-panel.active::before {
  background: var(--brand);
}

:root[data-theme="dark"] .toggle-large {
  background: var(--surface-2);
  border: 1px solid var(--line);
}

:root[data-theme="dark"] .toggle-large strong { color: var(--ink); }
:root[data-theme="dark"] .toggle-large .toggle-track { background: var(--surface-3); }
:root[data-theme="dark"] .toggle-large input:checked + .toggle-track { background: var(--brand); }

:root[data-theme="dark"] .plans-editor .plan-editor-card {
  background: var(--surface);
  border-color: var(--line);
}

:root[data-theme="dark"] .plan-editor-card.featured {
  border-color: var(--brand);
  background: linear-gradient(180deg, var(--brand-soft) 0%, var(--surface) 30%);
}

/* Org rename input + inputs in tables */

:root[data-theme="dark"] .org-rename-input {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--ink);
}

:root[data-theme="dark"] tbody td input,
:root[data-theme="dark"] tbody td select {
  background: var(--surface-2);
  border-color: var(--line);
  font-size: 12.5px;
  padding: 6px 10px;
}

/* Notice — mute warning na dark */

:root[data-theme="dark"] .runtime-notice {
  padding: 14px 18px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--ink);
  font-size: 13.5px;
  margin-bottom: 14px;
}

:root[data-theme="dark"] .runtime-notice strong { color: #f87171; }

/* Compliance strip */

:root[data-theme="dark"] .compliance-strip {
  background: var(--surface-2);
  border-color: var(--line);
}

/* Auth mode (przed zalogowaniem - sidebar ukryty) - już obsłużone */

/* Drobne resety dla starych grid-cols */

:root[data-theme="dark"] .grid {
  display: grid;
  gap: 14px;
}

:root[data-theme="dark"] .grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:root[data-theme="dark"] .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
:root[data-theme="dark"] .grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 980px) {
  :root[data-theme="dark"] .grid.cols-2,
  :root[data-theme="dark"] .grid.cols-3,
  :root[data-theme="dark"] .grid.cols-4 {
    grid-template-columns: 1fr;
  }
}

/* Print preview overlay */

:root[data-theme="dark"] .ksef-result {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  color: var(--ink-soft);
  font-size: 12px;
}

:root[data-theme="dark"] .ksef-result pre {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-all;
}

/* Section title */

:root[data-theme="dark"] .section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

:root[data-theme="dark"] .section-title h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.005em;
}

:root[data-theme="dark"] .section-title p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

/* Activity cards in dashboard */

:root[data-theme="dark"] .news-list { display: grid; gap: 10px; }

:root[data-theme="dark"] .news-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  position: relative;
  box-shadow: none;
}

:root[data-theme="dark"] .news-item.important {
  border-left: 2px solid var(--brand);
}

:root[data-theme="dark"] .news-author {
  color: var(--muted);
}

:root[data-theme="dark"] .traffic-badge {
  background: var(--brand-soft);
  color: var(--brand-2);
}

:root[data-theme="dark"] .date {
  background: var(--surface-2);
  color: var(--muted);
}

/* Setup-progress bar */

:root[data-theme="dark"] .setup-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

:root[data-theme="dark"] .setup-close {
  background: transparent;
  color: var(--muted);
  border: 0;
  cursor: pointer;
  padding: 6px;
}

/* Wszystkie scrollbary w app */
:root[data-theme="dark"] .sidebar::-webkit-scrollbar,
:root[data-theme="dark"] .main::-webkit-scrollbar,
:root[data-theme="dark"] .table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

:root[data-theme="dark"] .sidebar::-webkit-scrollbar-track,
:root[data-theme="dark"] .main::-webkit-scrollbar-track {
  background: transparent;
}

:root[data-theme="dark"] .sidebar::-webkit-scrollbar-thumb,
:root[data-theme="dark"] .main::-webkit-scrollbar-thumb,
:root[data-theme="dark"] .table-wrap::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}

:root[data-theme="dark"] .sidebar::-webkit-scrollbar-thumb:hover,
:root[data-theme="dark"] .main::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* Force-clean: usuń stare gradient-em background body fallback */
:root[data-theme="dark"] body::before { display: none; }

/* Topbar actions w dark - dopasować */

:root[data-theme="dark"] .topbar-actions .button.secondary {
  font-weight: 600;
  font-size: 13px;
}

/* Sidebar mobile - na dark spójnie */

@media (max-width: 980px) {
  :root[data-theme="dark"] .app-shell.sidebar-open .sidebar-backdrop {
    background: rgba(0, 0, 0, 0.6);
  }
}

/* Wycofanie żółtych/gold akcentów które mogą zostać */

:root[data-theme="dark"] .nav button.active::before { display: none; }
:root[data-theme="dark"] .gold,
:root[data-theme="dark"] [class*="gold"] { color: var(--brand-2); }

/* Capability/panel cards w app context */

:root[data-theme="dark"] .panel.command-center {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

:root[data-theme="dark"] .command-center .section-title h2,
:root[data-theme="dark"] .command-center .section-title p {
  color: var(--ink);
}

:root[data-theme="dark"] .command-grid button {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink);
}

:root[data-theme="dark"] .command-grid button:hover {
  border-color: var(--brand);
  background: var(--surface-3);
}

:root[data-theme="dark"] .command-grid strong { color: var(--ink-display); }
:root[data-theme="dark"] .command-grid span { color: var(--ink-soft); }

/* =====================================================================
   Hero v4 - dramatyczne tło z noise + większy bold display
   ===================================================================== */

.portal-shell .hero-v3 .hero-title {
  font-size: clamp(44px, 5.6vw, 76px);
  letter-spacing: -0.034em;
  font-weight: 800;
  line-height: 0.98;
}

.portal-shell .hero-v3 .hero-lede {
  font-size: 19px;
  line-height: 1.5;
}

.hero-aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-repeat: repeat;
  opacity: 0.5;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero-doc {
  perspective: 1400px;
}

.hero-doc .doc-paper {
  transform: rotate(-1.2deg) rotateY(-3deg) rotateX(2deg);
  transform-style: preserve-3d;
  box-shadow:
    0 1px 1px rgba(12, 26, 31, 0.04),
    0 24px 50px rgba(12, 26, 31, 0.10),
    -16px 30px 60px rgba(11, 111, 106, 0.10),
    12px 20px 40px rgba(217, 195, 153, 0.10);
}

.hero-doc:hover .doc-paper {
  transform: rotate(-0.4deg) rotateY(-1deg) rotateX(1deg) translateY(-3px);
}

/* =====================================================================
   How it works - 4 steps
   ===================================================================== */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
  position: relative;
}

.steps-grid::before {
  content: "";
  position: absolute;
  top: 50px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(11, 111, 106, 0.4) 0 6px, transparent 6px 14px);
  z-index: 0;
}

.step-card {
  position: relative;
  z-index: 1;
  padding: 28px 22px 24px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(12, 26, 31, 0.08);
  box-shadow: 0 1px 1px rgba(12, 26, 31, 0.03), 0 14px 30px rgba(12, 26, 31, 0.06);
  transition: transform .25s ease, box-shadow .25s ease;
  text-align: left;
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 1px 1px rgba(12, 26, 31, 0.04), 0 24px 48px rgba(12, 26, 31, 0.10);
}

.step-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0b6f6a, #0d8079);
  color: #fff;
  margin-bottom: 14px;
}

.step-icon svg { width: 22px; height: 22px; }

.step-num {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0b6f6a;
  font-weight: 800;
  margin-bottom: 6px;
}

.step-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: -0.005em;
  color: #0c1a1f;
}

.step-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: #4a5b66;
}

@media (max-width: 980px) {
  .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps-grid::before { display: none; }
}

@media (max-width: 580px) {
  .steps-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   Bento grid features
   ===================================================================== */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 16px;
  margin-top: 32px;
}

.bento-cell {
  position: relative;
  padding: 28px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(12, 26, 31, 0.08);
  box-shadow: 0 1px 1px rgba(12, 26, 31, 0.03), 0 12px 28px rgba(12, 26, 31, 0.05);
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.bento-cell:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 1px rgba(12, 26, 31, 0.04), 0 22px 50px rgba(12, 26, 31, 0.10);
}

.bento-large { grid-column: span 4; grid-row: span 2; }
.bento-wide { grid-column: span 4; }
.bento-medium { grid-column: span 2; }

.bento-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(11, 111, 106, 0.14);
  color: #0b6f6a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
  width: fit-content;
}

.bento-cell h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: #0c1a1f;
}

.bento-large h3 { font-size: 26px; letter-spacing: -0.02em; }

.bento-cell p {
  margin: 0;
  color: #4a5b66;
  font-size: 14px;
  line-height: 1.5;
}

.bento-large p { font-size: 15px; max-width: 540px; }

.bento-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--brand-soft, #e7f3f1);
  color: #0b6f6a;
  margin-bottom: 4px;
}

.bento-icon svg { width: 20px; height: 20px; }

.bento-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.bento-stats {
  display: flex;
  gap: 28px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(12, 26, 31, 0.08);
}

.bento-stats div { min-width: 0; }

.bento-stats strong {
  display: block;
  font-size: 22px;
  letter-spacing: -0.015em;
  color: #0c1a1f;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.bento-stats span {
  font-size: 11.5px;
  color: #4a5b66;
}

.bento-large.bento-accent {
  background:
    linear-gradient(135deg, rgba(11, 111, 106, 0.06) 0%, rgba(217, 195, 153, 0.10) 100%),
    #fff;
  border-color: rgba(11, 111, 106, 0.18);
}

.bento-visual {
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 360px;
  max-width: 60%;
  opacity: 0.95;
  pointer-events: none;
}

.bento-dark {
  background: linear-gradient(135deg, #0c1a1f 0%, #143436 100%);
  color: #fff;
  border-color: #0c1a1f;
}

.bento-dark h3 { color: #fff; }
.bento-dark p { color: rgba(255, 255, 255, 0.72); }
.bento-dark .bento-icon {
  background: rgba(255, 255, 255, 0.08);
  color: #d9c399;
}

.bento-warm {
  background: linear-gradient(135deg, rgba(217, 195, 153, 0.18) 0%, #fff 70%);
  border-color: rgba(217, 195, 153, 0.4);
}

.bento-warm .bento-icon {
  background: rgba(217, 150, 28, 0.12);
  color: #b76200;
}

.ksef-visual {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(12, 26, 31, 0.03);
  border: 1px solid rgba(12, 26, 31, 0.06);
  font-size: 11.5px;
  transform: rotate(-2deg);
  width: 100%;
}

.ksef-visual-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 6px;
  background: #fff;
}

.ksef-visual-row span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
}

.ksef-visual-ok span { background: #0b6f6a; box-shadow: 0 0 0 3px rgba(11, 111, 106, 0.2); }
.ksef-visual-progress span { background: #d9961c; box-shadow: 0 0 0 3px rgba(217, 150, 28, 0.2); }

.ksef-visual-row strong { font-weight: 600; color: #0c1a1f; font-size: 11px; }
.ksef-visual-row em { font-style: normal; color: #4a5b66; font-size: 10.5px; }

@media (max-width: 1180px) {
  .bento-large, .bento-wide { grid-column: span 6; }
  .bento-medium { grid-column: span 3; }
  .bento-large { grid-row: auto; }
}

@media (max-width: 700px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-large, .bento-wide, .bento-medium { grid-column: span 1; }
  .bento-visual { display: none; }
  .bento-stats { flex-direction: column; gap: 12px; }
}

/* =====================================================================
   Integrations grid
   ===================================================================== */

.integrations-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.integration-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(12, 26, 31, 0.08);
  transition: border-color .2s ease, transform .2s ease;
}

.integration-card:hover {
  border-color: rgba(11, 111, 106, 0.3);
  transform: translateY(-2px);
}

.integration-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(11, 111, 106, 0.14), rgba(217, 195, 153, 0.18));
  color: #0c1a1f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.integration-card strong {
  font-size: 14px;
  color: #0c1a1f;
  letter-spacing: -0.005em;
}

.integration-card span {
  font-size: 12.5px;
  color: #4a5b66;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .integrations-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 580px) {
  .integrations-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   FAQ
   ===================================================================== */

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 56px;
  align-items: start;
}

.faq-header {
  position: sticky;
  top: 96px;
}

.faq-header h2 {
  font-size: clamp(28px, 2.8vw, 38px);
  letter-spacing: -0.025em;
  margin: 0 0 12px;
}

.faq-header p { margin: 0; max-width: 360px; }
.faq-header a { color: #0b6f6a; font-weight: 700; }

.faq-list {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(12, 26, 31, 0.10);
}

.faq-item {
  padding: 18px 0;
  border-bottom: 1px solid rgba(12, 26, 31, 0.10);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-size: 16px;
  font-weight: 600;
  color: #0c1a1f;
  letter-spacing: -0.005em;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(11, 111, 106, 0.10);
  color: #0b6f6a;
  font-size: 18px;
  font-weight: 600;
  transition: transform .2s ease, background .2s ease;
}

.faq-item[open] summary::after {
  content: "−";
  background: #0b6f6a;
  color: #fff;
  transform: rotate(180deg);
}

.faq-item p {
  margin: 12px 0 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: #4a5b66;
  max-width: 660px;
}

@media (max-width: 980px) {
  .faq-layout { grid-template-columns: 1fr; gap: 28px; }
  .faq-header { position: static; }
}

/* =====================================================================
   Changelog
   ===================================================================== */

.changelog-list {
  display: grid;
  gap: 0;
  margin-top: 32px;
  border-left: 2px solid rgba(11, 111, 106, 0.18);
  padding-left: 0;
}

.changelog-item {
  position: relative;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  padding: 18px 0 18px 32px;
  border-bottom: 1px solid rgba(12, 26, 31, 0.06);
}

.changelog-item:last-child { border-bottom: 0; }

.changelog-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 26px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0b6f6a;
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px rgba(11, 111, 106, 0.3);
}

.changelog-date {
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: #4a5b66;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding-top: 4px;
}

.changelog-item h3 {
  margin: 0 0 6px;
  font-size: 16.5px;
  letter-spacing: -0.005em;
  color: #0c1a1f;
}

.changelog-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #4a5b66;
  max-width: 640px;
}

@media (max-width: 700px) {
  .changelog-item { grid-template-columns: 1fr; gap: 6px; padding-left: 24px; }
}

/* =====================================================================
   Newsletter
   ===================================================================== */

.newsletter-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 36px 44px;
  border-radius: 24px;
  background:
    radial-gradient(800px 400px at 100% 0%, rgba(217, 195, 153, 0.18), transparent 60%),
    linear-gradient(135deg, #0c1a1f 0%, #143436 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.newsletter-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.05) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
}

.newsletter-card > * { position: relative; z-index: 1; }

.newsletter-card h3 {
  margin: 4px 0 6px;
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -0.015em;
  color: #fff;
  line-height: 1.2;
  max-width: 480px;
}

.newsletter-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.newsletter-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.newsletter-form input {
  flex: 1 0 220px;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 14px;
  transition: border-color .2s ease, background .2s ease;
}

.newsletter-form input::placeholder { color: rgba(255, 255, 255, 0.4); }

.newsletter-form input:focus {
  outline: none;
  border-color: rgba(217, 195, 153, 0.6);
  background: rgba(255, 255, 255, 0.10);
}

.newsletter-form button {
  flex: 0 0 auto;
}

.newsletter-success {
  padding: 14px 18px;
  border-radius: 10px;
  background: rgba(11, 111, 106, 0.18);
  border: 1px solid rgba(11, 111, 106, 0.4);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 980px) {
  .newsletter-card { grid-template-columns: 1fr; padding: 28px; }
}

:root[data-theme="dark"] .quality-section {
  background: var(--surface-2);
}

:root[data-theme="dark"] .quality-summary,
:root[data-theme="dark"] .quality-check {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
}

:root[data-theme="dark"] .quality-summary h3,
:root[data-theme="dark"] .quality-check strong {
  color: var(--ink);
}

:root[data-theme="dark"] .quality-score::after {
  background: var(--surface);
}

:root[data-theme="dark"] .quality-score {
  background: conic-gradient(var(--brand-2) var(--score-deg), var(--surface-3) 0);
  color: var(--brand-2);
}

:root[data-theme="dark"] .quality-score.good {
  background: conic-gradient(#f59e0b var(--score-deg), var(--surface-3) 0);
  color: #f59e0b;
}

:root[data-theme="dark"] .quality-score.needs-work {
  background: conic-gradient(#f87171 var(--score-deg), var(--surface-3) 0);
  color: #f87171;
}
