:root {
  --ink: #051f20;
  --ink-soft: #234940;
  --muted: #607d72;
  --paper: #edf4ef;
  --surface: #f7fbf8;
  --surface-strong: #ffffff;
  --line: #c9d9cf;
  --line-soft: #dde8e1;
  --espresso: #051f20;
  --orange: #235347;
  --orange-deep: #163832;
  --orange-soft: #daf1de;
  --lime: #8eb69b;
  --lime-dark: #235347;
  --green: #235347;
  --green-soft: #daf1de;
  --red: #b33d2e;
  --red-soft: #f5ded9;
  --shadow: 0 18px 52px rgba(5, 31, 32, 0.09);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --font-body: "DM Sans", Arial, sans-serif;
  --font-display: "Manrope", "DM Sans", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 82% 5%, rgba(142, 182, 155, 0.16), transparent 27rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

button {
  border: 0;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(35, 83, 71, 0.3);
  outline-offset: 2px;
}

svg {
  display: block;
}

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

.sidebar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 28px 20px 20px;
  overflow-y: auto;
  color: #daf1de;
  background:
    linear-gradient(180deg, rgba(5, 31, 32, 0.72), rgba(5, 31, 32, 0.96)),
    url("assets/black-dunes-texture.png") center / cover,
    #051f20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 34px;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--lime);
  transform: rotate(-4deg);
}

.brand-mark span {
  position: absolute;
  left: 9px;
  width: 20px;
  height: 5px;
  border-radius: 5px;
  background: var(--espresso);
  transform-origin: left center;
}

.brand-mark span:nth-child(1) { top: 9px; transform: rotate(18deg); }
.brand-mark span:nth-child(2) { top: 17px; width: 15px; transform: rotate(-15deg); }
.brand-mark span:nth-child(3) { top: 25px; transform: rotate(18deg); }

.brand strong,
.brand small {
  display: block;
  line-height: 1;
}

.brand strong {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.brand small {
  margin-top: 5px;
  color: #8eb69b;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-label {
  padding: 0 12px 10px;
  color: rgba(218, 241, 222, 0.45);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 46px;
  gap: 12px;
  padding: 0 13px;
  border-radius: 13px;
  color: rgba(218, 241, 222, 0.68);
  background: transparent;
  text-align: left;
  transition: 180ms ease;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: 0 0 auto;
}

.nav-item > span:nth-child(2) {
  flex: 1;
  font-weight: 600;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
  color: #051f20;
  background: var(--lime);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.nav-count {
  min-width: 25px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #16130f;
  background: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.sidebar-insight {
  position: relative;
  margin-top: auto;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 55%),
    rgba(11, 43, 38, 0.86);
}

.sidebar-insight::after {
  position: absolute;
  right: -24px;
  bottom: -34px;
  width: 100px;
  height: 100px;
  border: 18px solid rgba(142, 182, 155, 0.12);
  border-radius: 50%;
  content: "";
}

.insight-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8eb69b;
  font-size: 11px;
}

.insight-top i,
.online-dot,
.hero-label i,
.live-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(142, 182, 155, 0.12);
}

.sidebar-insight > strong {
  display: block;
  margin: 12px 0 4px;
  font-family: var(--font-display);
  font-size: 35px;
  font-weight: 500;
  letter-spacing: -0.06em;
}

.sidebar-insight p {
  min-height: 42px;
  color: #a9a19a;
  font-size: 11px;
}

.sidebar-insight button {
  position: relative;
  z-index: 1;
  margin-top: 15px;
  color: var(--lime);
  background: none;
  font-size: 11px;
  font-weight: 700;
}

.sidebar-insight button span {
  margin-left: 6px;
}

.sidebar-footer {
  display: grid;
  grid-template-columns: 34px 1fr 8px;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 17px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.company-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  background: #453a32;
  font-weight: 700;
}

.sidebar-footer strong,
.sidebar-footer small {
  display: block;
}

.sidebar-footer strong {
  overflow: hidden;
  color: #e8e3dd;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-footer small {
  color: #77706a;
  font-size: 9px;
}

