:root {
  --hoters-red: #ef3328;
  --hoters-red-deep: #9f1717;
  --hoters-ink: #140000;
  --bg: #f3f1ef;
  --surface: #ffffff;
  --text: #1c1917;
  --muted: #78716c;
  --line: #e7e5e4;
  --sidebar: #171210;
  --sidebar-text: #f5f5f4;
  --ok: #15803d;
  --off: #b91c1c;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(20, 0, 0, 0.08);
  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --nav: 196px;
  --nav-mini: 68px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  min-height: 0;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3, .auth-brand, .sidebar__brand strong, .stat-card__value, .topbar__title, .scene__id {
  font-family: var(--font-display);
}

/* Auth */
.auth-body {
  min-height: 100vh;
  background: #0f0b0a;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

.auth-visual {
  position: relative;
  overflow: hidden;
  padding: 48px;
  color: #fff;
  background:
    radial-gradient(1200px 600px at -10% 10%, rgba(239, 51, 40, 0.35), transparent 55%),
    linear-gradient(160deg, #140000 0%, #2a0d0d 45%, #120808 100%);
}

.auth-visual__glow {
  position: absolute;
  inset: auto -20% -30% auto;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 51, 40, 0.45), transparent 70%);
  filter: blur(10px);
}

.auth-visual__content {
  position: relative;
  max-width: 420px;
  margin-top: 18vh;
}

.auth-brand {
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fecaca;
  margin: 0 0 12px;
}

.auth-visual h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.05;
  margin: 0 0 16px;
}

.auth-lead {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent),
    #1a1412;
}

.auth-panel__inner {
  width: 100%;
  max-width: 420px;
}

.auth-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.auth-kicker {
  margin: 0 0 8px;
  color: var(--hoters-red-deep);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.auth-card h2 {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

.auth-copy {
  margin: 0 0 24px;
  color: var(--muted);
}

.auth-form .form-field,
.form-panel .form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.92rem;
}

.form-control {
  border-radius: 10px;
  border-color: var(--line);
  padding: 0.7rem 0.85rem;
  min-height: 46px;
}

.form-control:focus {
  border-color: var(--hoters-red);
  box-shadow: 0 0 0 0.2rem rgba(239, 51, 40, 0.15);
}

.btn-primary {
  background: var(--hoters-red);
  border-color: var(--hoters-red);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--hoters-red-deep);
  border-color: var(--hoters-red-deep);
}

.btn-auth {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  font-weight: 700;
  margin-top: 8px;
}

.auth-errors {
  margin-bottom: 12px;
}

/* App shell */
.app-body { background: var(--bg); height: 100%; }

.app-shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--nav) minmax(0, 1fr);
}

html.nav-mini .app-shell {
  grid-template-columns: var(--nav-mini) minmax(0, 1fr);
  overflow-x: hidden;
}

.sidebar {
  --sidebar-w: var(--nav);
  width: var(--sidebar-w);
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  padding: 16px 10px;
  height: 100%;
  min-height: 0;
  position: relative;
  z-index: 30;
  transition: width 0.18s ease;
}

html.nav-mini .sidebar { --sidebar-w: var(--nav-mini); }

html.nav-mini .sidebar:not(:hover) {
  overflow: hidden;
  padding-left: 0;
  padding-right: 0;
}

html.nav-mini .sidebar:not(:hover) .sidebar__nav {
  overflow: hidden;
}

html.nav-mini .sidebar:not(:hover) .sidebar__section {
  display: none;
}

html.nav-mini .sidebar:not(:hover) .sidebar__brand,
html.nav-mini .sidebar:not(:hover) .sidebar__link,
html.nav-mini .sidebar:not(:hover) .sidebar__user,
html.nav-mini .sidebar:not(:hover) .btn-logout,
html.nav-mini .sidebar:not(:hover) .sidebar__pin {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

html.nav-mini .sidebar:not(:hover) .sidebar__icon {
  width: var(--nav-mini);
  min-width: 0;
}

html.nav-mini .sidebar:not(:hover) .sidebar__avatar {
  margin-left: auto;
  margin-right: auto;
}

html.nav-mini .sidebar:not(:hover) .sidebar__label { display: none; }

html.nav-mini .sidebar:hover {
  --sidebar-w: var(--nav);
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  height: 100vh;
  overflow: hidden;
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.35);
}

html.nav-mini .sidebar:hover .sidebar__nav {
  overflow: auto;
}

.sidebar__brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 8px 18px;
  min-height: 56px;
}

.sidebar__logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--hoters-red), var(--hoters-red-deep));
  font-family: var(--font-display);
  font-weight: 800;
  flex-shrink: 0;
}

.sidebar__brand .sidebar__label strong { display: block; line-height: 1.1; }
.sidebar__brand .sidebar__label small { color: #a8a29e; }

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.sidebar__section {
  margin: 14px 8px 6px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #78716c;
  min-height: 18px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 8px;
  border-radius: 10px;
  color: #e7e5e4;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar__icon {
  width: 44px;
  min-width: 44px;
  height: 42px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
}

.sidebar__icon i {
  display: block;
  width: 1.1em;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1;
}

.sidebar__label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  font-size: 0.92rem;
}

html.nav-mini .sidebar:not(:hover) .sidebar__label { display: none; }
/* section handled above via display:none in mini */

