:root {
  --ink: #101511;
  --ink-soft: #253028;
  --paper: #f4f1e8;
  --surface: #fffdf7;
  --line: #d9d6cb;
  --muted: #6d746e;
  --lime: #c9f44d;
  --lime-dark: #527500;
  --coral: #ff735d;
  --blue: #596dff;
  --shadow: 0 18px 45px rgba(21, 31, 23, 0.08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--paper);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.wordmark {
  align-items: center;
  color: inherit;
  display: inline-flex;
  font-size: 18px;
  font-weight: 800;
  gap: 10px;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.wordmark-light {
  color: #fff;
}

.mark {
  align-items: center;
  background: var(--lime);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  transform: rotate(-3deg);
  width: 34px;
}

.kicker {
  color: var(--lime-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.kicker-light {
  color: var(--lime);
}

.login-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(360px, 1.2fr) minmax(420px, 0.8fr);
}

.simple-login {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 24px;
}

.simple-login .login-panel {
  min-height: auto;
  padding: 0;
  width: 100%;
}

.simple-login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 34px;
}

.simple-login-card h1 {
  font-size: 28px;
  letter-spacing: -0.035em;
  margin: 0 0 28px;
}

.login-story {
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    var(--ink);
  background-size: 44px 44px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 44px 6vw;
}

.story-copy {
  max-width: 740px;
}

.story-copy h1 {
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 750;
  letter-spacing: -0.065em;
  line-height: 0.94;
  margin: 12px 0 28px;
}

.story-copy > p:last-child {
  color: #c7d0c9;
  font-size: 18px;
  line-height: 1.55;
  max-width: 560px;
}

.split-proof {
  align-items: baseline;
  border-top: 1px solid #3a433c;
  display: grid;
  gap: 0 20px;
  grid-template-columns: auto auto 1fr;
  padding-top: 28px;
}

.split-proof span {
  color: #c7d0c9;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.split-proof strong {
  color: var(--lime);
  font-size: 48px;
  letter-spacing: -0.05em;
}

.split-proof small {
  color: #89938b;
}

.login-panel,
.password-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  padding: 40px;
}

.login-card,
.password-card {
  max-width: 430px;
  width: 100%;
}

.login-card h2,
.password-card h2 {
  font-size: 38px;
  letter-spacing: -0.045em;
  line-height: 1.05;
  margin: 0 0 14px;
}

.form-intro,
.password-card > p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 30px;
}

label {
  color: var(--ink-soft);
  display: block;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.025em;
  margin-bottom: 16px;
}

input,
select,
textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  display: block;
  height: 44px;
  margin-top: 7px;
  outline: none;
  padding: 0 12px;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(201, 244, 77, 0.45);
}

textarea {
  height: auto;
  line-height: 1.5;
  min-height: 92px;
  padding: 11px 12px;
  resize: vertical;
}

label small {
  color: var(--muted);
  display: block;
  font-weight: 500;
  line-height: 1.4;
  margin-top: 6px;
}

.form-help {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  margin: -3px 0 16px;
}

.button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

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

.button:disabled {
  cursor: wait;
  opacity: 0.6;
  transform: none;
}

.button-primary {
  background: var(--lime);
  color: var(--ink);
}

.button-primary:hover {
  box-shadow: 0 7px 18px rgba(129, 173, 20, 0.24);
}

.button-secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.button-ink {
  background: var(--ink);
  color: #fff;
}

.button-small {
  min-height: 31px;
  padding: 0 10px;
}

.button-wide {
  width: 100%;
}

.form-error,
.action-result {
  color: #b52817;
  font-size: 12px;
  line-height: 1.45;
  min-height: 18px;
}

.action-result.success {
  color: #395600;
}

.action-result code {
  background: #ebe8de;
  border-radius: 4px;
  color: var(--ink);
  display: inline-block;
  margin-top: 5px;
  padding: 4px 6px;
  user-select: all;
}

.privacy-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  margin-top: 18px;
  text-align: center;
}

.password-shell {
  min-height: 100vh;
}

.password-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 42px;
}

.password-card .mark {
  margin-bottom: 32px;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--ink);
  color: #fff;
  display: flex;
  flex-direction: column;
  height: 100vh;
  left: 0;
  padding: 28px 22px 20px;
  position: sticky;
  top: 0;
}