.main-content {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 78px;
  padding: 0 38px;
  border-bottom: 1px solid rgba(201, 217, 207, 0.86);
  background: rgba(237, 244, 239, 0.88);
  backdrop-filter: blur(18px);
}

.search-box,
.filter-search {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box {
  width: min(430px, 45vw);
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.7);
}

.search-box svg,
.filter-search svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-width: 1.8;
}

.search-box input,
.filter-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
}

.search-box input::placeholder,
.filter-search input::placeholder {
  color: #9c958e;
}

.search-box kbd {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #9a928a;
  background: var(--surface-strong);
  font-family: inherit;
  font-size: 9px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.today {
  padding-right: 18px;
  border-right: 1px solid var(--line);
}

.today span,
.today strong {
  display: block;
  line-height: 1.2;
}

.today span {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.today strong {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
}

.primary-button,
.secondary-button,
.dark-button,
.soft-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  gap: 8px;
  padding: 0 17px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  transition: 180ms ease;
}

.primary-button {
  color: #051f20;
  background: var(--lime);
  box-shadow: inset 0 -2px 0 rgba(5, 31, 32, 0.13);
}

.primary-button:hover {
  background: #a5c9af;
  transform: translateY(-1px);
}

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

.secondary-button:hover {
  border-color: #8eb69b;
  background: #edf6ef;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.icon-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.menu-toggle {
  display: none;
}

.page-area {
  width: min(1510px, 100%);
  margin: 0 auto;
  padding: 44px 38px 70px;
}

.view {
  display: none;
  animation: view-in 320ms ease both;
}

.view.active {
  display: block;
}

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

.eyebrow,
.panel-kicker {
  color: var(--orange-deep);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  align-items: end;
  gap: 40px;
  margin-bottom: 32px;
}

.page-intro h1,
.section-heading h1 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.065em;
}

.page-intro h1 {
  margin-top: 12px;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 0.98;
}

.page-intro h1 span {
  color: #607d72;
}

.page-intro > p {
  max-width: 390px;
  padding-bottom: 4px;
  color: var(--ink-soft);
  font-size: 15px;
}

.hero-card {
  position: relative;
  min-height: 405px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(142, 182, 155, 0.2);
  background: #051f20;
  box-shadow: var(--shadow);
}

.hero-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 31, 32, 0.96) 0%, rgba(5, 31, 32, 0.78) 35%, rgba(5, 31, 32, 0.1) 68%),
    linear-gradient(0deg, rgba(5, 31, 32, 0.35), transparent 55%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: 52%;
  padding: 44px 0 40px 46px;
  color: #daf1de;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid rgba(218, 241, 222, 0.22);
  border-radius: 999px;
  color: #daf1de;
  background: rgba(11, 43, 38, 0.5);
  font-size: 10px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.hero-label i {
  background: #8eb69b;
  box-shadow: 0 0 0 4px rgba(142, 182, 155, 0.14);
}

.hero-copy h2 {
  margin: 24px 0 15px;
  font-family: var(--font-display);
  font-size: clamp(42px, 4.8vw, 69px);
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 0.94;
}

.hero-copy > p {
  max-width: 420px;
  color: rgba(218, 241, 222, 0.76);
  font-size: 13px;
}

.hero-actions {
  display: flex;
  gap: 9px;
  margin-top: 27px;
}

.dark-button {
  color: #051f20;
  background: #daf1de;
}

.dark-button:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.soft-button {
  border: 1px solid rgba(218, 241, 222, 0.24);
  color: #daf1de;
  background: rgba(11, 43, 38, 0.48);
  backdrop-filter: blur(10px);
}

.soft-button:hover {
  background: rgba(35, 83, 71, 0.7);
}

.hero-float {
  position: absolute;
  z-index: 3;
  right: 25px;
  bottom: 25px;
  display: flex;
  width: 250px;
  min-height: 130px;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 20px;
  color: #fff;
  background: rgba(5, 31, 32, 0.82);
  box-shadow: 0 15px 40px rgba(5, 31, 32, 0.32);
  backdrop-filter: blur(18px);
}

.hero-float small,
.hero-float span {
  color: #8eb69b;
  font-size: 10px;
}

.hero-float strong {
  margin: 5px 0 7px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.05em;
}

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

.stat-card {
  min-height: 148px;
  padding: 21px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: 180ms ease;
}

.stat-card:hover {
  border-color: #8eb69b;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-top span:first-child {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.stat-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  color: var(--orange-deep);
  background: var(--orange-soft);
  font-size: 13px;
}

.stat-card:nth-child(3) .stat-icon { color: #163832; background: #cbe3d0; }
.stat-card:nth-child(4) .stat-icon { color: var(--green); background: var(--green-soft); }

.stat-card > strong {
  display: block;
  margin: 17px 0 7px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 31px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
}

.stat-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
}

.trend-positive,
.trend-neutral {
  padding: 3px 7px;
  border-radius: 999px;
  font-weight: 700;
}

.trend-positive { color: var(--green); background: var(--green-soft); }
.trend-neutral { color: #607d72; background: #e3eee7; }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr) minmax(260px, 0.7fr);
  gap: 16px;
}

.panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 22px 0;
}

