.macro-page {
  --macro-page-bg: #0B0B0B;
  --macro-card-bg: #151515;
  --macro-table-bg: #111111;
  --macro-row-bg: #1b1b1b;
  --macro-row-hover: #111111;
  --macro-date-bg: #171717;
  --macro-border-soft: #242424;
  --macro-border-medium: #303030;
  --macro-text: #ffffff;
  --macro-text-secondary: #d4d4d4;
  --macro-text-muted: #747474;
  --macro-accent: rgba(255, 255, 255, 0.88);
  --macro-radius: 8px;
  --macro-gap: 12px;
  --macro-card-h: 132px;
  --macro-control-h: 36px;
  --macro-row-h: 56px;
  --macro-head-h: 38px;
  --macro-date-h: 46px;
  padding: 18px 24px 32px;
  background: var(--macro-page-bg);
  font-family: var(--font-main);
  min-width: 0;
  max-width: 100%;
}

.macro-summary,
.macro-controls,
.macro-table-wrap {
  width: 100%;
}

.macro-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px) minmax(260px, 1fr);
  gap: var(--macro-gap);
  margin-bottom: var(--macro-gap);
}

.macro-summary-card {
  min-height: var(--macro-card-h);
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--macro-radius);
  background: var(--macro-card-bg);
  display: grid;
  grid-template-rows: 14px auto 1fr;
  align-items: start;
  gap: 7px;
  overflow: hidden;
}

