:root {
  --bg: #f5f4f6;
  --ink: #111827;
  --card: #ffffff;
  --line: #e8e4e6;
  --brand: #B5122B;
  --accent: #B5122B;
  --ok: #0f7b4e;
  --muted: #5b6475;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.analytics-wrap[hidden],
.analytics-filter-bar[hidden],
.table-wrap[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: auto;
  background: radial-gradient(circle at 14% 14%, #ffeaec 0%, transparent 36%),
    radial-gradient(circle at 80% 22%, #fff0f2 0%, transparent 42%),
    radial-gradient(circle at 65% 80%, #fbf5f6 0%, transparent 32%), var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
}

.bg-shape {
  position: fixed;
  width: 38vw;
  height: 38vw;
  border-radius: 999px;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.45;
  pointer-events: none;
}

.bg-shape-a {
  background: #ffe4e8;
  top: -12vw;
  right: -8vw;
}

.bg-shape-b {
  background: #ffecf0;
  bottom: -15vw;
  left: -10vw;
}

.layout {
  width: min(1560px, 95vw);
  margin: 2.2rem auto 3.4rem;
  display: grid;
  grid-template-columns: minmax(290px, 330px) minmax(0, 1fr);
  gap: 1.25rem;
  min-width: 0;
}

.sidebar {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #fff, #fdfdf8);
  border-radius: 20px;
  padding: 1.6rem;
  height: fit-content;
  position: sticky;
  top: 1.1rem;
  animation: slide-in 0.5s ease;
  box-shadow: 0 20px 45px -38px rgba(23, 34, 60, 0.45);
}

.sidebar-auth {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.9rem;
  padding: 0.55rem 0.75rem;
  background: #f4f7fc;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.auth-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #3b4b66;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.logout-btn {
  background: none;
  border: 1px solid #d4deef;
  border-radius: 8px;
  padding: 0.22rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #55627a;
  cursor: pointer;
  transition: all 0.15s ease;
}

.logout-btn:hover {
  background: #ffffff;
  color: #a82e44;
  border-color: #f1b8c2;
}

.content {
  display: grid;
  gap: 1.15rem;
  min-width: 0;
}

.eyebrow {
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

h1 {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(2rem, 3vw, 2.75rem);
  margin: 0.3rem 0;
  line-height: 1.04;
}

.subtitle {
  margin: 0.15rem 0 0;
  max-width: 42ch;
  color: #303845;
  font-size: 1.05rem;
  line-height: 1.4;
}

.refresh-btn {
  width: 100%;
  margin-top: 1.1rem;
  border: none;
  border-radius: 12px;
  padding: 0.9rem 1.15rem;
  font-weight: 700;
  font-size: 1rem;
  background: linear-gradient(135deg, #1b090c, #360f15);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.refresh-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px -12px rgba(181, 18, 43, 0.7);
}

.side-nav {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.15rem;
}

.nav-item {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 0.9rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 600;
  transition: border-color 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
}

.nav-item strong {
  font-size: 0.86rem;
  color: #5c1822;
  background: #fff0f2;
  border: 1px solid #fbd3d8;
  border-radius: 999px;
  padding: 0.18rem 0.58rem;
  min-width: 2rem;
  text-align: center;
}

.nav-item:hover {
  transform: translateY(-1px);
  border-color: #f3c0c7;
  box-shadow: 0 12px 16px -16px rgba(181, 18, 43, 0.25);
}

.nav-item.is-active {
  border-color: #f09ea9;
  background: linear-gradient(135deg, #fdfefe, #fff5f7);
  box-shadow: 0 14px 24px -20px rgba(181, 18, 43, 0.35);
}

.nav-item.is-active strong {
  background: #B5122B;
  color: #ffffff;
  border-color: #B5122B;
}

/* Filter Bar */
.analytics-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.85rem 1.15rem;
  box-shadow: 0 12px 28px -24px rgba(24, 40, 73, 0.45);
  min-width: 0;
}

.filter-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.preset-btn {
  border: 1px solid var(--line);
  background: #f8fafc;
  color: #435169;
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.preset-btn:hover {
  background: #fff0f2;
  border-color: #f5b5bf;
  color: #B5122B;
}

.preset-btn.is-active {
  background: #B5122B;
  color: #ffffff;
  border-color: #B5122B;
}

.filter-custom {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.date-field {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #526079;
}

.date-field input[type="date"] {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  font-family: inherit;
  font-size: 0.82rem;
  background: #fafbfe;
  color: var(--ink);
  outline: none;
}

.date-field input[type="date"]:focus {
  border-color: #B5122B;
  background: #fff;
}

.filter-apply-btn {
  border: none;
  border-radius: 8px;
  padding: 0.42rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  background: #B5122B;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.filter-apply-btn:hover {
  opacity: 0.92;
}

.timezone-badge {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
}

/* KPI Cards */
.cards {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
}

.cards--overview {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

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

@media (max-width: 768px) {
  .cards--overview-3 {
    grid-template-columns: 1fr;
  }
}

.cards--analytics {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.05rem 1.15rem;
  animation: rise 0.45s ease both;
  min-height: 110px;
  box-shadow: 0 16px 30px -28px rgba(24, 40, 73, 0.45);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.card h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #4b5d7d;
}

.card p {
  margin: 0.45rem 0 0;
  font-size: clamp(1.8rem, 2.5vw, 2.3rem);
  font-weight: 700;
  line-height: 1;
}

.card-meta {
  margin-top: 0.45rem;
  font-size: 0.76rem;
  color: #6b7a94;
}

.card--accent p {
  color: #B5122B;
}

.card--brand p {
  color: #B5122B;
}

.card--ok p {
  color: #0f7b4e;
}

.card--muted p {
  color: #8291a7;
}

/* Main Panel */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  animation: rise 0.55s ease both;
  min-height: 540px;
  box-shadow: 0 20px 40px -36px rgba(22, 39, 71, 0.45);
  min-width: 0;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 1.3rem;
  min-width: 0;
}

.panel-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
}

.panel-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  color: #5a6880;
}

.pill {
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid #fbd3d8;
  background: #fff0f2;
  color: #B5122B;
  padding: 0.24rem 0.64rem;
  white-space: nowrap;
}

/* Marketing Analytics View */
.analytics-wrap {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  min-width: 0;
  width: 100%;
}

.migration-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 0.95rem 1.1rem;
  color: #1e40af;
  font-size: 0.88rem;
  line-height: 1.45;
  min-width: 0;
}

.migration-notice__icon {
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1;
}

.migration-notice__content strong {
  display: block;
  margin-bottom: 0.2rem;
}

.analytics-section {
  min-width: 0;
  width: 100%;
}

.section-title-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  min-width: 0;
}

.section-title-wrap h3,
.section-title-wrap h4 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: #1e293b;
}

.section-note {
  font-size: 0.82rem;
  color: #64748b;
}

/* Source Comparison Table */
.source-comparison-table th {
  background: #f8fafc;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
}

.source-comparison-table td {
  padding: 0.95rem 1rem;
}

.table-row--total {
  background: #f8fafc;
  font-weight: 700;
  border-top: 2px solid #cbd5e1;
}

.table-row--total td {
  font-size: 1.02rem;
}

.metric-leads {
  color: #1d4ed8;
}

.metric-confirmed {
  color: #059669;
}

.rate-badge {
  display: inline-block;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

.pending-text {
  color: #94a3b8;
  font-style: italic;
  font-size: 0.86rem;
}

/* Channel Badges */
.channel-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.24rem 0.65rem;
  color: #ffffff;
  white-space: nowrap;
}

.channel-meta {
  background: linear-gradient(135deg, #1877f2 0%, #833ab4 50%, #fd1d1d 100%);
  color: #ffffff;
}

.channel-tiktok {
  background: #010101;
  border: 1px solid #2f2f2f;
  color: #ffffff;
  box-shadow: 0 0 10px -3px rgba(254, 44, 85, 0.4), 0 0 10px -3px rgba(37, 244, 238, 0.4);
}

.channel-instagram {
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}

.channel-facebook {
  background: #1877f2;
}

.channel-telegram {
  background: #229ed9;
}

.channel-direct {
  background: #475569;
}

/* Campaign Tracking Links */
.campaign-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
  margin-top: 0.6rem;
}

.campaign-link-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: 0 4px 12px -6px rgba(0, 0, 0, 0.05);
}

.campaign-link-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.copy-link-btn {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-link-btn:hover {
  background: #fff0f2;
  border-color: #fbd3d8;
  color: #B5122B;
}

.copy-link-btn.copied {
  background: #0f7b4e;
  border-color: #0f7b4e;
  color: #ffffff;
}

.campaign-link-code {
  font-family: monospace;
  font-size: 0.78rem;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 6px;
  padding: 0.4rem 0.55rem;
  word-break: break-all;
}

/* Status Pills */
.status-pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.status-registered,
.status-confirmed,
.status-approved {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.status-pending_review {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.status-continued_free {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

/* Person Cell */
.person-cell {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.person-name {
  color: #0f172a;
  font-weight: 700;
  font-size: 0.94rem;
}

.person-cell__sub {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
}

/* Event Badges */
.event-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.event-badge--reg {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.event-badge--free {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.event-badge--tiktok {
  background: #0f172a;
  color: #38bdf8;
  border-color: #38bdf8;
}

.event-badge--telegram {
  background: #f0fdfa;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.event-badge--download {
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.event-badge--upgrade {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.event-badge--generic {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

/* Metadata Cell */
.meta-cell {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.76rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  color: #334155;
  font-weight: 500;
}

.meta-pill__key {
  color: #64748b;
  font-weight: 600;
}

.meta-empty {
  color: #94a3b8;
  font-size: 0.88rem;
}

.date-cell {
  font-size: 0.88rem;
  color: #475569;
  font-weight: 500;
}

/* Attribution Section (Stacked full-width cards) */
.attribution-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
  width: 100%;
  min-width: 0;
}

.attribution-card {
  border: 1px solid var(--line);
  background: #fcfdfe;
  border-radius: 14px;
  padding: 1.15rem;
  min-width: 0;
  width: 100%;
  box-shadow: 0 8px 20px -16px rgba(24, 40, 73, 0.25);
}

.subtable-wrap {
  max-height: 420px;
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  width: 100%;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}

.subtable-wrap table {
  font-size: 0.88rem;
  width: 100%;
  min-width: 600px;
}

.subtable-wrap th,
.subtable-wrap td {
  padding: 0.72rem 0.85rem;
}

/* Standard Table Styles */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
}

th,
td {
  text-align: left;
  padding: 0.88rem 1rem;
  border-bottom: 1px solid #edf0f5;
  white-space: nowrap;
  vertical-align: middle;
}

th {
  background: #fafcff;
  font-size: 0.81rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #405372;
}

.empty,
.error {
  padding: 1.5rem;
  color: #576070;
  font-size: 1rem;
}

.error {
  color: #a83344;
}

/* Image preview button */
.image-preview-btn {
  border: 1px solid #cad8f3;
  background: #eef4ff;
  color: #234271;
  border-radius: 8px;
  padding: 0.32rem 0.64rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s ease, border-color 0.2s ease;
}

.image-preview-btn:hover {
  transform: translateY(-1px);
  border-color: #aac2eb;
}

/* Screenshot Preview Modal */
.image-preview {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 2000;
}

.image-preview.is-open {
  display: grid;
}

.image-preview__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 20, 33, 0.6);
  backdrop-filter: blur(3px);
}

.image-preview__dialog {
  position: relative;
  margin: 0;
  width: min(92vw, 1080px);
  max-height: 88vh;
  background: #ffffff;
  border: 1px solid #d9e2f2;
  border-radius: 14px;
  padding: 0.8rem;
  box-shadow: 0 30px 60px -35px rgba(14, 24, 40, 0.9);
  animation: rise 0.2s ease;
}

.image-preview__close {
  border: 1px solid #d6deec;
  background: #f5f8ff;
  border-radius: 8px;
  padding: 0.34rem 0.56rem;
  font-family: inherit;
  font-weight: 600;
  color: #2c3d5f;
  cursor: pointer;
  margin-bottom: 0.65rem;
}

.image-preview__img {
  display: block;
  width: 100%;
  max-height: calc(88vh - 4.6rem);
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #e4e9f3;
}

.image-preview__error {
  border: 1px solid #ecd7dd;
  background: #fff6f8;
  border-radius: 10px;
  padding: 0.9rem;
}

.image-preview__error-text {
  margin: 0;
  color: #7a2f3d;
  font-weight: 600;
}

.image-preview__source {
  display: inline-block;
  margin-top: 0.55rem;
  color: #234271;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid #cddbf4;
  background: #eef4ff;
  border-radius: 8px;
  padding: 0.33rem 0.56rem;
}

/* Authentication Modal */
.auth-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 3000;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 16, 28, 0.72);
  backdrop-filter: blur(6px);
}

.auth-modal__dialog {
  position: relative;
  background: #ffffff;
  border: 1px solid #d5e0f2;
  border-radius: 20px;
  padding: 2rem;
  width: min(92vw, 440px);
  box-shadow: 0 25px 60px -25px rgba(10, 20, 40, 0.8);
  animation: rise 0.25s ease;
}

.auth-modal__badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #B5122B;
  background: #fdf2f4;
  border: 1px solid #f9ccd5;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  margin-bottom: 0.75rem;
}

.auth-modal__dialog h2 {
  font-family: "Archivo Black", sans-serif;
  font-size: 1.55rem;
  margin: 0 0 0.4rem;
  line-height: 1.15;
}

.auth-modal__desc {
  margin: 0 0 1.4rem;
  font-size: 0.94rem;
  color: #55637a;
  line-height: 1.45;
}

.auth-form .form-group {
  margin-bottom: 1.1rem;
}

.auth-form label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: #334155;
}

.auth-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  background: #f8fafc;
  color: var(--ink);
  outline: none;
  transition: all 0.18s ease;
}

.auth-input:focus {
  border-color: #B5122B;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(181, 18, 43, 0.12);
}

.auth-error {
  margin: 0 0 0.9rem;
  color: #dc2626;
  font-size: 0.85rem;
  font-weight: 600;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
}

.auth-submit-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 0.95rem 1.25rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, #B5122B, #7a0c1d);
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -10px rgba(181, 18, 43, 0.7);
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -10px rgba(15, 23, 42, 0.9);
}

/* Animations */
@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ultra-wide screens: optional 2-column layout */
@media (min-width: 1800px) {
  .attribution-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    width: min(1100px, 94vw);
    margin: 1.5rem auto 2.5rem;
  }

  .sidebar {
    position: static;
    padding: 1.25rem;
  }

  .analytics-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-presets {
    justify-content: flex-start;
  }

  .filter-custom {
    flex-wrap: wrap;
  }

  .cards--overview {
    grid-template-columns: 1fr;
  }

  .panel {
    min-height: 440px;
  }

  .table-wrap {
    min-height: 360px;
  }

  th,
  td {
    font-size: 0.88rem;
    padding: 0.72rem 0.8rem;
  }
}
