/* Fraction Control 2026 — warstwa produktu ponad zachowanymi modułami. */

body.organization-ems {
  --ui-accent: #ab8cff;
  --ui-accent-2: #38d5a5;
  --ui-ink: #120f27;
  --ui-glow: rgba(143, 108, 255, .32);
  --ui-soft: rgba(120, 85, 219, .14);
}

body.organization-lspd {
  --ui-accent: #4da5ff;
  --ui-accent-2: #42d6d1;
  --ui-ink: #07162a;
  --ui-glow: rgba(42, 135, 255, .31);
  --ui-soft: rgba(30, 115, 229, .14);
}

body.organization-ems,
body.organization-lspd {
  --accent: var(--ui-accent);
  --accent-hover: color-mix(in srgb, var(--ui-accent), white 14%);
  background:
    radial-gradient(circle at 4% 0%, var(--ui-glow), transparent 27rem),
    radial-gradient(circle at 91% 86%, color-mix(in srgb, var(--ui-accent-2), transparent 88%), transparent 30rem),
    #080b12;
}

.sidebar {
  width: 268px;
  padding: 24px 15px 16px;
  border-right-color: color-mix(in srgb, var(--ui-accent), transparent 77%);
  background: linear-gradient(180deg, rgba(11, 15, 25, .98), rgba(7, 10, 17, .99));
}

.brand {
  position: relative;
  margin: 0 4px 10px;
  padding: 8px 7px 26px;
}

.brand::after {
  position: absolute;
  right: 8px;
  bottom: 12px;
  left: 8px;
  height: 1px;
  background: linear-gradient(90deg, var(--ui-accent), transparent);
  opacity: .52;
  content: "";
}

.brand-mark {
  background: linear-gradient(135deg, var(--ui-accent), var(--ui-accent-2));
  box-shadow: 0 9px 24px var(--ui-glow);
}

.brand span span,
.eyebrow { color: var(--ui-accent); }

.nav { gap: 4px; }

.nav-label {
  margin: 21px 10px 6px;
  color: #718098;
  letter-spacing: .17em;
}

.nav-item {
  min-height: 43px;
  padding: 9px 11px;
  border-radius: 11px;
}

.nav-item::before {
  color: color-mix(in srgb, var(--ui-accent), white 22%);
  background: color-mix(in srgb, var(--ui-accent), transparent 88%);
}

.nav-item:hover {
  border-color: color-mix(in srgb, var(--ui-accent), transparent 72%);
  background: linear-gradient(90deg, var(--ui-soft), transparent);
}

.nav-item.active {
  border-color: color-mix(in srgb, var(--ui-accent), transparent 56%);
  background: linear-gradient(90deg, color-mix(in srgb, var(--ui-accent), transparent 74%), transparent);
  box-shadow: inset 2px 0 var(--ui-accent), 0 10px 24px rgba(0, 0, 0, .16);
}

.nav-item.active::before {
  background: linear-gradient(135deg, var(--ui-accent), var(--ui-accent-2));
  box-shadow: 0 6px 16px var(--ui-glow);
}

.content {
  width: calc(100% - 268px);
  margin-left: 268px;
  max-width: 1900px;
  padding: 30px clamp(22px, 4vw, 76px) 76px;
}

.content,
.content > *,
.topbar,
.topbar > *,
.panel,
.grid > * { min-width: 0; }

.topbar {
  position: sticky;
  top: 14px;
  z-index: 4;
  min-height: 72px;
  margin-bottom: 22px;
  padding: 12px 14px 12px 18px;
  border: 1px solid rgba(77, 91, 120, .44);
  border-radius: 18px;
  background: rgba(12, 17, 28, .82);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .18);
  backdrop-filter: blur(18px);
}

.topbar h1 { font-size: clamp(24px, 2.5vw, 34px); }

.topbar .tag {
  border: 1px solid color-mix(in srgb, var(--ui-accent), transparent 68%);
  color: color-mix(in srgb, var(--ui-accent), white 28%);
  background: color-mix(in srgb, var(--ui-accent), transparent 88%);
}

.sync-status { padding: 6px 8px; border-radius: 7px; background: rgba(4, 8, 14, .35); }

.refresh-button,
.secondary,
.hero-action-quiet {
  border-color: color-mix(in srgb, var(--ui-accent), transparent 70%);
  background: rgba(17, 25, 39, .82);
}

.refresh-button:hover,
.secondary:hover,
.hero-action-quiet:hover {
  border-color: color-mix(in srgb, var(--ui-accent), transparent 36%);
  background: var(--ui-soft);
}

.command-center-hero {
  min-height: 284px;
  border-color: color-mix(in srgb, var(--ui-accent), transparent 53%);
  background:
    radial-gradient(circle at 82% 16%, color-mix(in srgb, var(--ui-accent-2), transparent 72%), transparent 17rem),
    linear-gradient(116deg, color-mix(in srgb, var(--ui-accent), transparent 53%), rgba(21, 27, 45, .98) 52%, rgba(10, 15, 25, .99));
}

.command-center-hero::before { border-color: color-mix(in srgb, var(--ui-accent), transparent 89%); }

.hero-action-primary,
.primary {
  background: linear-gradient(135deg, var(--ui-accent), color-mix(in srgb, var(--ui-accent), var(--ui-accent-2) 44%));
}

.hero-action-primary { color: var(--ui-ink); }

.primary:hover,
.hero-action-primary:hover { filter: brightness(1.1); }

.command-hero-metrics > div {
  border-color: color-mix(in srgb, var(--ui-accent), transparent 78%);
  background: rgba(4, 9, 18, .32);
}

.command-hero-metrics strong,
.stat strong { color: color-mix(in srgb, var(--ui-accent), white 35%); }

.stat,
.panel {
  border-color: rgba(68, 82, 110, .72);
  background: linear-gradient(145deg, rgba(20, 27, 42, .95), rgba(10, 15, 25, .98));
  box-shadow: 0 14px 30px rgba(0, 0, 0, .13);
}

.stat { overflow: hidden; }

.stat::before {
  background: linear-gradient(90deg, var(--ui-accent), var(--ui-accent-2));
}

.panel:hover {
  border-color: color-mix(in srgb, var(--ui-accent), transparent 72%);
}

.quick-action {
  border-color: rgba(67, 83, 114, .72);
  background: linear-gradient(145deg, rgba(14, 20, 33, .86), rgba(8, 13, 22, .9));
}

.quick-action > span { color: var(--ui-accent); background: var(--ui-soft); }

.quick-action:hover {
  border-color: color-mix(in srgb, var(--ui-accent), transparent 42%);
  background: linear-gradient(135deg, var(--ui-soft), rgba(10, 16, 27, .92));
}

.tag,
.status-pill,
.badge {
  border: 1px solid color-mix(in srgb, var(--ui-accent), transparent 72%);
}

/* Ustawienia: małe centrum kategorii zamiast ściany formularzy. */
.settings-workspace {
  display: grid;
  grid-template-columns: minmax(210px, .28fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.settings-rail {
  position: sticky;
  top: 106px;
  align-self: start;
  padding: 14px;
  border: 1px solid rgba(66, 81, 110, .7);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(18, 25, 40, .92), rgba(10, 15, 25, .96));
}

.settings-rail p { margin: 0 0 12px; }

.settings-rail h2 { margin: 0 0 12px; color: #edf0fa; font-size: 15px; }

.settings-rail button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin-top: 4px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #aeb9cc;
  background: transparent;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
}

.settings-rail button::before { color: var(--ui-accent); content: "›"; font-size: 16px; }

.settings-rail button:hover,
.settings-rail button.active {
  border-color: color-mix(in srgb, var(--ui-accent), transparent 70%);
  color: #f1f3fa;
  background: var(--ui-soft);
}

.settings-groups { display: grid; gap: 12px; min-width: 0; }

.settings-group {
  overflow: hidden;
  border: 1px solid rgba(67, 82, 112, .74);
  border-radius: 15px;
  background: rgba(11, 16, 27, .74);
}

.settings-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 75px;
  padding: 15px 18px;
  cursor: pointer;
  list-style: none;
}