.sidebar-title {
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.workspace-card {
  align-items: center;
  border-bottom: 1px solid #303832;
  border-top: 1px solid #303832;
  display: flex;
  gap: 12px;
  margin: 30px 0 20px;
  padding: 20px 0;
}

.workspace-card .avatar {
  align-items: center;
  background: #263029;
  border: 1px solid #3c473f;
  border-radius: 50%;
  color: var(--lime);
  display: flex;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 900;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.workspace-card strong,
.workspace-card small {
  display: block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-card strong {
  font-size: 13px;
}

.workspace-card small {
  color: #8e9990;
  font-size: 10px;
  margin-top: 4px;
}

.nav-list {
  display: grid;
  gap: 5px;
}

.nav-item {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #a7afa9;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 13px;
  padding: 12px 13px;
  text-align: left;
}

.nav-item span {
  color: #5f6a62;
  font-size: 9px;
  padding-top: 3px;
}

.nav-item.active {
  background: var(--lime);
  color: var(--ink);
}

.nav-item.active span {
  color: #6b811e;
}

.sidebar-footer {
  margin-top: auto;
}

.ledger-status {
  align-items: center;
  display: flex;
  gap: 10px;
  margin: 20px 10px;
}

.ledger-status > i {
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(201, 244, 77, 0.1);
  height: 7px;
  width: 7px;
}

.ledger-status[data-status="error"] > i,
.ledger-status[data-status="not_configured"] > i {
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(255, 115, 93, 0.1);
}

.ledger-status[data-status="syncing"] > i {
  background: #ffd85a;
}

.ledger-status b,
.ledger-status small {
  display: block;
  font-size: 10px;
}

.ledger-status small {
  color: #768078;
  margin-top: 3px;
}

.text-button {
  background: none;
  border: 0;
  color: #929c94;
  font-size: 11px;
  padding: 10px;
}

.workspace {
  min-width: 0;
  padding: 34px 38px 70px;
}

.workspace-header {
  align-items: flex-start;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 30px;
}

.workspace-header h1 {
  font-size: 34px;
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 0;
}

.header-actions {
  align-items: flex-end;
  display: flex;
  gap: 10px;
}

.date-filter {
  align-items: flex-end;
  display: flex;
  gap: 8px;
}

.date-filter label {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.1em;
  margin: 0;
  text-transform: uppercase;
}

.date-filter input {
  height: 40px;
  margin-top: 4px;
  width: 136px;
}

.notice {
  background: #e8f8c1;
  border: 1px solid #bbd877;
  border-radius: 9px;
  color: #334b00;
  font-size: 12px;
  margin-bottom: 20px;
  padding: 12px 15px;
}

.notice.error {
  background: #fff0ed;
  border-color: #f4b3aa;
  color: #892619;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.hero-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1.6fr repeat(3, minmax(160px, 1fr));
  margin-bottom: 18px;
}

.earnings-card,
.metric-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.earnings-card {
  align-items: center;
  background: var(--lime);
  border-color: var(--lime);
  display: flex;
  justify-content: space-between;
  min-height: 155px;
  padding: 25px;
}

.earnings-card p,
.earnings-card span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin: 0;
}

.earnings-card strong {
  display: block;
  font-size: clamp(38px, 4vw, 55px);
  letter-spacing: -0.055em;
  margin: 9px 0 6px;
}

.share-ring {
  align-items: center;
  border: 1px solid rgba(16, 21, 17, 0.2);
  border-radius: 50%;
  display: flex;
  flex: 0 0 95px;
  flex-direction: column;
  height: 95px;
  justify-content: center;
  text-align: center;
}

.share-ring b {
  font-size: 25px;
  letter-spacing: -0.04em;
}

.share-ring span {
  font-size: 8px;
  max-width: 54px;
}

.metric-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 155px;
  padding: 22px;
}

.metric-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-card strong {
  font-size: clamp(27px, 2.6vw, 39px);
  letter-spacing: -0.055em;
  margin: 15px 0 9px;
}

.metric-card small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.metric-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.metric-dark span,
.metric-dark small {
  color: #9ca69e;
}

.alert-card {
  border-color: #ef9a8e;
}

.alert-card strong {
  color: #bd2c19;
}

.content-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 0.7fr);
  margin-bottom: 18px;
}

