:root {
  color-scheme: dark;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'sf pro display', 'helvetica neue', sans-serif;
  --bg: #050403;
  --bg-soft: #0c0b09;
  --surface: rgba(16, 15, 13, .92);
  --surface-2: rgba(24, 22, 19, .9);
  --surface-3: rgba(31, 28, 24, .78);
  --surface-line: rgba(255, 111, 25, .32);
  --surface-line-soft: rgba(255, 111, 25, .18);
  --text: #fff9f1;
  --text-soft: rgba(255, 249, 241, .68);
  --text-muted: rgba(255, 249, 241, .48);
  --accent: #ff6a1a;
  --accent-2: #ff9442;
  --accent-soft: rgba(255, 106, 26, .16);
  --good: #43d17c;
  --bad: #ff513f;
  --warn: #ffb045;
  --neutral: rgba(255, 249, 241, .56);
  --shadow: 0 24px 80px rgba(0, 0, 0, .5);
  --shadow-soft: 0 14px 38px rgba(0, 0, 0, .28);
  --radius-panel: 14px;
  --radius-card: 8px;
  --nav-width: 238px;
  --content-max: 1180px;
  --chart-color: var(--accent);
  --focus-ring-color: rgba(255, 148, 66, .95);
  --focus-ring-shadow: 0 0 0 4px rgba(255, 106, 26, .22);
  --cor-instagram: #dd2a7b;
  --cor-x: #f6f6f6;
  --cor-xof: #ed3b4d;
  --cor-telegram: #27a7e7;
  --cor-onlyfans: #00aff0;
  --cor-privacy: #f28c34;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f0ea;
  --bg-soft: #ebe5dc;
  --surface: rgba(255, 252, 246, .94);
  --surface-2: rgba(255, 250, 242, .9);
  --surface-3: rgba(247, 238, 226, .82);
  --surface-line: rgba(181, 91, 31, .34);
  --surface-line-soft: rgba(181, 91, 31, .16);
  --text: #17120e;
  --text-soft: rgba(23, 18, 14, .68);
  --text-muted: rgba(23, 18, 14, .5);
  --accent: #de5d13;
  --accent-2: #ff7a1f;
  --accent-soft: rgba(222, 93, 19, .14);
  --neutral: rgba(23, 18, 14, .54);
  --shadow: 0 24px 70px rgba(92, 55, 26, .16);
  --shadow-soft: 0 14px 34px rgba(92, 55, 26, .12);
  --cor-x: #111;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(115deg, rgba(255, 106, 26, .08), transparent 34%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 94%, rgba(255, 106, 26, .08) 95%, transparent 100%),
    repeating-linear-gradient(100deg, rgba(255, 106, 26, .04) 0 1px, transparent 1px 18px);
  opacity: .65;
}

body::after {
  content: '';
  position: fixed;
  left: -12vw;
  bottom: -38vh;
  z-index: -1;
  width: 55vw;
  height: 55vw;
  pointer-events: none;
  border: 1px solid rgba(255, 106, 26, .28);
  border-radius: 50%;
  box-shadow: inset 0 0 80px rgba(255, 106, 26, .08);
  opacity: .7;
}

:where(a[href], button, input, select, textarea, [role="button"], [role="tab"], [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 2px solid var(--focus-ring-color);
  outline-offset: 2px;
  box-shadow: var(--focus-ring-shadow);
}

button {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }

.app-shell {
  width: min(100% - 28px, 1440px);
  min-height: calc(100vh - 44px);
  margin: 22px auto;
  display: grid;
  grid-template-columns: var(--nav-width) minmax(0, 1fr);
  border: 1px solid var(--surface-line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01)), var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

:root[data-theme="light"] .app-shell {
  background: linear-gradient(145deg, rgba(255, 255, 255, .78), rgba(255, 247, 238, .88));
}

.sidebar-shell {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  padding: 36px 20px 24px;
  border-right: 1px solid var(--surface-line-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 34%),
    linear-gradient(180deg, rgba(255, 106, 26, .05), transparent 70%);
}

.sidebar-logo-wrap {
  display: flex;
  align-items: center;
  min-height: 72px;
}

.brand-logo {
  display: block;
  width: 148px;
  max-width: 100%;
  height: auto;
}

:root[data-theme="dark"] .brand-logo {
  filter: brightness(0) invert(1);
}

.brand-title {
  color: var(--text);
  font-size: 30px;
  font-weight: 900;
  line-height: .9;
}

.quick-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: start;
}

