
:root {
  --background: #f6f7f9;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --border: #dbe3ea;
  --border-strong: #cbd5e1;
  --text: #102033;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --good: #0f766e;
  --warn: #ca8a04;
  --danger: #dc2626;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--background);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.sidebar-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.loading-screen,
.login-screen {
  align-items: center;
  display: flex;
  min-height: 100vh;
  justify-content: center;
  padding: 24px;
}

.login-screen {
  background:
    linear-gradient(140deg, rgba(5, 30, 37, 0.98), rgba(6, 13, 26, 1) 58%, rgba(8, 47, 54, 0.96)),
    #06121f;
  overflow: hidden;
  position: relative;
}

.login-screen::before {
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  inset: 0;
  opacity: 0.28;
  pointer-events: none;
  position: absolute;
}

.login-screen::after {
  background:
    linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.09), transparent);
  content: "";
  height: 1px;
  left: 12%;
  pointer-events: none;
  position: absolute;
  right: 12%;
  top: 18%;
}

.login-panel {
  background: rgba(248, 250, 252, 0.98);
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 8px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.36);
  display: grid;
  grid-template-columns: minmax(430px, 1.08fr) minmax(360px, 0.92fr);
  max-width: 1080px;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 100%;
  z-index: 1;
}

.login-brand-panel {
  background:
    linear-gradient(180deg, rgba(7, 48, 57, 0.98), rgba(8, 16, 32, 1)),
    #0b1220;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 28px;
  justify-content: space-between;
  min-height: 560px;
  padding: 36px;
  position: relative;
}

.login-brand-panel::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
  position: absolute;
}

.login-brand-panel > * {
  position: relative;
  z-index: 1;
}