.panel {
  box-shadow: 0 6px 24px rgba(25, 37, 28, 0.035);
  margin-bottom: 18px;
  padding: 23px;
}

.panel-flush {
  padding: 0;
}

.panel-heading {
  align-items: flex-start;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.panel-heading.padded {
  margin-bottom: 0;
  padding: 23px;
}

.panel-heading h2,
.action-card h2,
.payout-intro h2 {
  font-size: 20px;
  letter-spacing: -0.035em;
  margin: 0;
}

.panel-note,
.legend {
  color: var(--muted);
  font-size: 10px;
}

.legend {
  align-items: center;
  display: flex;
  gap: 7px;
}

.legend i {
  background: var(--lime);
  border-radius: 2px;
  height: 8px;
  width: 8px;
}

.daily-chart {
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 7px;
  height: 250px;
  padding: 15px 4px 0;
}

.chart-day {
  align-items: center;
  display: flex;
  flex: 1;
  flex-direction: column;
  height: 100%;
  justify-content: flex-end;
  min-width: 5px;
  position: relative;
}

.chart-day i {
  background: var(--lime);
  border: 1px solid #a9d236;
  border-radius: 5px 5px 0 0;
  display: block;
  flex: 0 0 auto;
  min-height: 2px;
  width: min(22px, 75%);
}

.chart-day i.bar-h0 { flex-basis: 2px; height: 2px; }
.chart-day i.bar-h10 { flex-basis: 19px; height: 19px; }
.chart-day i.bar-h20 { flex-basis: 38px; height: 38px; }
.chart-day i.bar-h30 { flex-basis: 57px; height: 57px; }
.chart-day i.bar-h40 { flex-basis: 76px; height: 76px; }
.chart-day i.bar-h50 { flex-basis: 95px; height: 95px; }
.chart-day i.bar-h60 { flex-basis: 114px; height: 114px; }
.chart-day i.bar-h70 { flex-basis: 133px; height: 133px; }
.chart-day i.bar-h80 { flex-basis: 152px; height: 152px; }
.chart-day i.bar-h90 { flex-basis: 171px; height: 171px; }
.chart-day i.bar-h100 { flex-basis: 190px; height: 190px; }

.chart-day span {
  color: var(--muted);
  font-size: 8px;
  height: 23px;
  padding-top: 7px;
  white-space: nowrap;
}

.chart-day b {
  background: var(--ink);
  border-radius: 5px;
  color: #fff;
  display: none;
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
  left: 50%;
  padding: 5px 7px;
  position: absolute;
  top: 3px;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 2;
}

.chart-day:hover b {
  display: block;
}

.chart-empty {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  margin: auto;
}

.quality-score {
  background: #eff3e8;
  border-radius: 12px;
  margin-bottom: 20px;
  padding: 20px;
}

.quality-score strong {
  display: block;
  font-size: 36px;
  letter-spacing: -0.05em;
}

.quality-score span {
  color: var(--muted);
  font-size: 10px;
}

.quality-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.quality-list li {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  font-size: 10px;
  gap: 8px;
  grid-template-columns: 7px 1fr auto;
  padding: 12px 1px;
}

.quality-list i {
  border-radius: 50%;
  height: 7px;
  width: 7px;
}

.quality-list .good {
  background: #86b400;
}

.quality-list .warn {
  background: var(--coral);
}

.quality-list b {
  font-size: 9px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  padding: 13px 12px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #faf8f1;
}

td code {
  background: #ece9df;
  border-radius: 4px;
  color: #354038;
  font-size: 10px;
  padding: 3px 5px;
}

.money-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.subtle-cell {
  color: var(--muted);
}

.article-cell {
  min-width: 210px;
  white-space: normal;
}

.article-cell a {
  color: var(--ink);
  font-weight: 700;
  text-decoration-color: #b2b9b3;
  text-underline-offset: 3px;
}

.badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.06em;
  padding: 5px 7px;
  text-transform: uppercase;
}

.badge-final,
.badge-paid,
.badge-active,
.badge-live,
.badge-ready {
  background: #edf7d7;
  border-color: #bed675;
  color: #436000;
}

.badge-estimated,
.badge-approved,
.badge-syncing {
  background: #fff2dc;
  border-color: #ecc381;
  color: #794500;
}