.quick-nav-btn {
  min-height: 46px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.quick-nav-btn svg {
  width: 22px;
  height: 22px;
}

.quick-nav-btn:hover,
.quick-nav-btn.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--surface-line-soft);
}

.quick-nav-btn:active {
  transform: scale(.98);
}

.admin-card {
  position: relative;
  min-height: 300px;
  display: grid;
  align-content: end;
  gap: 12px;
  padding: 20px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--surface-line-soft);
  background: linear-gradient(180deg, transparent 0%, rgba(255, 106, 26, .12) 100%);
}

.admin-portrait {
  position: absolute;
  inset: 0;
}

.admin-portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 15%, rgba(0, 0, 0, .84) 86%);
}

:root[data-theme="light"] .admin-portrait::after {
  background: linear-gradient(180deg, transparent 12%, rgba(244, 230, 212, .92) 88%);
}

.admin-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.08) contrast(1.05);
}

.admin-copy,
.admin-actions {
  position: relative;
  z-index: 1;
}

.admin-copy strong,
.admin-copy span {
  display: block;
}

.admin-copy strong {
  font-size: 18px;
  line-height: 1.1;
}

.admin-copy span {
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 13px;
}

.admin-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.admin-actions span {
  height: 44px;
  border: 1px solid var(--surface-line-soft);
  border-radius: 8px;
  background: rgba(0, 0, 0, .18);
}

:root[data-theme="light"] .admin-actions span {
  background: rgba(255, 255, 255, .55);
}

.dashboard-shell {
  min-width: 0;
  padding: 30px 28px 20px;
}

.header-area {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: start;
  gap: 20px;
  margin-bottom: 20px;
}

.page-title h1 {
  margin: 0;
  font-size: 29px;
  line-height: 1;
  letter-spacing: 0;
}

.page-title p {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-panel {
  position: relative;
  min-width: 338px;
  height: 54px;
  display: grid;
  grid-template-columns: 1fr 34px;
  align-items: center;
  gap: 10px;
  padding: 0 8px 0 18px;
  border: 1px solid var(--surface-line-soft);
  border-radius: 14px;
  background: var(--surface-2);
}

.status-content {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.status-progress-label,
.status-progress-check {
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

.status-progress-check {
  color: var(--text-soft);
}

.status-progress-track {
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, .08);
}

:root[data-theme="light"] .status-progress-track {
  background: rgba(23, 18, 14, .1);
}

.status-progress-fill {
  height: 100%;
  min-width: 4%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7f54f0, #a56cff 55%, var(--accent) 100%);
  transition: width .5s cubic-bezier(.2, 1, .2, 1);
}

.range-picker {
  position: relative;
}

.status-toggle,
.progress-collapse-toggle {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--surface-line-soft);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, .03);
  cursor: pointer;
}

.status-toggle svg {
  width: 18px;
  height: 18px;
}

.range-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  min-width: 86px;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--surface-line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease;
}

.range-picker.is-open .range-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.range-option {
  min-height: 32px;
  border: 0;
  border-radius: 7px;
  color: var(--text-soft);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.range-option.is-active,
.range-option:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.control-btn {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--surface-line-soft);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.control-btn:hover {
  border-color: var(--surface-line);
  background: var(--surface-3);
}

.control-btn:active {
  transform: scale(.96);
}

.control-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: currentColor;
}

.calendar-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

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

.card {
  min-width: 0;
  min-height: 124px;
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 8px 10px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--surface-line-soft);
  border-radius: var(--radius-card);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent),
    var(--surface-2);
  box-shadow: var(--shadow-soft);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-top: 1px solid rgba(255, 106, 26, .42);
  opacity: .7;
}