.settings-group > summary::-webkit-details-marker { display: none; }

.settings-group > summary::after {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--ui-accent), transparent 65%);
  border-radius: 8px;
  color: var(--ui-accent);
  background: var(--ui-soft);
  content: "+";
  font-size: 17px;
  font-weight: 400;
}

.settings-group[open] > summary {
  border-bottom: 1px solid rgba(67, 82, 112, .65);
  background: linear-gradient(90deg, var(--ui-soft), transparent 70%);
}

.settings-group[open] > summary::after { content: "−"; }

.settings-group-title { display: grid; gap: 4px; }
.settings-group-title strong { color: #f0f2fa; font-size: 14px; }
.settings-group-title small { color: #9aa8bf; font-size: 11px; line-height: 1.4; }

.settings-group-body { display: grid; gap: 14px; padding: 14px; }
.settings-group-body .panel { margin: 0; }
.settings-group-body .grid { margin: 0; }
.settings-group-body .actions-grid { margin: 0; }
.settings-group-body > .panel { box-shadow: none; }

/* Formularze w grupach nigdy nie mogą wypchnąć drugiej kolumny poza kartę. */
.settings-group-body,
.settings-form-grid,
.settings-form-grid > *,
.settings-form-grid form,
.settings-form-row,
.settings-form-row form,
.settings-group-body .form-row,
.settings-group-body label { min-width: 0; }

.settings-group-body select,
.settings-group-body input,
.settings-group-body textarea { max-width: 100%; }

.settings-group-body > form.panel.action-form,
.settings-group-body > .grid > form.panel.action-form {
  border-top: 2px solid color-mix(in srgb, var(--ui-accent), transparent 47%);
}

/* Właściciel: identyczny język wizualny jak w panelu serwera. */
.owner-page {
  --ui-accent: #a98cff;
  --ui-accent-2: #46d8b2;
  --ui-soft: rgba(132, 103, 237, .14);
  --ui-glow: rgba(132, 103, 237, .28);
  background: radial-gradient(circle at 4% 0, var(--ui-glow), transparent 30rem), #080b12;
}

.owner-hero,
.owner-command-center,
.owner-status-section,
.billing-dashboard-section,
.owner-invite-section {
  border-color: color-mix(in srgb, var(--ui-accent), transparent 69%);
}

.owner-hero { background: linear-gradient(125deg, color-mix(in srgb, var(--ui-accent), transparent 64%), rgba(13, 19, 31, .98) 58%); }
.owner-brand-mark { background: linear-gradient(135deg, var(--ui-accent), var(--ui-accent-2)); box-shadow: 0 8px 20px var(--ui-glow); }
.owner-server-card:hover { border-color: color-mix(in srgb, var(--ui-accent), transparent 54%); transform: translateY(-2px); }
.owner-open, .billing-save { background: linear-gradient(135deg, var(--ui-accent), color-mix(in srgb, var(--ui-accent), var(--ui-accent-2) 38%)); }

@media (max-width: 1080px) {
  .sidebar { width: 224px; }
  .content { width: calc(100% - 224px); margin-left: 224px; }
  .settings-workspace { grid-template-columns: 1fr; }
  .settings-rail { position: static; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
  .settings-rail > div { width: 100%; }
  .settings-rail p, .settings-rail h2 { display: inline; margin-right: 8px; }
  .settings-rail button { width: auto; margin: 0; }
}

@media (max-width: 920px) {
  .settings-form-grid.grid.two,
  .settings-group-body .grid.two { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 680px) {
  .sidebar { border-right: 0; }
  .content { width: 100%; margin-left: 0; padding-top: 14px; }
  .topbar { position: static; min-height: 0; padding: 13px; border-radius: 14px; }
  .top-actions { align-items: stretch; }
  .top-actions > * { max-width: 100%; }
  .settings-workspace { gap: 10px; }
  .settings-rail { padding: 11px; border-radius: 12px; }
  .settings-rail button { flex: 1 1 calc(50% - 5px); justify-content: center; text-align: center; }
  .settings-rail button::before { display: none; }
  .settings-group { border-radius: 12px; }
  .settings-group > summary { min-height: 66px; padding: 12px; }
  .settings-group-body { padding: 10px; }
}

/* --------------------------------------------------------------------------
   Fraction Control — wspólny refresh wszystkich podstron.
   Ta warstwa jest ładowana na końcu, aby nie zmieniać działania formularzy,
   modułów ani skryptów. Łączy widoki w jeden spokojny język: nocny grafit,
   fiolet jako nawigacja i mięta jako sygnał działania.
   -------------------------------------------------------------------------- */

:root {
  color-scheme: dark;
  --fc-ink: #080b12;
  --fc-surface: rgba(15, 21, 33, .88);
  --fc-surface-strong: #111827;
  --fc-line: rgba(112, 129, 163, .32);
  --fc-text: #f5f7fc;
  --fc-muted: #a0aec2;
  --fc-violet: #9b8cff;
  --fc-violet-soft: rgba(133, 116, 244, .15);
  --fc-mint: #58d8b3;
  --fc-shadow: 0 22px 70px rgba(0, 0, 0, .27);
}

body.offer-page,
body.legal-page,
body.login-body,
body.setup-page,
body.owner-page,
body.knowledge-body,
body.appeal-page,
body.rating-spin-body,
body.billing-blocked-page,
body.server-select-page,
body.not-found-page {
  background-color: var(--fc-ink);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(155, 140, 255, .82);
  outline-offset: 3px;
}

/* Dashboard: bardziej spójna hierarchia, bez ingerowania w jego logikę. */
body.organization-ems,
body.organization-lspd {
  min-height: 100vh;
  background:
    radial-gradient(circle at 0% 0%, var(--ui-glow), transparent 33rem),
    radial-gradient(circle at 96% 88%, color-mix(in srgb, var(--ui-accent-2), transparent 89%), transparent 30rem),
    #080b12;
}

.sidebar-footer {
  margin-inline: -2px;
  padding: 16px 8px 0;
}

.account {
  padding: 9px;
  border: 1px solid rgba(78, 94, 123, .44);
  border-radius: 12px;
  background: rgba(5, 9, 16, .28);
}

.quiet-button {
  width: 100%;
  min-height: 35px;
  margin-top: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #a8b3c5;
  text-align: left;
}

.quiet-button:hover {
  border-color: rgba(120, 136, 166, .42);
  color: #edf1f8;
  background: rgba(255, 255, 255, .04);
}

.topbar,
.command-center-hero,
.stat,
.panel {
  animation: fc-reveal .4s cubic-bezier(.2, .72, .25, 1) both;
}

.stats .stat:nth-child(2), .quick-actions > :nth-child(2) { animation-delay: .04s; }
.stats .stat:nth-child(3), .quick-actions > :nth-child(3) { animation-delay: .08s; }
.stats .stat:nth-child(4), .quick-actions > :nth-child(4) { animation-delay: .12s; }

.section-intro {
  padding: 13px 16px;
  border-left: 3px solid var(--ui-accent);
  border-radius: 0 12px 12px 0;
  background: linear-gradient(90deg, var(--ui-soft), transparent 80%);
}

.section-intro p { margin: 0; }

/* Wybór serwera: z małego okna logowania do czytelnego centrum startu. */
.server-select-page {
  min-height: 100vh;
  margin: 0;
  padding: clamp(16px, 3vw, 42px);
  color: var(--fc-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(128, 106, 244, .28), transparent 30rem),
    radial-gradient(circle at 94% 78%, rgba(58, 210, 169, .11), transparent 29rem),
    var(--fc-ink);
}

.server-select-shell { width: min(1040px, 100%); margin: 0 auto; }
.server-select-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.server-select-brand { display: inline-flex; align-items: center; gap: 10px; color: #f8f9ff; font-size: 17px; font-weight: 900; letter-spacing: -.65px; text-decoration: none; }
.server-select-brand .brand-mark { width: 38px; height: 38px; font-size: 18px; box-shadow: 0 8px 24px rgba(136, 112, 255, .33); }
.server-select-brand b { color: var(--fc-violet); }
.server-select-account { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--fc-line); border-radius: 10px; color: #adbad0; background: rgba(10, 15, 25, .56); font-size: 11px; }
.server-select-account strong { color: #e9edf7; }
.server-select-presence { width: 8px; height: 8px; border-radius: 50%; background: var(--fc-mint); box-shadow: 0 0 0 4px rgba(88, 216, 179, .12), 0 0 15px rgba(88, 216, 179, .5); }
.server-select-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; overflow: hidden; padding: clamp(28px, 5vw, 53px); border: 1px solid rgba(157, 142, 255, .44); border-radius: 24px; background: linear-gradient(122deg, rgba(79, 62, 181, .52), rgba(19, 26, 42, .96) 52%, rgba(11, 17, 28, .99)); box-shadow: var(--fc-shadow); }
.server-select-hero::after { position: absolute; top: -130px; right: -66px; width: 290px; height: 290px; border: 42px solid rgba(216, 210, 255, .07); border-radius: 50%; content: ""; }
.server-select-hero > * { position: relative; z-index: 1; }
.server-select-hero h1 { margin: 0; color: #fff; font-size: clamp(34px, 5vw, 58px); letter-spacing: -2.5px; line-height: .96; }
.server-select-hero h1 em { color: #a99dff; font-style: normal; }
.server-select-hero p:not(.eyebrow) { max-width: 600px; margin: 16px 0 0; color: #c2cbe0; font-size: 14px; line-height: 1.7; }
.server-select-hero aside { display: grid; align-content: center; min-width: 155px; padding: 16px; border: 1px solid rgba(193, 185, 255, .2); border-radius: 14px; background: rgba(7, 11, 21, .28); backdrop-filter: blur(12px); }
.server-select-hero aside span { color: #bcb5ff; font-size: 9px; font-weight: 900; letter-spacing: .11em; }
.server-select-hero aside strong { margin-top: 4px; color: #fff; font-size: 37px; letter-spacing: -1.3px; }
.server-select-hero aside small { color: #aab5ca; font-size: 10px; }
.server-select-card { margin-top: 18px; padding: clamp(18px, 3vw, 30px); border: 1px solid rgba(76, 91, 120, .74); border-radius: 20px; background: linear-gradient(145deg, rgba(20, 28, 43, .94), rgba(10, 15, 25, .98)); box-shadow: 0 16px 44px rgba(0, 0, 0, .17); }
.server-select-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.server-select-card-heading h2 { margin: 2px 0 0; font-size: 22px; letter-spacing: -.7px; }
.server-select-card-heading > span { padding: 6px 9px; border: 1px solid rgba(151, 139, 255, .34); border-radius: 999px; color: #d7d3ff; background: rgba(119, 102, 225, .12); font-size: 10px; font-weight: 800; }
.server-select-list { display: grid; gap: 9px; }
.server-select-form { margin: 0; }
.server-select-form button { display: grid; width: 100%; grid-template-columns: 42px minmax(0, 1fr) auto 21px; align-items: center; gap: 12px; min-height: 70px; padding: 12px; border: 1px solid rgba(76, 92, 121, .72); border-radius: 13px; color: #ebeff8; background: rgba(7, 12, 20, .39); text-align: left; transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.server-select-form button:hover { border-color: rgba(160, 147, 255, .78); background: linear-gradient(95deg, rgba(126, 108, 239, .19), rgba(10, 16, 27, .7)); transform: translateX(3px); }
.server-select-icon { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(188, 178, 255, .34); border-radius: 12px; color: #f0edff; background: linear-gradient(135deg, #7765d7, #3cbaa2); font-size: 17px; font-weight: 900; box-shadow: 0 7px 18px rgba(72, 62, 172, .2); }
.server-select-copy { min-width: 0; }.server-select-copy strong, .server-select-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.server-select-copy strong { font-size: 13px; }.server-select-copy small { margin-top: 4px; color: #94a1b8; font-size: 10px; }.server-select-members { display: grid; justify-items: end; color: #ddd9ff; font-size: 13px; font-weight: 850; }.server-select-members small { margin-top: 2px; color: #8997af; font-size: 9px; font-weight: 700; }.server-select-form button > b { color: #bdb3ff; font-size: 18px; }.server-select-owner { display: inline-flex; align-items: center; gap: 8px; margin-top: 17px; color: #c8c1ff; font-size: 11px; font-weight: 800; text-decoration: none; }.server-select-owner:hover { color: #fff; }.server-select-empty { display: flex; align-items: center; gap: 12px; padding: 18px; border: 1px solid rgba(236, 123, 145, .3); border-radius: 12px; background: rgba(132, 43, 61, .11); }.server-select-empty > span { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: #ffd2d9; background: rgba(202, 76, 100, .26); font-weight: 900; }.server-select-empty strong { font-size: 13px; }.server-select-empty p { margin: 3px 0 0; color: #bd9ea8; font-size: 11px; }

/* Ekran błędu: nadal prosty, lecz przestaje wyglądać jak awaria serwera. */
.not-found-page { min-height: 100vh; display: grid; place-items: center; margin: 0; padding: 24px; color: var(--fc-text); font-family: Inter, ui-sans-serif, system-ui, sans-serif; background: radial-gradient(circle at 50% -12%, rgba(124, 104, 244, .35), transparent 36rem), var(--fc-ink); }
.not-found-card { position: relative; width: min(100%, 620px); overflow: hidden; padding: clamp(30px, 6vw, 58px); border: 1px solid rgba(118, 132, 162, .5); border-radius: 24px; background: linear-gradient(145deg, rgba(24, 31, 47, .96), rgba(10, 15, 25, .99)); box-shadow: var(--fc-shadow); text-align: center; }
.not-found-card::after { position: absolute; top: -110px; right: -65px; width: 220px; height: 220px; border: 35px solid rgba(194, 185, 255, .08); border-radius: 50%; content: ""; }.not-found-card > * { position: relative; z-index: 1; }
.not-found-brand { display: inline-flex; align-items: center; gap: 8px; color: #e5e8f2; font-size: 12px; font-weight: 850; text-decoration: none; }.not-found-brand span { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 8px; color: #16132e; background: linear-gradient(135deg, #cabfff, #7e70e8); font-family: Georgia, serif; font-size: 17px; }.not-found-code { margin: 30px 0 4px; color: #a69bff; font-size: clamp(88px, 19vw, 150px); font-weight: 950; letter-spacing: -.11em; line-height: .8; text-shadow: 0 13px 30px rgba(99, 78, 213, .24); }.not-found-card h1 { margin: 12px 0 10px; font-size: clamp(23px, 4vw, 31px); letter-spacing: -1px; }.not-found-card > p:not(.not-found-code):not(.eyebrow) { margin: 0; color: #aeb9cc; font-size: 14px; line-height: 1.65; }.not-found-actions { display: flex; justify-content: center; gap: 9px; margin-top: 25px; }.not-found-actions a { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 0 14px; border: 1px solid rgba(125, 140, 170, .52); border-radius: 10px; color: #dce2ed; background: rgba(7, 12, 21, .3); font-size: 11px; font-weight: 800; text-decoration: none; transition: .16s ease; }.not-found-actions a:hover { border-color: #afa5ff; color: #fff; transform: translateY(-1px); }.not-found-actions a.primary { border-color: #a99eff; color: #18142c; background: linear-gradient(135deg, #c4bcff, #9a8ef4); }

/* Logowanie i konfiguracja: identyczne obramowania, kontrast i mikrodetale. */
.login-shell,
.setup-shell {
  box-shadow: 0 36px 104px rgba(0, 0, 0, .36);
}

.login-showcase-grid span,
.login-signal-card,
.login-card,
.setup-main-card,
.setup-progress,
.setup-help {
  border-color: rgba(111, 128, 162, .5);
}

.login-showcase-grid span { background: rgba(8, 14, 25, .34); }
.login-card { box-shadow: 0 30px 84px rgba(0, 0, 0, .34), 0 0 0 1px rgba(157, 142, 255, .06) inset; }
.login-card::before { background: linear-gradient(90deg, #b2a8ff, var(--fc-mint)); }

.setup-page {
  background:
    radial-gradient(circle at 5% 3%, rgba(124, 103, 240, .22), transparent 29rem),
    radial-gradient(circle at 96% 92%, rgba(62, 208, 172, .09), transparent 28rem),
    #080b12;
}

.setup-hero,
.setup-main-card,
.setup-progress,
.setup-help { box-shadow: 0 16px 38px rgba(0, 0, 0, .16); }

.setup-profile-card,
.setup-fields select,
.setup-reminder-field select { transition: border-color .16s ease, transform .16s ease, background .16s ease; }
.setup-profile-card:hover { transform: translateY(-2px); }

/* Samoobsługowe widoki użytkownika. */
.knowledge-body {
  background:
    radial-gradient(circle at 8% -10%, rgba(126, 112, 255, .3), transparent 33rem),
    radial-gradient(circle at 96% 66%, rgba(67, 210, 169, .08), transparent 28rem),
    #080b12;
}
.knowledge-header { padding-top: 12px; }
.knowledge-account { padding: 5px 7px; border: 1px solid rgba(80, 96, 125, .44); border-radius: 11px; background: rgba(6, 11, 19, .29); }
.knowledge-hero { border-color: rgba(162, 149, 255, .48); background: linear-gradient(118deg, rgba(82, 67, 186, .46), rgba(16, 23, 37, .96) 60%); }
.knowledge-panel { border-color: rgba(70, 86, 115, .8); box-shadow: 0 13px 33px rgba(0, 0, 0, .13); }
.knowledge-panel:hover { border-color: rgba(154, 141, 255, .52); }
.knowledge-options label { border-color: rgba(74, 90, 120, .78); background: rgba(7, 13, 23, .65); }
.knowledge-options label:hover { border-color: #a79bff; background: rgba(112, 95, 223, .16); }
.knowledge-submit { box-shadow: 0 10px 24px rgba(113, 95, 226, .2); }

.appeal-page { background: radial-gradient(circle at 15% 0%, rgba(128, 106, 244, .27), transparent 33rem), #080b12; }
.appeal-card { border-color: rgba(78, 95, 124, .75); box-shadow: var(--fc-shadow); }
.appeal-card-heading { border-bottom-color: rgba(79, 96, 126, .58); }
.appeal-user { border-color: rgba(88, 103, 133, .55); background: rgba(8, 14, 23, .4); }
.appeal-form textarea { border-color: rgba(76, 92, 121, .8); background: rgba(6, 12, 20, .67); }

.billing-blocked-page { background: radial-gradient(circle at 50% 0%, rgba(142, 111, 235, .25), transparent 31rem), #080b12; }
.billing-blocked-card { border-color: rgba(130, 115, 206, .5); box-shadow: var(--fc-shadow); }

.rating-spin-body { background: radial-gradient(circle at 17% 1%, rgba(124, 106, 237, .3), transparent 34rem), #080b12; }
.rating-spin-card { border-color: rgba(80, 98, 130, .72); box-shadow: var(--fc-shadow); }
.rating-spin-rules div { border-color: rgba(78, 95, 124, .7); background: rgba(7, 13, 22, .35); }

/* Dokumenty i oferta: lekka przestrzeń oddechu, ale ciągle ten sam produkt. */
.legal-page { background: radial-gradient(circle at 4% -6%, rgba(126, 106, 255, .28), transparent 33rem), radial-gradient(circle at 96% 45%, rgba(50, 202, 158, .09), transparent 30rem), var(--fc-ink); }
.legal-nav { border-bottom-color: rgba(101, 117, 146, .28); background: rgba(8, 12, 20, .82); }
.legal-document-hero { border-color: rgba(158, 145, 255, .38); box-shadow: var(--fc-shadow); }
.legal-section { border-color: rgba(72, 88, 116, .72); box-shadow: 0 10px 24px rgba(0, 0, 0, .1); }
.legal-section:hover { border-color: rgba(157, 143, 255, .43); }
.legal-toc { border-color: rgba(72, 88, 116, .68); background: rgba(11, 17, 27, .75); }

.offer-page { background: #080b12; }
.offer-page .offer-nav { border-bottom-color: rgba(103, 118, 147, .24); background: rgba(8, 12, 20, .8); backdrop-filter: blur(18px); }
.offer-page .offer-hero { isolation: isolate; }
.offer-page .offer-section,
.offer-page .offer-order { scroll-margin-top: 100px; }
.offer-page .feature-grid article,
.offer-page .price-card,
.offer-page .faq-list details { box-shadow: 0 12px 28px rgba(0, 0, 0, .1); }
.offer-page .feature-grid article { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.offer-page .feature-grid article:hover { transform: translateY(-4px); box-shadow: 0 18px 38px rgba(0, 0, 0, .19); }

/* Centrum właściciela jest nadrzędnym widokiem operacyjnym, a nie formularzem. */
.owner-page { background: radial-gradient(circle at 4% 0%, rgba(133, 103, 237, .27), transparent 32rem), radial-gradient(circle at 94% 70%, rgba(57, 210, 171, .1), transparent 28rem), #080b12; }
.owner-hero { box-shadow: var(--fc-shadow); }
.owner-section > .panel,
.owner-status-section,
.owner-command-center,
.billing-dashboard-section,
.owner-invite-section { box-shadow: 0 15px 34px rgba(0, 0, 0, .14); }

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

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

@media (max-width: 760px) {
  .server-select-page { padding: 15px; }
  .server-select-header { align-items: flex-start; }
  .server-select-account { max-width: 185px; text-align: right; }
  .server-select-hero { grid-template-columns: 1fr; padding: 27px 22px; border-radius: 19px; }
  .server-select-hero aside { grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; min-width: 0; padding: 12px; }
  .server-select-hero aside span { grid-column: 2; grid-row: 1; }.server-select-hero aside strong { grid-column: 1; grid-row: 1 / span 2; margin: 0; }.server-select-hero aside small { grid-column: 2; grid-row: 2; align-self: end; }
  .server-select-card { border-radius: 16px; }
  .not-found-card { border-radius: 19px; }.not-found-actions { flex-direction: column; }
  .knowledge-shell { width: min(100% - 28px, 1120px); }.knowledge-header { align-items: flex-start; }.knowledge-account { max-width: 180px; flex-wrap: wrap; justify-content: flex-end; }
}

@media (max-width: 470px) {
  .server-select-header { gap: 10px; }.server-select-brand { font-size: 14px; }.server-select-account { padding: 7px; font-size: 9px; }.server-select-hero h1 { font-size: 36px; }.server-select-form button { grid-template-columns: 38px minmax(0, 1fr) 16px; gap: 9px; }.server-select-icon { width: 38px; height: 38px; }.server-select-members { display: none; }
}

/* --------------------------------------------------------------------------
   Clinical UI 2026 — finalny język wizualny Fraction Control.
   Ciemny, minimalny panel operacyjny: fiolet prowadzi po interfejsie,
   a mięta oznacza stan poprawny i działania medyczne. Bez zmian w logice.
   -------------------------------------------------------------------------- */

body.organization-ems,
body.organization-lspd {
  --clinical-panel: rgba(15, 22, 35, .9);
  --clinical-panel-strong: rgba(18, 27, 43, .96);
  --clinical-line: rgba(105, 122, 153, .34);
  --clinical-text: #f3f6fc;
  --clinical-muted: #9daac0;
  --clinical-mint: #55d1b0;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--ui-accent), transparent 83%), transparent 31rem),
    radial-gradient(circle at 96% 76%, rgba(85, 209, 176, .075), transparent 26rem),
    #080c14;
}

/* Stałe centrum aplikacji: spokojne tło i lekka hierarchia, bez neonów. */
body.organization-ems .app-shell,
body.organization-lspd .app-shell { min-height: 100dvh; }

.sidebar {
  width: 276px;
  padding: 22px 14px 15px;
  border-right-color: rgba(109, 126, 160, .26);
  background: linear-gradient(180deg, rgba(12, 18, 30, .985), rgba(7, 11, 19, .995));
  box-shadow: 16px 0 48px rgba(0, 0, 0, .12);
}

.brand {
  gap: 11px;
  margin: 0 3px 13px;
  padding: 6px 7px 22px;
  border-bottom: 1px solid rgba(103, 119, 151, .22);
  color: #f7f8fd;
  font-size: 19px;
}

.brand .brand-mark {
  width: 37px;
  height: 37px;
  border-radius: 12px;
  background: linear-gradient(135deg, #b2a4ff, #6e5ee0 56%, #48c8aa);
  box-shadow: 0 9px 22px rgba(109, 91, 218, .28);
}

.nav { gap: 3px; }
.nav-label { margin: 19px 10px 6px; color: #66758e; font-size: 9px; letter-spacing: .15em; }
.nav-item {
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 10px;
  color: #abb7c9;
  font-size: 12px;
  font-weight: 720;
}

.nav-item::before {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(135, 149, 180, .2);
  border-radius: 8px;
  color: color-mix(in srgb, var(--ui-accent), white 18%);
  background: rgba(113, 98, 231, .075);
  font-size: 11px;
}

.nav-item:hover {
  border-color: rgba(138, 126, 232, .26);
  color: #f2f4fa;
  background: linear-gradient(90deg, rgba(126, 109, 237, .12), transparent 88%);
}

.nav-item.active {
  border-color: color-mix(in srgb, var(--ui-accent), transparent 56%);
  color: #f7f8fc;
  background: linear-gradient(90deg, color-mix(in srgb, var(--ui-accent), transparent 78%), rgba(21, 29, 45, .3));
  box-shadow: inset 2px 0 var(--ui-accent), 0 8px 20px rgba(0, 0, 0, .12);
}

.nav-item.active::before {
  border-color: transparent;
  background: linear-gradient(135deg, var(--ui-accent), var(--clinical-mint));
  box-shadow: 0 5px 14px color-mix(in srgb, var(--ui-accent), transparent 70%);
}

.sidebar-footer { border-top-color: rgba(103, 119, 151, .2); }
.account { border-color: rgba(104, 121, 151, .32); border-radius: 13px; background: rgba(255, 255, 255, .025); }
.account img { border: 1px solid rgba(174, 164, 255, .35); }

.content {
  width: calc(100% - 276px);
  max-width: none;
  margin-left: 276px;
  padding: 27px clamp(24px, 4vw, 68px) 72px;
}

.topbar {
  min-height: 74px;
  margin-bottom: 20px;
  padding: 13px 14px 13px 18px;
  border-color: rgba(99, 116, 148, .36);
  border-radius: 18px;
  background: rgba(13, 20, 32, .72);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
  backdrop-filter: blur(18px);
}

.topbar h1 { color: var(--clinical-text); font-size: clamp(25px, 2.35vw, 33px); letter-spacing: -1.15px; }
.topbar .eyebrow { margin-bottom: 3px; color: color-mix(in srgb, var(--ui-accent), white 18%); }
.top-actions { gap: 8px; }
.topbar .tag,
.topbar .sync-status {
  min-height: 34px;
  padding-inline: 10px;
  border: 1px solid rgba(105, 121, 151, .32);
  border-radius: 9px;
  background: rgba(6, 11, 20, .26);
}

.refresh-button,
.secondary,
.hero-action-quiet {
  min-height: 38px;
  border-color: rgba(118, 133, 165, .45);
  border-radius: 10px;
  background: rgba(20, 29, 45, .76);
}

.refresh-button:hover,
.secondary:hover,
.hero-action-quiet:hover { border-color: color-mix(in srgb, var(--ui-accent), transparent 30%); background: var(--ui-soft); }

.command-center-hero {
  min-height: 256px;
  gap: clamp(20px, 3vw, 38px);
  padding: clamp(27px, 3.5vw, 41px);
  border-color: color-mix(in srgb, var(--ui-accent), rgba(89, 105, 140, .48) 52%);
  border-radius: 22px;
  background:
    radial-gradient(circle at 86% 19%, rgba(85, 209, 176, .12), transparent 15rem),
    linear-gradient(120deg, color-mix(in srgb, var(--ui-accent), transparent 58%), rgba(20, 28, 45, .98) 53%, rgba(10, 16, 27, .99));
  box-shadow: 0 23px 54px rgba(0, 0, 0, .2);
}

.command-center-hero::before { border-color: rgba(212, 208, 255, .055); }
.command-hero h2 { max-width: 590px; font-size: clamp(28px, 3.1vw, 40px); letter-spacing: -1.65px; }
.command-hero-copy > p:not(.eyebrow) { color: #bac6d8; }
.hero-status { padding: 8px 10px; border: 1px solid rgba(94, 208, 174, .23); border-radius: 10px; background: rgba(10, 34, 36, .24); }
.hero-pulse { background: var(--clinical-mint); box-shadow: 0 0 0 5px rgba(85, 209, 176, .1), 0 0 15px rgba(85, 209, 176, .48); }
.hero-action-primary,
.primary { border-radius: 10px; background: linear-gradient(135deg, color-mix(in srgb, var(--ui-accent), white 14%), var(--ui-accent) 58%, color-mix(in srgb, var(--ui-accent), var(--clinical-mint) 35%)); box-shadow: 0 9px 19px color-mix(in srgb, var(--ui-accent), transparent 77%); }
.command-hero-metrics { gap: 8px; }
.command-hero-metrics > div { padding: 14px 12px; border-color: rgba(181, 174, 255, .16); border-radius: 12px; background: rgba(6, 12, 21, .26); }
.command-hero-metrics strong { color: #fbfbff; }

.stat,
.panel {
  border-color: var(--clinical-line);
  border-radius: 16px;
  background: linear-gradient(145deg, var(--clinical-panel-strong), rgba(10, 16, 27, .98));
  box-shadow: 0 13px 30px rgba(0, 0, 0, .1);
}

.stat { min-height: 112px; padding: 18px; }
.stat::before { width: 34px; height: 3px; border-radius: 0 0 6px 0; background: linear-gradient(90deg, var(--ui-accent), var(--clinical-mint)); }
.stat:hover,
.panel:hover { border-color: color-mix(in srgb, var(--ui-accent), transparent 62%); }
.panel-heading { margin-bottom: 17px; }
.panel-heading h2 { color: var(--clinical-text); }
.muted { color: var(--clinical-muted); }

.quick-actions { gap: 9px; }
.quick-action {
  min-height: 74px;
  border-color: rgba(83, 100, 132, .63);
  border-radius: 13px;
  background: rgba(8, 14, 24, .48);
}

.quick-action > span {
  width: 31px;
  height: 31px;
  border: 1px solid color-mix(in srgb, var(--ui-accent), transparent 70%);
  border-radius: 9px;
  color: transparent;
  background: color-mix(in srgb, var(--ui-accent), transparent 87%);
  font-size: 0;
}

.quick-action > span::after { color: color-mix(in srgb, var(--ui-accent), white 18%); font-size: 15px; font-weight: 850; }
.quick-action:nth-child(1) > span::after { content: "+"; }
.quick-action:nth-child(2) > span::after { content: "↗"; }
.quick-action:nth-child(3) > span::after { content: "•"; font-size: 23px; line-height: .5; }
.quick-action:nth-child(4) > span::after { content: "□"; }
.quick-action:nth-child(5) > span::after { content: "!"; }
.quick-action:nth-child(6) > span::after { content: "→"; }
.quick-action:nth-child(7) > span::after { content: "⚙"; font-size: 13px; }
.quick-action:hover { border-color: color-mix(in srgb, var(--ui-accent), transparent 37%); background: linear-gradient(130deg, var(--ui-soft), rgba(9, 15, 26, .72)); }

/* Formularze i bazy: mniej szumu, wyraźne stany oraz szersze pole oddechu. */
.action-form,
.settings-group,
.rank-catalog-group,
.ticket-category-row,
.miad-slot,
.knowledge-dashboard-question,
.knowledge-submission-card {
  border-color: rgba(82, 100, 132, .66);
}

.action-form input,
.action-form select,
.action-form textarea,
.rank-catalog-row input,
.rank-catalog-row select {
  border-color: rgba(79, 98, 131, .76);
  border-radius: 9px;
  background: rgba(6, 12, 21, .64);
}

.action-form input:focus,
.action-form select:focus,
.action-form textarea:focus,
.rank-catalog-row input:focus,
.rank-catalog-row select:focus {
  border-color: color-mix(in srgb, var(--ui-accent), white 15%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent), transparent 84%);
}

.settings-workspace { gap: 14px; }
.settings-rail { border-color: rgba(85, 103, 135, .62); border-radius: 15px; background: linear-gradient(155deg, rgba(22, 30, 47, .93), rgba(9, 15, 25, .96)); }
.settings-rail button { border-radius: 8px; }
.settings-group { border-radius: 14px; background: rgba(10, 16, 27, .7); }
.settings-group > summary { min-height: 71px; padding: 14px 16px; }
.settings-group[open] > summary { background: linear-gradient(90deg, var(--ui-soft), transparent 76%); }
.settings-group-body { padding: 13px; }

.miad-slot-grid { gap: 9px; }
.miad-slot { min-height: 103px; border-radius: 13px; background: rgba(8, 14, 24, .54); }
.miad-slot.is-free { border-color: rgba(85, 209, 176, .43); background: linear-gradient(135deg, rgba(43, 144, 125, .15), rgba(9, 20, 29, .75)); }
.miad-slot.is-taken { background: linear-gradient(135deg, rgba(31, 49, 69, .76), rgba(10, 17, 28, .96)); }
.miad-slot-rank { color: #b5c3d6; }
.miad-slot-free { color: #7de1c3; }

.table-panel td { background: rgba(10, 16, 27, .74); }
.table-panel tbody tr:hover td { border-color: color-mix(in srgb, var(--ui-accent), transparent 58%); }

/* Pozostałe podstrony: jedna marka, lecz każdy widok ma własny cel. */
.login-shell,
.server-select-hero,
.setup-hero,
.owner-hero,
.knowledge-hero,
.rating-spin-card,
.billing-blocked-card,
.appeal-card,
.legal-document-hero,
.not-found-card {
  border-color: rgba(145, 131, 237, .42);
  box-shadow: 0 26px 72px rgba(0, 0, 0, .28);
}

.login-brand .brand-mark,
.server-select-brand .brand-mark,
.setup-server-icon,
.owner-brand-mark,
.legal-logo-mark,
.not-found-brand span {
  background: linear-gradient(135deg, #b7abff, #7665dd 58%, #51cfb1);
}

.knowledge-hero,
.legal-document-hero,
.server-select-hero,
.owner-hero {
  background:
    radial-gradient(circle at 86% 18%, rgba(84, 207, 176, .12), transparent 17rem),
    linear-gradient(122deg, rgba(92, 75, 190, .45), rgba(18, 25, 40, .97) 57%, rgba(10, 16, 27, .99));
}

.knowledge-panel,
.legal-section,
.setup-main-card,
.setup-progress,
.setup-help,
.owner-section > .panel,
.owner-status-section,
.owner-command-center,
.billing-dashboard-section,
.owner-invite-section {
  border-color: rgba(81, 99, 130, .68);
  border-radius: 17px;
}

.offer-page .offer-nav { border-bottom-color: rgba(109, 126, 158, .27); }
.offer-page .offer-hero { background: radial-gradient(circle at 12% 18%, rgba(116, 94, 238, .22), transparent 30rem), #080c14; }
.offer-page .feature-grid article,
.offer-page .price-card,
.offer-page .faq-list details { border-color: rgba(84, 101, 132, .62); border-radius: 15px; background: rgba(14, 21, 34, .78); }
.offer-page .feature-grid article:hover { border-color: rgba(159, 145, 255, .65); }

@media (max-width: 1080px) {
  .sidebar { width: 238px; }
  .content { width: calc(100% - 238px); margin-left: 238px; }
  .quick-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .sidebar { width: 100%; padding: 12px 11px 10px; }
  .brand { margin: 0; padding: 0 6px 11px; }
  .content { width: 100%; margin-left: 0; padding: 15px 13px 42px; }
  .topbar { position: static; min-height: 0; padding: 13px; border-radius: 14px; }
  .top-actions { align-items: stretch; }
  .topbar .tag,
  .topbar .sync-status { min-height: 32px; }
  .command-center-hero { padding: 24px 18px; border-radius: 17px; }
  .command-hero h2 { font-size: 31px; }
  .panel,
  .stat { border-radius: 14px; }
  .quick-actions { grid-template-columns: 1fr; }
  .settings-workspace { gap: 10px; }
  .settings-group > summary { min-height: 66px; padding: 12px; }
}

/* Dashboard Clinical: realna przebudowa powłoki, nie tylko zmiana kolorów. */
.clinical-dashboard .sidebar {
  display: flex;
  width: 286px;
  padding: 18px 14px 14px;
  border-right: 1px solid rgba(113, 130, 164, .28);
  background:
    linear-gradient(180deg, rgba(15, 22, 37, .99), rgba(7, 11, 20, .995) 72%),
    #090d16;
}

.clinical-dashboard .brand {
  margin: 0 3px;
  padding: 8px 7px 15px;
  border: 0;
}

.clinical-dashboard .brand::after { right: 7px; bottom: 1px; left: 7px; background: linear-gradient(90deg, var(--ui-accent), var(--clinical-mint), transparent 77%); opacity: .75; }
.clinical-dashboard .brand .brand-mark { width: 40px; height: 40px; border-radius: 13px; }

.sidebar-context {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 4px 15px;
  padding: 11px;
  border: 1px solid rgba(113, 131, 163, .28);
  border-radius: 13px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--ui-accent), transparent 86%), rgba(10, 16, 27, .45));
}

.sidebar-context-pulse {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--clinical-mint);
  box-shadow: 0 0 0 4px rgba(85, 209, 176, .11), 0 0 14px rgba(85, 209, 176, .5);
}

.sidebar-context strong,
.sidebar-context small { display: block; }
.sidebar-context strong { color: #e8edf8; font-size: 11px; font-weight: 850; }
.sidebar-context small { margin-top: 3px; color: #8493ad; font-size: 9px; line-height: 1.35; }

.clinical-dashboard .nav { padding: 3px 2px 7px; }
.clinical-dashboard .nav-label { margin: 17px 8px 7px; }
.clinical-dashboard .nav-item { min-height: 40px; padding: 7px 9px; border-radius: 9px; }
.clinical-dashboard .nav-item::before { width: 22px; height: 22px; border-radius: 7px; }

.clinical-dashboard .sidebar-footer { margin: 0 2px; padding: 12px 4px 0; }
.clinical-dashboard .account { padding: 8px; border-radius: 11px; }
.sidebar-footnote { display: flex; align-items: center; gap: 6px; margin: 10px 5px 0; color: #7f8da5; font-size: 9px; line-height: 1.4; }
.sidebar-footnote span { width: 6px; height: 6px; border-radius: 50%; background: var(--clinical-mint); }

.clinical-dashboard .content {
  width: calc(100% - 286px);
  margin-left: 286px;
  padding: 20px clamp(24px, 3.7vw, 66px) 76px;
  background:
    linear-gradient(90deg, rgba(135, 118, 240, .026) 1px, transparent 1px),
    linear-gradient(rgba(135, 118, 240, .022) 1px, transparent 1px),
    radial-gradient(circle at 74% -8%, rgba(125, 103, 230, .1), transparent 29rem),
    #090d16;
  background-size: 36px 36px, 36px 36px, auto, auto;
}

.clinical-dashboard .topbar {
  position: relative;
  min-height: 82px;
  margin-bottom: 18px;
  padding: 15px 15px 15px 19px;
  border: 1px solid rgba(110, 127, 159, .34);
  border-radius: 17px;
  background: rgba(13, 20, 33, .82);
  box-shadow: 0 15px 35px rgba(0, 0, 0, .13);
}

.clinical-dashboard .topbar::before { position: absolute; top: 15px; bottom: 15px; left: 0; width: 3px; border-radius: 0 4px 4px 0; background: linear-gradient(var(--ui-accent), var(--clinical-mint)); content: ""; }
.clinical-dashboard .topbar-copy { display: grid; gap: 2px; }
.clinical-dashboard .topbar .eyebrow { margin: 0; font-size: 9px; }
.clinical-dashboard .topbar h1 { line-height: 1.05; }
.topbar-caption { color: #7f8da5; font-size: 10px; font-weight: 650; }

.clinical-dashboard .command-center-hero {
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, .82fr);
  min-height: 274px;
  margin-bottom: 16px;
  padding: clamp(25px, 3.4vw, 39px);
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(102, 83, 204, .17) 1px, transparent 1px),
    linear-gradient(rgba(102, 83, 204, .14) 1px, transparent 1px),
    radial-gradient(circle at 85% 24%, rgba(75, 203, 174, .16), transparent 15rem),
    linear-gradient(122deg, rgba(77, 61, 176, .48), rgba(19, 27, 45, .98) 54%, rgba(10, 16, 28, .99));
  background-size: 30px 30px, 30px 30px, auto, auto;
}

.clinical-dashboard .command-center-hero::before { top: -170px; right: -112px; width: 360px; height: 360px; border-width: 54px; }
.clinical-dashboard .hero-status { width: fit-content; margin-top: 18px; }
.clinical-dashboard .command-hero-metrics { align-self: stretch; grid-template-columns: 1fr; gap: 8px; }
.clinical-dashboard .command-hero-metrics > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: center; min-height: 75px; padding: 13px 15px; border-color: rgba(178, 170, 255, .19); background: rgba(6, 12, 23, .32); }
.clinical-dashboard .command-hero-metrics span { grid-column: 1; grid-row: 1; }.clinical-dashboard .command-hero-metrics small { grid-column: 1; grid-row: 2; }.clinical-dashboard .command-hero-metrics strong { grid-column: 2; grid-row: 1 / span 2; margin: 0; color: #fff; font-size: 27px; }

.clinical-dashboard .stats { gap: 11px; margin-bottom: 15px; }
.clinical-dashboard .stat { min-height: 107px; padding: 16px; border-radius: 14px; background: linear-gradient(145deg, rgba(21, 30, 47, .96), rgba(11, 17, 28, .98)); }
.clinical-dashboard .stat strong { color: #f4f6fb; font-size: 26px; }
.clinical-dashboard .panel { border-radius: 15px; }
.clinical-dashboard .overview-focus-grid { gap: 13px; }.clinical-dashboard .quick-actions-panel, .clinical-dashboard .recent-actions-panel { margin-top: 14px; }

/* Wszystkie zestawienia są modułami, a nie ścianą pojedynczych wierszy. */
.clinical-dashboard .rank-catalog-group {
  overflow: visible;
  border: 1px solid rgba(88, 106, 139, .66);
  border-radius: 15px;
  background: rgba(8, 14, 24, .44);
}

.clinical-dashboard .rank-catalog-group-heading {
  min-height: 62px;
  padding: 13px 15px;
  border-bottom-color: rgba(82, 100, 133, .55);
  border-radius: 14px 14px 0 0;
  background: linear-gradient(100deg, color-mix(in srgb, var(--ui-accent), transparent 84%), rgba(14, 21, 34, .42) 60%);
}

.clinical-dashboard .rank-catalog-rows { display: grid; gap: 8px; padding: 9px; }
.clinical-dashboard .rank-catalog-row {
  grid-template-columns: 28px minmax(180px, 1.35fr) minmax(96px, .55fr) minmax(96px, .55fr) minmax(190px, 1fr) auto;
  padding: 10px;
  border: 1px solid rgba(75, 94, 127, .62);
  border-radius: 11px;
  background: rgba(15, 23, 37, .68);
}

.clinical-dashboard .rank-catalog-row:last-child { border-bottom: 1px solid rgba(75, 94, 127, .62); }
.clinical-dashboard .rank-catalog-row:focus-within { border-color: color-mix(in srgb, var(--ui-accent), transparent 36%); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent), transparent 89%); }
.clinical-dashboard .rank-catalog-position { margin-bottom: 5px; border: 1px solid color-mix(in srgb, var(--ui-accent), transparent 70%); color: color-mix(in srgb, var(--ui-accent), white 28%); background: color-mix(in srgb, var(--ui-accent), transparent 86%); }

.clinical-dashboard .miad-database-panel { padding: 19px; }
.clinical-dashboard .miad-slot-grid { grid-template-columns: repeat(auto-fill, minmax(194px, 1fr)); gap: 8px; }
.clinical-dashboard .miad-slot { min-height: 100px; padding: 12px; border-radius: 12px; }
.clinical-dashboard .miad-slot.is-free { border-style: solid; }.clinical-dashboard .miad-slot.is-free::before { display: block; width: 23px; height: 2px; border-radius: 4px; background: var(--clinical-mint); content: ""; opacity: .85; }

@media (max-width: 1120px) {
  .clinical-dashboard .sidebar { width: 246px; }.clinical-dashboard .content { width: calc(100% - 246px); margin-left: 246px; }
  .clinical-dashboard .rank-catalog-row { grid-template-columns: 28px minmax(150px, 1.25fr) minmax(86px, .55fr) minmax(86px, .55fr) minmax(150px, 1fr) auto; }
}

@media (max-width: 900px) {
  .clinical-dashboard .command-center-hero { grid-template-columns: 1fr; }.clinical-dashboard .command-hero-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }.clinical-dashboard .command-hero-metrics > div { grid-template-columns: 1fr; }.clinical-dashboard .command-hero-metrics span, .clinical-dashboard .command-hero-metrics small, .clinical-dashboard .command-hero-metrics strong { grid-column: auto; grid-row: auto; }.clinical-dashboard .command-hero-metrics strong { margin-top: 5px; }
}

@media (max-width: 680px) {
  .clinical-dashboard .sidebar { width: 100%; padding: 11px 10px 9px; }.clinical-dashboard .sidebar-context, .clinical-dashboard .sidebar-footer { display: none; }.clinical-dashboard .content { width: 100%; margin-left: 0; padding: 14px 12px 40px; }.clinical-dashboard .topbar { padding: 13px; }.clinical-dashboard .topbar::before { top: 13px; bottom: 13px; }.clinical-dashboard .command-center-hero { min-height: 0; padding: 23px 17px; }.clinical-dashboard .command-hero-metrics { grid-template-columns: 1fr; }.clinical-dashboard .command-hero-metrics > div { grid-template-columns: minmax(0, 1fr) auto; }.clinical-dashboard .command-hero-metrics span { grid-column: 1; grid-row: 1; }.clinical-dashboard .command-hero-metrics small { grid-column: 1; grid-row: 2; }.clinical-dashboard .command-hero-metrics strong { grid-column: 2; grid-row: 1 / span 2; margin: 0; }.clinical-dashboard .rank-catalog-rows { padding: 7px; }.clinical-dashboard .rank-catalog-row { border-radius: 10px; }
}

/* Fraction Control Signature: charakterystyczny moment wejścia do panelu. */
.clinical-dashboard .command-center-hero {
  isolation: isolate;
  overflow: hidden;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.clinical-dashboard .command-center-hero::after {
  position: absolute;
  z-index: 0;
  top: -65%;
  right: 11%;
  width: 48%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 30deg, transparent 0 13%, rgba(140, 124, 255, .18) 19%, transparent 28% 49%, rgba(85, 209, 176, .16) 59%, transparent 67% 100%);
  filter: blur(1px);
  content: "";
  animation: clinical-halo 16s linear infinite;
}

.clinical-dashboard .clinical-hero-visual {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: clamp(18px, 4vw, 68px);
  width: clamp(214px, 21vw, 314px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.clinical-dashboard .clinical-hero-visual::before,
.clinical-dashboard .clinical-hero-visual::after {
  position: absolute;
  inset: 26%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(85, 209, 176, .3), rgba(126, 102, 239, .14) 34%, transparent 70%);
  filter: blur(10px);
  content: "";
  animation: clinical-core-breathe 3.8s ease-in-out infinite;
}

.clinical-dashboard .clinical-hero-visual::after {
  inset: 39%;
  background: #72e1c5;
  filter: blur(19px);
  opacity: .64;
  animation-delay: -1.8s;
}

.clinical-dashboard .clinical-orbit {
  position: absolute;
  display: block;
  border: 1px solid rgba(192, 184, 255, .42);
  border-radius: 50%;
  box-shadow: inset 0 0 24px rgba(113, 90, 230, .11), 0 0 18px rgba(133, 110, 245, .08);
}

.clinical-dashboard .orbit-one {
  inset: 3%;
  border-top-color: #a99aff;
  border-right-color: rgba(85, 209, 176, .72);
  transform: rotateX(66deg) rotateZ(-18deg);
  animation: clinical-orbit-one 11s linear infinite;
}

.clinical-dashboard .orbit-two {
  inset: 14%;
  border-color: rgba(85, 209, 176, .39);
  border-bottom-color: #89e7cf;
  transform: rotateX(66deg) rotateZ(51deg);
  animation: clinical-orbit-two 8s linear infinite reverse;
}

.clinical-dashboard .orbit-three {
  inset: 25%;
  border-color: rgba(196, 187, 255, .38);
  border-left-color: #c1b8ff;
  transform: rotateX(66deg) rotateZ(-52deg);
  animation: clinical-orbit-one 6.5s linear infinite reverse;
}

.clinical-dashboard .clinical-orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 1px solid rgba(232, 229, 255, .74);
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(145deg, rgba(183, 168, 255, .94), rgba(97, 77, 205, .9));
  box-shadow: 0 0 0 7px rgba(153, 132, 255, .09), 0 14px 38px rgba(74, 49, 170, .48), inset 0 1px 0 rgba(255, 255, 255, .55);
  font-size: 35px;
  font-weight: 300;
  line-height: 1;
  transform: translate(-50%, -50%) rotate(45deg);
  animation: clinical-core-float 4.5s ease-in-out infinite;
}

.clinical-dashboard .clinical-orbit-core i { display: block; font-style: normal; transform: rotate(-45deg); }

.clinical-dashboard .clinical-orbit-label {
  position: absolute;
  right: 4%;
  bottom: 13%;
  padding: 5px 7px;
  border: 1px solid rgba(127, 235, 209, .34);
  border-radius: 7px;
  color: #a4f0db;
  background: rgba(7, 16, 25, .72);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .16em;
}

.clinical-dashboard .command-hero-copy,
.clinical-dashboard .command-hero-metrics { z-index: 2; }
.clinical-dashboard .command-hero-copy { max-width: 560px; }
.clinical-dashboard .command-hero h2 { max-width: 530px; font-size: clamp(31px, 3.2vw, 47px); letter-spacing: -.055em; text-wrap: balance; }
.clinical-dashboard .command-hero-copy > p:not(.eyebrow) { max-width: 505px; color: #c1cbde; }
.clinical-dashboard .hero-status { border-color: rgba(85, 209, 176, .31); background: rgba(9, 28, 33, .38); box-shadow: 0 7px 22px rgba(0, 0, 0, .12); }

.clinical-dashboard .command-hero-metrics > div {
  position: relative;
  overflow: hidden;
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.clinical-dashboard .command-hero-metrics > div::after {
  position: absolute;
  top: -36px;
  right: -32px;
  width: 85px;
  height: 85px;
  border: 1px solid rgba(174, 164, 255, .17);
  border-radius: 50%;
  content: "";
}

.clinical-dashboard .command-hero-metrics > div:hover { border-color: rgba(175, 163, 255, .57); background: rgba(17, 27, 45, .62); transform: translateX(-3px); }

.clinical-dashboard .stats .stat,
.clinical-dashboard .panel,
.clinical-dashboard .quick-action {
  transition: border-color .28s ease, box-shadow .28s ease, transform .28s ease, background .28s ease;
}

.clinical-dashboard .stats .stat { position: relative; overflow: hidden; }
.clinical-dashboard .stats .stat::after { position: absolute; right: -18px; bottom: -22px; width: 86px; height: 86px; border: 1px solid color-mix(in srgb, var(--ui-accent), transparent 73%); border-radius: 50%; box-shadow: 0 0 0 14px color-mix(in srgb, var(--ui-accent), transparent 91%); content: ""; }
.clinical-dashboard .stats .stat:hover,
.clinical-dashboard .panel:hover { border-color: color-mix(in srgb, var(--ui-accent), transparent 45%); box-shadow: 0 16px 38px rgba(0, 0, 0, .18), 0 0 28px color-mix(in srgb, var(--ui-accent), transparent 92%); }
.clinical-dashboard .stats .stat:hover { transform: translateY(-3px); }

/* Ten sam język marki poza dashboardem: świetlna warstwa i techniczna głębia. */
.login-shell,
.server-select-hero,
.setup-hero,
.owner-hero,
.knowledge-hero,
.rating-spin-card,
.billing-blocked-card,
.appeal-card,
.legal-document-hero,
.not-found-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.login-shell::after,
.server-select-hero::after,
.setup-hero::after,
.owner-hero::after,
.knowledge-hero::after,
.rating-spin-card::after,
.billing-blocked-card::after,
.appeal-card::after,
.legal-document-hero::after,
.not-found-card::after {
  position: absolute;
  z-index: 0;
  top: -120px;
  right: -90px;
  width: 270px;
  height: 270px;
  border: 1px solid rgba(166, 153, 255, .22);
  border-radius: 50%;
  box-shadow: 0 0 0 30px rgba(141, 120, 244, .035), 0 0 0 74px rgba(85, 209, 176, .025);
  content: "";
  animation: clinical-halo 20s linear infinite reverse;
}

.login-shell > *,
.server-select-hero > *,
.setup-hero > *,
.owner-hero > *,
.knowledge-hero > *,
.rating-spin-card > *,
.billing-blocked-card > *,
.appeal-card > *,
.legal-document-hero > *,
.not-found-card > * { position: relative; z-index: 1; }

@keyframes clinical-halo { to { transform: rotate(360deg); } }
@keyframes clinical-orbit-one { to { transform: rotateX(66deg) rotateZ(342deg); } }
@keyframes clinical-orbit-two { to { transform: rotateX(66deg) rotateZ(411deg); } }
@keyframes clinical-core-breathe { 50% { transform: scale(1.16); opacity: .7; } }
@keyframes clinical-core-float { 50% { transform: translate(-50%, -56%) rotate(45deg) scale(1.04); } }

@media (max-width: 900px) {
  .clinical-dashboard .clinical-hero-visual { right: -34px; opacity: .46; }
}

@media (max-width: 680px) {
  .clinical-dashboard .clinical-hero-visual { display: none; }
  .clinical-dashboard .command-center-hero::after { right: -22%; width: 88%; }
  .clinical-dashboard .stats .stat:hover,
  .clinical-dashboard .panel:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .clinical-dashboard .command-center-hero::after,
  .clinical-dashboard .clinical-hero-visual::before,
  .clinical-dashboard .clinical-hero-visual::after,
  .clinical-dashboard .clinical-orbit,
  .clinical-dashboard .clinical-orbit-core,
  .login-shell::after,
  .server-select-hero::after,
  .setup-hero::after,
  .owner-hero::after,
  .knowledge-hero::after,
  .rating-spin-card::after,
  .billing-blocked-card::after,
  .appeal-card::after,
  .legal-document-hero::after,
  .not-found-card::after { animation: none; }
}
