:root {
  color-scheme: dark;
  --bg: #070a18;
  --surface: rgba(17, 23, 49, 0.82);
  --surface-strong: #121936;
  --surface-soft: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f6f7ff;
  --muted: #9ca7c5;
  --pink: #ff4f91;
  --pink-strong: #ff2d7f;
  --blue: #53b8ff;
  --cyan: #5ce1d4;
  --yellow: #ffd166;
  --red: #ff667a;
  --green: #66e3a4;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(83, 184, 255, 0.15), transparent 28rem),
    radial-gradient(circle at 90% 18%, rgba(255, 79, 145, 0.13), transparent 26rem),
    linear-gradient(180deg, #090d20 0%, var(--bg) 55%, #060812 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(rgba(255,255,255,.35) .6px, transparent .6px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, black, transparent 65%);
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.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;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 12px max(24px, calc((100vw - 1440px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(7, 10, 24, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 1rem; letter-spacing: .02em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: .75rem; }
.clan-name-top { color: var(--blue); font-size: .82rem; font-style: normal; font-weight: 700; }

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  transform: rotate(-5deg);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 24px 12px 24px 12px;
  background: linear-gradient(135deg, var(--pink), #864dff 56%, var(--blue));
  box-shadow: 0 18px 45px rgba(255, 79, 145, .23);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 19px 9px 19px 9px;
}

.brand-mark span { position: relative; z-index: 1; transform: rotate(5deg); font-weight: 900; letter-spacing: -.05em; }
.brand-mark-small { width: 46px; height: 46px; border-radius: 15px 8px 15px 8px; font-size: .8rem; }

.topbar-actions, .sync-status { display: flex; align-items: center; gap: 12px; }
.sync-status { color: var(--muted); font-size: .82rem; }
.sync-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--green); box-shadow: 0 0 16px var(--green); }

.ghost-button, .primary-button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 750;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.ghost-button { color: var(--text); border: 1px solid var(--line); background: var(--surface-soft); }
.primary-button { color: white; border: 0; background: linear-gradient(135deg, var(--pink-strong), #8f55ff); box-shadow: 0 12px 30px rgba(255,45,127,.2); }
.ghost-button:hover, .primary-button:hover { transform: translateY(-1px); }
.ghost-button:focus-visible, .primary-button:focus-visible, input:focus-visible, select:focus-visible, th button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.primary-button:disabled { opacity: .6; cursor: wait; }
.full-button { width: 100%; margin-top: 8px; }
.refresh-button { display: inline-flex; align-items: center; gap: 7px; }
.refresh-button span { display: inline-block; font-size: 1.05rem; }
.refresh-button.refreshing span { animation: spin .8s linear infinite; }

.upload-path-helper {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: end;
  gap: 12px;
  width: min(1440px, calc(100% - 48px));
  margin: 16px auto 0;
  padding: 14px;
  border: 1px solid rgba(83, 184, 255, .2);
  border-radius: 16px;
  background: rgba(17, 23, 49, .82);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .2);
}
.upload-path-helper label { flex: 1; min-width: 0; }
.upload-path-helper label > span { display: block; margin: 0 0 7px; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.upload-path-helper input { width: 100%; max-width: none; font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .76rem; cursor: text; user-select: all; }
.upload-path-helper button { flex: 0 0 auto; }

.dashboard { width: min(1440px, calc(100% - 48px)); margin: 0 auto; padding: 56px 0 80px; }

.command-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 30px;
}
.hero-controls { display: flex; align-items: stretch; gap: 12px; }
.period-control { display: grid; align-content: center; gap: 7px; min-width: 286px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.period-control > span { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.period-control select { width: 100%; min-height: 36px; padding-left: 10px; font-size: .76rem; font-weight: 750; }

.eyebrow { margin: 0 0 9px; color: var(--cyan); font-size: .72rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(2.35rem, 5vw, 4.8rem); line-height: .94; letter-spacing: -.065em; }
h2 { margin-bottom: 0; font-size: 1.35rem; letter-spacing: -.025em; }
.hero-copy { margin-bottom: 0; color: var(--muted); }

.cutoff-card {
  display: grid;
  gap: 7px;
  min-width: 236px;
  padding: 20px;
  border: 1px solid rgba(255, 209, 102, .2);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,209,102,.1), rgba(255,255,255,.03));
}
.cutoff-label { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; }
.cutoff-card strong { font-size: 1.35rem; }

.kpi-grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi-card, .panel, .samvitor-card, .action-card, .backpack-panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.kpi-card { position: relative; overflow: hidden; display: grid; min-height: 154px; padding: 22px; }
.kpi-card > span { color: var(--muted); font-size: .82rem; }
.kpi-card > strong { align-self: end; font-size: clamp(1.9rem, 3vw, 2.65rem); letter-spacing: -.055em; }
.kpi-card > small { color: var(--muted); font-size: .74rem; }
.kpi-projection { position: relative; z-index: 1; width: fit-content; margin-top: 5px; color: var(--blue) !important; font-size: .66rem !important; }
.kpi-primary { background: linear-gradient(145deg, rgba(255,45,127,.22), rgba(134,77,255,.13) 54%, var(--surface)); }
.kpi-primary::after { content: ""; position: absolute; width: 130px; height: 130px; right: -45px; top: -45px; border: 18px solid rgba(255,255,255,.055); border-radius: 50%; }
.kpi-header { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.kpi-header > span:first-child { color: var(--muted); font-size: .82rem; }
.metric-delta, .metric-comparison { display: block; font-weight: 800; }
.metric-delta { width: fit-content; padding: 5px 8px; border: 1px solid var(--line); border-radius: 99px; font-size: .65rem; background: rgba(255,255,255,.04); }
.metric-comparison { min-height: 28px; margin-top: 7px; color: var(--muted); font-size: .64rem; font-weight: 700; line-height: 1.35; }
.personal-projection { display: block; margin-top: 3px; color: var(--blue); font-size: .63rem; font-weight: 750; }
.metric-delta.positive, .metric-comparison.positive { color: var(--green); border-color: rgba(102,227,164,.2); }
.metric-delta.negative, .metric-comparison.negative { color: var(--red); border-color: rgba(255,102,122,.2); }
#period-updated { display: block; margin-top: 3px; color: var(--blue); }

.spotlight-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 18px; margin: 18px 0; }
.samvitor-card { position: relative; overflow: hidden; padding: 26px; background: linear-gradient(140deg, rgba(83,184,255,.18), rgba(17,23,49,.88) 45%, rgba(255,79,145,.13)); }
.samvitor-card::before { content: "SAM"; position: absolute; right: -8px; bottom: -30px; color: rgba(255,255,255,.035); font-size: 9rem; font-weight: 950; letter-spacing: -.1em; }
.spotlight-heading, .section-heading { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.sam-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 28px; }
.sam-stats div { padding-right: 12px; border-right: 1px solid var(--line); }
.sam-stats div:last-child { border-right: 0; }
.sam-stats span, .backpack-values span { display: block; margin-bottom: 5px; color: var(--muted); font-size: .72rem; }
.sam-stats strong { font-size: 1.5rem; letter-spacing: -.04em; }
.card-note { position: relative; z-index: 1; margin: 22px 0 0; color: var(--muted); font-size: .78rem; }
.sam-analysis { position: relative; z-index: 1; margin: 22px 0 0; padding: 13px 15px; border: 1px solid rgba(83,184,255,.18); border-radius: 12px; color: #dfeaff; background: rgba(83,184,255,.07); font-size: .8rem; line-height: 1.55; }
.action-card { display: flex; flex-direction: column; align-items: flex-start; padding: 26px; background: linear-gradient(150deg, rgba(255,79,145,.12), var(--surface)); }
.action-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
.action-card .primary-button { margin-top: auto; width: 100%; }
.legend-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 4px 0 24px; color: var(--muted); font-size: .72rem; }
.legend-row span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 99px; }
.legend-dot.red { background: var(--red); }.legend-dot.blue { background: var(--blue); }

.backpack-panel { margin: 18px 0; padding: 26px; border-color: rgba(255,79,145,.25); }
.backpack-disclaimer { margin: 10px 0 20px; color: var(--muted); font-size: .72rem; }
.backpack-decision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.decision-lane { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.018); }
.ban-lane { border-color: rgba(255,102,122,.22); }.investigate-lane { border-color: rgba(255,209,102,.2); }
.decision-lane-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.decision-lane-heading h3 { margin: 3px 0 0; font-size: 1rem; }
.decision-lane-heading > strong { display: grid; place-items: center; min-width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.05); font-size: 1rem; }
.ban-lane .decision-lane-heading > strong { color: var(--red); }.investigate-lane .decision-lane-heading > strong { color: var(--yellow); }
.decision-kicker { color: var(--muted); font-size: .63rem; text-transform: uppercase; letter-spacing: .07em; }
.backpack-list { display: grid; gap: 8px; margin-top: 14px; }
.backpack-item { display: grid; grid-template-columns: 1fr; align-items: center; gap: 13px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.backpack-item.red { border-left: 3px solid var(--red); }.backpack-item.blue { border-left: 3px solid var(--blue); }
.backpack-item > div:first-child span { display: block; margin-top: 4px; color: var(--muted); font-size: .72rem; }
.backpack-values { display: flex; flex-wrap: wrap; gap: 22px; }
.backpack-values strong { font-size: 1rem; }
.colored-name.red { color: var(--red); }.colored-name.blue { color: var(--blue); }

.ranking-grid, .trend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 0; }
.panel { padding: 24px; }
.compact-heading { margin-bottom: 20px; }
.ranking-list, .trend-list { display: grid; gap: 8px; }
.ranking-item { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; min-height: 66px; padding: 10px 12px; border-radius: 14px; background: var(--surface-soft); }
.rank-number { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--muted); background: rgba(255,255,255,.05); font-size: .74rem; font-weight: 900; }
.rank-1 { color: #18130a; background: linear-gradient(135deg, #ffe59a, #ffc14e); }
.ranking-identity .member-link, .ranking-identity span { display: block; }
.ranking-identity span, .trend-item span { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.ranking-score { font-size: 1.25rem; }
.ranking-score-group { display: grid; justify-items: end; gap: 3px; }
.ranking-delta { font-size: .66rem; font-weight: 850; }
.neutral-text { color: var(--muted) !important; }
.panel-tabs { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: rgba(7,10,24,.4); }
.panel-tabs button { min-height: 30px; padding: 0 9px; color: var(--muted); border: 0; border-radius: 7px; background: transparent; font-size: .66rem; font-weight: 800; }
.panel-tabs button.active { color: var(--text); background: rgba(255,255,255,.1); }
.trend-panel { position: relative; overflow: hidden; }
.positive-panel::before, .attention-panel::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; }
.positive-panel::before { background: var(--green); }.attention-panel::before { background: var(--pink); }
.trend-item { display: flex; justify-content: space-between; align-items: center; padding: 14px; border-radius: 12px; background: var(--surface-soft); }
.trend-item strong, .trend-item span { display: block; }
.trend-value { font-weight: 850; }
.empty-copy { margin: 0; padding: 18px; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; font-size: .82rem; }

.table-panel { margin-top: 18px; }
.table-heading { align-items: flex-end; margin-bottom: 20px; }
.table-controls { display: flex; gap: 9px; }
input, select { min-height: 42px; color: var(--text); border: 1px solid var(--line); border-radius: 11px; background: rgba(7,10,24,.72); }
input { width: min(260px, 42vw); padding: 0 14px; }
select { padding: 0 32px 0 12px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .82rem; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
th button { padding: 0; color: inherit; border: 0; background: none; text-transform: inherit; letter-spacing: inherit; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: rgba(255,255,255,.025); }
td:first-child strong, .member-meta { display: block; }
.member-meta { margin-top: 4px; color: var(--muted); font-size: .68rem; }
.score-cell { color: var(--text); font-weight: 850; }
.table-panel th:nth-child(4), .table-panel td:nth-child(4), .member-history-table th:nth-child(4), .member-history-table td:nth-child(4) { border-inline: 1px solid rgba(83,184,255,.13); background: rgba(83,184,255,.065); }
.table-panel th:nth-child(4), .member-history-table th:nth-child(4) { color: var(--blue); }
.previous-points-cell strong, .previous-points-cell small { display: block; }
.previous-points-cell small { margin-top: 3px; font-size: .62rem; font-weight: 800; }
.member-link { padding: 0; color: inherit; border: 0; background: none; font-weight: 800; text-align: left; text-decoration: underline; text-decoration-color: rgba(83,184,255,.3); text-underline-offset: 3px; }
.member-link:hover { color: var(--blue); text-decoration-color: currentColor; }
.member-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 3px; }
.table-summary { margin: 16px 0 0; color: var(--muted); font-size: .72rem; }

.member-dialog { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: auto; color: var(--text); border: 1px solid rgba(83,184,255,.24); border-radius: 22px; background: #0d132b; box-shadow: 0 32px 100px rgba(0,0,0,.7); }
.member-dialog::backdrop { background: rgba(3,5,14,.76); backdrop-filter: blur(7px); }
.member-dialog-shell { position: relative; padding: 28px; background: radial-gradient(circle at 90% 0, rgba(83,184,255,.12), transparent 23rem); }
.dialog-close { position: absolute; z-index: 2; top: 18px; right: 18px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; color: var(--muted); border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.04); font-size: 1.4rem; }
.dialog-close:hover { color: var(--text); background: rgba(255,255,255,.08); }
.member-profile-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-right: 48px; }
.member-profile-header h2 { margin: 6px 0 0; font-size: clamp(1.7rem, 4vw, 2.5rem); }
.member-profile-meta { margin: 6px 0 0; color: var(--muted); font-size: .76rem; }
.member-profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 24px 0 16px; }
.member-profile-stats article { min-height: 100px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.035); }
.member-profile-stats span { display: block; margin-bottom: 14px; color: var(--muted); font-size: .68rem; }
.member-profile-stats strong { font-size: 1.35rem; letter-spacing: -.04em; }
.member-point-red { color: var(--red); }.member-point-blue { color: var(--blue); }
.member-recommendation { margin: 16px 0 24px; padding: 17px 18px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 14px; background: rgba(255,255,255,.025); }
.member-recommendation > span { color: var(--muted); font-size: .63rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.member-recommendation h3 { margin: 5px 0 6px; font-size: 1.05rem; }
.member-recommendation p { margin: 0; color: #dce2f3; font-size: .8rem; line-height: 1.55; }
.member-recommendation.banir { border-left-color: var(--red); background: rgba(255,102,122,.055); }
.member-recommendation.investigar { border-left-color: var(--yellow); background: rgba(255,209,102,.05); }
.member-recommendation.nenhuma { border-left-color: var(--green); background: rgba(102,227,164,.05); }
.member-history-section { padding-top: 4px; }
.member-history-section h3 { margin-top: 4px; }
.member-history-table th:first-child, .member-history-table td:first-child { text-align: left; }

.observations-panel { margin-top: 18px; background: linear-gradient(145deg, rgba(92,225,212,.06), var(--surface) 48%, rgba(255,79,145,.05)); }
.raw-data-label { padding: 5px 9px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; }
.observation-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.observation-item { display: grid; grid-template-columns: 34px 1fr; align-items: start; gap: 11px; min-height: 74px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); }
.observation-item p { margin: 2px 0 0; color: #dbe0f0; font-size: .78rem; line-height: 1.5; }
.observation-marker { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; font-size: .75rem; font-weight: 950; background: rgba(255,255,255,.06); }
.observation-item.positive .observation-marker { color: var(--green); background: rgba(102,227,164,.1); }
.observation-item.attention .observation-marker { color: var(--red); background: rgba(255,102,122,.1); }
.observation-item.context .observation-marker { color: var(--blue); background: rgba(83,184,255,.1); }
.observation-disclaimer { margin: 15px 0 0; color: var(--muted); font-size: .69rem; }

.status-pill { display: inline-flex; align-items: center; width: fit-content; min-height: 26px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: rgba(255,255,255,.035); font-size: .65rem; font-weight: 800; white-space: nowrap; }
.status-pill.safe { color: var(--green); border-color: rgba(102,227,164,.24); background: rgba(102,227,164,.08); }
.status-pill.warning, .status-pill.active { color: var(--yellow); border-color: rgba(255,209,102,.24); background: rgba(255,209,102,.08); }
.status-pill.danger { color: var(--red); border-color: rgba(255,102,122,.25); background: rgba(255,102,122,.08); }
.status-pill.historical { color: var(--blue); border-color: rgba(83,184,255,.25); background: rgba(83,184,255,.08); }
.positive-text { color: var(--green) !important; }.negative-text { color: var(--red) !important; }

.dashboard-footer { display: flex; justify-content: space-between; gap: 32px; padding: 28px 4px 0; color: var(--muted); font-size: .7rem; }
.dashboard-footer p { margin: 0; }

.state-screen { display: grid; place-items: center; align-content: center; gap: 12px; min-height: calc(100vh - 78px); padding: 24px; text-align: center; }
.state-screen p { max-width: 520px; color: var(--muted); }
.loading-orbit { width: 44px; height: 44px; border: 3px solid rgba(255,255,255,.1); border-top-color: var(--pink); border-radius: 50%; animation: spin .8s linear infinite; }
.empty-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; color: var(--cyan); background: var(--surface); font-weight: 900; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-page { display: grid; place-items: center; padding: 24px; }
.login-shell { display: grid; grid-template-columns: 1.2fr .8fr; width: min(960px, 100%); overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: rgba(12,17,37,.88); box-shadow: var(--shadow); }
.login-intro { position: relative; overflow: hidden; min-height: 560px; padding: 64px; background: radial-gradient(circle at 20% 15%, rgba(83,184,255,.22), transparent 50%), linear-gradient(145deg, rgba(255,79,145,.15), transparent); }
.login-intro::after { content: "X"; position: absolute; right: -30px; bottom: -110px; color: rgba(255,255,255,.035); font-size: 28rem; font-weight: 950; line-height: 1; }
.login-intro .brand-mark { margin-bottom: 80px; }
.login-intro h1 { font-size: 4.8rem; }
.login-intro > p:not(.eyebrow) { position: relative; z-index: 1; max-width: 480px; color: var(--muted); line-height: 1.65; }
.login-signal { position: absolute; left: 64px; bottom: 48px; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .76rem; }
.login-signal span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px var(--green); }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: 52px; background: rgba(7,10,24,.55); }
.login-card h2 { margin-bottom: 30px; font-size: 1.8rem; }
.login-card label { display: block; margin: 0 0 7px; color: var(--muted); font-size: .76rem; font-weight: 700; }
.login-card input { width: 100%; margin-bottom: 18px; }
.form-error { margin: 0 0 12px; color: var(--red); font-size: .78rem; }
.pair-shell { width: min(560px, 100%); padding: 54px; text-align: center; border: 1px solid var(--line); border-radius: 28px; background: radial-gradient(circle at 50% 0, rgba(83,184,255,.16), transparent 24rem), rgba(12,17,37,.92); box-shadow: var(--shadow); }
.pair-shell .brand-mark { margin: 0 auto 28px; }
.pair-shell h1 { margin: 8px 0 16px; font-size: clamp(2rem, 7vw, 3.4rem); }
.pair-status { margin: 0 auto; color: var(--muted); line-height: 1.6; }
.pair-shell .primary-button { display: inline-flex; margin-top: 24px; text-decoration: none; }