.panel-header h2 {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.period-chip,
.live-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}

.live-pill {
  gap: 7px;
  color: var(--green);
  border-color: #b9d2c1;
  background: #eaf4ed;
}

.live-pill i {
  width: 5px;
  height: 5px;
  background: var(--green);
  box-shadow: none;
}

.chart-wrap {
  position: relative;
  display: flex;
  height: 210px;
  gap: 12px;
  padding: 25px 22px 22px;
}

.chart-wrap::before {
  position: absolute;
  inset: 25px 22px 49px 55px;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(50% - 1px), var(--line-soft) 50%);
  content: "";
  pointer-events: none;
}

.chart-scale {
  display: flex;
  width: 26px;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 25px;
  color: #aaa29a;
  font-size: 8px;
}

.bar-chart {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  flex: 1;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 10px;
}

.bar-column {
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  gap: 7px;
  text-align: center;
}

.bar-column .bar {
  position: relative;
  width: min(30px, 65%);
  min-height: 8px;
  margin: 0 auto;
  border-radius: 10px 10px 3px 3px;
  background: linear-gradient(180deg, #235347, #8eb69b);
  transform-origin: bottom;
  animation: grow-bar 700ms cubic-bezier(.22,.75,.22,1) both;
}

.bar-column:nth-child(2n) .bar { background: linear-gradient(180deg, #051f20, #235347); }
.bar-column:last-child .bar { background: linear-gradient(180deg, var(--lime-dark), var(--lime)); }

@keyframes grow-bar { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.bar-column small {
  color: var(--muted);
  font-size: 9px;
  text-transform: capitalize;
}

.bar-column em {
  position: absolute;
  top: -19px;
  left: 50%;
  display: none;
  padding: 2px 5px;
  border-radius: 5px;
  color: #fff;
  background: var(--espresso);
  font-size: 8px;
  font-style: normal;
  transform: translateX(-50%);
  white-space: nowrap;
}

.bar-column .bar:hover em { display: block; }

.status-body {
  display: grid;
  grid-template-columns: 135px 1fr;
  align-items: center;
  gap: 20px;
  padding: 30px 22px 27px;
}

.donut {
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--orange) 0%, var(--orange) 0%, #dbe7df 0%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.02);
}

.donut > div {
  display: grid;
  width: 91px;
  height: 91px;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: var(--surface);
}

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

.donut strong {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.05em;
}

.donut span {
  color: var(--muted);
  font-size: 9px;
}

.status-legend {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.status-legend > div {
  display: grid;
  grid-template-columns: 8px 1fr;
  align-items: start;
  gap: 9px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
}

.legend-dot.paid { background: var(--orange); }
.legend-dot.pending { background: #c9d9cf; }

.status-legend p {
  color: var(--muted);
  font-size: 9px;
}

.status-legend strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 12px;
}

.group-share {
  display: flex;
  flex-direction: column;
  gap: 21px;
  padding: 28px 22px 30px;
}

.group-row-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.group-row-top span {
  font-size: 11px;
  font-weight: 600;
}

.group-row-top strong {
  font-size: 11px;
}

.group-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe9e2;
}

.group-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--espresso);
}

.group-row:nth-child(2) .group-track i { background: var(--orange); }

.group-row small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}