.card-profile-link {
  position: relative;
  z-index: 1;
  grid-row: 1;
  width: 48px;
  height: 48px;
  color: inherit;
  text-decoration: none;
}

.img-wrapper,
.profile-img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.img-wrapper {
  position: relative;
}

.profile-img {
  display: block;
  object-fit: cover;
  background: rgba(255, 255, 255, .08);
}

.verified-badge {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
}

.verified-badge svg {
  width: 18px;
  height: 18px;
}

.card-main {
  position: relative;
  z-index: 1;
  min-width: 0;
  align-self: center;
}

.platform-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.platform-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.platform-pill {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent !important;
  color: var(--text);
  color: var(--text) !important;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.user-row {
  margin-top: 5px;
}

.user {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-soft);
  font-size: 11px;
}

.card-metrics {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  align-self: end;
  display: grid;
  gap: 7px;
}

.value-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.value {
  min-width: 0;
  color: var(--text);
  font-size: clamp(24px, 2vw, 30px);
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.info-trigger {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
}

.info-trigger svg {
  width: 16px;
  height: 16px;
}

.info-popover {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: 240px;
  z-index: 20;
  padding: 8px 10px;
  border: 1px solid var(--surface-line-soft);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .16s ease, transform .16s ease;
  font-size: 11px;
}

.value-row.show-info .info-popover {
  opacity: 1;
  transform: translateY(0);
}

.info-piece {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 8px;
}

.info-piece svg {
  width: 13px;
  height: 13px;
}

.badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.value-range-tag {
  color: var(--text);
  font-size: 13px;
}

.badge {
  min-width: 64px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--neutral);
  background: rgba(255, 255, 255, .04);
  font-size: 12px;
  font-weight: 700;
}

.badge.positive,
.overview-insight-card.is-up .overview-insight-value,
.ranking-delta.positive,
.footer-last5-delta.is-up,
.grab-pulse-delta.is-up,
.chart-total-delta.positive {
  color: var(--good);
}

.badge.negative,
.overview-insight-card.is-down .overview-insight-value,
.ranking-delta.negative,
.footer-last5-delta.is-down,
.grab-pulse-delta.is-down,
.chart-total-delta.negative {
  color: var(--bad);
}

.card-empty {
  opacity: .76;
}

.overview-panel {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(0, 2fr);
  grid-template-areas:
    "summary chart"
    "ranking pulse";
  gap: 14px;
}

.panel-card {
  min-width: 0;
  border: 1px solid var(--surface-line-soft);
  border-radius: var(--radius-panel);
  background: var(--surface-2);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.smart-card { grid-area: summary; }
.chart-card { grid-area: chart; }
.ranking-card-wrap { grid-area: ranking; }
.pulse-card-wrap { grid-area: pulse; }

.panel-head {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 6px;
}

.panel-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.1;
}

.overview-range-chip,
.panel-period,
.chart-filter {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid var(--surface-line-soft);
  border-radius: 9px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, .03);
  font-size: 12px;
}

.overview-summary-list {
  display: grid;
  gap: 10px;
  padding: 8px 14px 14px;
}

.overview-insight-card {
  min-height: 50px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--surface-line-soft);
  border-radius: 9px;
  background: rgba(255, 106, 26, .06);
}

.overview-insight-network {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.overview-insight-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 7px;
}

.overview-insight-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--text);
}

.overview-insight-metric {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.overview-insight-variation {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
}

.overview-insight-period {
  color: var(--text-muted);
  font-size: 10px;
}

.chart-card {
  padding-bottom: 12px;
}

.overview-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 16px 10px;
}

.toggle-option {
  width: 42px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--surface-line-soft);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, .03);
  cursor: pointer;
}

.toggle-option.is-active,
.toggle-option:hover {
  border-color: var(--surface-line);
  background: var(--accent-soft);
}

.toggle-option-logo {
  width: 19px;
  height: 19px;
  object-fit: contain;
}

.chart-stage {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  padding: 0 16px;
}