.sidebar__link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.sidebar__link.is-active {
  background: rgba(239, 51, 40, 0.18);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--hoters-red);
}

.sidebar__link.is-disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.sidebar__footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar__user {
  display: flex;
  align-items: center;
  padding: 0 4px;
}

.sidebar__avatar,
.person-cell__avatar {
  width: 36px;
  height: 36px;
  margin: 0 4px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #44403c;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar__user .sidebar__label strong { display: block; font-size: 0.85rem; }
.sidebar__user .sidebar__label small {
  display: block;
  color: #a8a29e;
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout,
.sidebar__pin {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #e7e5e4;
  cursor: pointer;
  text-align: left;
  font-weight: 600;
}

.btn-logout:hover,
.sidebar__pin:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

html.nav-mini .pin-icon--collapse { display: none; }
html:not(.nav-mini) .pin-icon--expand { display: none; }

.nav-burger,
.nav-backdrop { display: none; }

.app-main {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 28px 8px;
  flex-shrink: 0;
}

.topbar__title {
  margin: 0;
  font-size: 1.65rem;
}

.topbar__subtitle {
  margin: 4px 0 0;
  color: var(--muted);
}

.content {
  flex: 1;
  min-height: 0;
  padding: 12px 28px 28px;
  overflow: auto;
}

.content--workspace {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.workspace-flash {
  margin: 10px 14px 0;
  flex-shrink: 0;
}

/* Workspace */
.workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.workspace--config {
  padding: 0 0 20px;
  overflow: auto;
}

.workspace--config .panel-card,
.workspace--config .legend-box,
.workspace--config .template-edit,
.workspace--config .workspace-panel {
  margin-left: 14px;
  margin-right: 14px;
}

.workspace-panel {
  margin-top: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.settings-tabs__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.settings-tabs__link:hover {
  color: var(--text);
  border-color: #d6d3d1;
}

.settings-tabs__link.is-active {
  background: #1c1917;
  border-color: #1c1917;
  color: #fff;
}

.workspace-hero {
  flex-shrink: 0;
  padding: 12px 14px 6px;
  background: linear-gradient(135deg, #1c1917 0%, #3f1a16 55%, #9f1717 140%);
  color: #fafaf9;
}

.workspace-hero__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.workspace-hero__lead {
  margin: 4px 0 0;
  max-width: 46rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
}

.workspace__toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 8px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.workspace__subbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 14px 10px;
  background: #fafaf9;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.workspace__subbar-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.workspace__tabs,
.workspace__filters {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  padding: 0;
  flex-shrink: 0;
}

.workspace__filters {
  flex-wrap: wrap;
}

.workspace__sep {
  width: 1px;
  height: 22px;
  background: var(--line);
  flex-shrink: 0;
}

.workspace__tab {
  padding: 7px 11px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.84rem;
  white-space: nowrap;
}

.workspace__tab.is-active {
  color: #fff;
  background: var(--hoters-red);
  border-color: var(--hoters-red);
}

.workspace__filters .chip-filter {
  white-space: nowrap;
}

.workspace__grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  border-top: 0;
}

.workspace--config > .mb-3 {
  margin-left: 14px;
  margin-right: 14px;
}

.queue {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f5f5f4;
  border-right: 1px solid var(--line);
}

.queue__search {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  background: #fff;
}

.queue__search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 10px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafaf9;
  color: var(--muted);
}

.queue__search-wrap:focus-within {
  border-color: #d6d3d1;
  background: #fff;
}

.queue__search-wrap .form-control {
  border: 0;
  background: transparent;
  box-shadow: none;
  min-height: 34px;
  padding: 0.35rem 0;
}

.queue__list {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.queue__empty,
.workspace-empty {
  padding: 28px 16px;
  color: var(--muted);
  text-align: center;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.queue__empty i,
.workspace-empty > i {
  font-size: 1.4rem;
  opacity: 0.55;
}

.queue__empty p,
.workspace-empty p {
  margin: 0;
}

.queue-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
  background: #fff;
  box-shadow: 0 1px 0 rgba(28, 25, 23, 0.04);
}

.queue-card:hover {
  border-color: #e7e5e4;
}

.queue-card.is-active {
  border-color: var(--hoters-red);
  box-shadow: inset 3px 0 0 var(--hoters-red);
}

.queue-card.has-multi {
  background: linear-gradient(180deg, #fff 0%, #fff7ed 100%);
}

.queue-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #f5f5f4;
  color: #57534e;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.queue-card.is-active .queue-card__icon {
  background: color-mix(in srgb, var(--hoters-red) 12%, #fff);
  color: var(--hoters-red);
}

.queue-card__body {
  min-width: 0;
}

.queue-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.status-pill {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1.2;
}

.status-pill--on {
  color: #166534;
  background: #dcfce7;
}

.status-pill--off {
  color: #991b1b;
  background: #fee2e2;
}

.queue-card__id {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-card__type {
  font-weight: 700;
  font-size: 0.9rem;
  margin: 2px 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-card__sub {
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-card__sub i {
  margin-right: 3px;
  opacity: 0.7;
}

.queue-card__multi {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ffedd5;
  color: #9a3412;
  font-size: 0.72rem;
  font-weight: 700;
}

.queue-card__multi-open {
  font-weight: 600;
  opacity: 0.85;
}

.badge-multi {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #ffedd5;
  color: #9a3412;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-multi__open {
  font-weight: 600;
  opacity: 0.85;
}

.badge-soft i {
  margin-right: 4px;
}

.sibling-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.sibling-links a {
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  padding: 2px 7px;
  border-radius: 6px;
  background: #f5f5f4;
  color: var(--text);
}

.sibling-links a:hover {
  background: color-mix(in srgb, var(--hoters-red) 12%, #fff);
  color: var(--hoters-red);
}

.source-block__title i {
  margin-right: 6px;
  opacity: 0.7;
}

.workspace__tab i,
.chip-filter i {
  margin-right: 5px;
  font-size: 0.85em;
}

.btn i {
  margin-right: 0.35em;
}

.btn-sm i {
  margin-right: 0;
}

.scene {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.scene__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.scene__head-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
}

.scene__id { margin: 0; font-size: 1.15rem; }

.badge-soft {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f5f5f4;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.scene__nav { display: flex; gap: 6px; flex-shrink: 0; }

.scene__body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.scene__split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
}

.scene__source,
.scene__editor {
  min-height: 0;
  overflow: auto;
  padding: 12px 14px;
}

.scene__source {
  border-right: 1px solid var(--line);
  background: #fafaf9;
}

.scene__editor { background: #fff; }

.scene__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
}

.source-pane,
.editor-pane { display: grid; gap: 14px; }

.source-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.source-block__title {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 10px;
}

.send-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.send-log li {
  display: grid;
  gap: 2px;
  font-size: 0.9rem;
}

.alert-soft {
  border: none;
  border-radius: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.stat-card__go {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.stat-card__go:hover {
  border-color: var(--hoters-red);
  color: var(--hoters-red);
}

.stat-card,
.panel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.stat-card {
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 51, 40, 0.16), transparent 70%);
}

.stat-card__label {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.stat-card__value {
  display: block;
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-card__meta {
  color: #a8a29e;
  font-size: 0.82rem;
}

.panel-card {
  padding: 22px;
}

.panel-card__title {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.panel-card__text {
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

.admin-table {
  --bs-table-bg: transparent;
}

.admin-table thead th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom-color: var(--line);
}

.admin-table--wrap {
  table-layout: fixed;
  width: 100%;
  max-width: 100%;
}

.admin-table--wrap th,
.admin-table--wrap td {
  vertical-align: middle;
}

.cell-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-all;
  white-space: normal !important;
}

.cell-wrap strong,
.cell-wrap a,
.cell-wrap div {
  display: inline;
  overflow-wrap: anywhere;
  word-break: break-all;
  white-space: normal !important;
}

.workspace-panel .table-responsive {
  max-width: 100%;
  overflow-x: auto;
}

.person-cell {
  display: flex;
  gap: 12px;
  align-items: center;
}

.person-cell__avatar {
  background: #f5e6e4;
  color: var(--hoters-red-deep);
}

.muted { color: var(--muted); }

.role-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f5f5f4;
  border: 1px solid var(--line);
  font-size: 0.8rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.status--ok { color: var(--ok); }
.status--off { color: var(--off); }
.status--warn { color: #b45309; }

.mod-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.mod-tabs__link {
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 600;
}

.mod-tabs__link.is-active {
  color: #fff;
  background: var(--hoters-red);
  border-color: var(--hoters-red);
}

.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.chip-filter {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.chip-filter.is-active {
  background: #1c1917;
  border-color: #1c1917;
  color: #fff;
}

.chip-filter__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f5f5f4;
  color: #57534e;
  font-size: 0.78em;
  font-weight: 700;
}

.chip-filter.is-active .chip-filter__count {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

.detail-list {
  margin: 0;
  display: grid;
  gap: 12px;
}

.detail-list div {
  display: grid;
  gap: 2px;
}

.detail-list dt {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  font-weight: 600;
}

.verify-photo {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.verify-photo img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: #111;
}

.decision-card {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fafaf9;
  display: grid;
  gap: 8px;
}

.decision-card__title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.decision-card__hint {
  line-height: 1.45;
}

.search-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.search-row__field {
  flex: 1;
  min-width: 220px;
}

.search-row .form-control {
  flex: 1;
  min-width: 0;
}

@media (max-width: 992px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.form-panel {
  max-width: 640px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.role-checklist {
  display: grid;
  gap: 10px;
}

.role-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  background: #fafaf9;
}

.role-check input {
  margin-top: 4px;
}

.role-check strong {
  display: block;
}

.role-check small {
  color: var(--muted);
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.legend-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.legend-box summary {
  cursor: pointer;
  font-weight: 700;
  color: #1c1917;
}

.legend-box__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin-top: 12px;
}

.legend-box__grid p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.legend-box--compact p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.legend-list {
  margin: 8px 0 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.legend-list li {
  margin-bottom: 6px;
}

.legend-list strong {
  color: var(--text);
}

.report-decision {
  display: grid;
  grid-template-columns: 1.35fr 0.75fr;
  gap: 16px;
  align-items: start;
}

.report-decision__main,
.report-decision__side {
  display: grid;
  gap: 16px;
}

.sticky-panel {
  position: sticky;
  top: 16px;
}

.report-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.report-meta__title {
  margin: 2px 0 4px;
  font-family: Syne, sans-serif;
  font-size: 1.35rem;
}

.user-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: stretch;
}

.user-pair__arrow {
  align-self: center;
  color: var(--muted);
  font-size: 1.4rem;
}

.user-pair__labels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
  padding: 0 0 0 0;
}

.user-pair__labels span {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.user-pair__labels span:last-child {
  text-align: right;
}

.user-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafaf9;
}

.user-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: #e7e5e4;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}

.user-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.mod-user-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 96px;
}

.mod-user-card__avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
  background: #e7e5e4;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 700;
}

.mod-user-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mod-user-card__name {
  display: block;
  margin-bottom: 2px;
}

.mod-user-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.mod-user-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.mod-content-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.chip--ok { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.chip--warn { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.chip--off { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

.content-desc {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.content-desc p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.media-grid--thumbs {
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
}

.media-tile--thumb img,
.media-tile--thumb video {
  height: 88px;
}

.media-thumb-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #111;
  cursor: zoom-in;
}

.media-thumb-btn img,
.media-thumb-btn video {
  display: block;
  width: 100%;
  height: 88px;
  object-fit: cover;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.88);
  display: grid;
  place-items: center;
  padding: 24px;
}

.lightbox[hidden] { display: none !important; }

.lightbox__stage {
  max-width: min(96vw, 1100px);
  max-height: 90vh;
}

.lightbox__img,
.lightbox__video {
  display: block;
  max-width: 96vw;
  max-height: 90vh;
  margin: 0 auto;
  border-radius: 8px;
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}


.media-tile {
  margin: 0;
  border: 2px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fafaf9;
}

.media-tile--selected { border-color: #ef3328; }
.media-tile--attachment { border-color: #b45309; }
.media-tile--content { border-color: #57534e; }

.media-tile img,
.media-tile video {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: #111;
}

.media-tile figcaption {
  padding: 6px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.media-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.media-tag {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.media-tag--selected { border-color: #ef3328; color: #9f1717; }
.media-tag--attachment { border-color: #b45309; color: #92400e; }
.media-tag--content { border-color: #57534e; }

.quick-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.quick-actions__title {
  margin: 4px 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.quick-form .form-field { margin-bottom: 12px; }

.check-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  margin: 8px 0 4px;
}

.soft-hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}

.template-edit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.code-area {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
}

.email-preview {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #fafaf9;
  min-height: 220px;
  line-height: 1.55;
  overflow: auto;
}

.seo-preview {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  min-height: 160px;
  line-height: 1.55;
  overflow: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.seo-preview--full {
  max-height: min(70vh, 720px);
}

.seo-preview h1,
.seo-preview h2,
.seo-preview h3 {
  margin-top: 0.8em;
  margin-bottom: 0.4em;
}

.seo-preview p {
  margin: 0 0 0.75em;
}

.workspace--seo .workspace__grid--templates {
  grid-template-columns: 280px minmax(0, 1fr);
}

.workspace--seo .scene__head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.workspace--seo .seo-edit-form .form-field {
  margin-bottom: 12px;
}

.workspace--seo .seo-edit-form .form-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.82rem;
  color: var(--muted);
}

.workspace--hotline .workspace__grid--templates {
  grid-template-columns: 300px minmax(0, 1fr);
}

.workspace--hotline .queue-card {
  grid-template-columns: 40px minmax(0, 1fr);
}

.workspace--hotline .hotline-search {
  flex: 1;
  max-width: 360px;
  border: 0;
  background: transparent;
  padding: 0;
  margin-left: auto;
}

.workspace--hotline .queue__meta {
  padding: 8px 12px;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--line);
  background: #fff;
  flex-shrink: 0;
}

.workspace--hotline .queue__more {
  padding: 10px;
  border-top: 1px solid var(--line);
  text-align: center;
  background: #fff;
  flex-shrink: 0;
}

.workspace--hotline .queue-card__thumb {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e7e5e4;
}

.workspace--hotline .queue-card__pop {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--hoters-red-deep, #9f1239);
}

.workspace--hotline .scene__head-main {
  align-items: flex-start;
}

.workspace--hotline .scene__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin-top: 4px;
}

.workspace--hotline .scene__head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.workspace--hotline .event-cover--sm {
  width: 64px;
}

.workspace--hotline .event-cover--sm .event-cover__img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
}

.workspace--hotline .scene__split--hotline {
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
}

.workspace--hotline .scene__body--scroll {
  overflow: auto;
}

.workspace--hotline .min-w-0 {
  min-width: 0;
}

@media (max-width: 1100px) {
  .workspace--hotline .scene__split--hotline {
    grid-template-columns: 1fr;
  }
}

.email-preview--full {
  max-height: min(70vh, 640px);
  background: #f5f5f4;
  padding: 12px;
}

.workspace--templates {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}

.workspace--templates .workspace__grid--templates {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
}

.workspace__subbar--settings {
  background: #fff;
}

.workspace__subbar--stacked {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.workspace__subbar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.scene__split--templates {
  grid-template-columns: 1.15fr 0.85fr;
}

@media (max-width: 1100px) {
  .scene__split {
    grid-template-columns: 1fr;
  }

  .scene__source {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: 42vh;
  }
}

@media (max-width: 992px) {
  .detail-grid,
  .report-decision,
  .template-edit,
  .legend-box__grid {
    grid-template-columns: 1fr;
  }

  .user-pair {
    grid-template-columns: 1fr;
  }

  .user-pair__arrow,
  .user-pair__labels {
    display: none;
  }

  .sticky-panel {
    position: static;
  }

  .workspace__grid {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .auth-shell,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 220px;
    padding: 28px;
  }

  .auth-visual__content {
    margin-top: 0;
  }
}

@media (max-width: 767px) {
  .nav-burger {
    display: grid;
    gap: 5px;
    place-content: center;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 60;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: var(--sidebar);
    box-shadow: var(--shadow);
  }

  .nav-burger span {
    display: block;
    width: 18px;
    height: 2px;
    background: #fff;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 45;
  }

  .nav-backdrop[hidden] { display: none !important; }

  .app-shell {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(86vw, var(--nav)) !important;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    z-index: 50;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.35);
  }

  html.nav-open .sidebar {
    transform: translateX(0);
  }

  html.nav-mini .sidebar:hover {
    position: fixed;
    width: min(86vw, var(--nav)) !important;
  }

  .sidebar__pin {
    display: none !important;
  }

  html.nav-mini .sidebar:not(:hover) .sidebar__label {
    display: initial;
  }

  .app-main {
    padding-top: 8px;
  }

  .topbar {
    padding-left: 64px;
  }

  .workspace__grid {
    grid-template-columns: 1fr;
  }

  .queue {
    max-height: 36vh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

/* —— Users admin —— */
.dash-search {
  margin-bottom: 18px;
}

.user-suggest {
  position: relative;
}

.user-suggest__box {
  position: relative;
  max-width: 560px;
}

.user-suggest__field {
  width: 100%;
}

.user-suggest__hint {
  margin-top: 8px;
}

.user-suggest__panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(28, 25, 23, 0.12);
  max-height: 320px;
  overflow: auto;
  padding: 6px;
}

.user-suggest__item {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
}

.user-suggest__item:hover,
.user-suggest__item.is-active {
  background: #f5f5f4;
}

.user-suggest__name {
  font-weight: 650;
  color: #1c1917;
}

.user-suggest__meta {
  font-size: 0.86rem;
  color: var(--muted);
}

.user-suggest__badge {
  margin-left: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #b91c1c;
}

.user-suggest__empty {
  padding: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.load-more {
  margin-top: 16px;
  text-align: center;
}

/* User detail — bar + cards + packages */
.user-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.user-bar__main {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
  flex: 1 1 280px;
}

.user-bar__text {
  min-width: 0;
  flex: 1 1 auto;
}

.user-bar__avatar {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: #e7e5e4;
  flex-shrink: 0;
}

.user-bar__avatar--empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.user-bar__crumb {
  margin: 0 0 2px;
  font-size: 0.85rem;
}

.user-bar__title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.user-bar__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin-top: 4px;
}

.user-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.user-bar__actions .btn i {
  margin-right: 6px;
}

.event-cover {
  position: relative;
  width: 88px;
  flex-shrink: 0;
}

.event-cover__img {
  width: 88px;
  height: 88px;
  border-radius: 14px;
  object-fit: cover;
  background: #e7e5e4;
  display: block;
}

.event-cover__img--empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 1.4rem;
}

.event-cover__ops {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.event-cover__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: #292524;
  font-size: 0.72rem;
  cursor: pointer;
  margin: 0;
}

.event-cover__btn input {
  display: none;
}

.event-cover__btn:hover {
  background: #f5f5f4;
}

.event-cover__btn--danger {
  color: #b91c1c;
  border-color: #fecaca;
}

.event-members {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
}

.event-members__item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.event-members__item--off {
  opacity: 0.55;
}

.event-members__avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  background: #e7e5e4;
  flex-shrink: 0;
}

.event-members__avatar--empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.event-members__meta {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.event-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.event-stats__item {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fafaf9;
  border: 1px solid var(--line);
}

.event-stats__item--wide {
  grid-column: 1 / -1;
}

.event-stats__item strong {
  font-size: 1.15rem;
  line-height: 1.2;
}

.event-stats__item span {
  color: var(--muted);
  font-size: 0.82rem;
}

.event-stats__item em {
  font-style: normal;
  font-size: 0.75rem;
}

.user-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.profile-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  min-height: 140px;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.profile-card__h {
  margin: 0 0 12px;
  font-size: 1rem;
}

.profile-card__lead {
  margin: 0 0 12px;
  font-weight: 650;
}

.profile-card__details {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.profile-card__details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
}

.user-packages {
  margin-bottom: 16px;
}

.user-packages__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.user-packages__add {
  margin-bottom: 16px;
  padding: 14px;
  background: #fafaf9;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

.user-packages__add-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.user-packages__add-actions {
  padding-bottom: 2px;
}

.pkg-table th,
.pkg-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.club-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #fcd34d;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #78350f;
}

.club-banner__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #f59e0b;
  color: #fff;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.club-banner strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.rank-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #bbf7d0;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  color: #14532d;
}

.rank-banner--empty {
  border-color: var(--line);
  background: #fafaf9;
  color: #44403c;
}

.rank-banner__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #16a34a;
  color: #fff;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.rank-banner--empty .rank-banner__icon {
  background: #a8a29e;
}

.rank-banner strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.rank-banner__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.rank-banner__list li {
  display: block;
}

.rank-banner__link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  transition: background .15s ease;
}

.rank-banner__link:hover,
.rank-banner__link:focus-visible {
  background: rgba(22, 163, 74, 0.12);
  outline: none;
}

.rank-banner__place {
  font-weight: 800;
  min-width: 2.2rem;
}

.rank-banner__ext {
  margin-left: auto;
  font-size: 0.75rem;
  opacity: 0.55;
}

.rank-banner__link:hover .rank-banner__ext {
  opacity: 1;
}

.status--club {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fdba74;
}

.status--user {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.pkg-row--mismatch {
  background: #fff7ed;
}

.pkg-row--active {
  background: #f0fdf4;
}

.pkg-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  background: #a8a29e;
  vertical-align: middle;
}

.pkg-dot--ok { background: #16a34a; }
.pkg-dot--off { background: #dc2626; }
.pkg-dot--warn { background: #ea580c; }

.pkg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  align-items: flex-start;
}

.pkg-edit {
  display: inline-block;
}

.pkg-edit > summary {
  list-style: none;
  cursor: pointer;
}

.pkg-edit > summary::-webkit-details-marker {
  display: none;
}

.pkg-edit__form {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  min-width: 180px;
  text-align: left;
}

@media (max-width: 1100px) {
  .user-cards {
    grid-template-columns: 1fr;
  }

  .user-packages__add-grid {
    grid-template-columns: 1fr;
  }
}

.user-admin__hero {
  display: flex;
  gap: 16px;
  align-items: center;
}

.user-admin__avatar {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  background: #e7e5e4;
  flex-shrink: 0;
}

.user-admin__avatar--empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 1.4rem;
}

.user-admin__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.user-admin__h {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.user-admin__dl {
  margin: 0;
  display: grid;
  gap: 10px;
}

.user-admin__dl > div {
  display: grid;
  gap: 2px;
}

.user-admin__dl dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.user-admin__dl dd {
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.user-admin__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.user-admin__stat {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: inherit;
  text-decoration: none;
  background: transparent;
  transition: background .15s ease, border-color .15s ease;
}

a.user-admin__stat {
  cursor: pointer;
}

a.user-admin__stat:hover,
a.user-admin__stat:focus-visible {
  background: #f5f5f4;
  border-color: var(--line);
  outline: none;
}

a.user-admin__stat span {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.user-admin__stat--static {
  cursor: default;
  opacity: 0.85;
}

.user-admin__stat strong {
  font-size: 1.25rem;
}

.user-admin__stat span {
  color: var(--muted);
  font-size: 0.85rem;
}

.user-admin .workspace-panel[id] {
  scroll-margin-top: 88px;
}

.user-admin__actions,
.user-admin__package-form {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.user-admin__albums {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.user-admin__album {
  display: grid;
  gap: 8px;
}

.user-admin__album-open {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
}

.user-admin__album-open img,
.user-admin__album-empty {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f5f5f4;
}

.user-admin__album-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 1.4rem;
}

.user-admin__album-meta {
  padding: 8px 10px 10px;
  display: grid;
  gap: 2px;
}

.user-admin__thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  background: #f5f5f4;
}

.user-admin-modal {
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  background: #fff;
}

.user-admin-modal::backdrop {
  background: rgba(28, 25, 23, 0.45);
}

.user-admin-modal__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.user-admin-modal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  padding: 16px;
  overflow: auto;
  max-height: min(60vh, 560px);
}

.user-admin-modal__item {
  display: grid;
  gap: 8px;
}

.user-admin-modal__item img,
.user-admin-modal__item video {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  background: #f5f5f4;
}

.user-admin-modal__footer {
  padding: 0 16px 16px;
}

@media (max-width: 960px) {
  .user-admin__grid {
    grid-template-columns: 1fr;
  }
}

.content-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.content-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  padding: 12px;
  background: #fafaf9;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.content-card--off {
  opacity: 0.72;
}

.content-card__media img,
.content-card__placeholder {
  width: 88px;
  height: 88px;
  border-radius: 10px;
  object-fit: cover;
  background: #e7e5e4;
}

.content-card__placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 1.25rem;
}

.content-card__body {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-content: start;
}

.content-card__desc {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.content-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.user-admin__albums {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.user-admin__album {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.user-admin__album-open {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.user-admin__album-open img,
.user-admin__album-empty {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  background: #f5f5f4;
}

.user-admin__album-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-actions .btn i {
  margin-right: 6px;
}

.event-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.event-edit-grid__full {
  grid-column: 1 / -1;
}

.event-edit-checks {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 4px;
}

@media (max-width: 900px) {
  .event-edit-grid {
    grid-template-columns: 1fr;
  }
}

/* —— Wyliczenia (Calculation) —— */
.calc {
  --calc-ink: #1a2332;
  --calc-muted: #5c6b7a;
  --calc-line: #e4e9ef;
  --calc-surface: #fff;
  --calc-wash: #f4f7fa;
  --calc-accent: #0d6e6e;
  --calc-in: #e8f6ef;
  --calc-out: #fdecee;
  --calc-rev: #fff6df;
  --calc-profit: #e4f6f7;
  max-width: 100%;
}

.calc__hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px 32px;
  margin-bottom: 22px;
  padding: 22px 24px;
  border-radius: 16px;
  background:
    radial-gradient(1200px 280px at 10% -40%, rgba(13, 110, 110, 0.14), transparent 55%),
    linear-gradient(165deg, #f8fbfc 0%, #eef3f6 100%);
  border: 1px solid var(--calc-line);
}

.calc__eyebrow {
  margin: 0 0 4px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--calc-accent);
  font-weight: 600;
}

.calc__title {
  margin: 0;
  font-family: Syne, sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  color: var(--calc-ink);
  letter-spacing: -0.02em;
}

.calc__lead {
  margin: 8px 0 0;
  max-width: 52ch;
  color: var(--calc-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.calc__month {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.calc__month-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--calc-muted);
}

.calc__month-label input[type="month"] {
  border: 1px solid var(--calc-line);
  border-radius: 10px;
  padding: 8px 12px;
  background: #fff;
  font-weight: 600;
  color: var(--calc-ink);
}

.calc__month-nav {
  display: flex;
  gap: 6px;
}

.calc__table-wrap {
  margin-bottom: 22px;
}

.calc__table-scroll {
  overflow-x: auto;
  border: 1px solid var(--calc-line);
  border-radius: 14px;
  background: var(--calc-surface);
  box-shadow: 0 1px 0 rgba(26, 35, 50, 0.04);
}

.calc-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.78rem;
}

.calc-table th,
.calc-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--calc-line);
  border-right: 1px solid #f0f3f6;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.calc-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f9fb;
  text-align: center;
  font-weight: 600;
  color: var(--calc-ink);
}

.calc-table thead th.is-open {
  opacity: 0.45;
}

.calc-table__dow {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--calc-muted);
  text-transform: lowercase;
}

.calc-table__sticky {
  position: sticky;
  left: 0;
  z-index: 3;
  text-align: left !important;
  background: #fff;
  font-weight: 600;
  color: var(--calc-ink);
  min-width: 160px;
  box-shadow: 4px 0 8px -6px rgba(0, 0, 0, 0.12);
}

.calc-table thead .calc-table__sticky {
  z-index: 4;
  background: #f7f9fb;
}

.calc-row--in td { background: var(--calc-in); }
.calc-row--in .calc-table__sticky { background: #dff3e8; }
.calc-row--out td { background: var(--calc-out); }
.calc-row--out .calc-table__sticky { background: #f9e0e3; }
.calc-row--rev td { background: var(--calc-rev); }
.calc-row--rev .calc-table__sticky { background: #f7edc8; }
.calc-row--profit td { background: var(--calc-profit); }
.calc-row--profit .calc-table__sticky { background: #d5eef0; }
.calc-row--person .calc-table__sticky { background: #eef1f4; }

.calc-cell--red { background: #fecaca !important; color: #7f1d1d; font-weight: 600; }
.calc-cell--blue { background: #bfdbfe !important; color: #1e3a8a; font-weight: 600; }
.calc-cell--yellow { background: #fde68a !important; color: #78350f; font-weight: 600; }
.calc-cell--gray { background: #e5e7eb !important; color: #1f2937; font-weight: 600; }
.calc-cell--cyan { background: #a5f3fc !important; color: #155e75; font-weight: 600; }

.calc__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-top: 10px;
  padding: 0 4px;
}

.calc-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 2px;
  vertical-align: middle;
}
.calc-dot--red { background: #fecaca; }
.calc-dot--blue { background: #bfdbfe; }
.calc-dot--yellow { background: #fde68a; }
.calc-dot--gray { background: #e5e7eb; }
.calc-dot--cyan { background: #a5f3fc; }

.calc__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.calc__grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calc-card--wide {
  grid-column: 1 / -1;
}

.calc-payout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.calc-payout-card {
  padding: 12px;
  border-radius: 10px;
  background: var(--calc-wash);
  border: 1px solid var(--calc-line);
}

.calc-payout-card h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
}

.calc-cost-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--calc-accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  text-align: left;
}

.calc-cost-link:hover { color: #0a5555; }

.calc-modal[hidden] { display: none !important; }
.calc-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 16px;
}
.calc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 40, 0.45);
}
.calc-modal__panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.18);
}
.calc-modal__panel h3 {
  margin: 0 0 14px;
  font-family: Syne, sans-serif;
  font-size: 1.15rem;
}
.calc-modal__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--calc-muted);
}
.calc-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.calc-modal__delete {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--calc-line);
}

@media (max-width: 1100px) {
  .calc__grid,
  .calc__grid--2 { grid-template-columns: 1fr; }
}

.calc-card {
  background: var(--calc-surface);
  border: 1px solid var(--calc-line);
  border-radius: 14px;
  padding: 18px 18px 16px;
}

.calc-card__h {
  margin: 0 0 12px;
  font-family: Syne, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--calc-ink);
}

.calc-card__h small {
  display: block;
  margin-top: 2px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--calc-muted);
}

.calc-stats {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.calc-stats > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #edf1f4;
}

.calc-stats dt {
  margin: 0;
  color: var(--calc-muted);
  font-weight: 500;
  font-size: 0.85rem;
}

.calc-stats dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--calc-ink);
}

.calc-stats--compact > div { border-bottom: none; padding-bottom: 2px; }

.calc-card__highlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0d6e6e 0%, #149494 100%);
  color: #fff;
}

.calc-card__hl-label {
  display: block;
  font-size: 0.72rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.calc-card__hl-value {
  font-family: Syne, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.calc-card__roi {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.calc-payout h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--calc-ink);
}

.calc-emphasis {
  color: var(--calc-accent) !important;
  font-size: 1.05rem !important;
}

.calc-payout__foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--calc-line);
  font-size: 0.85rem;
  color: var(--calc-muted);
}

.calc-payout__foot strong {
  color: var(--calc-ink);
  font-variant-numeric: tabular-nums;
}

.calc-costs {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.calc-costs th,
.calc-costs td {
  padding: 7px 6px;
  border-bottom: 1px solid var(--calc-line);
}

.calc-costs thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--calc-muted);
  font-weight: 600;
}

.calc-costs tfoot td {
  background: #fef2f2;
  color: #991b1b;
}

.calc-add {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--calc-line);
}

.calc-add__h {
  margin: 0 0 10px;
  font-size: 0.9rem;
  font-weight: 700;
}

.calc-add__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.calc-add__grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--calc-muted);
}

.calc-add__from { grid-column: 1 / -1; }

@media (max-width: 1100px) {
  .calc__grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .calc-add__grid { grid-template-columns: 1fr; }
}

/* —— Treści (infinite scroll) —— */
.workspace--content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.content-search { margin-left: auto; }

.content-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  padding: 16px 18px 8px;
  overflow: auto;
  flex: 1;
}

.content-feed__empty,
.content-feed__status {
  padding: 12px 18px 24px;
  color: var(--muted, #6b7280);
  font-size: 0.9rem;
}

.content-feed__sentinel { height: 1px; }

.content-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.content-card__media {
  aspect-ratio: 1;
  background: #f3f4f6;
  position: relative;
}

.content-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.content-card__empty {
  display: grid;
  place-items: center;
  height: 100%;
  color: #9ca3af;
  font-size: 1.6rem;
}

.content-card__video { position: relative; height: 100%; }
.content-card__play {
  position: absolute;
  inset: auto 10px 10px auto;
  background: rgba(0,0,0,.65);
  color: #fff;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
}

.content-card__body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.content-card__badge {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  font-weight: 600;
}
.content-card__title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.content-card__meta { font-size: 0.75rem; color: #6b7280; }
.content-card__user { font-size: 0.78rem; }
.content-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  align-items: center;
}
.content-card__link { font-size: 0.78rem; }
.content-card__btn {
  border: 0;
  background: transparent;
  font-size: 0.78rem;
  padding: 0;
  cursor: pointer;
}
.content-card__btn--danger { color: #b91c1c; }
.content-flash { margin: 8px 18px 0; }

/* —— Audyt —— */
.workspace--audit { padding: 0 0 24px; }
.audit-filters { flex-wrap: wrap; gap: 8px; }
.audit-filters__form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  width: 100%;
}
.audit-filters__form .form-select,
.audit-filters__form .form-control { max-width: 200px; }
.audit-meta { padding: 8px 18px; }
.audit-table-wrap { overflow: auto; padding: 0 18px; }
.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.audit-table th,
.audit-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
  text-align: left;
}
.audit-table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  position: sticky;
  top: 0;
  background: #fff;
}
.audit-table__time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.audit-table__details { max-width: 360px; }
.audit-table code {
  font-size: 0.78rem;
  background: #f3f4f6;
  padding: 1px 5px;
  border-radius: 4px;
}

/* —— Forum / Tagi —— */
.forum-comments { list-style: none; margin: 0; padding: 0; }
.forum-comments__item {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}
.forum-comments__item.is-deleted { opacity: 0.55; }
.forum-comments__meta { font-size: 0.78rem; color: #6b7280; margin-bottom: 4px; }
.forum-comments__text { white-space: pre-wrap; font-size: 0.9rem; }

.tags-layout { padding: 12px 18px 24px; }
.tags-create { margin-bottom: 16px; max-width: 520px; }
.tags-rename { display: flex; gap: 6px; align-items: center; }
.tags-table { margin: 0 18px 16px; width: calc(100% - 36px); }

/* —— Pakiety —— */
.packages-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.packages-form__grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #6b7280;
}
.packages-form__full { grid-column: 1 / -1; }
.packages-ent { font-size: 0.82rem; }
.packages-addon { max-width: 720px; }

@media (max-width: 700px) {
  .packages-form__grid { grid-template-columns: 1fr; }
}

/* —— Growth dashboard —— */
.growth-panel { padding: 18px; }
.growth-stats { margin-bottom: 8px; }
.growth-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: start;
}
.growth-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 140px;
  padding: 8px 0;
}
.growth-bars__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
}
.growth-bars__bar {
  width: 100%;
  max-width: 28px;
  min-height: 2px;
  background: linear-gradient(180deg, #f97316, #ea580c);
  border-radius: 4px 4px 0 0;
}
.growth-bars__label {
  font-size: 0.62rem;
  color: #9ca3af;
  margin-top: 4px;
}
@media (max-width: 900px) {
  .growth-split { grid-template-columns: 1fr; }
}


