/* Sales Intelligence readability pass */
:root {
  --bg-1: #eef2f6;
  --bg-2: #f7f9fb;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --line: #d9e0e8;
  --line-strong: #b8c6d6;
  --text: #17202a;
  --muted: #4d5d6c;
  --muted-2: #687887;
  --accent: #1769aa;
  --accent-2: #007f78;
  --success: #16794f;
  --danger: #ba2d3b;
  --shadow-lg: 0 18px 44px rgba(28, 43, 58, 0.10);
  --shadow-md: 0 6px 18px rgba(28, 43, 58, 0.07);
}

html {
  font-size: 16px;
}

html,
body {
  background: #eef2f6;
  color: var(--text);
}

body::before {
  display: none;
}

.shell {
  grid-template-columns: 264px minmax(0, 1fr);
  background: #eef2f6;
}

.sidebar {
  padding: 24px 18px;
  background: #17283a;
  border-right: 0;
  box-shadow: none;
  gap: 20px;
}

.sidebar-logo {
  max-width: 142px;
  border-radius: 6px;
  padding: 4px;
  background: #ffffff;
  border: 0;
  box-shadow: none;
}

.sidebar-title h1,
.user-chip strong {
  color: #ffffff;
}

.sidebar-title p,
.user-chip small {
  color: #c6d2dd;
}

.user-chip {
  padding: 14px;
  border-radius: 6px;
  background: #21384f;
  border: 1px solid #35516b;
}

.nav-list {
  gap: 6px;
}

.nav-button,
.tab-button,
.ghost-button,
.primary-button,
.danger-button {
  border-radius: 6px;
  min-height: 44px;
  font-weight: 650;
}

.nav-button {
  padding: 12px 14px;
  color: #d5e0e9;
  background: transparent;
  border: 1px solid transparent;
  font-size: .96rem;
}

.nav-button:hover {
  color: #ffffff;
  background: #21384f;
  transform: none;
}

.nav-button.active {
  color: #ffffff;
  background: #1769aa;
  border-color: #2b7dbd;
  box-shadow: none;
}

.content {
  padding: 28px 32px 48px;
}

.content-toolbar {
  margin-bottom: 18px;
}

.content-toolbar-label,
.env-badge,
.badge {
  border-radius: 4px;
  letter-spacing: 0;
  text-transform: none;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

.content-toolbar-label {
  background: #ffffff;
  border-color: var(--line);
  color: #465565;
  font-size: .82rem;
}

.hero {
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  padding: 24px 26px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-md);
}

.hero::before {
  display: none;
}

.hero-topline {
  margin-bottom: 12px;
}

.hero-meta {
  margin-top: 14px;
}

.badge {
  padding: 6px 9px;
  background: #eef5fb;
  border-color: #caddec;
  color: #245779;
  font-size: .78rem;
}

.badge::before {
  width: 6px;
  height: 6px;
  background: var(--accent);
  box-shadow: none;
}

.hero h2 {
  max-width: none;
  font-size: 2rem;
  line-height: 1.18;
  letter-spacing: 0;
  color: #14202c;
}

.hero p {
  margin-top: 10px;
  color: #4d5d6c;
  line-height: 1.6;
  font-size: 1rem;
}

.panel,
.auth-panel,
.table-card,
.detail-card,
.modal-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  color: var(--text);
}

.panel,
.table-card,
.detail-card,
.auth-panel {
  padding: 22px 24px;
}

.panel,
.table-card {
  margin-bottom: 18px;
}

.panel h3,
.table-card h3,
.detail-card h3,
.modal-card h3 {
  color: #17202a;
  font-size: 1.12rem;
  line-height: 1.35;
}

.section-note,
.muted {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.55;
}

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.kpi {
  position: relative;
  min-height: 132px;
  padding: 18px 18px 17px;
  border-radius: 7px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-top: 4px solid #96a5b3;
  box-shadow: 0 3px 10px rgba(28, 43, 58, 0.05);
}

.kpi--success {
  border-top-color: var(--success);
}

.kpi--warning {
  border-top-color: #c2770a;
}

.kpi--danger {
  border-top-color: var(--danger);
}

.kpi-label {
  color: #536373;
  font-size: .86rem;
  font-weight: 650;
}