.chart-y-labels {
  height: 136px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding: 5px 0 10px;
  color: var(--text-muted);
  font-size: 11px;
}

.consolidated-chart-wrap {
  height: 136px;
  min-width: 0;
  padding: 6px 0 10px;
}

#consolidatedChart {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-grid-line {
  stroke: rgba(255, 255, 255, .09);
  stroke-width: .5;
}

:root[data-theme="light"] .chart-grid-line {
  stroke: rgba(23, 18, 14, .1);
}

.chart-area-path {
  fill: color-mix(in srgb, var(--chart-color) 24%, transparent);
}

.chart-line-path {
  fill: none;
  stroke: var(--chart-color);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.chart-point {
  fill: var(--text);
  stroke: var(--chart-color);
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

.chart-date-labels {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 0 16px 8px 64px;
  color: var(--text-muted);
  font-size: 11px;
}

.chart-date-labels span {
  text-align: center;
  white-space: nowrap;
}

.chart-total-card {
  min-height: 76px;
  display: grid;
  grid-template-columns: 52px auto auto minmax(210px, 1fr);
  align-items: center;
  gap: 14px;
  margin: 4px 16px 0;
  padding: 12px;
  border: 1px solid var(--surface-line-soft);
  border-radius: 12px;
  background: rgba(0, 0, 0, .16);
}

:root[data-theme="light"] .chart-total-card {
  background: rgba(255, 255, 255, .48);
}

.chart-total-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(circle at 35% 28%, #ffb16f, var(--accent) 68%);
  font-weight: 900;
}

.chart-total-main {
  display: grid;
  gap: 4px;
}

.chart-total-main span {
  color: var(--text-soft);
  font-size: 13px;
}

.chart-total-main strong {
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}

.chart-total-delta {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.chart-insight {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.ranking-list {
  display: grid;
  gap: 10px;
  padding: 6px 16px 16px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 26px minmax(78px, 1fr) minmax(120px, 1.4fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
}

.ranking-card-head {
  display: contents;
}

.ranking-position {
  color: var(--text-soft);
  text-align: center;
}

.ranking-network-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ranking-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 5px;
}

.ranking-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}

:root[data-theme="light"] .ranking-bar {
  background: rgba(23, 18, 14, .09);
}

.ranking-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7f54f0, var(--accent));
}

.ranking-delta {
  color: var(--text);
  text-align: right;
  white-space: nowrap;
  font-weight: 700;
}

.footer-last5-table {
  padding: 6px 16px 16px;
}

.footer-last5-scroll {
  overflow-x: auto;
}

.footer-last5-native-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  color: var(--text);
}

.footer-last5-th,
.footer-last5-network-cell,
.footer-last5-td {
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, .06);
  text-align: right;
  font-size: 12px;
}

:root[data-theme="light"] .footer-last5-th,
:root[data-theme="light"] .footer-last5-network-cell,
:root[data-theme="light"] .footer-last5-td {
  border-color: rgba(23, 18, 14, .07);
}

.footer-last5-th {
  color: var(--text-soft);
  font-weight: 700;
}

.footer-last5-th-network,
.footer-last5-network-cell {
  text-align: center;
  width: 48px;
}

.footer-last5-day,
.footer-last5-date {
  display: block;
}

.footer-last5-day {
  color: var(--accent);
  font-size: 11px;
  text-transform: uppercase;
}

.footer-last5-date {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 10px;
}

.footer-last5-network-wrap {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
}

.footer-last5-network-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.footer-last5-value,
.footer-last5-delta {
  display: block;
}

.footer-last5-value {
  font-weight: 700;
}

.footer-last5-delta {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11px;
}

.grab-pulse-mobile-list {
  display: grid;
  gap: 8px;
}

.grab-pulse-controls {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
}

.grab-pulse-nav-btn {
  height: 38px;
  border: 1px solid var(--surface-line-soft);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-3);
}

.grab-pulse-nav-btn svg {
  width: 18px;
  height: 18px;
}

.grab-pulse-window-label {
  color: var(--text-soft);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.grab-pulse-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 8px;
  background: rgba(255, 255, 255, .02);
}

