:root {
  --brand: #1a73e8;
  --text: #202124;
  --muted: #5f6368;
  --faint: #80868b;
  --chip: #e8f0fe;
  --line: #dadce0;
  --bg: #f8f9fa;
  --hover: #f1f3f4;
  --shadow: 0 1px 2px rgba(32, 33, 36, 0.08), 0 1px 3px rgba(32, 33, 36, 0.06);
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; }

.to-guest {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1200px 480px at 50% -80px, #e8f0fe 0%, transparent 70%),
    var(--bg);
}
.to-guest-card {
  width: min(440px, 92vw);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 36px 36px;
  text-align: center;
  box-shadow: var(--shadow);
}
.to-guest-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 16px 0 8px;
}
.to-guest-lede {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
  margin: 0 0 24px;
}
.to-logo img { height: 40px; width: auto; }
.to-side .to-logo {
  display: flex;
  justify-content: center;
  padding: 8px 4px 20px;
}
.to-side .to-logo img { height: 36px; }

.to-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 0.95rem;
  cursor: pointer;
}
.to-btn:hover { filter: brightness(1.05); }
.to-btn-block { width: 100%; }

.to-app {
  display: grid;
  grid-template-columns: 15rem 1fr;
  min-height: 100vh;
  background: var(--bg);
}
.to-side {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 20px 12px;
}
.to-side-nav { min-height: 12rem; }
.to-main { display: flex; flex-direction: column; min-width: 0; }
.to-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.to-brand { font-weight: 600; font-size: 0.95rem; }
.to-account { display: flex; align-items: center; gap: 4px; }
.to-account a,
.to-account button {
  color: var(--muted);
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 999px;
}
.to-account a:hover,
.to-account button:hover { color: var(--text); background: var(--hover); }
.to-account a[aria-current="page"] { color: var(--brand); background: var(--chip); }

.to-body { padding: 28px; max-width: 1080px; }
.to-page-head { margin-bottom: 20px; }
.to-page-head h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.to-lede { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.45; max-width: 42rem; }

.to-grid {
  display: grid;
  grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.to-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px 22px;
  box-shadow: var(--shadow);
}
.to-card h2 {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 600;
}
.to-card-wide { grid-column: 1 / -1; }

.to-form { display: grid; gap: 14px; }
.to-field { display: grid; gap: 6px; }
.to-field span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}
.to-form input,
.to-form textarea,
.to-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
}
.to-form textarea { resize: vertical; min-height: 5.5rem; }
.to-form input:focus,
.to-form textarea:focus,
.to-form select:focus {
  outline: 2px solid #aecbfa;
  outline-offset: 1px;
  border-color: var(--brand);
}
.to-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}
.to-check input { width: auto; margin-top: 2px; }

.to-alert {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fce8e6;
  color: #c5221f;
  font-size: 0.9rem;
}

