:root {
  --ink: #06101c;
  --navy: #081827;
  --card: #10283f;
  --line: rgba(255, 255, 255, .12);
  --muted: #8fa2b7;
  --text: #f4f7fb;
  --cream: #edf2f7;
  --accent: #77ded5;
  --magenta: #d00045;
  --magenta-bright: #ff2e73;
  --green: #7cf6bf;
  --red: #ff7a90;
  --shadow: 0 28px 80px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 80% 0%, rgba(119, 222, 213, .12), transparent 32%),
    linear-gradient(135deg, #050b13 0%, #081827 48%, #0b2136 100%);
}

.shell { width: min(1380px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 42px; }

.hero, .panel, .card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(16, 40, 63, .94), rgba(8, 24, 39, .98));
  box-shadow: var(--shadow);
  border-radius: 22px;
}

.hero { position: relative; overflow: hidden; padding: 56px 40px 62px; margin-bottom: 18px; text-align: center; }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 4px; background: linear-gradient(90deg, var(--magenta), var(--accent)); }

h1 {
  margin: 0 auto;
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  text-transform: uppercase;
  font-size: clamp(46px, 7vw, 92px);
  font-weight: 900;
  line-height: .92;
  letter-spacing: .055em;
  background: linear-gradient(180deg, #ffd5dc 0%, #c92f51 20%, #790f2b 52%, #d7506d 76%, #7b102c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 12px 24px rgba(76, 0, 20, .28));
}

h2 { margin: 0; text-transform: uppercase; font-size: 22px; }
.sub { color: var(--muted); font-size: 13px; line-height: 1.45; }
label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; text-transform: uppercase; font-weight: 900; }

select, input[type="date"] {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  background: rgba(255, 255, 255, .07);
  color: var(--text);
  padding: 12px;
  margin-bottom: 12px;
}

button {
  width: 100%;
  border: 0;
  border-radius: 13px;
  padding: 14px 18px;
  background: var(--cream);
  color: var(--ink);
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

button:hover { transform: translateY(-1px); }

#syncButton {
  width: auto;
  min-width: 220px;
  padding: 12px 20px;
  background: linear-gradient(110deg, var(--magenta), var(--magenta-bright));
  color: white;
  box-shadow: 0 10px 26px rgba(208, 0, 69, .22);
}

#syncButton:disabled { opacity: .55; cursor: default; transform: none; }

.sync-footer { display: flex; align-items: center; justify-content: flex-end; gap: 18px; padding: 18px 2px 0; }
.sync-footer .status { margin: 0; text-align: right; }
.status { margin-top: 10px; min-height: 18px; color: var(--muted); font-size: 12px; }
.status.ok { color: var(--green); }
.status.error { color: var(--red); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 20px; border-radius: 8px; background: var(--cream); color: var(--ink); }
.kpi.dark { background: linear-gradient(145deg, #10283f, #081827); color: var(--text); border: 1px solid var(--line); }
.kpi:nth-child(odd) { border-top: 4px solid var(--accent); }
.kpi:nth-child(even) { border-top: 4px solid var(--magenta); }
.kpi span { display: block; color: #5b6878; text-transform: uppercase; font-size: 12px; font-weight: 900; }
.kpi.dark span { color: var(--muted); }
.kpi strong { display: block; margin-top: 16px; font-size: 34px; line-height: 1; }

.panel { padding: 20px; }
.panel-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.list { display: grid; gap: 10px; }
.card { padding: 14px; border-radius: 16px; box-shadow: none; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.name { text-transform: uppercase; font-weight: 900; }
.pill { color: var(--green); background: rgba(124, 246, 191, .12); padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; }

.mini { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; }
.mini div { background: rgba(255, 255, 255, .055); padding: 10px; border-radius: 12px; }
.mini span { display: block; color: var(--muted); font-size: 11px; }
.mini strong { font-size: 15px; }

.filters { display: grid; grid-template-columns: 1fr 1fr .72fr; gap: 12px; margin-bottom: 18px; align-items: end; }
.filters button { margin-bottom: 12px; background: rgba(119, 222, 213, .13); color: var(--accent); border: 1px solid rgba(119, 222, 213, .32); }

.activity-panel { margin-bottom: 18px; }
.activity-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.activity-card { position: relative; overflow: hidden; padding: 18px; border-radius: 8px; background: rgba(255, 255, 255, .055); border: 1px solid rgba(255, 255, 255, .09); }
.activity-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(var(--magenta), var(--accent)); }
.activity-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.conversion { color: var(--accent); font-size: 24px; font-weight: 900; }
.activity-metrics { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 14px; }
.activity-metrics div { padding: 10px; background: rgba(3, 13, 24, .42); border-radius: 6px; }
.activity-metrics span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.activity-metrics strong { display: block; margin-top: 5px; font-size: 18px; }

details.manager-card { padding: 0; overflow: hidden; }
summary.manager-summary { list-style: none; cursor: pointer; padding: 16px; }
summary.manager-summary::-webkit-details-marker { display: none; }
.manager-summary .row { margin-bottom: 12px; }
.manager-body { border-top: 1px solid rgba(255, 255, 255, .08); padding: 14px 16px 16px; }

.switcher { display: inline-grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 5px; margin-bottom: 12px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; background: rgba(255, 255, 255, .045); }
.switcher button { width: auto; padding: 9px 13px; border-radius: 10px; background: transparent; color: var(--muted); }
.switcher button.active { background: var(--cream); color: var(--ink); }

.nested-list { display: grid; gap: 8px; }
.nested-card { padding: 12px; border-radius: 13px; background: rgba(255, 255, 255, .055); border: 1px solid rgba(255, 255, 255, .08); }

@media (max-width: 1000px) {
  .kpis, .filters, .activity-grid { grid-template-columns: 1fr; }
  .mini, .activity-metrics { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 28px 24px 34px; }
  .sync-footer { align-items: stretch; flex-direction: column-reverse; }
  #syncButton { width: 100%; }
}