.grab-pulse-network-wrap {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
}

.grab-pulse-network-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.grab-pulse-values {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.grab-pulse-chip {
  min-width: 0;
  min-height: 54px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 8px;
}

.grab-pulse-chip.is-today {
  border-color: var(--surface-line);
}

.grab-pulse-chip-date,
.grab-pulse-today-badge,
.grab-pulse-delta {
  color: var(--text-muted);
  font-size: 9px;
}

.grab-pulse-value {
  max-width: 100%;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.footer-area {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--surface-line-soft);
  color: var(--text-muted);
  font-size: 13px;
}

.footer-meta,
.footer-brand {
  min-width: 0;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
}

.tables-section {
  grid-column: 1 / -1;
}

.tables-preview-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  color: var(--text);
}

.tables-preview-table th,
.tables-preview-table td {
  padding: 10px;
  border: 1px solid var(--surface-line-soft);
  text-align: left;
}

.pin-lock {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .62);
}

.pin-card {
  width: min(100%, 360px);
  padding: 24px;
  border: 1px solid var(--surface-line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.pin-title {
  font-size: 24px;
  font-weight: 850;
}

.pin-help {
  margin-top: 10px;
  color: var(--text-soft);
  line-height: 1.45;
}

.pin-input {
  width: 100%;
  height: 54px;
  margin-top: 16px;
  border: 1px solid var(--surface-line-soft);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
  text-align: center;
  font-size: 26px;
  letter-spacing: .35em;
}

.pin-error {
  min-height: 20px;
  margin-top: 8px;
  color: var(--bad);
  font-size: 13px;
  opacity: 0;
}

.pin-error.is-visible {
  opacity: 1;
}

.pin-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.pin-btn {
  flex: 1;
  min-height: 44px;
  border: 1px solid var(--surface-line-soft);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.pin-btn.primary {
  color: #fff;
  background: var(--accent);
}

.pin-btn.secondary {
  color: var(--text);
  background: var(--surface-2);
}

.pin-card.is-shaking {
  animation: pinShake .34s ease;
}

@keyframes pinShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.is-updating {
  opacity: .82;
}

.plain-link,
.profile-link {
  color: inherit;
  text-decoration: none;
}

.flatpickr-calendar {
  border: 1px solid var(--surface-line-soft);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

@media (max-width: 1180px) {
  .app-shell {
    width: min(100% - 20px, 1080px);
    grid-template-columns: 210px minmax(0, 1fr);
  }

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

  .overview-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "summary"
      "chart"
      "ranking"
      "pulse";
  }
}

@media (max-width: 760px) {
  body::after {
    display: none;
  }

  .app-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    display: block;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .sidebar-shell {
    display: contents;
  }

  .sidebar-logo-wrap,
  .admin-card {
    display: none;
  }

  .dashboard-shell {
    padding: calc(16px + env(safe-area-inset-top, 0px)) 12px calc(96px + env(safe-area-inset-bottom, 0px));
  }

  .header-area {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 12px;
  }

  .page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .page-title::before {
    content: '';
    width: 128px;
    height: 48px;
    display: block;
    background: url('./assets/logo-grabnumber.svg') left center / contain no-repeat;
  }

  :root[data-theme="dark"] .page-title::before {
    filter: brightness(0) invert(1);
  }

  .page-title h1,
  .page-title p {
    display: none;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr repeat(4, 44px);
    gap: 8px;
  }

  .status-panel {
    grid-column: 1 / -1;
    min-width: 0;
    height: 44px;
    order: 2;
    padding-left: 12px;
    border-radius: 12px;
  }

  .status-content {
    grid-template-columns: minmax(118px, auto) minmax(0, 1fr) 44px;
    gap: 10px;
  }

  .status-progress-label,
  .status-progress-check {
    font-size: 11px;
  }

  .control-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  #eyeButton {
    grid-column: 2;
    grid-row: 1;
  }

  #calendarButton {
    grid-column: 3;
    grid-row: 1;
  }

  #todayButton {
    grid-column: 4;
    grid-row: 1;
  }

  #themeButton {
    grid-column: 5;
    grid-row: 1;
  }

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

  .card {
    min-height: 92px;
    grid-template-columns: 50px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 6px 10px;
    padding: 9px;
  }

  .card-profile-link,
  .img-wrapper,
  .profile-img {
    width: 50px;
    height: 50px;
  }

  .platform-logo {
    width: 16px;
    height: 16px;
  }

  .platform-pill {
    font-size: 9px;
  }

  .user {
    font-size: 10px;
  }

  .card-metrics {
    grid-column: 2;
    gap: 4px;
    align-self: start;
  }

  .value {
    font-size: clamp(18px, 5.7vw, 24px);
  }

  .info-trigger {
    display: none;
  }

  .info-popover {
    display: none;
  }

  .badge-row {
    gap: 6px;
  }

  .value-range-tag,
  .badge {
    font-size: 10px;
  }

  .badge {
    min-width: 46px;
    padding: 3px 7px;
  }

  .overview-panel {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "summary"
      "chart"
      "ranking"
      "pulse";
    gap: 10px;
  }

  .panel-head {
    min-height: 44px;
    padding: 12px 12px 6px;
  }

  .panel-head h3 {
    font-size: 15px;
  }

  .overview-range-chip,
  .panel-period,
  .chart-filter {
    padding: 6px 8px;
    font-size: 10px;
  }

  .overview-summary-list,
  .ranking-list,
  .footer-last5-table {
    padding: 8px 10px 10px;
  }

  .overview-insight-card {
    min-height: 48px;
    padding: 9px;
  }

  .overview-insight-logo {
    width: 22px;
    height: 22px;
  }

  .overview-insight-name,
  .overview-insight-variation {
    font-size: 11px;
  }

  .overview-insight-period {
    display: none;
  }

  .overview-toggle {
    gap: 6px;
    padding: 0 10px 10px;
  }

  .toggle-option {
    width: 34px;
    height: 30px;
  }

  .toggle-option-logo {
    width: 16px;
    height: 16px;
  }

  .chart-stage {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 6px;
    padding: 0 10px;
  }

  .chart-y-labels,
  .consolidated-chart-wrap {
    height: 142px;
  }

  .chart-y-labels,
  .chart-date-labels {
    font-size: 9px;
  }

  .chart-date-labels {
    padding: 0 10px 8px 46px;
  }

  .chart-total-card {
    grid-template-columns: 42px 1fr auto;
    gap: 10px;
    margin: 4px 10px 0;
    padding: 10px;
  }

  .chart-total-icon {
    width: 38px;
    height: 38px;
  }

  .chart-total-main strong {
    font-size: 24px;
  }

  .chart-insight {
    grid-column: 1 / -1;
    font-size: 11px;
  }

  .ranking-card {
    grid-template-columns: 20px minmax(72px, 1fr) minmax(68px, 1fr) auto;
    gap: 7px;
    font-size: 11px;
  }

  .footer-last5-native-table {
    display: none;
  }

  .footer-area {
    display: block;
    margin-top: 14px;
    padding-top: 12px;
    text-align: center;
    font-size: 11px;
  }

  .footer-brand {
    justify-content: center;
    margin-top: 8px;
  }

  .quick-nav {
    position: fixed;
    left: calc(10px + env(safe-area-inset-left, 0px));
    right: calc(10px + env(safe-area-inset-right, 0px));
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 200;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--surface-line-soft);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .quick-nav-btn {
    min-height: 50px;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 3px;
    padding: 4px 2px;
    border-radius: 8px;
    font-size: 10px;
    line-height: 1;
  }

  .quick-nav-btn svg {
    width: 20px;
    height: 20px;
  }

  .pin-lock {
    padding: 14px;
  }
}

@media (max-width: 390px) {
  .dashboard-shell {
    padding-left: 9px;
    padding-right: 9px;
  }

  .cards-grid {
    gap: 8px;
  }

  .status-content {
    grid-template-columns: minmax(104px, auto) minmax(0, 1fr) 36px;
  }

  .status-progress-label {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