.recent-panel {
  margin-top: 16px;
}

.text-button {
  color: var(--ink);
  background: none;
  font-size: 11px;
  font-weight: 700;
}

.text-button span {
  margin-left: 5px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 18px 22px 10px;
  color: #607d72;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 15px 22px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-soft);
  font-size: 11px;
  vertical-align: middle;
  white-space: nowrap;
}

.data-table tr:hover td {
  background: #edf6ef;
}

.data-table td strong {
  color: var(--ink);
  font-weight: 700;
}

.company-cell {
  display: flex;
  align-items: center;
  min-width: 190px;
  gap: 10px;
}

.company-initial {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--orange-deep);
  background: var(--orange-soft);
  font-weight: 800;
}

.company-cell p,
.company-cell span {
  display: block;
}

.company-cell p {
  color: var(--ink);
  font-weight: 700;
}

.company-cell span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.status-badge,
.group-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
}

.status-badge::before {
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-badge.paid { color: var(--green); background: var(--green-soft); }
.status-badge.pending { color: #607d72; background: #e3eee7; }
.group-badge { color: #234940; background: #e3eee7; }
.group-badge.brak { color: #163832; background: var(--orange-soft); }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 32px;
}

.section-heading h1 {
  margin-top: 8px;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1;
}

.section-heading p:last-child {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.filter-strip,
.client-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(247, 251, 248, 0.84);
}

.filter-search {
  min-width: 220px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-strong);
}

.filter-dropdown {
  position: relative;
  min-width: 150px;
}

.month-dropdown {
  min-width: 178px;
}

.filter-dropdown-button {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink-soft);
  background: var(--surface-strong);
  font-size: 11px;
  font-weight: 500;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.filter-dropdown-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 160ms ease;
}

.filter-dropdown.open .filter-dropdown-button {
  border-color: #8eb69b;
  background: #f4faf6;
  box-shadow: 0 0 0 3px rgba(35, 83, 71, 0.1);
}

.filter-dropdown.open .filter-dropdown-button svg {
  transform: rotate(180deg);
}

.filter-dropdown-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 7px);
  left: 0;
  display: none;
  width: max(100%, 188px);
  max-height: 275px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(5, 31, 32, 0.15);
}

.filter-dropdown.open .filter-dropdown-menu {
  display: grid;
  gap: 3px;
  animation: dropdown-in 160ms ease both;
}

@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.filter-option {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 11px;
  text-align: left;
  transition: 140ms ease;
}

.filter-option:hover {
  color: var(--ink);
  background: #edf6ef;
}

.filter-option.selected {
  color: #051f20;
  background: var(--lime);
  font-weight: 700;
}

.clear-filters {
  min-height: 36px;
  padding: 0 7px;
  color: var(--orange-deep);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.clear-filters span {
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin-left: 4px;
  place-items: center;
  border-radius: 50%;
  background: var(--orange-soft);
}

.filter-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.filter-actions .secondary-button {
  min-height: 40px;
}

.list-panel {
  overflow: hidden;
}

.list-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px 22px;
}

.list-summary span {
  font-weight: 700;
}