.macro-summary-card span {
  height: 14px;
  color: var(--macro-text-muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.macro-summary-card strong {
  align-self: start;
  min-width: 0;
  max-width: 100%;
  color: var(--macro-text);
  font-size: 18px;
  font-weight: 780;
  line-height: 24px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: none;
}

.macro-summary-lines {
  max-width: 100%;
  min-width: 0;
  display: grid;
  gap: 3px;
  align-self: end;
}

.macro-summary-card small {
  max-width: 100%;
  min-height: 14px;
  color: #79e995;
  font-size: 10px;
  font-weight: 650;
  line-height: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.macro-summary-card small:empty {
  visibility: hidden;
}

.macro-summary-card .session-closed {
  color: var(--macro-text-muted);
}

.macro-summary-card .macro-summary-line.session-time {
  color: #79e995;
}

.macro-summary-card .macro-summary-line.user-time {
  color: var(--macro-text-muted);
}

.macro-summary-card .macro-summary-muted-label {
  color: var(--macro-text-muted);
}

.macro-summary-card .macro-event-currency {
  color: var(--macro-text-muted);
  text-transform: none;
}

.macro-summary-card .macro-event-currency span {
  text-transform: none;
}

.macro-summary-card .countdown {
  height: 20px;
  padding: 0 8px;
  border: 1px solid #4438ff;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7f76ff;
  line-height: 1;
}

.macro-impact-counts {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.macro-impact-counts .count-high {
  color: #FF8D8D;
}

.macro-impact-counts .count-medium {
  color: #FFB179;
}

.macro-impact-counts .count-low {
  color: #FFD45C;
}

.macro-impact-counts .count-holiday {
  color: #ffffff;
}

.macro-impact-counts .count-separator {
  color: var(--macro-text-muted);
}

.macro-controls {
  margin-bottom: var(--macro-gap);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px 12px;
}

.calendar-chip-group {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.calendar-filter-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
}

.calendar-filter-row .calendar-chip-group {
  width: auto;
}

.calendar-impact-group {
  flex: 0 0 auto;
}

.calendar-weekday-group {
  flex: 1 1 auto;
  justify-content: flex-end;
}

.calendar-timezone-group {
  width: 100%;
  margin-left: 0;
}

.calendar-chip {
  height: var(--macro-control-h);
  min-height: var(--macro-control-h);
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #151515;
  color: var(--macro-text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.calendar-chip:hover {
  background: #191919;
}

.calendar-chip.active {
  border-color: transparent;
  background: #242424;
  color: #ffffff;
  box-shadow: none;
}

.calendar-chip:disabled,
.calendar-chip[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
}

.calendar-timezone-control {
  height: var(--macro-control-h);
  min-height: var(--macro-control-h);
  position: relative;
  display: inline-flex;
  color: #ffffff;
}

.calendar-timezone-trigger {
  height: var(--macro-control-h);
  min-height: var(--macro-control-h);
  min-width: 282px;
  padding: 0 12px 0 14px;
  border: 1px solid #303030;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #171717;
  color: #ffffff;
  cursor: pointer;
  line-height: 1;
  text-align: left;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.calendar-timezone-trigger:hover {
  border-color: #555555;
  background: #1d1d1d;
}

.calendar-timezone-control.is-open .calendar-timezone-trigger {
  border-color: #ffffff;
  background: #1d1d1d;
}

.calendar-timezone-prefix {
  display: inline-flex;
  align-items: center;
  height: 100%;
  color: var(--macro-text-muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  transform: translateY(1px);
}

.calendar-timezone-trigger strong {
  min-width: 0;
  flex: 1 1 auto;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-timezone-chevron {
  width: 8px;
  height: 8px;
  margin-left: 4px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  flex: 0 0 auto;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.16s ease;
}

.calendar-timezone-control.is-open .calendar-timezone-chevron {
  transform: rotate(225deg) translateY(-2px);
}

.calendar-timezone-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 20;
  width: min(320px, calc(100vw - 64px));
  max-height: 430px;
  padding: 4px 0;
  border: 1px solid #303030;
  border-radius: 6px;
  display: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #1f1f1f;
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.38);
}

.calendar-timezone-control.is-open .calendar-timezone-menu {
  display: block;
}

.calendar-timezone-menu::-webkit-scrollbar {
  width: 8px;
}

.calendar-timezone-menu::-webkit-scrollbar-track {
  background: #161616;
}

.calendar-timezone-menu::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #8f8f8f;
}

.calendar-timezone-option {
  width: 100%;
  min-height: 30px;
  padding: 0 12px 0 10px;
  border: 0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #d7d7d7;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
  text-align: left;
}

.calendar-timezone-section {
  padding: 10px 16px 5px 36px;
  color: #767676;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.calendar-timezone-custom-toggle {
  margin-top: 4px;
  border-top: 1px solid #303030;
}

.calendar-timezone-option:hover,
.calendar-timezone-option:focus-visible {
  outline: 0;
  background: #2a2a2a;
  color: #ffffff;
}

.calendar-timezone-option.active {
  color: #ffffff;
}

.calendar-timezone-check {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-block;
}

.calendar-timezone-option.active .calendar-timezone-check::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 4px;
  width: 9px;
  height: 5px;
  border-left: 2px solid #dcdcdc;
  border-bottom: 2px solid #dcdcdc;
  transform: rotate(-45deg);
}

.calendar-chip.impact-high,
.calendar-chip.impact-medium,
.calendar-chip.impact-low,
.calendar-chip.impact-holiday {
  border-color: #303030;
  background: #151515;
  color: #ffffff;
}

.macro-page .calendar-chip.active,
.macro-page .calendar-chip.neutral.active {
  border-color: transparent;
  background: #242424;
  color: #ffffff;
  box-shadow: none;
}

.macro-page .calendar-chip.active:hover,
.macro-page .calendar-chip.neutral.active:hover {
  border-color: transparent;
  background: #2a2a2a;
  color: #ffffff;
}

.macro-page .calendar-chip.impact-high.active {
  border-color: transparent;
  background: #242424;
  color: #FF8D8D;
}

.macro-page .calendar-chip.impact-medium.active {
  border-color: transparent;
  background: #242424;
  color: #FFB179;
}

.macro-page .calendar-chip.impact-low.active {
  border-color: transparent;
  background: #242424;
  color: #FFD45C;
}

.macro-page .calendar-chip.impact-holiday.active {
  border-color: transparent;
  background: #242424;
  color: #ffffff;
}

.macro-table-wrap {
  overflow: hidden;
  border: 1px solid var(--macro-border-soft);
  border-radius: var(--macro-radius);
  background: var(--macro-table-bg);
}

.macro-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.macro-mobile-list {
  display: none;
}

.macro-col-time {
  width: 76px;
}

.macro-col-currency {
  width: 86px;
}

.macro-col-number {
  width: 128px;
}

.macro-table thead tr {
  height: var(--macro-head-h);
}

.macro-table tbody tr:not(.macro-date-row):not(.macro-empty-row) {
  height: var(--macro-row-h);
}

.macro-table th,
.macro-table td {
  height: var(--macro-row-h);
  padding: 0 16px;
  border-bottom: 1px solid var(--macro-border-soft);
  vertical-align: middle;
  font-size: 12px;
  line-height: 1;
}

.macro-table td:first-child,
.macro-table td:nth-child(2) {
  width: auto;
}

.macro-table th {
  height: var(--macro-head-h);
  color: var(--macro-text-muted);
  background: #151515;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  text-align: left;
}

.macro-table th:nth-child(4),
.macro-table th:nth-child(5),
.macro-table th:nth-child(6) {
  text-align: center;
}

.macro-table tbody tr:not(.macro-date-row):not(.macro-empty-row) {
  background: var(--macro-row-bg);
  transition: background-color 0.16s ease;
}

.macro-table tbody tr:not(.macro-date-row):not(.macro-empty-row):hover {
  background: var(--macro-row-hover);
}

.macro-table tbody tr.macro-event-past {
  background: #121212;
}

.macro-table tbody tr.macro-event-past:hover {
  background: #151515;
}

.macro-table tbody tr:not(.macro-date-row):not(.macro-empty-row) td:first-child {
  position: relative;
}

.macro-table tbody tr:not(.macro-date-row):not(.macro-empty-row) td:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  border-radius: 0;
  background: #ffffff;
  opacity: 0.9;
}

.macro-table tbody tr.impact-row-high:not(.macro-date-row):not(.macro-empty-row) td:first-child::before {
  background: #FF8D8D;
}

.macro-table tbody tr.impact-row-medium:not(.macro-date-row):not(.macro-empty-row) td:first-child::before {
  background: #FFB179;
}

.macro-table tbody tr.impact-row-low:not(.macro-date-row):not(.macro-empty-row) td:first-child::before {
  background: #FFD45C;
}

.macro-table tbody tr.impact-row-holiday:not(.macro-date-row):not(.macro-empty-row) td:first-child::before {
  background: #ffffff;
}

.macro-event-past .macro-time,
.macro-event-past .macro-currency,
.macro-event-past .macro-news-cell strong,
.macro-event-past .macro-number {
  color: #6f6f6f;
}

.macro-event-past .macro-currency-icon,
.macro-event-past .macro-impact,
.macro-event-past .macro-flag {
  opacity: 0.45;
}

.macro-cell {
  min-width: 0;
  min-height: var(--macro-row-h);
  display: inline-flex;
  align-items: center;
  line-height: 1.25;
}

.macro-time {
  width: 100%;
  color: var(--macro-text);
  font-size: 12px;
  font-weight: 700;
}

.macro-currency {
  width: 100%;
  gap: 10px;
  color: var(--macro-text);
  font-size: 11px;
  font-weight: 700;
}

.macro-currency-icon {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  flex: 0 0 auto;
  display: block;
  object-fit: cover;
  background: #111111;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28);
}

.macro-news-cell {
  width: 100%;
  gap: 10px;
  overflow: visible;
}

.macro-news-cell strong {
  min-width: 0;
  overflow: hidden;
  color: var(--macro-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: none;
}

.macro-table td:nth-child(3) .macro-news-cell strong {
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
}

.macro-number {
  width: 100%;
  justify-content: center;
  color: var(--macro-text-secondary);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
}

.macro-metric-label {
  display: none;
}

.macro-actual-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 520;
}

.macro-actual-value.actual-better {
  color: #72e28f;
}

.macro-actual-value.actual-worse {
  color: #ff7878;
}

.macro-actual-value.actual-neutral {
  color: #a3a3a3;
}

.macro-actual-arrow {
  font-size: 11px;
  font-weight: 520;
  line-height: 1;
}

.macro-flag {
  width: 8px;
  height: 5px;
  margin: 0;
  border-radius: 1px;
  flex: 0 0 auto;
  display: inline-block;
  background: linear-gradient(180deg, #f04444 0 33%, #ffd032 33% 66%, #f04444 66% 100%);
}

.macro-impact {
  width: 8px;
  height: 8px;
  margin: 0;
  border-radius: 2px;
  flex: 0 0 auto;
  display: inline-block;
}

.macro-impact.impact-high {
  background: #ff4444;
}

.macro-impact.impact-medium {
  background: #ff7b3a;
}

.macro-impact.impact-low {
  background: #ffc400;
}

.macro-impact.impact-holiday {
  border: 0;
  background: #e6e6e6;
}

.macro-table tbody tr.macro-date-row,
.macro-table tbody tr.macro-date-row:hover {
  height: var(--macro-date-h);
  background: var(--macro-date-bg);
}

.macro-date-row td {
  height: var(--macro-date-h);
  padding: 0 16px;
  border-top: 1px solid var(--macro-border-soft);
  border-bottom: 1px solid var(--macro-border-soft);
  color: var(--macro-text);
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  text-align: center;
  vertical-align: middle;
}

.macro-empty {
  height: 72px;
  padding: 0 16px;
  color: var(--macro-text-secondary);
  background: var(--macro-row-bg);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
  vertical-align: middle;
}

@media (max-width: 900px) {
  .macro-page {
    --macro-card-h: auto;
    padding: 12px 10px 22px;
  }

  .macro-summary {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .macro-summary-card {
    min-height: 94px;
    padding: 10px 14px 11px;
    gap: 5px;
  }

  .macro-summary-card strong {
    font-size: 17px;
    line-height: 22px;
    white-space: normal;
  }

  .calendar-filter-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .calendar-filter-row .calendar-chip-group {
    width: 100%;
  }

  .calendar-chip-group {
    gap: 7px;
    min-width: 0;
  }

  .calendar-chip {
    height: 34px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 7px;
    font-size: 12px;
    max-width: 100%;
  }

  .calendar-weekday-group {
    justify-content: flex-start;
  }

  .calendar-timezone-control,
  .calendar-timezone-trigger {
    width: 100%;
  }

  .calendar-timezone-trigger {
    min-width: 0;
    height: 40px;
    min-height: 40px;
    padding: 0 12px 0 13px;
    border-radius: 8px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
  }

  .calendar-timezone-control {
    height: 40px;
    min-height: 40px;
  }

  .calendar-timezone-prefix {
    flex: 0 0 auto;
    height: auto;
    display: flex;
    align-items: center;
    line-height: 1;
    transform: none;
  }

  .calendar-timezone-trigger strong {
    height: auto;
    display: flex;
    align-items: center;
    line-height: 1;
  }

  .calendar-timezone-chevron {
    margin-left: 2px;
  }

  .calendar-timezone-menu {
    width: min(320px, calc(100vw - 44px));
    max-height: min(430px, calc(100dvh - 180px));
  }

  .macro-table-wrap {
    overflow: hidden;
    border-radius: 8px;
    max-width: 100%;
  }

  .macro-table {
    width: 100%;
    min-width: 0;
    display: block;
    border-collapse: separate;
    border-spacing: 0;
  }

  .macro-table colgroup,
  .macro-table thead {
    display: none;
  }

  .macro-table tbody {
    display: block;
    width: 100%;
  }

  .macro-table tbody tr.macro-date-row,
  .macro-table tbody tr.macro-date-row:hover {
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
    background: var(--macro-date-bg);
  }

  .macro-table tbody tr:not(.macro-date-row):not(.macro-empty-row)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--macro-border-soft);
    pointer-events: none;
  }

  .macro-table tbody tr.macro-day-end:not(.macro-date-row):not(.macro-empty-row)::after {
    content: none;
  }

  .macro-table tbody tr.macro-date-row td {
    min-height: 42px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--macro-date-bg);
    color: var(--macro-text);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.2;
    text-align: center;
  }

  .macro-table tbody tr:not(.macro-date-row):not(.macro-empty-row) {
    height: auto;
    min-height: 0;
    padding: 10px 10px 11px 12px;
    display: grid;
    position: relative;
    overflow: hidden;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-areas:
      "time time currency currency currency news news news news news news news"
      "previous previous previous previous forecast forecast forecast forecast actual actual actual actual";
    gap: 8px 7px;
    border-bottom: 0;
    background: var(--macro-row-bg);
  }

  .macro-table tbody tr:not(.macro-date-row):not(.macro-empty-row)::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    border-radius: 0 2px 2px 0;
    background: #ffffff;
    opacity: 0.9;
  }

  .macro-table tbody tr.macro-day-end:not(.macro-date-row):not(.macro-empty-row)::before {
    bottom: 8px;
    border-radius: 0 2px 999px 0;
  }

  .macro-table tbody tr.impact-row-high:not(.macro-date-row):not(.macro-empty-row)::before {
    background: #FF8D8D;
  }

  .macro-table tbody tr.impact-row-medium:not(.macro-date-row):not(.macro-empty-row)::before {
    background: #FFB179;
  }

  .macro-table tbody tr.impact-row-low:not(.macro-date-row):not(.macro-empty-row)::before {
    background: #FFD45C;
  }

  .macro-table tbody tr.impact-row-holiday:not(.macro-date-row):not(.macro-empty-row)::before {
    background: #ffffff;
  }

  .macro-table tbody tr:not(.macro-date-row):not(.macro-empty-row):hover {
    background: var(--macro-row-bg);
  }

  .macro-table tbody tr.macro-event-past:not(.macro-date-row):not(.macro-empty-row) {
    background: #151515;
  }

  .macro-table th,
  .macro-table td {
    height: auto;
    padding: 0;
    border-bottom: 0;
    display: block;
  }

  .macro-table tbody tr:not(.macro-date-row):not(.macro-empty-row) td:first-child {
    grid-area: time;
    position: relative;
  }

  .macro-table tbody tr:not(.macro-date-row):not(.macro-empty-row) td:first-child::before {
    display: none;
  }

  .macro-table tbody tr:not(.macro-date-row):not(.macro-empty-row) td:nth-child(2) {
    grid-area: currency;
  }

  .macro-table tbody tr:not(.macro-date-row):not(.macro-empty-row) td:nth-child(3) {
    grid-area: news;
  }

  .macro-table tbody tr:not(.macro-date-row):not(.macro-empty-row) td:nth-child(4) {
    grid-area: previous;
  }

  .macro-table tbody tr:not(.macro-date-row):not(.macro-empty-row) td:nth-child(5) {
    grid-area: forecast;
  }

  .macro-table tbody tr:not(.macro-date-row):not(.macro-empty-row) td:nth-child(6) {
    grid-area: actual;
  }

  .macro-cell {
    min-height: 0;
  }

  .macro-time {
    align-items: center;
    padding-top: 0;
    font-size: 12px;
    line-height: 16px;
  }

  .macro-currency {
    align-items: center;
    gap: 7px;
    padding-top: 0;
    font-size: 11px;
    line-height: 16px;
  }

  .macro-currency-icon {
    width: 16px;
    height: 16px;
  }

  .macro-news-cell {
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .macro-news-cell strong,
  .macro-table td:nth-child(3) .macro-news-cell strong {
    font-size: 12px;
    line-height: 16px;
    white-space: normal;
    text-overflow: clip;
  }

  .macro-impact {
    width: 7px;
    height: 7px;
    margin-top: 0;
  }

  .macro-table td.macro-metric {
    height: 58px;
    min-height: 58px;
    padding: 8px 5px 7px;
    border: 1px solid var(--macro-border-medium);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    background: #131313;
    box-shadow: none;
    text-align: center;
  }

  .macro-metric-label {
    width: 100%;
    min-width: 0;
    display: block;
    color: var(--macro-text-muted);
    font-size: 10px;
    font-weight: 650;
    line-height: 12px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .macro-metric::before,
  .macro-metric::after {
    content: none;
  }

  .macro-metric .macro-number {
    width: 100%;
    min-height: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 520;
    line-height: 17px;
    text-align: center;
  }

  .macro-metric .macro-actual-value,
  .macro-metric .macro-actual-arrow {
    font-weight: 520;
  }

  .macro-empty-row {
    display: block;
  }

  .macro-table .macro-empty {
    height: auto;
    min-height: 54px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 18px;
  }

  .macro-table {
    display: none;
  }

  .macro-mobile-list {
    width: 100%;
    display: block;
    overflow: hidden;
    background: var(--macro-table-bg);
  }

  .macro-mobile-day {
    background: var(--macro-table-bg);
  }

  .macro-mobile-day + .macro-mobile-day .macro-mobile-date {
    border-top: 1px solid var(--macro-border-soft);
  }

  .macro-mobile-date {
    min-height: 44px;
    padding: 0 12px;
    border-bottom: 1px solid var(--macro-border-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--macro-date-bg);
    color: var(--macro-text);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.2;
    text-align: center;
  }

  .macro-mobile-events {
    background: var(--macro-row-bg);
  }

  .macro-mobile-event {
    height: 121px;
    min-height: 121px;
    padding: 10px 10px 11px 12px;
    border-bottom: 0;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: 34px 58px;
    grid-template-areas:
      "time time currency currency currency news news news news news news news"
      "previous previous previous previous forecast forecast forecast forecast actual actual actual actual";
    gap: 8px 7px;
    position: relative;
    overflow: hidden;
    background: var(--macro-row-bg);
  }

  .macro-mobile-event::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ffffff;
    opacity: 0.9;
  }

  .macro-mobile-event::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--macro-border-soft);
    pointer-events: none;
  }

  .macro-mobile-event:last-child::after {
    content: none;
  }

  .macro-mobile-event.impact-row-high::before {
    background: #FF8D8D;
  }

  .macro-mobile-event.impact-row-medium::before {
    background: #FFB179;
  }

  .macro-mobile-event.impact-row-low::before {
    background: #FFD45C;
  }

  .macro-mobile-event.impact-row-holiday::before {
    background: #ffffff;
  }

  .macro-mobile-time,
  .macro-mobile-currency,
  .macro-mobile-news {
    min-width: 0;
    height: 34px;
    display: flex;
    align-items: center;
  }

  .macro-mobile-time {
    grid-area: time;
    color: var(--macro-text);
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
  }

  .macro-mobile-currency {
    grid-area: currency;
    gap: 7px;
    color: var(--macro-text);
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
  }

  .macro-mobile-currency .macro-currency-icon {
    width: 16px;
    height: 16px;
  }

  .macro-mobile-news {
    grid-area: news;
    gap: 8px;
  }

  .macro-mobile-news strong {
    min-width: 0;
    color: var(--macro-text);
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
    line-height: 15px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .macro-mobile-metric {
    min-width: 0;
    height: 58px;
    min-height: 58px;
    padding: 8px 5px 7px;
    border: 1px solid var(--macro-border-medium);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    background: #131313;
    box-shadow: none;
    text-align: center;
  }

  .macro-mobile-metric-previous {
    grid-area: previous;
  }

  .macro-mobile-metric-forecast {
    grid-area: forecast;
  }

  .macro-mobile-metric-actual {
    grid-area: actual;
  }

  .macro-mobile-metric-label {
    width: 100%;
    min-width: 0;
    display: block;
    color: var(--macro-text-muted);
    font-size: 10px;
    font-weight: 650;
    line-height: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .macro-mobile-metric-value {
    width: 100%;
    min-height: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--macro-text-secondary);
    font-size: 13px;
    font-weight: 520;
    line-height: 17px;
    text-align: center;
  }

  .macro-mobile-empty {
    min-height: 54px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--macro-row-bg);
    color: var(--macro-text-secondary);
    font-size: 12px;
    font-weight: 650;
    line-height: 18px;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .macro-page {
    padding: 10px 8px 20px;
  }

  .macro-summary-card {
    min-height: 88px;
    padding-inline: 12px;
  }

  .macro-table tbody tr:not(.macro-date-row):not(.macro-empty-row) {
    gap: 7px 6px;
    padding: 9px 9px 10px 11px;
  }

  .macro-table td.macro-metric {
    height: 54px;
    min-height: 54px;
    padding: 7px 4px 6px;
    gap: 3px;
  }

  .macro-mobile-event {
    height: 112px;
    min-height: 112px;
    padding: 9px 9px 10px 11px;
    grid-template-rows: 32px 54px;
    gap: 7px 6px;
  }

  .macro-mobile-time,
  .macro-mobile-currency,
  .macro-mobile-news {
    height: 32px;
  }

  .macro-mobile-metric {
    height: 54px;
    min-height: 54px;
    padding: 7px 4px 6px;
    gap: 3px;
  }

  .macro-metric-label {
    font-size: 10px;
  }

  .macro-news-cell strong,
  .macro-table td:nth-child(3) .macro-news-cell strong {
    font-size: 11px;
    line-height: 15px;
  }
}