.login-brand-top {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.login-logo {
  display: block;
  height: auto;
  max-width: 236px;
  object-fit: contain;
  width: 100%;
}

.login-brand-top > span {
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 999px;
  color: #99f6e4;
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
  padding: 8px 10px;
  text-transform: uppercase;
}

.login-statement {
  display: grid;
  gap: 12px;
  margin: auto 0;
  max-width: 360px;
  padding: 0;
}

.login-statement span {
  color: #99f6e4;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-panel .login-statement p {
  color: #ffffff;
  font-size: clamp(1.35rem, 2.1vw, 1.7rem);
  font-weight: 850;
  line-height: 1.24;
  margin: 0;
  text-shadow: none;
}

.login-order-lines {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  max-width: 280px;
}

.login-order-lines i {
  background: linear-gradient(90deg, #5eead4, rgba(148, 163, 184, 0.2));
  border-radius: 999px;
  display: block;
  height: 2px;
  width: 100%;
}

.login-order-lines i:nth-child(2) {
  opacity: 0.72;
  width: 82%;
}

.login-order-lines i:nth-child(3) {
  opacity: 0.48;
  width: 64%;
}

.login-brand-copy {
  display: grid;
  gap: 12px;
  max-width: 420px;
}

.login-brand-copy span,
.login-form-heading span {
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-brand-copy span {
  color: #5eead4;
}

.login-brand-copy strong {
  color: #f8fafc;
  font-size: 1.45rem;
  line-height: 1.18;
}

.login-form-panel {
  align-content: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.98));
  display: grid;
  gap: 22px;
  padding: 48px;
}

.login-form-heading {
  display: grid;
  gap: 8px;
}

.login-form-heading span {
  color: var(--primary);
}

.login-footnote {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 8px;
}

.login-footnote::before {
  background: var(--good);
  border-radius: 999px;
  content: "";
  height: 7px;
  width: 7px;
}

.loading-panel {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 14px;
  min-width: min(360px, 100%);
  padding: 22px;
}

.loading-panel div {
  display: grid;
  gap: 3px;
}

.loading-panel strong {
  font-size: 1rem;
}

.loading-panel span:not(.spinner) {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.login-panel h1 {
  color: var(--text);
  font-size: 1.85rem;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0;
}

.login-panel p {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
}

.login-panel form {
  display: grid;
  gap: 16px;
}

.login-panel label {
  color: var(--muted);
  display: grid;
  font-size: 0.85rem;
  font-weight: 800;
  gap: 8px;
}

.login-panel .password-rule-hint {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.45;
  margin: -6px 0 0;
}

.login-panel input {
  background: #fbfdff;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text);
  min-height: 44px;
  padding: 0 12px;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.login-panel input:focus {
  background: #fff;
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  outline: 0;
}

.login-panel .primary-button {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
  font-weight: 850;
  min-height: 48px;
}

.login-panel .primary-button:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
}

.primary-button,
.ghost-button,
.clear-button,
.icon-button,
.filter-action {
  align-items: center;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-height: 40px;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.primary-button {
  background: var(--primary);
  color: #fff;
  margin-top: 4px;
  width: 100%;
}

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

.ghost-button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  margin-top: 12px;
  width: 100%;
}

.form-error,
.notice {
  align-items: center;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 42px;
  padding: 10px 12px;
}

.notice span {
  min-width: 0;
}

.form-error,
.notice.danger {
  background: #fff1f2;
  color: #be123c;
}

.notice.info {
  background: #eff6ff;
  color: #1d4ed8;
  justify-content: flex-start;
}

.spinner {
  animation: spin 850ms linear infinite;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
  height: 16px;
  width: 16px;
}

.spinner.large {
  color: var(--primary);
  height: 26px;
  width: 26px;
}

.app-shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 82px minmax(0, 1fr);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(20, 184, 166, 0.12), transparent 170px),
    #0b1220;
  border-right: 1px solid rgba(148, 163, 184, 0.18);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
  grid-column: 1;
  grid-row: 1;
  transition:
    padding 260ms cubic-bezier(0.2, 0.8, 0.2, 1),
    width 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sidebar.collapsed {
  align-items: center;
  cursor: pointer;
  padding: 18px 10px;
}

.sidebar-logo {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 62px;
  padding: 8px 10px 18px;
  width: 100%;
}

.sidebar-logo-image {
  display: block;
  height: auto;
  max-height: 30px;
  max-width: 188px;
  object-fit: contain;
  object-position: center;
  transform: translateY(1px);
  transition:
    max-width 220ms ease,
    max-height 220ms ease,
    opacity 180ms ease,
    transform 220ms ease;
  width: 100%;
}

.sidebar-logo-image.mark {
  max-height: 36px;
  max-width: 38px;
  transform: none;
}

.sidebar.collapsed .sidebar-logo {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.sidebar-footer span {
  color: #a7b4c8;
  font-size: 0.82rem;
}

.sidebar-backdrop {
  background: rgba(2, 6, 23, 0);
  border: 0;
  cursor: default;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition:
    background 240ms ease,
    opacity 240ms ease;
  z-index: 10;
}

.sidebar-backdrop.active {
  background: rgba(2, 6, 23, 0.66);
  cursor: pointer;
  opacity: 1;
  pointer-events: auto;
}

.sidebar-section-label {
  color: #718199;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  padding: 0 10px;
  text-transform: uppercase;
  transition:
    opacity 160ms ease,
    transform 200ms ease;
}

.sidebar-nav {
  display: grid;
  gap: 5px;
  width: 100%;
}

.sidebar-module {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #cbd5e1;
  display: grid;
  column-gap: 10px;
  grid-template-columns: 36px minmax(0, 1fr);
  min-height: 48px;
  padding: 9px 10px;
  position: relative;
  text-align: left;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    padding 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
    width 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
  width: 100%;
}

.sidebar-nav .sidebar-module {
  align-items: center;
  display: grid;
  justify-content: stretch;
  min-height: 48px;
}

.sidebar-module.active,
.sidebar-module:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(148, 163, 184, 0.18);
  color: #fff;
}

.sidebar-module.active {
  background: rgba(20, 184, 166, 0.13);
  border-color: rgba(45, 212, 191, 0.28);
  box-shadow: inset 3px 0 0 #2dd4bf;
}

.module-icon {
  align-items: center;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  color: #93c5fd;
  display: flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.sidebar-module.active .module-icon {
  background: rgba(20, 184, 166, 0.16);
  border-color: rgba(20, 184, 166, 0.22);
  color: #5eead4;
}

.module-icon svg {
  height: 18px;
  width: 18px;
}

.module-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  opacity: 1;
  overflow: hidden;
  transform: translateX(0);
  transition:
    opacity 160ms ease 70ms,
    transform 220ms ease 40ms;
}

.module-label {
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-footer {
  margin-top: auto;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 160ms ease 80ms,
    transform 220ms ease 50ms;
  width: 100%;
}

.sidebar.collapsed .sidebar-section-label {
  height: 0;
  overflow: hidden;
  padding-bottom: 0;
  padding-top: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
  visibility: hidden;
}

.sidebar.collapsed .module-copy {
  height: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transform: translateX(-8px);
  transition:
    opacity 90ms ease,
    transform 140ms ease;
  visibility: hidden;
  width: 0;
}

.sidebar.collapsed .sidebar-footer {
  height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 90ms ease,
    transform 140ms ease;
  visibility: hidden;
}

.sidebar.collapsed .sidebar-nav {
  gap: 12px;
  justify-items: center;
}

.sidebar.collapsed .sidebar-module {
  column-gap: 0;
  grid-template-columns: 1fr;
  height: 50px;
  justify-items: center;
  min-height: 50px;
  padding: 0;
  place-items: center;
  width: 50px;
}

.sidebar.collapsed .sidebar-module.active {
  box-shadow: none;
}

.user-chip {
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  gap: 9px;
  min-height: 42px;
  overflow: hidden;
  padding: 0 10px;
}

.user-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace {
  align-content: start;
  display: grid;
  gap: 18px;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  padding: 24px;
}

.topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.topbar h1 {
  font-size: 1.75rem;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0;
}

.freshness {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  margin-top: 7px;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.topbar-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.icon-button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  height: 42px;
  width: 42px;
}

.topbar-icon {
  display: block;
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  width: 18px;
}

.refresh-icon,
.logout-icon,
.icon-button:hover .refresh-icon,
.icon-button:focus-visible .refresh-icon,
.icon-button:hover .logout-icon,
.icon-button:focus-visible .logout-icon {
  color: inherit;
}

.icon-button {
  color: var(--muted);
}

.icon-button:hover,
.icon-button:focus-visible {
  color: var(--text);
}

.filters-shell {
  display: grid;
  align-content: start;
  gap: 8px;
}

.filters-shell + .metrics-grid {
  margin-top: -8px;
}

.filters-shell > *,
.filter-primary-row > *,
.advanced-filters > * {
  min-width: 0;
}

.filter-primary-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(280px, 1fr) 112px 178px 112px 104px;
}

.post-filter-row {
  grid-template-columns: minmax(240px, 1fr) repeat(5, minmax(112px, 0.48fr)) 104px minmax(154px, auto);
}

.automatic-replicas-button {
  min-height: 42px;
  white-space: nowrap;
}

.advanced-filters {
  display: none;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.advanced-filters.open {
  display: grid;
}

.active-filter-strip {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 0;
}

.active-filter-strip span {
  background: #eef6ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: #1e3a8a;
  display: inline-flex;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.15;
  max-width: min(280px, 100%);
  min-height: 28px;
  overflow: hidden;
  padding: 5px 9px;
  text-overflow: ellipsis;
  vertical-align: top;
  white-space: nowrap;
}

.search-field,
.select-filter,
.date-filter-group {
  background:
    linear-gradient(180deg, #ffffff, #fbfdff);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 44px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.filter-primary-row .search-field,
.filter-primary-row .filter-action,
.filter-primary-row .clear-button {
  height: 44px;
  max-height: 44px;
  min-height: 44px;
  overflow: hidden;
}

.search-field:focus-within,
.select-filter:focus-within,
.date-filter-group:focus-within {
  border-color: rgba(37, 99, 235, 0.48);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.11);
}

.search-field {
  align-items: center;
  display: flex;
  gap: 9px;
  padding: 0 12px;
}

.search-field svg,
.search-field > span {
  color: var(--muted);
  flex: 0 0 auto;
}

.search-field input {
  background: transparent;
  border: 0;
  color: var(--text);
  min-width: 0;
  outline: 0;
  width: 100%;
}

.select-filter {
  display: grid;
  gap: 2px;
  padding: 6px 10px;
  position: relative;
}

.select-filter::after {
  border-bottom: 2px solid #64748b;
  border-right: 2px solid #64748b;
  content: "";
  height: 7px;
  pointer-events: none;
  position: absolute;
  right: 13px;
  top: 22px;
  transform: rotate(45deg);
  width: 7px;
}

.select-filter span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.select-filter select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  min-width: 0;
  outline: 0;
  padding-right: 28px;
  width: 100%;
}

.date-filter-group {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-column: span 2;
  grid-template-columns: auto repeat(2, minmax(118px, 1fr));
  padding: 6px 10px;
}

.date-filter-group > * {
  min-width: 0;
}

.date-filter-group strong {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.date-filter-group label {
  display: grid;
  gap: 2px;
}

.date-filter-group label span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.date-filter-group input {
  background: transparent;
  border: 0;
  color: var(--text);
  color-scheme: light;
  font: inherit;
  font-weight: 800;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.filter-action {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.15;
  min-height: 44px;
  padding: 0 12px;
  text-align: center;
  white-space: normal;
  width: 100%;
}

.filter-action:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.filter-action.apply {
  background: var(--primary);
  color: #fff;
}

.filter-action.apply.pending {
  background: var(--primary-dark);
}

.filter-action.month {
  background: #eef6ff;
  border-color: #bfd7ff;
  color: #1e3a8a;
}

.filter-action.month.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.filter-action.subtle {
  background: #fff;
  color: var(--text);
}

.filter-action.subtle.active {
  background: #e8f3ff;
  border-color: #bfd7ff;
  color: #1d4ed8;
}

.clear-button {
  background: #0f172a;
  color: #fff;
  min-height: 44px;
  min-width: 92px;
  padding: 0 13px;
  width: 100%;
}

.metrics-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

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

.compact-metrics article {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 58px;
  padding: 12px 14px;
}

.compact-metrics span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.compact-metrics strong {
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
}

.access-screen {
  max-width: 1040px;
}

.access-panel {
  display: grid;
  gap: 12px;
}

.access-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 0.9fr) minmax(220px, 1.2fr) minmax(140px, 0.55fr) 120px;
}

.access-form label {
  color: var(--muted);
  display: grid;
  font-size: 0.74rem;
  font-weight: 850;
  gap: 6px;
  min-width: 0;
}

.access-form input,
.access-form select,
.copy-field input {
  background: #fbfdff;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  min-height: 40px;
  min-width: 0;
  outline: 0;
  padding: 0 11px;
  width: 100%;
}

.access-form input:focus,
.access-form select:focus,
.copy-field input:focus {
  border-color: rgba(37, 99, 235, 0.48);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.11);
}

.copy-field {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

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

.access-user {
  align-items: center;
  background: #fbfdff;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 62px;
  padding: 10px 12px;
}

.access-user > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.access-user strong,
.access-user span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-user strong {
  font-size: 0.92rem;
}

.access-user span,
.access-user small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.access-user-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.access-user-actions {
  align-items: center;
  display: flex;
  justify-content: flex-end;
}

.self-access-label {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 850;
  min-height: 28px;
  padding: 5px 10px;
}

.role-pill {
  background: #eef6ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: #1e3a8a;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 850;
  min-height: 26px;
  padding: 4px 9px;
}

.role-pill.admin {
  background: #ecfdf5;
  border-color: #ccfbf1;
  color: #0f766e;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  min-height: 78px;
  padding: 14px 16px;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.metric-card strong {
  font-size: 1.58rem;
  line-height: 1;
}

.metric-card.good {
  border-left-color: var(--good);
}

.metric-card.progress {
  border-left-color: var(--primary);
}

.metric-card.warn {
  border-left-color: var(--warn);
}

.metric-card.danger {
  border-left-color: var(--danger);
}

.metric-card.ignored {
  border-left-color: #7c3aed;
}

.team-screen {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.team-controls {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 1fr) 112px 178px 104px;
}

.team-search-field {
  min-width: 0;
}

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

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

.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
}

.team-card-header {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.team-person {
  min-width: 0;
}

.team-person h2 {
  font-size: 1rem;
  line-height: 1.2;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-person span,
.team-progress-block span,
.team-card-kpis span,
.team-card-footer span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.team-card-header > strong {
  font-size: 1.35rem;
  line-height: 1;
}

.team-progress-block {
  display: grid;
  gap: 8px;
}

.team-progress-block > div {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.team-progress-block b {
  font-size: 0.82rem;
}

.team-card-kpis {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.team-card-kpis div {
  background: var(--surface-muted);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-height: 66px;
  padding: 10px;
}

.team-card-kpis strong {
  font-size: 1.05rem;
  line-height: 1.1;
}

.team-completion-bar {
  background: #e2e8f0;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.team-completion-bar span {
  background: var(--good);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.team-card-footer {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.active-filter-strip.compact {
  margin-top: -2px;
}

.charts-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.25fr 0.75fr;
}

.main-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 0.9fr 1.25fr;
}

.module-screen {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.module-screen.compact-screen {
  gap: 10px;
}

.module-grid {
  display: grid;
  gap: 18px;
}

.module-grid.two-columns {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  min-width: 0;
  padding: 18px;
}

.panel-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-heading span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.panel-heading h2 {
  font-size: 1.05rem;
  letter-spacing: 0;
  margin: 4px 0 0;
}

.chart-box {
  height: 230px;
  width: 100%;
}

.bar-chart {
  display: grid;
  gap: 13px;
  padding-top: 8px;
}

.bar-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(92px, 1.2fr) minmax(120px, 4fr) 34px;
  min-height: 26px;
}

.bar-row span {
  color: var(--muted);
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row strong {
  font-size: 0.82rem;
  text-align: right;
}

.bar-track {
  background: #e2e8f0;
  border-radius: 999px;
  height: 11px;
  overflow: hidden;
}

.bar-track i {
  border-radius: 999px;
  display: block;
  height: 100%;
}

.donut-wrap {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
}

.donut {
  align-items: center;
  border-radius: 999px;
  display: flex;
  height: 170px;
  justify-content: center;
  width: 170px;
}

.donut-center {
  background: var(--surface);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px #e2e8f0;
  height: 104px;
  width: 104px;
}

.legend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
}

.legend-list span {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.8rem;
  gap: 7px;
  max-width: 100%;
}

.legend-list i {
  border-radius: 99px;
  display: inline-block;
  height: 9px;
  width: 9px;
}

.legend-list.compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.timeline {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  max-height: 560px;
  overflow: auto;
}

.month-column {
  background: var(--surface-muted);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  min-width: 0;
  padding: 12px;
}

.month-column h3 {
  font-size: 0.92rem;
  margin: 0 0 12px;
  text-transform: capitalize;
}

.timeline-item {
  display: grid;
  gap: 10px;
  grid-template-columns: 10px minmax(0, 1fr);
  padding: 9px 0;
}

.timeline-item + .timeline-item {
  border-top: 1px solid #dbe3ea;
}

.timeline-item strong {
  display: block;
  font-size: 0.86rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.timeline-item small {
  color: var(--muted);
  display: block;
  font-size: 0.75rem;
  line-height: 1.3;
  margin-top: 3px;
}

.dot {
  background: var(--primary);
  border-radius: 99px;
  height: 9px;
  margin-top: 4px;
  width: 9px;
}

.dot.done {
  background: var(--good);
}

.dot.late {
  background: var(--danger);
}

.calendar-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.62fr);
}

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

.calendar-toolbar span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-toolbar h2 {
  font-size: 1.28rem;
  margin: 4px 0 0;
}

.calendar-actions {
  display: flex;
  gap: 8px;
}

.secondary-button.icon-only {
  font-size: 1.15rem;
  padding: 0;
  width: 38px;
}

.calendar-weekdays {
  color: var(--muted);
  display: grid;
  font-size: 0.74rem;
  font-weight: 850;
  gap: 8px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-bottom: 8px;
  text-transform: uppercase;
}

.calendar-weekdays span {
  padding: 0 4px;
}

.calendar-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-day {
  align-items: start;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 7px;
  min-height: 102px;
  padding: 9px;
  text-align: left;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.calendar-day:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.calendar-day.out-month {
  background: #f8fafc;
  color: #94a3b8;
}

.calendar-day.today {
  border-color: rgba(37, 99, 235, 0.45);
}

.calendar-day.selected {
  background: #eff6ff;
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.16);
}

.calendar-day.has-late {
  border-left: 4px solid var(--danger);
}

.day-number {
  align-items: center;
  background: #f1f5f9;
  border-radius: 7px;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 900;
  height: 26px;
  justify-content: center;
  width: 30px;
}

.calendar-day.selected .day-number {
  background: var(--primary);
  color: #fff;
}

.day-total {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.2;
}

.day-empty {
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 750;
}

.day-dots {
  display: flex;
  gap: 4px;
}

.day-dots i {
  background: var(--primary);
  border-radius: 999px;
  display: block;
  height: 7px;
  width: 7px;
}

.day-dots i.late {
  background: var(--danger);
}

.day-dots i.done {
  background: var(--good);
}

.day-panel {
  position: sticky;
  top: 24px;
}

.calendar-task-list {
  display: grid;
  gap: 10px;
  max-height: 650px;
  overflow: auto;
  padding-right: 2px;
}

.calendar-task-card {
  align-items: start;
  background: #fbfdff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 70px;
  padding: 12px;
}

.calendar-task-card strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.25;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.calendar-task-card span:not(.status-pill),
.calendar-task-card small {
  color: var(--muted);
  display: block;
  font-size: 0.76rem;
  line-height: 1.3;
  margin-top: 4px;
}

.table-panel {
  min-width: 0;
  overflow: hidden;
}

.table-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  margin: -6px 0 12px;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
}

table {
  border-collapse: collapse;
  min-width: 960px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.84rem;
  padding: 13px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

td strong,
td span {
  display: block;
}

td strong {
  line-height: 1.25;
  max-width: 420px;
  overflow-wrap: anywhere;
}

td span:not(.status-pill) {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 4px;
}

.cell-primary {
  font-size: 0.86rem;
  font-weight: 800;
}

.task-area-label {
  color: #475569;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.task-name-cell {
  min-width: 360px;
}

.task-hierarchy-preview {
  border-left: 2px solid #dbeafe;
  display: grid;
  gap: 4px;
  margin-top: 9px;
  max-width: 520px;
  padding-left: 10px;
}

.task-hierarchy-preview.muted {
  border-left-color: #e2e8f0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.task-hierarchy-preview span {
  align-items: center;
  color: #52637a;
  display: flex;
  font-size: 0.74rem;
  font-weight: 780;
  gap: 6px;
  line-height: 1.25;
  margin-top: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  position: relative;
}

.task-hierarchy-preview span::before {
  border-top: 1px solid #bfdbfe;
  content: "";
  left: -10px;
  position: absolute;
  top: 50%;
  width: 7px;
}

.task-hierarchy-preview span.current {
  color: var(--text);
  font-weight: 900;
}

.task-hierarchy-preview i {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  flex: 0 0 auto;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  padding: 3px 5px;
}

.status-pill {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 800;
  gap: 5px;
  min-height: 28px;
  padding: 0 9px;
  white-space: nowrap;
}

.status-pill.done {
  background: #dff7ef;
  color: #0f766e;
}

.status-pill.late {
  background: #fee2e2;
  color: #b91c1c;
}

.status-pill.no-date {
  background: #fef3c7;
  color: #92400e;
}

.status-pill.progress {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-pill.ignored {
  background: #ede9fe;
  color: #6d28d9;
}

.task-row.expanded {
  background: #fbfdff;
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 108px;
}

.row-action {
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 850;
  justify-content: center;
  line-height: 1.15;
  min-height: 30px;
  min-width: 50px;
  padding: 0 9px;
  text-align: center;
  text-decoration: none;
  white-space: normal;
}

.row-action:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.row-action.link {
  background: #eff6ff;
  border-color: #bfd7ff;
  color: #1d4ed8;
}

.row-action.strong {
  min-height: 36px;
  width: auto;
}

.posts-screen {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.posts-panel {
  display: grid;
  gap: 12px;
}

.post-list-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: -8px;
}

.post-card-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.post-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
}

.post-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.post-card.ignored {
  background: #f8fafc;
  opacity: 0.62;
}

.post-table {
  min-width: 1040px;
}

.post-row.ignored {
  background: #f8fafc;
  opacity: 0.62;
}

.post-row.replica {
  background: #fbfdff;
  opacity: 0.72;
}

.post-row.ignored.replica {
  opacity: 0.54;
}

.post-row td:first-child {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.post-account-cell {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.post-account-cell strong {
  max-width: 220px;
}

.post-account-cell .network-badge {
  display: inline-flex;
  margin-top: 0;
}

.network-badge.compact {
  font-size: 0.66rem;
  min-height: 22px;
  padding: 0 7px;
}

.replica-badge {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
  padding: 4px 7px;
}

.replica-badge.subtle {
  background: #f1f5f9;
  border-color: #dbe3ea;
  color: var(--muted);
}

.post-text-cell strong {
  max-width: 420px;
}

.post-author-toggle {
  flex-wrap: nowrap;
  min-width: 160px;
}

.post-author-toggle .row-action {
  min-width: 72px;
}

.post-card-header {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.post-card-header strong {
  display: block;
  font-size: 0.94rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.post-card-header span:not(.status-pill):not(.network-badge) {
  color: var(--muted);
  display: block;
  font-size: 0.77rem;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 4px;
}

.network-badge {
  align-items: center;
  background: #eef6ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 900;
  min-height: 28px;
  padding: 0 9px;
  text-transform: uppercase;
  white-space: nowrap;
}

.clients-screen,
.client-accounts-screen {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.client-tabs {
  align-items: center;
  background: #eaf0f6;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: inline-flex;
  gap: 4px;
  justify-self: start;
  padding: 4px;
}

.client-tab {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  min-height: 34px;
  padding: 0 12px;
}

.client-tab.active {
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  color: var(--text);
}

.client-automation-notice {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.client-automation-notice span {
  min-width: min(100%, 320px);
}

.metrics-grid.compact .metric-card {
  min-height: 70px;
}

.client-accounts-panel {
  overflow: hidden;
}

.client-accounts-table {
  min-width: 1120px;
}

.client-account-row.unassigned {
  background: #f8fafc;
}

.client-row-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.client-month-posts {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  white-space: nowrap;
}

.reportei-cell {
  display: grid;
  gap: 8px;
  min-width: 300px;
}

.reportei-project-list,
.network-counts,
.client-account-status {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reportei-project-pill {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  gap: 7px;
  min-height: 30px;
  padding: 4px 5px 4px 10px;
}

.reportei-project-pill strong,
.reportei-project-pill em,
.reportei-project-pill small {
  display: inline;
  line-height: 1;
  margin: 0;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reportei-project-pill strong {
  font-size: 0.76rem;
  font-weight: 900;
}

.reportei-project-pill em {
  color: var(--text);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 800;
}

.reportei-project-pill small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.reportei-project-pill button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 900;
  height: 22px;
  justify-content: center;
  line-height: 1;
  width: 22px;
}

.reportei-project-pill button:hover {
  border-color: #fecaca;
  color: var(--danger);
}

.reportei-inline-form {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 118px minmax(120px, 1fr) auto;
  max-width: 460px;
}

.reportei-inline-form input {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 750;
  min-height: 32px;
  min-width: 0;
  padding: 0 9px;
}

.muted-cell {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
}

.client-account-detail-row > td {
  background: #fbfdff;
  padding: 0 12px 14px;
}

.client-account-detail {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.detail-header.compact {
  align-items: center;
  padding-bottom: 10px;
}

.compact-table-wrap table,
.nested-accounts-table {
  min-width: 760px;
}

.nested-accounts-table code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #475569;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 6px;
}

.inactive-account {
  background: #f8fafc;
  opacity: 0.65;
}

.account-active-toggle.active {
  background: #ecfdf5;
  border-color: #99f6e4;
  color: #0f766e;
}

.account-active-toggle.inactive {
  background: #f1f5f9;
  color: #64748b;
}

.post-card-body {
  display: grid;
  gap: 9px;
}

.post-card-body p {
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.post-card-meta span {
  background: var(--surface-muted);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 8px;
}

.post-metric-strip {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.post-metric-strip span {
  background: var(--surface-muted);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
}

.post-metric-strip strong {
  font-size: 0.92rem;
  line-height: 1;
}

.post-metric-strip small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.post-actions,
.post-modal-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.post-action.wholly.active {
  background: #dff7ef;
  border-color: #99f6e4;
  color: #0f766e;
}

.post-action.client.active {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
}

.post-action.preview {
  gap: 6px;
}

.post-action.replicas {
  gap: 6px;
  min-width: 104px;
}

.post-action.preview.icon-only {
  height: 34px;
  min-width: 38px;
  padding: 0;
  width: 38px;
}

.row-action-icon {
  fill: none;
  height: 15px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 15px;
}

.post-modal-backdrop {
  align-items: center;
  background: rgba(2, 6, 23, 0.62);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 100;
}

.post-modal {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.24);
  display: grid;
  gap: 14px;
  max-height: calc(100dvh - 40px);
  max-width: 920px;
  overflow: auto;
  padding: 18px;
  position: relative;
  width: min(920px, 100%);
}

.post-modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
}

.post-modal-header {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-right: 46px;
}

.post-modal-header span:not(.status-pill) {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.post-modal-header h2 {
  font-size: 1.16rem;
  letter-spacing: 0;
  margin: 3px 0;
}

.post-modal-header p {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  margin: 0;
}

.system-dialog {
  border-left: 4px solid var(--primary);
  max-width: 500px;
  width: min(500px, 100%);
}

.system-dialog.sucesso {
  border-left-color: var(--good);
}

.system-dialog.erro {
  border-left-color: var(--danger);
}

.system-dialog-body {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: 40px minmax(0, 1fr);
  padding-right: 40px;
}

.system-dialog-icon {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 950;
  height: 34px;
  justify-content: center;
  line-height: 1;
  width: 34px;
}

.system-dialog.sucesso .system-dialog-icon {
  background: #ecfdf5;
  border-color: #ccfbf1;
  color: #0f766e;
}

.system-dialog.erro .system-dialog-icon {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.system-dialog-copy h2 {
  font-size: 1.08rem;
  letter-spacing: 0;
  margin: 0 0 7px;
}

.system-dialog-copy p {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
}

.system-dialog-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.replica-modal {
  max-width: 980px;
}

.automatic-replica-modal {
  max-width: 1040px;
}

.automatic-replica-groups {
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
  display: grid;
  max-height: min(58vh, 620px);
  overflow: auto;
}

.automatic-replica-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.automatic-replica-toolbar > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.automatic-replica-selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.automatic-replica-pagination {
  margin-top: 0;
}

.automatic-replica-group {
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 10px;
  padding: 14px 2px;
}

.automatic-replica-group:last-child {
  border-bottom: 0;
}

.automatic-replica-group-heading {
  align-items: center;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font-size: 0.82rem;
  font-weight: 850;
  gap: 8px;
}

.automatic-replica-group-heading input {
  height: 16px;
  margin: 0;
  width: 16px;
}

.automatic-replica-members {
  display: grid;
  gap: 10px;
  padding-left: 24px;
}

.automatic-replica-members > div {
  display: grid;
  gap: 6px;
}

.replica-current,
.replica-section {
  display: grid;
  gap: 8px;
}

.replica-section-heading {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.replica-section-heading small,
.replica-section-label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.replica-section-label {
  text-transform: uppercase;
}

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

.replica-item,
.replica-candidate {
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-width: 0;
  padding: 10px;
}

.replica-item.root {
  background: #f8fafc;
  border-color: #dbe3ea;
}

.replica-candidate {
  cursor: pointer;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.replica-candidate input {
  height: 16px;
  margin: 0;
  width: 16px;
}

.replica-item-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.replica-item-copy strong {
  font-size: 0.86rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}

.replica-item-copy small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.replica-similarity {
  background: #ecfdf5;
  border: 1px solid #ccfbf1;
  border-radius: 999px;
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 6px 8px;
}

.post-video-frame {
  aspect-ratio: 16 / 9;
  background: #020617;
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
}

.post-video-frame iframe {
  border: 0;
  height: 100%;
  width: 100%;
}

.post-preview-card {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.post-preview-text {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.posts-pagination {
  margin-top: 2px;
}

.task-detail-row td {
  background: #f8fafc;
  padding: 0 10px 14px;
}

.task-detail {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.task-detail span:not(.status-pill) {
  margin-top: 0;
}

.task-detail strong {
  max-width: none;
}

.detail-header {
  align-items: flex-start;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 12px;
}

.detail-header span,
.detail-title,
.related-title {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.detail-header h3 {
  font-size: 1rem;
  line-height: 1.25;
  margin: 4px 0 0;
}

.detail-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.detail-block {
  background: #fbfdff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
}

.detail-block.wide {
  grid-column: 1 / -1;
}

.hierarchy-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.hierarchy-node {
  background: #fff;
  border: 1px solid #dbeafe;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  display: grid;
  flex: 0 0 210px;
  gap: 4px;
  min-height: 86px;
  padding: 10px;
}

.hierarchy-node.missing {
  border-color: #fde68a;
  border-left-color: var(--warn);
}

.hierarchy-node span,
.related-task span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.hierarchy-node strong,
.related-task strong {
  font-size: 0.84rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.hierarchy-node small {
  color: var(--muted);
  font-size: 0.72rem;
}

.hierarchy-node em {
  align-self: end;
  background: #eef2ff;
  border-radius: 999px;
  color: #3730a3;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  justify-self: start;
  padding: 4px 7px;
}

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

.related-grid > div {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.related-grid small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
}

.related-task {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  text-decoration: none;
}

.related-task:hover {
  border-color: var(--border-strong);
}

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

.info-grid div {
  min-width: 0;
}

.info-grid dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.info-grid dd {
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.25;
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.level-chain {
  display: grid;
  gap: 8px;
}

.level-chain span {
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: var(--text);
  display: grid;
  font-size: 0.84rem;
  font-weight: 750;
  gap: 9px;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 38px;
  padding: 7px 9px;
}

.level-chain span em {
  font-style: normal;
  overflow-wrap: anywhere;
}

.level-chain-actions span {
  grid-template-columns: 34px minmax(0, 1fr) minmax(108px, auto);
}

.level-chain b {
  align-items: center;
  background: #e8f3ff;
  border-radius: 7px;
  color: var(--primary-dark);
  display: inline-flex;
  font-size: 0.72rem;
  height: 24px;
  justify-content: center;
  width: 28px;
}

.level-action {
  background: #fff;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  color: #3730a3;
  font-size: 0.72rem;
  font-weight: 850;
  min-height: 30px;
  padding: 0 9px;
}

.level-action:hover {
  border-color: #818cf8;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.08);
}

.level-action.restore {
  background: #ecfdf5;
  border-color: #99f6e4;
  color: #0f766e;
}

.level-action.locked,
.level-action:disabled {
  background: #f1f5f9;
  border-color: #e2e8f0;
  box-shadow: none;
  color: #64748b;
  cursor: not-allowed;
}

.disregard-list {
  display: grid;
  gap: 12px;
}

.disregard-card {
  align-items: center;
  background: #fbfdff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(190px, auto) auto;
  padding: 14px;
}

.disregard-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.disregard-main h3 {
  font-size: 1rem;
  line-height: 1.25;
  margin: 0;
  overflow-wrap: anywhere;
}

.disregard-main p {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  margin: 3px 0 0;
}

.rule-path {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rule-path span {
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 800;
  gap: 6px;
  max-width: 100%;
  padding: 5px 8px;
}

.rule-path b {
  color: var(--primary-dark);
  font-size: 0.68rem;
}

.disregard-meta {
  display: grid;
  gap: 8px;
}

.disregard-meta div {
  display: grid;
  gap: 2px;
}

.disregard-meta strong {
  font-size: 0.9rem;
}

.disregard-meta span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.empty-mini {
  background: #fff;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
  padding: 10px;
}

.empty-state {
  align-items: center;
  background: var(--surface-muted);
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  min-height: 120px;
  padding: 18px;
}

.empty-state.compact-empty {
  min-height: 82px;
  padding: 14px 16px;
}

.empty-state div {
  display: grid;
  gap: 5px;
}

.empty-state strong {
  color: var(--text);
  font-size: 0.98rem;
}

.empty-state span {
  font-size: 0.84rem;
  font-weight: 700;
}

.pagination {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 14px;
}

.pagination span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.secondary-button {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  min-height: 36px;
  padding: 0 12px;
}

.secondary-button.compact {
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 800;
  min-height: 32px;
}

.secondary-button:hover {
  border-color: var(--border-strong);
}

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

.summary-row {
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 14px;
  grid-template-columns: 34px minmax(0, 1fr) minmax(180px, 0.42fr);
  min-height: 68px;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
}

.summary-row:hover {
  border-color: var(--border-strong);
  background: #fbfdff;
}

.summary-rank {
  align-items: center;
  background: var(--surface-muted);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-size: 0.78rem;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.summary-main {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.summary-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-track {
  background: #e2e8f0;
  border-radius: 999px;
  display: block;
  height: 9px;
  overflow: hidden;
}

.summary-track i {
  background: var(--primary);
  border-radius: 999px;
  display: block;
  height: 100%;
}

.summary-stats {
  display: grid;
  gap: 3px;
  justify-items: end;
}

.summary-stats b {
  font-size: 1rem;
}

.summary-stats small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
  text-align: right;
}

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

.recurrence-card {
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  overflow: hidden;
}

.recurrence-card.open {
  background: #fbfdff;
  border-color: #bfdbfe;
}

.recurrence-summary {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 14px;
  grid-template-columns: 38px minmax(0, 1fr) minmax(220px, 0.38fr);
  min-height: 74px;
  padding: 12px 46px 12px 12px;
  position: relative;
  text-align: left;
  width: 100%;
}

.recurrence-summary::after {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  content: "+";
  display: flex;
  font-size: 1rem;
  font-weight: 900;
  height: 26px;
  justify-content: center;
  position: absolute;
  right: 12px;
  top: calc(50% - 13px);
  width: 26px;
}

.recurrence-card.open .recurrence-summary::after {
  content: "-";
}

.recurrence-rank {
  align-items: center;
  background: var(--surface-muted);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-size: 0.78rem;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.recurrence-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.recurrence-title small,
.recurrence-title em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.recurrence-title strong {
  font-size: 0.98rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.recurrence-stats {
  display: grid;
  gap: 3px;
  justify-items: end;
}

.recurrence-stats b {
  font-size: 1.05rem;
}

.recurrence-stats small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.3;
  text-align: right;
}

.recurrence-body {
  border-top: 1px solid #e2e8f0;
  display: grid;
  gap: 12px;
  padding: 12px 14px 14px 64px;
}

.recurrence-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.secondary-button.compact.danger {
  border-color: #fecaca;
  color: #b91c1c;
}

.secondary-button.compact.danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.recurrence-tree {
  display: grid;
  gap: 7px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.recurrence-tree.depth-1,
.recurrence-tree.depth-2 {
  border-left: 2px solid #dbeafe;
  margin: 6px 0 0 15px;
  padding-left: 14px;
}

.recurrence-tree li {
  display: grid;
  gap: 5px;
}

.tree-node {
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 38px;
  padding: 8px 10px;
}

.tree-node-toggle {
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  width: 100%;
}

.tree-node-toggle:hover {
  background: #f8fbff;
  border-color: #bfdbfe;
}

.tree-node-toggle.collapsed {
  background: #f8fafc;
}

.tree-node.task-node {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.tree-node.task-node.open {
  border-color: #bfdbfe;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

.tree-node.task-node .status-pill {
  justify-self: start;
  white-space: nowrap;
  width: auto;
}

.tree-node-name {
  align-items: center;
  display: flex;
  gap: 7px;
  min-width: 0;
}

.tree-node-name i {
  background: #e8f3ff;
  border-radius: 7px;
  color: var(--primary-dark);
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  padding: 4px 6px;
}

.tree-node-name b {
  font-size: 0.82rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.tree-node-stats,
.tree-more {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.tree-node-stats {
  align-items: center;
  display: flex;
  gap: 9px;
  justify-content: flex-end;
}

.tree-node-stats i {
  align-items: center;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: flex;
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 950;
  height: 22px;
  justify-content: center;
  line-height: 1;
  width: 22px;
}

.tree-task-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.tree-task-main small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.tree-task-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.tree-task-list {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.recurrence-task-detail {
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding: 12px;
}

.recurrence-task-detail-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.recurrence-task-detail-header span {
  color: var(--muted);
  display: block;
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.recurrence-task-detail-header strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.25;
  margin-top: 3px;
}

.recurrence-info-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.recurrence-info-grid div {
  display: grid;
  gap: 2px;
}

.recurrence-info-grid dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.recurrence-info-grid dd {
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.25;
  margin: 0;
  overflow-wrap: anywhere;
}

.tree-more {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
}

.tree-more-button {
  background: #fff;
  color: #1d4ed8;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
  width: 100%;
}

.tree-more-button:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1e40af;
}

.compact-list,
.insight-list {
  display: grid;
  gap: 10px;
}

.compact-row {
  align-items: start;
  border-bottom: 1px solid #e2e8f0;
  display: grid;
  gap: 6px;
  padding: 10px 0;
}

.compact-row .status-pill {
  justify-self: start;
  width: auto;
}

.compact-row:last-child {
  border-bottom: 0;
}

.compact-row strong {
  line-height: 1.25;
}

.compact-row span:not(.status-pill) {
  color: var(--muted);
  font-size: 0.78rem;
}

.insight-list div {
  align-items: center;
  background: var(--surface-muted);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 14px;
}

.insight-list strong {
  font-size: 1.5rem;
}

.insight-list span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.more-row {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  padding-top: 8px;
}

.spin {
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1180px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .sidebar {
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    position: sticky;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    z-index: 40;
  }

  .sidebar:not(.collapsed) {
    bottom: 0;
    box-shadow: 24px 0 50px rgba(2, 6, 23, 0.3);
    height: auto;
    left: 0;
    max-height: none;
    max-width: calc(100vw - 24px);
    position: fixed;
    top: 0;
    width: 272px;
  }

  .sidebar-backdrop {
    z-index: 30;
  }

  .sidebar:not(.collapsed) .sidebar-nav {
    align-content: start;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

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

  .charts-grid,
  .main-grid,
  .calendar-layout,
  .module-grid.two-columns,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .day-panel {
    position: static;
  }

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

  .team-card-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .sidebar {
    height: 100dvh;
    padding: 12px 7px;
  }

  .sidebar:not(.collapsed) {
    max-width: calc(100vw - 28px);
  }

  .sidebar.collapsed {
    padding: 12px 7px;
  }

  .sidebar-logo {
    min-height: 46px;
    padding: 4px 0 10px;
  }

  .sidebar-logo-image.mark {
    max-height: 30px;
    max-width: 32px;
  }

  .sidebar.collapsed .sidebar-nav {
    gap: 9px;
  }

  .sidebar.collapsed .sidebar-module {
    height: 44px;
    min-height: 44px;
    width: 44px;
  }

  .module-icon {
    height: 34px;
    width: 34px;
  }

  .workspace {
    gap: 12px;
    padding: 14px 12px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: row;
  }

  .topbar h1 {
    font-size: 1.45rem;
  }

  .topbar-actions {
    flex: 0 0 auto;
  }

  .icon-button {
    height: 38px;
    width: 38px;
  }

  .filters-shell {
    gap: 7px;
  }

  .filter-primary-row,
  .advanced-filters.open {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .filter-primary-row .search-field {
    grid-column: 1 / -1;
  }

  .filter-primary-row .filter-action.month {
    grid-column: 1 / -1;
  }

  .filter-primary-row .search-field,
  .filter-primary-row .filter-action,
  .filter-primary-row .clear-button {
    height: 42px;
    max-height: 42px;
    min-height: 42px;
  }

  .active-filter-strip {
    gap: 4px;
  }

  .active-filter-strip span {
    max-width: 100%;
    min-height: 26px;
    padding: 4px 8px;
  }

  .date-filter-group {
    grid-column: 1 / -1;
    gap: 6px;
    grid-template-columns: 1fr;
  }

  .date-filter-group strong {
    grid-column: auto;
  }

  .select-filter,
  .date-filter-group {
    min-height: 42px;
  }

  .panel {
    padding: 14px;
  }

  .post-card-grid {
    grid-template-columns: 1fr;
  }

  .post-card-header,
  .post-modal-header {
    grid-template-columns: 1fr;
  }

  .post-modal-header {
    padding-right: 42px;
  }

  .replica-item,
  .replica-candidate {
    align-items: start;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .automatic-replica-members {
    padding-left: 0;
  }

  .automatic-replica-selection-actions,
  .automatic-replica-toolbar > span {
    width: 100%;
  }

  .automatic-replica-selection-actions .secondary-button {
    flex: 1 1 auto;
  }

  .replica-item .row-action,
  .replica-similarity {
    grid-column: 2;
    justify-self: start;
  }

  .post-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-modal-backdrop {
    padding: 10px;
  }

  .metric-card {
    min-height: 62px;
    padding: 12px 14px;
  }

  .team-controls {
    grid-template-columns: 1fr;
  }

  .team-overview-grid,
  .team-card-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-card {
    padding: 14px;
  }

  .team-card-header {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .team-card-header > strong {
    grid-column: 2;
  }

  .team-card-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics-grid,
  .compact-metrics,
  .legend-list.compact {
    grid-template-columns: 1fr;
  }

  .calendar-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-actions {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .calendar-weekdays,
  .calendar-grid {
    gap: 5px;
  }

  .calendar-day {
    min-height: 76px;
    padding: 6px;
  }

  .day-total,
  .day-empty {
    font-size: 0.68rem;
  }

  .day-dots {
    display: none;
  }

  .calendar-task-card {
    grid-template-columns: 1fr;
  }

  .summary-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .recurrence-summary {
    align-items: start;
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .recurrence-stats {
    grid-column: 2;
    justify-items: start;
  }

  .recurrence-stats small {
    text-align: left;
  }

  .recurrence-body {
    padding-left: 16px;
  }

  .recurrence-tree.depth-1,
  .recurrence-tree.depth-2 {
    margin-left: 8px;
    padding-left: 10px;
  }

  .tree-node {
    align-items: start;
    flex-direction: column;
  }

  .tree-node.task-node,
  .recurrence-info-grid {
    grid-template-columns: 1fr;
  }

  .tree-task-actions,
  .recurrence-task-detail-header {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .recurrence-task-detail-header {
    flex-direction: column;
  }

  .tree-node-stats {
    white-space: normal;
  }

  .disregard-card {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

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

  .access-form,
  .copy-field,
  .access-user {
    grid-template-columns: 1fr;
  }

  .access-user-meta {
    justify-content: flex-start;
  }

  .access-user-actions {
    justify-content: flex-start;
  }

  .summary-stats {
    grid-column: 2;
    justify-items: start;
  }

  .summary-stats small {
    text-align: left;
  }

  .detail-header,
  .pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .related-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

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

  .login-screen {
    align-items: stretch;
    background: #06121f;
    padding: 14px;
  }

  .login-panel {
    align-self: center;
    grid-template-columns: 1fr;
    margin: 0 auto;
    max-width: 480px;
    padding: 0;
  }

  .login-brand-panel {
    gap: 20px;
    min-height: auto;
    padding: 24px;
  }

  .login-brand-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-logo {
    max-width: 176px;
  }

  .login-statement {
    margin: 8px 0;
    max-width: 330px;
    padding-left: 0;
  }

  .login-panel .login-statement p {
    font-size: 1.24rem;
    line-height: 1.3;
  }

  .login-order-lines {
    max-width: 210px;
  }

  .login-brand-copy {
    max-width: none;
  }

  .login-brand-copy strong {
    font-size: 1.12rem;
  }

  .login-form-panel {
    gap: 20px;
    padding: 24px;
  }

  .login-panel h1 {
    font-size: 1.55rem;
  }
}

@media (max-width: 420px) {
  .login-screen {
    padding: 0;
  }

  .login-panel {
    border: 0;
    border-radius: 0;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 100vh;
  }

  .login-brand-panel {
    min-height: 278px;
  }

  .login-form-panel {
    align-content: start;
  }
}

@media (max-height: 620px) and (min-width: 721px) {
  .login-panel {
    grid-template-columns: minmax(330px, 0.96fr) minmax(340px, 1fr);
  }

  .login-brand-panel {
    min-height: 440px;
    padding: 28px;
  }

  .login-panel .login-statement p {
    font-size: 1.22rem;
  }

  .login-form-panel {
    padding: 34px;
  }
}

@media (max-width: 1180px) and (max-height: 560px) {
  .sidebar:not(.collapsed) {
    gap: 6px;
    padding: 8px 10px;
    width: min(238px, calc(100vw - 18px));
  }

  .sidebar:not(.collapsed) .sidebar-logo {
    justify-content: flex-start;
    min-height: 28px;
    padding: 0 6px 2px;
  }

  .sidebar:not(.collapsed) .sidebar-logo-image.full {
    max-height: 18px;
    max-width: 118px;
  }

  .sidebar:not(.collapsed) .sidebar-section-label {
    font-size: 0.62rem;
    padding: 0 7px;
  }

  .sidebar:not(.collapsed) .sidebar-nav {
    gap: 4px;
  }

  .sidebar:not(.collapsed) .sidebar-module {
    column-gap: 8px;
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 32px;
    padding: 3px 8px;
  }

  .sidebar:not(.collapsed) .module-icon {
    border-radius: 7px;
    height: 26px;
    width: 26px;
  }

  .sidebar:not(.collapsed) .module-icon svg {
    height: 15px;
    width: 15px;
  }

  .sidebar:not(.collapsed) .module-label {
    font-size: 0.76rem;
  }

  .sidebar:not(.collapsed) .sidebar-footer {
    display: none;
  }
}