.kpi-value {
  margin-top: 11px;
  color: #111a23;
  font-size: 1.85rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.kpi-sub {
  margin-top: 8px;
  color: #617181;
  font-size: .88rem;
  line-height: 1.45;
}

.action-list {
  display: grid;
  gap: 10px;
}

.action-item {
  position: relative;
  padding: 14px 16px 14px 42px;
  border: 1px solid #d7e0e8;
  border-radius: 6px;
  background: #f7f9fb;
  color: #22303d;
  line-height: 1.55;
}

.action-item::before {
  content: "!";
  position: absolute;
  left: 15px;
  top: 13px;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1769aa;
  color: #ffffff;
  font-size: .75rem;
  font-weight: 800;
}

.filters {
  gap: 14px;
}

.field label {
  color: #344554;
  font-size: .92rem;
}

.field input,
.field select,
.field textarea {
  min-height: 46px;
  padding: 11px 13px;
  border-radius: 6px;
  border-color: #bdc9d5;
  background: #ffffff;
  color: #17202a;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #1769aa;
  box-shadow: 0 0 0 3px rgba(23, 105, 170, .13);
}

.search-suggestions {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}

.search-suggestion {
  width: 100%;
  min-height: 0;
  height: auto;
  padding: 9px 11px;
  border: 1px solid #d7e0ea;
  border-radius: 6px;
  background: #f8fbfe;
  color: #17202a;
  display: grid;
  gap: 3px;
  text-align: left;
  box-shadow: none;
}

.search-suggestion:hover,
.search-suggestion:focus-visible {
  background: #eef6ff;
  border-color: #1769aa;
}

.search-suggestion__name {
  font-weight: 800;
}

.search-suggestion__meta {
  color: #5e7185;
  font-size: .82rem;
  font-weight: 600;
}

.primary-button {
  color: #ffffff;
  background: #1769aa;
  box-shadow: none;
}

.primary-button:hover {
  background: #11578e;
  transform: none;
}

.ghost-button,
.tab-button {
  color: #263746;
  background: #ffffff;
  border: 1px solid #bdc9d5;
}

.ghost-button:hover,
.tab-button:hover {
  background: #f2f5f8;
  transform: none;
}

.tab-button.active {
  color: #ffffff;
  background: #1769aa;
  border-color: #1769aa;
}

.table-wrap {
  border: 1px solid #d9e0e8;
  border-radius: 6px;
  background: #ffffff;
}

.table-wrap-limited {
  max-height: calc(60px + (var(--visible-rows) * 56px));
}

table {
  font-size: .94rem;
}

th,
td {
  padding: 13px 14px;
  border-bottom-color: #e1e7ed;
  line-height: 1.45;
}

th {
  background: #edf2f6;
  color: #2e4050;
  font-size: .79rem;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.table-sort-button {
  padding: 13px 14px;
}

.table-sort-button:hover {
  background: #e3ebf2;
}

tbody tr {
  cursor: default;
}

tbody tr:hover {
  background: #f5f8fa;
}

tbody tr.is-active {
  background: #e1effa;
  box-shadow: inset 4px 0 0 #1769aa;
}

.table-sort-indicator {
  color: #1769aa;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: #9fb0bf;
}

.table-wrap::-webkit-scrollbar-track {
  background: #eef2f6;
}

.empty-state,
.info-box,
.error-box,
.success-box {
  border-radius: 6px;
  color: #263746;
  line-height: 1.5;
}

.empty-state,
.info-box {
  background: #eef5fb;
  border-color: #c9ddeb;
}

.error-box {
  color: #7e1f29;
  background: #fff0f1;
  border-color: #efc4c9;
}

.success-box {
  color: #135f40;
  background: #ecf8f2;
  border-color: #b9dfcc;
}

.map-box {
  border-radius: 6px;
  border-color: #c8d2dc;
}

.apartment-benchmark {
  margin: 18px 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.apartment-benchmark__heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.apartment-benchmark__heading h4 {
  margin: 0 0 5px;
  font-size: 1.05rem;
}

.apartment-benchmark__heading p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}

.score-badge {
  flex: 0 0 auto;
  min-width: 74px;
  padding: 8px 10px;
  border-radius: 5px;
  background: #edf2f6;
  color: #263746;
  text-align: center;
  font-weight: 800;
}

.score-badge--success {
  background: #e6f5ed;
  color: #11633f;
}

.score-badge--warning {
  background: #fff4df;
  color: #8a5200;
}

.score-badge--danger {
  background: #ffe9eb;
  color: #9c2632;
}

.auth-shell {
  width: min(1640px, calc(100vw - 28px));
}

.auth-hero {
  border-left-width: 1px;
}

.auth-panel {
  background: #ffffff;
}

.auth-panel .field input,
.auth-panel .field select,
.auth-panel .field textarea {
  background: #ffffff;
  border-color: #bdc9d5;
}

.auth-lead,
.legal-content,
.legal-content p,
.legal-content li {
  color: #425464;
}

.legal-content h1,
.legal-content h2,
.legal-content h3,
.legal-content h4 {
  color: #17202a;
}

.modal {
  background: rgba(17, 28, 39, .62);
}

@media (max-width: 860px) {
  .content {
    padding: 18px;
  }

  .hero h2 {
    font-size: 1.7rem;
  }

  .kpi {
    min-height: 118px;
  }
}

@media (max-width: 640px) {
  .hero,
  .panel,
  .table-card,
  .detail-card,
  .auth-panel {
    padding: 18px;
  }

  .hero h2 {
    font-size: 1.55rem;
  }

  .kpi-value {
    font-size: 1.6rem;
  }
}
/* Balanced light surfaces and sold drill-down */
html,
body,
.shell {
  background: #e7ecef;
}

.content-toolbar-label,
.hero {
  background: #f5f8fa;
}

.panel,
.table-card,
.detail-card,
.modal-card,
.auth-panel {
  background: #f8fafb;
}

.kpi {
  background: #f3f6f8;
}

.kpi--success {
  background: #edf7f2;
}

.kpi--warning {
  background: #fff6e8;
}

.kpi--danger {
  background: #fff0f1;
}

/* env-badge kolory zdefiniowane wyzej zakladaly ciemne tlo (jasny tekst na
   przezroczystym tle) - w jasnym motywie ten sam styl daje niski kontrast
   (np. blade zolte litery na jasnozoltym tle). Dopasowujemy do konwencji
   .score-badge z tego samego jasnego motywu. */
.env-badge {
  background: #eef2f6;
  border-color: rgba(70, 85, 101, 0.18);
  color: #465565;
}

.env-badge--work {
  background: #fff4df;
  border-color: rgba(138, 82, 0, 0.22);
  color: #8a5200;
}

.env-badge--production {
  background: #e6f5ed;
  border-color: rgba(17, 99, 63, 0.22);
  color: #11633f;
}

.field input,
.field select,
.field textarea,
.ghost-button,
.tab-button,
.table-wrap,
.auth-panel .field input,
.auth-panel .field select,
.auth-panel .field textarea {
  background: #f3f6f8;
}

tbody tr:nth-child(even) {
  background: #f1f4f6;
}

tbody tr:hover {
  background: #e7eff5;
}

.table-link-button {
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: #115f99;
  font: inherit;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.table-link-button:hover,
.table-link-button:focus-visible {
  color: #0b4774;
  text-decoration: underline;
}

.sold-details {
  margin: -2px 0 18px;
  padding: 20px 22px;
  border: 1px solid #cfd9e1;
  border-left: 5px solid var(--success);
  border-radius: 7px;
  background: #eaf3ef;
}

.sold-details--empty {
  border-left-color: #8798a7;
  background: #e9eef1;
  color: var(--muted);
}

.sold-details__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.sold-details__header h3 {
  margin: 3px 0 4px;
}

.sold-details__eyebrow {
  color: #176b4c;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.sold-count-badge {
  min-width: 52px;
  padding: 8px 12px;
  border-radius: 5px;
  background: #176b4c;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  text-align: center;
}

.sold-apartments-table {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 4px;
  font-size: .82rem;
  font-weight: 750;
}

.status-pill--sold {
  background: #d7ebdf;
  color: #115c40;
}

.sold-details__basis {
  margin-top: 12px;
  color: #50616e;
  font-size: .84rem;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .sold-details {
    padding: 16px;
  }

  .sold-details__header {
    align-items: center;
  }
}
/* Admin section navigation */
.admin-subnav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 8px;
  margin: -4px 0 18px;
  padding: 10px;
  border: 1px solid #cdd7df;
  border-radius: 7px;
  background: #e8edf1;
  box-shadow: 0 4px 12px rgba(28, 43, 58, 0.08);
}

.admin-subnav .tab-button {
  flex: 0 1 auto;
  min-height: 40px;
}

@media (max-width: 760px) {
  .admin-subnav {
    position: static;
    overflow-x: auto;
  }

  .admin-subnav .tab-button {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* Dashboard period controls */
.dashboard-period-panel {
  padding: 16px 18px;
}

.dashboard-period-controls {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.dashboard-period-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-period-tabs .tab-button {
  min-width: 96px;
}

.dashboard-date-field {
  min-width: 220px;
}

.dashboard-city-field {
  min-width: 220px;
}

@media (max-width: 640px) {
  .dashboard-period-controls {
    align-items: stretch;
  }

  .dashboard-date-field,
  .dashboard-city-field {
    width: 100%;
    min-width: 0;
  }

  .dashboard-period-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-period-tabs .tab-button {
    min-width: 0;
  }
}
/* Dashboard visual analytics */
.dashboard-visuals {
  margin: 2px 0 20px;
  padding: 20px 0;
  border-top: 1px solid #cbd6df;
  border-bottom: 1px solid #cbd6df;
}

.dashboard-visuals__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.dashboard-visuals__eyebrow {
  margin-bottom: 5px;
  color: #1769aa;
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-visuals__header h2 {
  margin: 0;
  color: #17202a;
  font-size: 1.28rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.dashboard-visuals__period {
  color: #536373;
  font-size: .84rem;
  font-weight: 650;
  white-space: nowrap;
}

.dashboard-chart-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-chart {
  min-width: 0;
  padding: 18px;
  border: 1px solid #cfd9e2;
  border-radius: 8px;
  background: #f7f9fb;
}

.dashboard-chart--price {
  grid-column: span 4;
}

.dashboard-chart--activity {
  grid-column: span 8;
}

.dashboard-chart--cities {
  grid-column: 1 / -1;
}

.dashboard-chart--sold-developers {
  grid-column: 1 / -1;
}

.dashboard-chart__header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.dashboard-chart__header h3 {
  margin: 0;
  color: #17202a;
  font-size: 1rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.dashboard-chart__header p {
  margin: 4px 0 0;
  color: #607080;
  font-size: .82rem;
  line-height: 1.4;
}

.dashboard-price-direction {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 178px;
}

.dashboard-donut {
  --price-up-angle: 0deg;
  position: relative;
  flex: 0 0 156px;
  width: 156px;
  height: 156px;
  border-radius: 50%;
  background: conic-gradient(#16794f 0 var(--price-up-angle), #ba2d3b var(--price-up-angle) 360deg);
}

.dashboard-donut.is-empty {
  background: #dbe3ea;
}

.dashboard-donut::after {
  content: "";
  position: absolute;
  inset: 27px;
  border-radius: 50%;
  background: #f7f9fb;
}

.dashboard-donut__value {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  text-align: center;
}

.dashboard-donut__value strong {
  color: #17202a;
  font-size: 1.65rem;
  line-height: 1;
}

.dashboard-donut__value span {
  margin-top: 5px;
  color: #607080;
  font-size: .76rem;
}

.dashboard-direction-stats {
  display: grid;
  gap: 12px;
  min-width: 112px;
}

.dashboard-direction-stats > div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: #465565;
  font-size: .82rem;
}

.dashboard-direction-stats strong {
  color: #17202a;
  font-size: .94rem;
}

.dashboard-price-net {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 4px solid #8a99a8;
  background: #e9eef2;
  color: #4b5c6c;
  font-size: .82rem;
}

.dashboard-price-net strong {
  color: #263746;
  white-space: nowrap;
}

.dashboard-price-net--up {
  border-left-color: #16794f;
}

.dashboard-price-net--down {
  border-left-color: #ba2d3b;
}

.dashboard-bar-chart {
  display: grid;
  gap: 9px;
}

.dashboard-bar-row {
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(120px, 1fr) 42px;
  align-items: center;
  gap: 12px;
  min-height: 38px;
}

.dashboard-bar-label {
  min-width: 0;
}

.dashboard-bar-label strong,
.dashboard-bar-label small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-bar-label strong {
  color: #263746;
  font-size: .82rem;
}

.dashboard-bar-label small {
  margin-top: 2px;
  color: #71808e;
  font-size: .7rem;
}

.dashboard-bar-track {
  display: flex;
  width: 100%;
  height: 13px;
  overflow: hidden;
  border-radius: 3px;
  background: #dfe6ec;
}

.dashboard-bar-segment {
  display: block;
  height: 100%;
  min-width: 2px;
}

.dashboard-bar-segment--new,
.dashboard-chart-swatch--new {
  background: #007f78;
}

.dashboard-bar-segment--sold,
.dashboard-chart-swatch--sold {
  background: #c45d2f;
}

.dashboard-bar-segment--price,
.dashboard-chart-swatch--price {
  background: #c2770a;
}

/* Keep the two activity series visually distinct without changing other charts. */
.dashboard-chart--activity .dashboard-bar-segment--sold,
.dashboard-chart--activity .dashboard-chart-swatch--sold {
  background: #c2410c;
}

.dashboard-chart--activity .dashboard-bar-segment--price,
.dashboard-chart--activity .dashboard-chart-swatch--price {
  background: #7c3aed;
}

.dashboard-bar-segment--status,
.dashboard-chart-swatch--status,
.dashboard-bar-segment--available,
.dashboard-chart-swatch--available {
  background: #1769aa;
}

.dashboard-bar-segment--reserved,
.dashboard-chart-swatch--reserved {
  background: #7257a8;
}

.dashboard-chart-swatch--increase {
  background: #16794f;
}

.dashboard-chart-swatch--decrease {
  background: #ba2d3b;
}

.dashboard-bar-total {
  color: #263746;
  font-size: .84rem;
  text-align: right;
}

.dashboard-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid #dbe2e8;
}

.dashboard-chart-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5c6c7b;
  font-size: .75rem;
}

.dashboard-chart-swatch {
  display: inline-block;
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.dashboard-chart-empty {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 20px;
  border: 1px dashed #bdcad5;
  color: #607080;
  font-size: .86rem;
  text-align: center;
}

@media (max-width: 1120px) {
  .dashboard-chart--price,
  .dashboard-chart--activity,
  .dashboard-chart--cities,
  .dashboard-chart--sold-developers {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .dashboard-visuals__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-visuals__period {
    white-space: normal;
  }

  .dashboard-chart {
    padding: 15px;
  }

  .dashboard-price-direction {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-donut {
    align-self: center;
  }

  .dashboard-direction-stats {
    min-width: 0;
  }

  .dashboard-bar-row {
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 6px 10px;
  }

  .dashboard-bar-label {
    grid-column: 1 / -1;
  }

  .dashboard-bar-track {
    grid-column: 1;
  }

  .dashboard-bar-total {
    grid-column: 2;
  }
}

@media (max-width: 720px) {
  .content-toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .top-brand-logos {
    justify-content: center;
    width: 100%;
  }

  .auth-hero-logo-frame {
    gap: 16px;
  }

  .auth-hero-logo--emmerson {
    height: 48px;
  }

  .auth-hero-logo--mira {
    height: 60px;
  }
}

/* Emmerson visual layer */
:root {
  --bg-1: #f3f5f3;
  --bg-2: #f7f8f6;
  --surface: #fff;
  --surface-2: #f9faf8;
  --line: #dce1dc;
  --line-strong: #c8d0c9;
  --text: #202321;
  --muted: #606863;
  --muted-2: #78817a;
  --accent: #ad874d;
  --accent-2: #263c3a;
  --shadow-lg: 0 16px 34px rgba(28, 36, 30, .07);
  --shadow-md: 0 6px 18px rgba(28, 36, 30, .05);
}

* { letter-spacing: 0; }
html, body { background: var(--bg-1); color: var(--text); }
body::before, .hero::before { display: none; }

.shell { grid-template-columns: 272px minmax(0, 1fr); background: var(--bg-1); }
.shell.sidebar-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.sidebar {
  padding: 26px 18px 18px;
  background: #fff;
  border-right: 1px solid var(--line);
  box-shadow: none;
  gap: 18px;
}
.sidebar .top-brand-logos {
  display: flex;
  align-self: stretch;
  justify-content: center;
  gap: 18px;
  margin-top: 44px;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}
.top-brand-logo--emmerson { height: 38px; max-width: 50%; }
.top-brand-logo--mira { height: 48px; max-width: 50%; }
.sidebar-title h1, .user-chip strong { color: var(--text); }
.sidebar-title p, .user-chip small, .section-note, .muted { color: var(--muted); }
.user-chip { background: #f7f8f6; border: 1px solid var(--line); border-radius: 3px; }
.nav-list { gap: 3px; }
.nav-button { padding: 11px 12px; color: #525b54; background: transparent; border: 1px solid transparent; border-radius: 3px; }
.nav-button:hover, .nav-button.active { color: var(--text); background: #f5f2ed; border-color: #e8d9c0; box-shadow: none; transform: none; }
.nav-button.active { border-left: 3px solid #ad874d; }

.content { padding: 28px 34px 44px; }
.content-toolbar { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.content-toolbar-label, .env-badge, .badge {
  color: #876632;
  background: #fff;
  border: 1px solid #e7d8bf;
  border-radius: 2px;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  text-transform: none;
}
.badge::before, .hero-marker, .action-item::before { background: #ad874d; }
.hero { padding: 14px 0 20px; color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.hero h2, .panel h3, .table-card h3, .detail-card h3, .modal-card h3 { color: var(--text); font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.hero h2 { font-size: 2rem; line-height: 1.14; }
.hero p, .auth-lead, .legal-content, .legal-content p, .legal-content li { color: var(--muted); }
.panel, .auth-panel, .table-card, .detail-card, .modal-card, .kpi, .dashboard-chart {
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: var(--shadow-md);
}
.kpi { border-top: 2px solid #ad874d; }
.kpi-label, .kpi-sub { color: var(--muted); }
.kpi-value { color: var(--text); }

.auth-shell { width: min(1320px, calc(100vw - 32px)); padding: 28px 0 48px; }
.auth-hero { padding: 22px 28px 26px; margin-bottom: 18px; background: #fff; border: 1px solid var(--line); border-top: 3px solid #ad874d; }
.auth-hero-logo-frame { padding: 8px; background: #fff; border-radius: 0; box-shadow: none; gap: 24px; }
.auth-hero-logo--emmerson { height: 72px; max-width: min(46%, 330px); }
.auth-hero-logo--mira { height: 82px; max-width: min(46%, 300px); }
.auth-grid { grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr); gap: 18px; }
.auth-side .kpi { min-height: 124px; }
.auth-panel { top: 18px; padding: 24px; }
.auth-panel .tabs { gap: 6px; }
.auth-panel .tab-button { min-height: 46px; padding: 10px 12px; }
.tab-button, .ghost-button { color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 3px; box-shadow: none; }
.tab-button.active, .tab-button:hover, .ghost-button:hover { color: var(--text); background: #f5f2ed; border-color: #d8bc8e; transform: none; }
.primary-button { color: #fff; background: #202321; border: 1px solid #202321; border-radius: 3px; box-shadow: none; }
.primary-button:hover { color: #fff; background: #876632; border-color: #876632; transform: none; }
.field input, .field select, .field textarea, .auth-panel .field input, .auth-panel .field select, .auth-panel .field textarea { color: var(--text); background: #fff; border-color: #cfd7ce; border-radius: 3px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #ad874d; }
th { color: #4a514b; background: #f2f4f1; border-bottom: 1px solid var(--line); }
td { border-bottom-color: #e4e8e2; }
tbody tr:hover, tbody tr.is-active { background: #f7f6f2; }
.empty-state, .info-box { color: #34535a; background: #f1f6f6; border-color: #d7e6e7; border-radius: 3px; }
.error-box, .success-box, .map-box { border-radius: 3px; }

@media (max-width: 1080px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar, .content { min-width: 0; }
  .sidebar { min-height: 0; }
  .auth-grid { grid-template-columns: 1fr; }
  .auth-panel { position: static; order: -1; }
}

@media (max-width: 640px) {
  .sidebar { gap: 10px; padding: 12px 14px; }
  .sidebar .top-brand-logos { margin-top: 44px; padding: 0 0 10px; }
  .sidebar-title p { display: none; }
  .user-chip { padding: 8px 10px; }
  .nav-list { display: flex; flex-wrap: nowrap; gap: 6px; width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .nav-button { flex: 0 0 auto; min-height: 40px; white-space: nowrap; }
  .sidebar .logout-button { display: none; }
  .content { padding: 18px 14px 30px; }
  .auth-shell { width: min(100%, calc(100vw - 20px)); padding-top: 10px; }
  .auth-hero { padding: 18px; }
  .auth-hero-logo-frame { gap: 14px; }
  .auth-hero-logo--emmerson, .auth-hero-logo--mira { max-width: 45%; height: 54px; }
  .auth-panel { padding: 18px; }
  .auth-panel .tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero h2 { font-size: 1.7rem; }
}