.list-summary small {
  color: var(--muted);
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.row-action {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
}

.row-action:hover {
  color: var(--orange-deep);
  border-color: #b9d2c1;
  background: #edf6ef;
}

.row-action.delete:hover {
  color: var(--red);
  border-color: #e7b8af;
  background: var(--red-soft);
}

.billing-button {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: 9px;
  color: #051f20;
  background: var(--lime);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
  transition: 160ms ease;
}

.billing-button::before {
  content: "✓";
  font-size: 10px;
}

.billing-button:hover {
  background: #a5c9af;
  transform: translateY(-1px);
}

.empty-state {
  padding: 55px 25px !important;
  color: var(--muted) !important;
  text-align: center;
}

.client-toolbar {
  justify-content: space-between;
}

.client-toolbar .filter-search {
  width: min(460px, 70%);
}

.client-toolbar > span {
  padding-right: 10px;
  color: var(--muted);
  font-size: 11px;
}

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

.client-card {
  position: relative;
  min-height: 230px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: 180ms ease;
}

.client-card::before {
  position: absolute;
  top: -48px;
  right: -42px;
  width: 120px;
  height: 120px;
  border: 20px solid rgba(35, 83, 71, 0.06);
  border-radius: 50%;
  content: "";
}

.client-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.client-card-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.client-logo {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: var(--espresso);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.client-card:nth-child(3n + 2) .client-logo { color: var(--ink); background: var(--lime); }
.client-card:nth-child(3n + 3) .client-logo { background: #235347; }

.client-card h3 {
  margin: 17px 0 3px;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.035em;
}

.client-cnpj {
  color: var(--muted);
  font-size: 9px;
}

.client-details {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line-soft);
}

.client-details span {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-details span::before {
  display: inline-block;
  width: 17px;
  color: var(--orange-deep);
}

.client-details .contact::before { content: "●"; }
.client-details .email::before { content: "@"; }
.client-details .phone::before { content: "⌕"; }

.client-actions {
  display: flex;
  gap: 5px;
}

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

.report-summary {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(5, 31, 32, 0.82), rgba(5, 31, 32, 0.97)),
    url("assets/black-dunes-hero.png") center 62% / cover;
}

.report-summary > div {
  min-height: 120px;
  padding: 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
}

.report-summary > div:first-child {
  background: rgba(35, 83, 71, 0.78);
}

.report-summary small,
.report-summary strong {
  display: block;
}

.report-summary small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-summary strong {
  margin-top: 13px;
  font-family: var(--font-display);
  font-size: clamp(19px, 2vw, 27px);
  font-weight: 500;
  letter-spacing: -0.05em;
}

.report-card {
  min-width: 0;
  overflow: hidden;
}

.report-card-wide {
  grid-column: 1 / -1;
}

.icon-link {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
  font-size: 17px;
}

.report-bars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  padding: 28px 22px 8px;
}

.report-bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  font-size: 10px;
}

.report-bar-track {
  height: 42px;
  overflow: hidden;
  border-radius: 12px;
  background: #dfe9e2;
}

.report-bar-track i {
  display: grid;
  height: 100%;
  align-items: center;
  padding-left: 13px;
  border-radius: inherit;
  color: #fff;
  background: var(--espresso);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.report-bar:nth-child(2) i {
  color: var(--ink);
  background: var(--lime);
}

.modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 31, 32, 0.58);
  backdrop-filter: blur(8px);
  animation: fade-in 180ms ease;
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: calc(100vh - 44px);
  padding: 28px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 34px 90px rgba(5, 31, 32, 0.3);
  animation: modal-in 240ms cubic-bezier(.22,.75,.22,1);
}

@keyframes fade-in { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(.98); } }

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 26px;
}

.modal-header h2 {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.05em;
}

.modal-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  background: #fff;
  font-size: 22px;
  line-height: 1;
}

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

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

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