.badge-void,
.badge-disabled,
.badge-not_configured,
.badge-error {
  background: #f0efeb;
  color: #6d726e;
}

.empty-row td {
  color: var(--muted);
  padding: 40px 16px;
  text-align: center;
}

.table-search {
  height: 38px;
  margin: 0;
  max-width: 240px;
}

.keyword-workspace {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
}

.keyword-generator,
.keyword-output-panel {
  min-height: 325px;
}

.angle-builder {
  background: #f7f8ef;
  border: 1px solid #dbe5bd;
  border-radius: 12px;
  margin: 4px 0 18px;
  padding: 16px;
}

.angle-builder > .button {
  margin-top: 2px;
}

.angle-output {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 14px;
  padding: 16px;
}

.angle-output h3 {
  font-size: 18px;
  letter-spacing: -0.025em;
  line-height: 1.3;
  margin: 12px 0 8px;
}

.angle-output > p:not(.angle-compliance) {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
  margin: 0 0 10px;
}

.angle-output ul {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
  margin: 0 0 12px;
  padding-left: 18px;
}

.angle-compliance {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  margin: 12px 0;
  padding-top: 10px;
}

.keyword-divider {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 10px;
  font-weight: 800;
  gap: 10px;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.keyword-divider::before,
.keyword-divider::after {
  background: var(--line);
  content: "";
  flex: 1;
  height: 1px;
}

.inline-actions {
  align-items: center;
  display: flex;
  gap: 9px;
}

.keyword-help {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  margin: 10px 0 22px;
}

.keyword-results {
  align-content: start;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-chip {
  background: #eff6dc;
  border: 1px solid #bdd574;
  border-radius: 999px;
  color: #314500;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 11px;
}

.empty-keywords {
  color: var(--muted);
  font-size: 11px;
}

.one-click-card {
  border-color: #a9c95b;
  box-shadow: inset 4px 0 0 var(--lime);
}

.subid-guide {
  border-color: #b7cb82;
  box-shadow: inset 4px 0 0 var(--lime), 0 6px 24px rgba(25, 37, 28, 0.035);
}

.subid-guide-heading {
  align-items: center;
}

.parameter-pill {
  background: #eff6dc;
  border: 1px solid #c7d99b;
  border-radius: 999px;
  color: #3f550d;
  font-size: 10px;
  font-weight: 750;
  padding: 8px 11px;
  white-space: nowrap;
}

.subid-steps {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
}

.subid-steps li {
  align-items: flex-start;
  background: #f8f6ef;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  gap: 10px;
  padding: 13px;
}

.subid-steps li > span {
  align-items: center;
  background: var(--ink);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 24px;
  font-size: 10px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
}

.subid-steps strong,
.subid-steps small {
  display: block;
}

.subid-steps strong {
  font-size: 11px;
  margin: 1px 0 4px;
}

.subid-steps small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.subid-builder-grid {
  display: grid;
  gap: 0 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.prefix-lock,
.tracked-link-preview {
  border-radius: 9px;
  margin-bottom: 12px;
}

.prefix-lock {
  align-items: center;
  background: #f8f6ef;
  border: 1px solid var(--line);
  display: flex;
  gap: 15px;
  justify-content: space-between;
  padding: 12px 14px;
}

.prefix-lock span,
.tracked-link-preview > span {
  color: var(--muted);
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.prefix-lock code {
  font-size: 12px;
  font-weight: 800;
  user-select: all;
}

.tracked-link-preview {
  background: var(--ink);
  color: #fff;
  padding: 15px;
}

.tracked-link-preview > span {
  color: #aab2ac;
}

.tracked-link-preview code {
  display: block;
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  user-select: all;
}

.subid-builder-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.subid-builder-actions .action-result {
  flex: 1 1 260px;
  margin: 0;
}

.subid-safety-note,
.tracking-intro {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.subid-safety-note {
  border-top: 1px solid var(--line);
  margin: 17px 0 0;
  padding-top: 13px;
}

.tracking-intro {
  margin: -7px 0 16px;
}

.tracking-list,
.statement-list {
  display: grid;
  gap: 10px;
}

.tracking-route,
.statement-card {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 16px;
  padding: 15px;
}

.tracking-route {
  grid-template-columns: minmax(170px, 1.5fr) 1fr 1fr auto auto;
}

.tracking-route strong,
.tracking-route span,
.tracking-route small {
  display: block;
}

.tracking-route span {
  color: var(--muted);
  font-size: 9px;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.tracking-route strong,
.tracking-route code {
  font-size: 11px;
}

.rate-editor {
  align-items: center;
  display: grid;
  gap: 5px;
  grid-template-columns: 68px auto auto;
  min-width: 144px;
}

.rate-editor .rate-value {
  height: 32px;
  margin: 0;
  padding: 0 7px;
}

.rate-editor > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.rate-note {
  color: var(--muted);
  display: block;
  font-size: 9px;
  margin-top: 5px;
}

.payout-intro {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin: 8px 0 22px;
}

.payout-intro > p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  margin: 0;
  max-width: 440px;
}

.statement-card {
  background: var(--surface);
  grid-template-columns: 0.9fr 1.5fr repeat(3, 1fr) auto;
}

.statement-card span,
.statement-card small {
  color: var(--muted);
  display: block;
  font-size: 9px;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.statement-card strong {
  font-size: 13px;
}

.admin-metrics {
  grid-template-columns: repeat(4, 1fr);
}

.admin-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.provider-sync-card {
  grid-column: 1 / -1;
}

.provider-sync-heading {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
}

.provider-sync-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  margin: 22px 0;
}

.provider-sync-metrics div {
  background: #f0eee6;
  border-radius: 9px;
  padding: 13px;
}

.provider-sync-metrics span,
.provider-sync-metrics strong {
  display: block;
}

.provider-sync-metrics span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.provider-sync-metrics strong {
  font-size: 16px;
  margin-top: 7px;
}

.action-card {
  margin: 0;
}

.action-card h2 {
  margin-bottom: 22px;
}

.field-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.file-drop {
  background: #f3f4ec;
  border: 1px dashed #adb3a9;
  border-radius: 10px;
  cursor: pointer;
  padding: 22px;
  text-align: center;
}

.file-drop input {
  height: auto;
  margin: 0 0 12px;
}

.file-drop b,
.file-drop span {
  display: block;
}

.file-drop span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  margin-top: 5px;
}

@media (max-width: 1180px) {
  .hero-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .earnings-card {
    grid-column: span 2;
  }

  .admin-metrics .metric-card {
    min-height: 120px;
  }
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-story {
    min-height: 55vh;
    padding: 34px;
  }

  .story-copy {
    margin: 70px 0;
  }

  .login-panel {
    min-height: 45vh;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    height: auto;
    padding: 14px 18px;
    position: static;
  }

  .workspace-card,
  .sidebar-footer {
    display: none;
  }

  .nav-list {
    display: flex;
    margin-top: 14px;
    overflow-x: auto;
  }

  .nav-item {
    flex: 0 0 auto;
  }

  .workspace {
    padding: 25px 20px 50px;
  }

  .workspace-header {
    display: block;
  }

  .header-actions {
    margin-top: 20px;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .keyword-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .login-story {
    min-height: 48vh;
  }

  .story-copy h1 {
    font-size: 42px;
  }

  .split-proof {
    grid-template-columns: auto auto;
  }

  .split-proof small {
    display: none;
  }

  .login-panel,
  .password-shell {
    padding: 28px 20px;
  }

  .password-card {
    padding: 28px;
  }

  .hero-grid,
  .admin-metrics {
    grid-template-columns: 1fr;
  }

  .earnings-card {
    grid-column: auto;
  }

  .header-actions,
  .date-filter {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .date-filter {
    width: 100%;
  }

  .date-filter label {
    flex: 1;
  }

  .date-filter input {
    width: 100%;
  }

  .admin-grid,
  .provider-sync-metrics,
  .field-grid,
  .subid-builder-grid {
    grid-template-columns: 1fr;
  }

  .subid-guide-heading,
  .prefix-lock {
    align-items: flex-start;
    display: grid;
  }

  .subid-steps {
    grid-template-columns: 1fr;
  }

  .tracking-route,
  .statement-card {
    grid-template-columns: 1fr 1fr;
  }

  .payout-intro {
    align-items: flex-start;
    display: grid;
    gap: 13px;
  }
}