.to-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.to-offer-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  background: #fff;
}
.to-offer-row strong { display: block; font-size: 0.98rem; margin-bottom: 4px; }
.to-chip {
  display: inline-block;
  background: var(--chip);
  color: var(--brand);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.to-empty {
  text-align: center;
  padding: 36px 16px 28px;
  color: var(--muted);
}
.to-empty strong {
  display: block;
  color: var(--text);
  font-size: 0.98rem;
  margin-bottom: 6px;
}
.to-help p { line-height: 1.5; margin: 0 0 12px; }
.to-help code {
  display: block;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.82rem;
  overflow-x: auto;
}
.to-muted { color: var(--muted); font-size: 0.9rem; }

.to-partner-home {
  margin: 0;
  color: var(--text);
  background: #fff;
}
.to-partner-home .to-partner-name {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 0.95rem;
  font-weight: 600;
}
.to-partner-home h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.to-partner-home p {
  margin: 0 0 14px;
  max-width: 40rem;
  font-size: 1.05rem;
  line-height: 1.55;
}
.to-partner-home .to-btn { margin-top: 8px; }
.to-vendor-modal {
  width: min(32rem, calc(100vw - 32px));
  border: 0;
  border-radius: 16px;
  padding: 20px 22px 24px;
}
.to-vendor-modal::backdrop { background: rgba(0, 0, 0, 0.4); }
.to-vendor-modal .to-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.to-vendor-modal h2 { margin: 0 0 12px; font-size: 1.35rem; }
.to-vendor-modal p { margin: 0 0 16px; color: var(--muted); }
.to-vendor-modal .to-icon-btn {
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.to-partner-home img { height: auto; }
.to-widget { font-family: Arial, Helvetica, sans-serif; color: #202124; border: 1px solid #dadce0; border-radius: 12px; padding: 16px; max-width: 420px; background: #fff; }
.to-widget h2 { margin: 0 0 8px; font-size: 1.1rem; }
.to-widget form { display: grid; gap: 8px; grid-template-columns: 1fr; }
.to-widget input[type="text"], .to-widget input[type="email"] { border: 1px solid #dadce0; border-radius: 8px; padding: 8px 10px; font: inherit; }
.to-offer { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; }
.to-hp { position: absolute; left: -9999px; }

@media (max-width: 900px) {
  .to-grid { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .to-app { grid-template-columns: 1fr; }
  .to-app .to-side { display: none; }
  .to-body { padding: 20px 16px 32px; }
}

.to-partner-app {
  min-height: 100vh;
  background: #f8f9fa;
  color: var(--text);
}
.to-partner-app .to-mobile {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid #ebebeb;
}
.to-partner-app .to-mobile button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.to-partner-app .to-mobile .to-logo img { height: 36px; width: auto; }
.to-partner-app .to-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(0, 0, 0, 0.3);
}
.to-partner-app .to-side {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: min(18rem, calc(100vw - 2rem));
  height: 100vh;
  padding: 16px;
  background: #fff;
  border-right: 1px solid #eee;
  box-shadow: 0 8px 24px rgba(32, 33, 36, 0.16);
  transform: translateX(-105%);
}
.to-partner-app .to-side.is-open { transform: none; }
.to-partner-app .to-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.to-partner-app .to-side .to-logo img {
  height: 48px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.to-partner-app .to-add-widget {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.to-partner-app .to-add-widget:hover { background: #f8f9fa; }
.to-partner-app .to-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.to-partner-app .to-nav-account {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.to-partner-app .to-nav a,
.to-partner-app .to-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.to-partner-app .to-nav a:hover,
.to-partner-app .to-nav button:hover { background: #f1f3f4; color: var(--text); }
.to-partner-app .to-nav a[aria-current="page"] {
  background: var(--chip);
  color: var(--brand);
  font-weight: 500;
}
.to-partner-app .to-content {
  min-height: 100vh;
  padding: 80px 16px 48px;
}
.to-partner-app .to-page-head h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0;
}
.to-partner-app .to-stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.to-partner-app .to-stat-plain { height: auto; padding-bottom: 16px; }
.to-partner-app .to-stat {
  display: flex;
  flex-direction: column;
  height: 172px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.to-partner-app .to-stat-value {
  margin: 12px 12px 0;
  font-size: 1.5rem;
  line-height: 1;
}
.to-partner-app .to-stat-label {
  margin: 6px 12px 0;
  color: var(--faint);
  font-size: 13px;
  line-height: 1;
}
.to-partner-app .to-spark {
  height: 112px;
  margin-top: auto;
}
.to-partner-app .to-spark svg,
.to-partner-app .to-chart-plot svg { width: 100%; height: 100%; display: block; }
.to-partner-app .to-reports { margin-top: 16px; }
.to-partner-app .to-chart,
.to-partner-app .to-payouts {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 16px;
}
.to-partner-app .to-chart h2,
.to-partner-app .to-payouts h2 { margin: 0 0 12px; font-size: 1rem; font-weight: 600; }
.to-partner-app .to-chart-plot { height: 180px; }
.to-partner-app .to-payouts { margin-top: 16px; }
.to-partner-app .to-sites-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.to-partner-app .to-sites-bar input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  background: #fff;
}
.to-partner-app .to-site-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.to-partner-app .to-site-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.to-partner-app .to-site-row:hover { border-color: #c6dafc; }
.to-partner-app .to-badge {
  flex: none;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
}
.to-partner-app .to-badge-pending { background: #fef7e0; color: #b06000; }
.to-partner-app .to-badge-approved { background: #e6f4ea; color: #137333; }
.to-partner-app .to-badge-rejected { background: #fce8e6; color: #c5221f; }
.to-partner-app .to-modal-site { width: min(560px, calc(100vw - 32px)); }
.to-partner-app .to-modal-earn { width: min(720px, calc(100vw - 32px)); }
.to-partner-app .to-ledger-wrap { margin-top: 20px; overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.to-partner-app .to-ledger { width: 100%; min-width: 36rem; border-collapse: collapse; font-size: 0.92rem; }
.to-partner-app .to-ledger th,
.to-partner-app .to-ledger td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.to-partner-app .to-ledger th { font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.to-partner-app .to-ledger .num { text-align: right; font-variant-numeric: tabular-nums; }
.to-partner-app .to-ledger-empty { color: var(--muted); text-align: center; }
.to-partner-app .to-ledger-open {
  border: 0;
  padding: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  cursor: pointer;
}
.to-partner-app .to-ledger-open:hover { text-decoration: underline; }
.to-partner-app .to-notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #e6f4ea;
  color: #137333;
  font-size: 0.95rem;
}
.to-partner-app .to-form.to-card { max-width: 40rem; }
.to-partner-app .to-ledger-ref {
  display: inline-block;
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}
.to-partner-app .row { display: flex; flex-wrap: wrap; margin: 0 -12px; }
.to-partner-app .col-md-4 { width: 100%; padding: 12px; }
.to-partner-app .to-modal {
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 0;
  border-radius: 16px;
  padding: 20px 20px 28px;
  box-shadow: 0 12px 40px rgba(32, 33, 36, 0.2);
}
.to-partner-app .to-modal::backdrop { background: rgba(0, 0, 0, 0.4); }
.to-partner-app .to-modal-code { width: min(560px, calc(100vw - 32px)); }
.to-partner-app .to-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.to-partner-app .to-modal-head h2 { margin: 0; font-size: 1.25rem; }
.to-partner-app .to-icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
}
.to-partner-app .to-icon-btn:hover { background: #f1f3f4; }
.to-partner-app .to-widget-card { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.to-partner-app .to-widget-thumb {
  overflow: hidden;
  border-radius: 12px;
  background: #f8f9fa;
}
.to-partner-app .to-widget-thumb svg { display: block; width: 100%; height: auto; }
.to-partner-app .to-widget-card h3 { margin: 0; font-size: 1.05rem; }
.to-partner-app .to-modal textarea {
  width: 100%;
  margin: 12px 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 0.85rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  resize: vertical;
}
@media (min-width: 768px) {
  .to-partner-app .to-stat-grid { grid-template-columns: 1fr 1fr; }
  .to-partner-app .col-md-4 { width: 33.333%; }
}
@media (min-width: 1024px) {
  .to-partner-app .to-mobile,
  .to-partner-app .to-backdrop { display: none; }
  .to-partner-app .to-side {
    width: 15rem;
    padding: 24px 16px;
    box-shadow: none;
    transform: none;
  }
  .to-partner-app .to-content { margin-left: 15rem; padding: 40px 40px 64px; }
}
@media (min-width: 1280px) {
  .to-partner-app .to-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