.field > span,
.switch-field > span:last-child strong {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.field > input,
.field > select,
.money-field {
  width: 100%;
  min-height: 45px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: #fff;
}

.field > input,
.field > select {
  padding: 0 13px;
}

.date-input {
  color-scheme: light;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

.date-input::-webkit-calendar-picker-indicator {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 4px;
  border-radius: 7px;
  cursor: pointer;
  opacity: 0.7;
  transition: background 160ms ease, opacity 160ms ease;
}

.date-input:hover::-webkit-calendar-picker-indicator {
  background: var(--orange-soft);
  opacity: 1;
}

.field > input:focus,
.field > select:focus,
.money-field:focus-within {
  border-color: #8eb69b;
  box-shadow: 0 0 0 3px rgba(35, 83, 71, 0.11);
}

.money-field {
  display: flex;
  align-items: center;
  overflow: hidden;
}

.money-field > span {
  align-self: stretch;
  display: grid;
  padding: 0 11px;
  place-items: center;
  border-right: 1px solid var(--line-soft);
  color: var(--muted);
  background: #edf4ef;
  font-size: 10px;
  font-weight: 700;
}

.money-field input {
  width: 100%;
  min-width: 0;
  align-self: stretch;
  padding: 0 12px;
  border: 0;
  outline: 0;
  background: transparent;
  font-variant-numeric: tabular-nums;
}

.money-field.calculated {
  background: #f1f7f3;
}

.money-field.calculated input {
  color: var(--ink-soft);
  cursor: default;
  font-weight: 600;
}

.switch-field {
  display: flex;
  align-items: center;
  align-self: end;
  min-height: 45px;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.switch-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch {
  position: relative;
  width: 37px;
  height: 21px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #c9d9cf;
  transition: 180ms ease;
}

.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.16);
  content: "";
  transition: 180ms ease;
}

.switch-field input:checked + .switch {
  background: var(--green);
}

.switch-field input:checked + .switch::after {
  transform: translateX(16px);
}

.switch-field > span:last-child strong,
.switch-field > span:last-child small {
  display: block;
}

.switch-field > span:last-child small {
  color: var(--muted);
  font-size: 8px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

.toast {
  position: fixed;
  z-index: 1200;
  right: 24px;
  bottom: 24px;
  display: flex;
  min-width: 290px;
  align-items: center;
  gap: 12px;
  padding: 14px 17px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  color: #fff;
  background: rgba(5, 31, 32, 0.95);
  box-shadow: 0 18px 50px rgba(5, 31, 32, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: 220ms ease;
  backdrop-filter: blur(14px);
}

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

.toast > span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--lime);
  font-weight: 800;
}

.toast.error > span {
  color: #fff;
  background: var(--red);
}

.toast p strong,
.toast p small {
  display: block;
}

.toast p strong { font-size: 11px; }
.toast p small { margin-top: 2px; color: #aaa29b; font-size: 9px; }

.mobile-overlay {
  display: none;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: #c9c2b9; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--orange); background-clip: padding-box; }

@media (max-width: 1220px) {
  .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .sidebar { padding-inline: 16px; }
  .dashboard-grid { grid-template-columns: 1.35fr 1fr; }
  .group-panel { grid-column: 1 / -1; }
  .group-share { display: grid; grid-template-columns: repeat(2, 1fr); }
  .clients-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-strip { flex-wrap: wrap; }
  .filter-actions { width: 100%; margin-left: 0; }
}

@media (max-width: 920px) {
  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-105%);
    width: 260px;
    transition: 220ms ease;
  }
  body.menu-open .sidebar { transform: translateX(0); }
  .mobile-overlay {
    position: fixed;
    z-index: 45;
    inset: 0;
    background: rgba(5, 31, 32, 0.42);
    backdrop-filter: blur(3px);
  }
  body.menu-open .mobile-overlay { display: block; }
  .menu-toggle { display: grid; }
  .topbar { padding: 0 22px; }
  .page-area { padding: 35px 22px 60px; }
  .page-intro { grid-template-columns: 1fr; gap: 18px; }
  .hero-copy { width: 65%; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .group-panel { grid-column: auto; }
  .reports-grid { grid-template-columns: 1fr; }
  .report-card-wide { grid-column: auto; }
  .report-summary { grid-template-columns: repeat(2, 1fr); }
  .report-summary > div:nth-child(2) { border-right: 0; }
  .report-summary > div:nth-child(-n + 2) { border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
}

@media (max-width: 680px) {
  .topbar { height: 68px; gap: 10px; padding: 0 14px; }
  .search-box { flex: 1; width: auto; }
  .search-box kbd, .today { display: none; }
  .topbar-right { gap: 0; }
  .topbar .primary-button { width: 42px; padding: 0; font-size: 0; }
  .topbar .primary-button span { font-size: 19px; }
  .page-area { padding: 28px 14px 50px; }
  .page-intro h1 { font-size: 41px; }
  .page-intro > p { font-size: 13px; }
  .hero-card { min-height: 500px; }
  .hero-card > img { object-position: 64% center; }
  .hero-shade {
    background: linear-gradient(180deg, rgba(5, 31, 32, 0.97) 0%, rgba(5, 31, 32, 0.82) 45%, rgba(5, 31, 32, 0.18) 75%);
  }
  .hero-copy { width: 100%; padding: 29px 25px; }
  .hero-copy h2 { font-size: 44px; }
  .hero-float { right: 16px; bottom: 16px; left: 16px; width: auto; min-height: 108px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 125px; }
  .group-share { display: flex; }
  .status-body { grid-template-columns: 120px 1fr; gap: 13px; }
  .donut { width: 116px; height: 116px; }
  .donut > div { width: 80px; height: 80px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading h1 { font-size: 46px; }
  .section-heading > .primary-button { width: 100%; }
  .filter-strip, .client-toolbar { align-items: stretch; flex-direction: column; }
  .filter-search, .client-toolbar .filter-search { width: 100%; min-width: 0; }
  .filter-dropdown { width: 100%; }
  .filter-dropdown-menu { width: 100%; }
  .clear-filters { align-self: flex-start; }
  .filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .clients-grid { grid-template-columns: 1fr; }
  .client-toolbar > span { padding: 3px 4px; }
  .report-summary { grid-template-columns: 1fr; }
  .report-summary > div { min-height: 96px; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
  .report-bars { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .modal { padding: 10px; }
  .modal-dialog { max-height: calc(100vh - 20px); padding: 22px 18px; border-radius: 20px; }
  .modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .toast { right: 14px; bottom: 14px; left: 14px; min-width: 0; }
}

@media print {
  .sidebar, .topbar, .section-heading .primary-button, .icon-link { display: none !important; }
  .app-shell { display: block; }
  .page-area { width: 100%; padding: 0; }
  .view { display: none !important; }
  #reportsView { display: block !important; }
  .panel, .report-summary { break-inside: avoid; box-shadow: none; }
  body { background: #fff; }
}

/* Fluxo 3.0 — operação, conciliação e governança */
.main-nav { overflow-y: auto; }
.nav-count.warning { color: #5e2b00; background: #ffd7a1; }
.heading-actions { display: flex; gap: 9px; }
.alert-strip {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -8px 0 24px;
  padding: 15px 18px;
  border: 1px solid #f0c995;
  border-radius: 15px;
  color: #5e2b00;
  background: #fff4e5;
  text-align: left;
}
.alert-strip strong { font-size: 12px; }
.alert-strip span { font-size: 10px; }
.status-badge.warning { color: #744000; background: #fff0cc; }
.status-badge.received { color: #174f37; background: #d5f4df; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 18px 0 2px; }
.pagination button, .compact-list button {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 9px;
  font-weight: 700;
}
.pagination button:disabled { opacity: .4; }
.pagination span { color: var(--muted); font-size: 9px; }
.client-financial { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line-soft); }
.client-financial span, .client-financial small { color: var(--muted); font-size: 8px; }
.client-financial strong { grid-row: span 2; align-self: center; font-size: 12px; }
.cell-note { display: block; max-width: 240px; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.file-chip { display: block; max-width: 220px; overflow: hidden; color: var(--ink-soft); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.file-button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 700; }
.native-filter, .report-filters select, .report-filters input, .inline-form input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 10px;
}
.compact-filters { justify-content: flex-start; }
.reconciliation-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.reconciliation-card {
  min-height: 90px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: left;
  box-shadow: var(--shadow);
}
.reconciliation-card span, .reconciliation-card strong { display: block; }
.reconciliation-card span { color: var(--muted); font-size: 9px; }
.reconciliation-card strong { margin-top: 9px; color: #8a3e13; font-family: "Manrope", sans-serif; font-size: 23px; }
.reconciliation-card.positive strong { color: var(--green); }
.reconciliation-badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: #7a2f0b; background: #ffeadb; font-size: 8px; font-weight: 800; white-space: nowrap; }
.reconciliation-badge.ok { color: #174f37; background: #d5f4df; }
.reconciliation-badge.divergente, .reconciliation-badge.duplicado { color: #7b1f1a; background: #fee2df; }
.report-filters { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)) auto; align-items: end; gap: 10px; margin-bottom: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.report-filters label > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.report-filters input, .report-filters select { width: 100%; }
.custom-report { margin-bottom: 18px; }
.governance-summary { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; overflow: hidden; border-radius: 18px; color: #fff; background: var(--ink); }
.governance-summary > div { min-height: 100px; padding: 20px; border-right: 1px solid rgba(255,255,255,.1); }
.governance-summary small, .governance-summary strong { display: block; }
.governance-summary small { color: #a8bbb7; font-size: 9px; }
.governance-summary strong { margin-top: 10px; font: 700 25px "Manrope", sans-serif; }
.governance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.governance-wide { grid-column: 1 / -1; }
.forecast-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.forecast-grid > div { padding: 13px; border-radius: 12px; background: var(--surface); }
.forecast-grid small, .forecast-grid strong { display: block; }
.forecast-grid small { color: var(--muted); font-size: 8px; }
.forecast-grid strong { margin-top: 6px; font-size: 12px; }
.inline-form { display: grid; grid-template-columns: 130px 1fr auto; gap: 8px; margin-bottom: 14px; }
.compact-list { display: grid; gap: 7px; max-height: 290px; overflow: auto; }
.compact-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 11px; border: 1px solid var(--line-soft); border-radius: 11px; }
.compact-list strong, .compact-list small { display: block; }
.compact-list strong { max-width: 310px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.compact-list small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.compact-actions { display: flex; gap: 5px; }
.compact-list .danger-link { color: var(--red); }
.modal-wide { width: min(100%, 980px); }
.detail-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-bottom: 15px; }
.detail-summary > div { padding: 14px; border-radius: 12px; background: var(--surface); }
.detail-summary small, .detail-summary strong { display: block; }
.detail-summary small { color: var(--muted); font-size: 8px; }
.detail-summary strong { margin-top: 5px; font-size: 13px; }
.detail-contact { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 16px; color: var(--muted); font-size: 9px; }
.field textarea { width: 100%; resize: vertical; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: #fff; font: inherit; }
.protocols-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.protocol-card { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 112px; padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: var(--shadow); }
.protocol-icon { display: grid; width: 56px; height: 68px; place-items: center; border-radius: 10px 10px 14px 10px; color: #fff; background: var(--ink); font: 800 10px "Manrope", sans-serif; letter-spacing: .08em; }
.protocol-card-copy { min-width: 0; }
.protocol-card-copy p { overflow: hidden; font: 700 12px "Manrope", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.protocol-card-copy span, .protocol-card-copy small { display: block; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.protocol-card .primary-button { min-width: 112px; }
.protocol-preview-modal { padding: 18px; }
.protocol-preview-dialog { display: flex; width: min(1180px, 100%); height: calc(100vh - 36px); max-height: none; flex-direction: column; }
.protocol-preview-body { min-height: 0; flex: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #e7ede9; }
.protocol-preview-body iframe, .protocol-preview-body img { width: 100%; height: 100%; border: 0; object-fit: contain; background: #fff; }

@media (max-width: 1100px) {
  .reconciliation-summary { grid-template-columns: repeat(3, 1fr); }
  .report-filters { grid-template-columns: repeat(2, 1fr); }
  .report-filters .primary-button { width: 100%; }
  .protocols-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .heading-actions { width: 100%; }
  .heading-actions > button { flex: 1; }
  .alert-strip { align-items: flex-start; flex-direction: column; }
  .reconciliation-summary { grid-template-columns: repeat(2, 1fr); }
  .report-filters, .governance-grid { grid-template-columns: 1fr; }
  .governance-wide { grid-column: auto; }
  .governance-summary, .detail-summary { grid-template-columns: repeat(2, 1fr); }
  .inline-form { grid-template-columns: 1fr; }
  .protocol-card { grid-template-columns: 48px minmax(0, 1fr); }
  .protocol-icon { width: 46px; height: 58px; }
  .protocol-card .primary-button { grid-column: 1 / -1; width: 100%; }
}