@media (max-width: 1040px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .spotlight-grid { grid-template-columns: 1fr; }
  .sam-stats { grid-template-columns: 1fr 1fr; }
  .sam-stats div:nth-child(2) { border-right: 0; }
  .backpack-decision-grid { grid-template-columns: 1fr; }
  .login-intro { padding: 44px; }
  .login-card { padding: 38px; }
}

@media (max-width: 760px) {
  .topbar { padding-inline: 16px; }
  .sync-status { display: none; }
  .upload-path-helper { align-items: stretch; flex-direction: column; width: min(100% - 28px, 1440px); }
  .upload-path-helper button { width: 100%; }
  .dashboard { width: min(100% - 28px, 1440px); padding-top: 32px; }
  .command-hero { align-items: stretch; flex-direction: column; }
  .hero-controls { flex-direction: column; }
  .period-control { min-width: 0; }
  .cutoff-card { min-width: 0; }
  .kpi-grid, .ranking-grid, .trend-grid { grid-template-columns: 1fr; }
  .backpack-item { grid-template-columns: 1fr; gap: 12px; }
  .backpack-values { justify-content: flex-start; }
  .table-heading { align-items: stretch; flex-direction: column; }
  .table-controls { flex-direction: column; }
  .table-controls input { width: 100%; }
  .dashboard-footer { flex-direction: column; }
  .observation-list { grid-template-columns: 1fr; }
  .member-profile-stats { grid-template-columns: 1fr 1fr; }
  .login-page { padding: 0; }
  .login-shell { grid-template-columns: 1fr; min-height: 100vh; border: 0; border-radius: 0; }
  .login-intro { min-height: 300px; padding: 36px 28px; }
  .login-intro .brand-mark { width: 58px; height: 58px; margin-bottom: 34px; }
  .login-intro h1 { font-size: 3.5rem; }
  .login-signal { display: none; }
  .login-card { padding: 36px 28px 48px; }
  .pair-shell { min-height: 100vh; padding: 48px 24px; border: 0; border-radius: 0; }
}

@media (max-width: 460px) {
  .sam-stats { grid-template-columns: 1fr; }
  .sam-stats div { padding: 0 0 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sam-stats div:last-child { border-bottom: 0; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .backpack-panel, .panel, .samvitor-card, .action-card { padding: 20px; }
  .member-dialog-shell { padding: 22px 16px; }
  .member-profile-header { flex-direction: column; }
  .member-profile-stats { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
