:root {
  --primary: #ec5b13;
  --on-primary: #ffffff;
  --background: #f8f6f6;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --surface-alt: #f8fafc;
  --border: #d5dde7;
  --border-muted: #e2e8f0;
  --ink-strong: #0f172a;
  --ink: #111827;
  --ink-emphasis: #334155;
  --ink-muted: #475569;
  --ink-subtle: #64748b;
  --ink-faint: #94a3b8;
  --info: #0ea5e9;
  --neutral: #9ca3af;
  --success: #15803d;
  --danger: #b91c1c;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --max-width: 1280px;
}

@font-face {
  font-display: swap;
  font-family: "PublicSans";
  font-style: normal;
  font-weight: 900;
  src: url("/web/fonts/PublicSans-Black.ttf") format("truetype");
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  color: var(--ink);
  font-family: Roboto, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  background: var(--background);
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.material-symbols-rounded {
  direction: ltr;
  display: inline-block;
  font-family: "Material Symbols Rounded";
  font-feature-settings: "liga";
  font-size: 24px;
  font-style: normal;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  font-weight: normal;
  letter-spacing: normal;
  line-height: 1;
  overflow-wrap: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
}

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

.app-shell {
  min-height: 100vh;
  padding-bottom: 0;
}

.topbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(236, 91, 19, 0.12);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-inner {
  align-items: center;
  display: flex;
  gap: 16px;
  height: 72px;
  margin: 0 auto;
  max-width: var(--max-width);
  padding: 0 24px;
}

.logo {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  min-width: max-content;
}

.logo img {
  height: 24px;
  width: 24px;
}

.logo-word {
  color: var(--ink-strong);
  font-family: "PublicSans", Roboto, ui-sans-serif, system-ui, sans-serif;
  font-size: 24px;
  font-weight: 900;
}

.nav-links {
  align-items: center;
  display: flex;
  gap: 4px;
}

.nav-link {
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  display: inline-flex;
  font-size: 16px;
  font-weight: 600;
  padding: 10px 12px;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link.active {
  font-weight: 800;
}

.search {
  flex: 1 1 auto;
  min-width: 180px;
  position: relative;
}

.search-input-wrap {
  align-items: center;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  min-height: 44px;
  padding: 0 14px;
}

.search-icon {
  align-items: center;
  color: var(--ink-faint);
  display: flex;
  margin-right: 8px;
}

.search-icon .material-symbols-rounded {
  font-size: 20px;
}

.search-input {
  background: transparent;
  border: 0;
  color: var(--ink-strong);
  min-height: 44px;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.search-clear {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--ink-faint);
  cursor: pointer;
  display: none;
  height: 30px;
  justify-content: center;
  padding: 4px;
  width: 30px;
}

.search-clear .material-symbols-rounded {
  font-size: 20px;
}

.search.has-query .search-clear {
  display: block;
}

.search-results {
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  display: none;
  left: 0;
  max-height: 420px;
  overflow: auto;
  padding: 10px 0;
  position: absolute;
  right: 0;
  top: 56px;
  z-index: 50;
}

.search.open .search-results {
  display: block;
}

.search-section-title {
  align-items: center;
  color: var(--ink-faint);
  display: flex;
  font-size: 11px;
  font-weight: 800;
  gap: 8px;
  letter-spacing: 0.08em;
  padding: 10px 20px 6px;
  text-transform: uppercase;
}

.search-section-title::before {
  background: var(--primary);
  border-radius: 999px;
  content: "";
  height: 14px;
  width: 4px;
}

.search-result {
  align-items: center;
  display: flex;
  gap: 14px;
  padding: 12px 20px;
}

.search-result:hover {
  background: var(--surface-alt);
}

.search-thumb,
.search-letter {
  align-items: center;
  background: rgba(236, 91, 19, 0.1);
  border-radius: var(--radius-sm);
  color: var(--primary);
  display: flex;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  object-fit: cover;
  width: 32px;
}

.search-sale-thumb {
  border-radius: var(--radius-sm);
  flex: 0 0 auto;
  height: 32px;
  object-fit: cover;
  width: 40px;
}

.search-title {
  color: var(--ink-strong);
  display: block;
  font-size: 14px;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-subtitle {
  color: var(--ink-subtle);
  display: block;
  font-size: 12px;
  margin-top: 2px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-empty {
  color: var(--ink-faint);
  font-size: 13px;
  padding: 12px 16px;
}

.topbar-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
}

.button {
  align-items: center;
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  text-align: center;
}

.button-icon,
.button .material-symbols-rounded {
  font-size: 18px;
}

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

.button-soft {
  background: rgba(236, 91, 19, 0.14);
  color: var(--primary);
}

.button-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-subtle);
}

.button-danger {
  border-color: var(--danger);
  color: var(--danger);
}

.button-success {
  border-color: var(--success);
  color: var(--success);
}

.button[disabled] {
  cursor: progress;
  opacity: 0.62;
}

.icon-button,
.avatar-button {
  align-items: center;
  background: rgba(236, 91, 19, 0.16);
  border: 0;
  border-radius: 999px;
  color: var(--primary);
  cursor: pointer;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.icon-button .material-symbols-rounded,
.avatar-button .material-symbols-rounded,
.follow-button .material-symbols-rounded {
  font-size: 22px;
}

.mobile-topbar,
.bottom-nav {
  display: none;
}

.page {
  min-height: calc(100vh - 72px);
}

.container {
  margin: 0 auto;
  max-width: var(--max-width);
  padding: 40px 48px 72px;
  width: 100%;
}

.hero {
  align-items: center;
  background: rgba(236, 91, 19, 0.08);
  border-radius: var(--radius-xl);
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
  padding: 24px;
}

.hero h1 {
  color: var(--ink-strong);
  font-size: 52px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.95;
  margin: 0;
}

.hero p {
  color: var(--ink-muted);
  font-size: 20px;
  line-height: 1.4;
  margin: 16px 0 24px;
}

.hero-image {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  height: clamp(260px, 32vw, 420px);
  object-fit: cover;
  width: 100%;
}

.stat-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}

.card,
.surface-card {
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.stat-card {
  align-items: center;
  display: flex;
  gap: 12px;
  padding: 16px 24px;
}

.stat-icon {
  align-items: center;
  background: rgba(236, 91, 19, 0.1);
  border-radius: var(--radius-md);
  color: var(--primary);
  display: flex;
  flex: 0 0 auto;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.stat-icon .material-symbols-rounded {
  font-size: 26px;
}

.stat-icon.success .material-symbols-rounded {
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

.stat-icon.success {
  background: rgba(21, 128, 61, 0.1);
  color: var(--success);
}

.stat-value {
  color: var(--ink-strong);
  display: block;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.stat-label {
  color: var(--ink-emphasis);
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-top: 2px;
}

.stat-sub {
  color: var(--ink-subtle);
  display: block;
  font-size: 12px;
}

.section {
  margin-top: 56px;
}

.section-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.section-title-wrap {
  align-items: center;
  display: flex;
  gap: 14px;
  min-width: 0;
}

.section-accent {
  background: var(--primary);
  border-radius: 999px;
  flex: 0 0 auto;
  height: 28px;
  width: 6px;
}

.section-accent.dot {
  border-radius: 999px;
  height: 12px;
  width: 12px;
}

.section-header h2 {
  color: var(--ink-strong);
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  margin: 0;
}

.section-subtitle {
  color: var(--ink-subtle);
  font-size: 14px;
  font-weight: 600;
  margin-top: 8px;
}

.section-action {
  color: var(--primary);
  align-items: center;
  display: inline-flex;
  font-weight: 800;
  min-height: 44px;
  padding: 8px 0;
}

.sales-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin-top: 14px;
}

.sales-grid.dashboard-sales {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-sales .sale-card:nth-child(n + 5) {
  display: none;
}

.dashboard-sales .sale-title,
.dashboard-sales .sale-meta .chip {
  display: none;
}

.dashboard-sales .sale-meta {
  margin-top: 8px;
}

.dashboard-sales .sale-actions {
  padding-top: 8px;
}

.sale-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.sale-image-wrap {
  aspect-ratio: 4 / 3;
  background: var(--surface-muted);
  min-height: 170px;
  position: relative;
}

.sale-image {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.sale-image-placeholder,
.brand-image-placeholder {
  align-items: center;
  background: var(--surface-muted);
  color: var(--ink-faint);
  display: flex;
  font-weight: 900;
  height: 100%;
  justify-content: center;
  min-height: inherit;
  width: 100%;
}

.sale-image-placeholder .material-symbols-rounded {
  font-size: 30px;
}

.sale-discount,
.partner-overlay {
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  left: 8px;
  padding: 4px 8px;
  position: absolute;
  top: 8px;
}

.sale-discount {
  background: #2e7d32;
}

.partner-overlay {
  background: rgba(0, 0, 0, 0.54);
  bottom: 8px;
  font-size: 11px;
  top: auto;
}

.sale-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 12px;
}

.sale-brand {
  align-items: center;
  color: var(--ink-strong);
  display: inline-flex;
  font-size: 17px;
  font-weight: 900;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sale-brand-chevron {
  color: var(--ink-subtle);
  display: none;
  flex: 0 0 auto;
  margin-left: 2px;
}

.sale-brand-chevron .material-symbols-rounded {
  font-size: 18px;
}

.sale-mobile-partner {
  color: var(--ink-subtle);
  display: none;
  font-size: 12px;
  font-weight: 500;
  margin-top: 2px;
}

.sale-title {
  color: var(--ink-subtle);
  display: -webkit-box;
  font-size: 13px;
  line-height: 1.35;
  margin-top: 4px;
  min-height: 34px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sale-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chip,
.countdown,
.badge {
  align-items: center;
  background: var(--surface-muted);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-md);
  color: var(--ink-subtle);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
  min-height: 28px;
  padding: 4px 9px;
}

.countdown {
  background: rgba(236, 91, 19, 0.1);
  border-color: transparent;
  border-radius: var(--radius-sm);
  color: var(--primary);
}

.countdown.info {
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.16);
  color: var(--info);
}

.sale-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

.sale-actions .button {
  flex: 1;
  min-height: 38px;
}

.ended-follow {
  width: 100%;
}

.follow-button {
  align-items: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink-faint);
  cursor: pointer;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  min-width: 38px;
}

.mobile-ended-follow {
  display: none;
}

.follow-button.active {
  background: rgba(236, 91, 19, 0.08);
  border-color: rgba(236, 91, 19, 0.3);
  color: var(--primary);
}

.empty-card {
  color: var(--ink-subtle);
  padding: 28px 32px;
}

.section > .empty-card {
  margin-top: 24px;
}

.partner-strip {
  margin: 34px 0 44px;
  text-align: center;
}

.partner-strip-title {
  color: var(--ink-subtle);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.partner-logos {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: center;
  margin-top: 12px;
}

.partner-logos img {
  filter: grayscale(1);
  height: 18px;
  opacity: 0.45;
}

.date-strip,
.filter-strip,
.alphabet-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 16px 14px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.date-strip::-webkit-scrollbar,
.filter-strip::-webkit-scrollbar,
.alphabet-strip::-webkit-scrollbar {
  display: none;
}

.date-pill {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  display: flex;
  flex: 0 0 64px;
  flex-direction: column;
  height: 90px;
  justify-content: center;
}

.date-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(236, 91, 19, 0.3);
  color: #ffffff;
}

.date-day {
  color: inherit;
  font-size: 20px;
  font-weight: 900;
}

.date-weekday {
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.78;
  text-transform: uppercase;
}

.filter-chip,
.alphabet-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-subtle);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 20px;
}

.filter-chip.active,
.alphabet-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.alphabet-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px;
}

.alphabet-strip {
  gap: 3px;
  padding: 0;
}

.alphabet-pill {
  border: 0;
  border-radius: 10px;
  color: var(--ink);
  min-width: 36px;
  padding: 9px 8px;
  justify-content: center;
}

.page-kicker {
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  margin: 6px 0 8px;
  text-transform: uppercase;
}

.page-subtitle {
  color: var(--ink-subtle);
  font-size: 18px;
  line-height: 1.5;
  margin: 0;
}

.brand-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 18px;
}

.brand-card {
  display: flex;
  flex-direction: column;
  min-height: 250px;
  overflow: hidden;
}

.brand-card-image {
  aspect-ratio: 4 / 3;
  background: var(--surface-muted);
  flex: 1 1 auto;
  min-height: 150px;
}

.brand-card-image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.brand-card-body {
  padding: 12px;
}

.brand-card-title {
  color: var(--ink-strong);
  font-size: 16px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.brand-actions .button {
  flex: 1;
  min-height: 40px;
  padding: 0 12px;
}

.brand-list {
  display: none;
}

.brand-hero {
  align-items: center;
  display: flex;
  gap: 36px;
  justify-content: space-between;
  padding: 40px;
}

.brand-hero-row {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  gap: 28px;
  min-width: 0;
}

.brand-hero-image {
  align-items: center;
  background: var(--surface-muted);
  border-radius: var(--radius-md);
  display: flex;
  flex: 0 0 96px;
  height: 96px;
  justify-content: center;
  overflow: hidden;
  padding: 14px;
  width: 96px;
}

.brand-hero-image img {
  max-height: 100%;
  object-fit: contain;
}

.brand-hero h1 {
  color: var(--ink-strong);
  font-size: 44px;
  font-weight: 900;
  line-height: 1.1;
  margin: 0;
}

.brand-hero p {
  color: var(--ink-subtle);
  font-size: 15px;
  margin: 8px 0 0;
  max-width: 720px;
}

.brand-hero .button {
  flex: 0 0 auto;
  margin-top: 0;
  min-height: 48px;
  padding: 0 28px;
}

.sites-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.site-card {
  padding: 24px;
}

.site-logo {
  align-items: center;
  display: flex;
  height: 64px;
  justify-content: flex-start;
}

.site-logo img {
  max-height: 40px;
}

.site-title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.site-title-row h2 {
  color: var(--ink-strong);
  font-size: 18px;
  font-weight: 900;
  margin: 0;
}

.site-url {
  color: var(--ink-muted);
  font-size: 12px;
  margin-top: 4px;
}

.site-description {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 12px;
}

.referral-box {
  align-items: center;
  background: rgba(21, 128, 61, 0.08);
  border: 1px solid rgba(21, 128, 61, 0.18);
  border-radius: var(--radius-md);
  color: var(--success);
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
}

.referral-value {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.referral-label {
  font-size: 12px;
  font-weight: 800;
  opacity: 0.85;
}

.site-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

.profile-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
}

.profile-card,
.subscriptions-card,
.admin-card {
  padding: 24px;
}

.profile-heading {
  align-items: center;
  display: flex;
  gap: 16px;
}

.profile-initial {
  align-items: center;
  background: var(--primary);
  border-radius: 999px;
  color: #ffffff;
  display: flex;
  flex: 0 0 56px;
  font-size: 22px;
  font-weight: 900;
  height: 56px;
  justify-content: center;
  width: 56px;
}

.divider {
  background: var(--border-muted);
  height: 1px;
  margin: 16px 0;
}

.toggle-row {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding-left: 28px;
}

.toggle-row + .toggle-row {
  margin-top: 8px;
}

.switch {
  height: 24px;
  position: relative;
  width: 44px;
}

.switch input {
  height: 0;
  opacity: 0;
  width: 0;
}

.slider {
  background: var(--border);
  border-radius: 999px;
  cursor: pointer;
  inset: 0;
  position: absolute;
  transition: 0.18s;
}

.slider::before {
  background: #ffffff;
  border-radius: 50%;
  bottom: 3px;
  content: "";
  height: 18px;
  left: 3px;
  position: absolute;
  transition: 0.18s;
  width: 18px;
}

.switch input:checked + .slider {
  background: var(--primary);
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

.subscription-item {
  align-items: center;
  background: var(--surface-muted);
  border-radius: var(--radius-md);
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  padding: 12px 16px;
}

.subscription-label {
  color: var(--ink-strong);
  flex: 1;
  font-size: 14px;
  font-weight: 800;
  min-width: 0;
}

.remove-sub {
  background: transparent;
  border: 0;
  color: var(--ink-faint);
  cursor: pointer;
  font-size: 18px;
}

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

.admin-table {
  border-collapse: collapse;
  min-width: 780px;
  width: 100%;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--border-muted);
  padding: 12px 10px;
  text-align: left;
}

.admin-table th {
  background: var(--surface-muted);
  color: var(--ink-strong);
  font-weight: 800;
}

.admin-table tr {
  cursor: pointer;
}

.admin-table tr:hover td {
  background: var(--surface-alt);
}

.form-field {
  margin-bottom: 16px;
}

.input {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--ink-strong);
  min-height: 48px;
  outline: 0;
  padding: 0 14px;
  width: 100%;
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.message {
  border-radius: var(--radius-md);
  display: none;
  font-size: 13px;
  font-weight: 700;
  margin-top: 12px;
  padding: 10px 12px;
}

.message.show {
  display: block;
}

.message.error {
  background: rgba(185, 28, 28, 0.08);
  color: var(--danger);
}

.message.success {
  background: rgba(21, 128, 61, 0.08);
  color: var(--success);
}

.modal-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 16px;
  position: fixed;
  z-index: 100;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--background);
  border-radius: var(--radius-lg);
  max-height: calc(100vh - 32px);
  max-width: 440px;
  min-width: 0;
  overflow: auto;
  padding: 24px;
  position: relative;
  width: min(100%, 440px);
}

.modal-close {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--ink-muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 24px;
  height: 40px;
  justify-content: center;
  position: absolute;
  right: 4px;
  top: 4px;
  width: 40px;
}

.modal h2 {
  color: var(--ink-strong);
  font-size: 24px;
  font-weight: 900;
  margin: 24px 0 8px;
}

.modal p {
  color: var(--ink-subtle);
  font-size: 14px;
  line-height: 1.45;
}

.modal strong {
  overflow-wrap: anywhere;
}

.modal .section-action {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--primary);
  cursor: pointer;
  display: inline-flex;
  font-size: 15px;
  font-weight: 800;
  justify-content: center;
  min-height: 38px;
  padding: 8px 10px;
}

.modal .section-action:hover {
  background: rgba(236, 91, 19, 0.08);
}

.modal .section-action:disabled {
  background: rgba(236, 91, 19, 0.08);
  color: var(--primary);
  cursor: default;
  opacity: 0.72;
}

.modal #otp-back {
  color: var(--ink-muted);
}

.modal #otp-back:hover {
  background: var(--surface-muted);
  color: var(--ink-strong);
}

.otp-row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 20px 0 16px;
}

.otp-input {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--ink-strong);
  font-size: 22px;
  font-weight: 800;
  height: 56px;
  min-width: 0;
  text-align: center;
  width: 100%;
}

.toast {
  background: var(--ink-strong);
  border-radius: var(--radius-md);
  bottom: 24px;
  box-shadow: var(--shadow-soft);
  color: #ffffff;
  left: 50%;
  max-width: min(420px, calc(100vw - 32px));
  opacity: 0;
  padding: 12px 16px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 16px);
  transition: 0.2s;
  z-index: 120;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.footer {
  background: var(--surface);
  margin-top: 44px;
  padding: 26px 16px 14px;
}

.footer-inner {
  margin: 0 auto;
  max-width: var(--max-width);
}

.footer-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 2fr 1fr 1fr;
}

.footer-description {
  color: var(--ink-subtle);
  line-height: 1.5;
  margin: 10px 0 0;
}

.footer h2 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  margin: 0 0 14px;
}

.footer-link {
  color: var(--ink-subtle);
  display: block;
  font-size: 14px;
  margin-bottom: 10px;
}

.footer-bottom {
  align-items: center;
  border-top: 1px solid var(--border-muted);
  display: flex;
  gap: 16px;
  margin-top: 18px;
  padding-top: 10px;
}

.copyright {
  color: var(--ink-faint);
  flex: 1;
  font-size: 12px;
}

.language-switch {
  align-items: center;
  color: var(--ink-subtle);
  display: flex;
  gap: 4px;
}

.language-switch button {
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--ink-subtle);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
}

.language-switch button.active {
  background: var(--primary);
  color: #ffffff;
}

.hidden {
  display: none !important;
}

@media (max-width: 1023px) {
  .brand-grid,
  .sites-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sales-grid.dashboard-sales {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-sales .sale-card:nth-child(n + 3) {
    display: none;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .brand-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .dashboard-sales .sale-card:nth-child(n + 4) {
    display: none;
  }
}

@media (max-width: 899px) and (min-width: 768px) {
  .topbar-inner {
    gap: 8px;
    padding: 0 16px;
  }

  .logo img {
    height: 22px;
    width: 22px;
  }

  .logo-word {
    font-size: 21px;
  }

  .nav-link {
    font-size: 14px;
    padding: 10px 7px;
  }

  .search {
    min-width: 120px;
  }

  .topbar-actions {
    gap: 8px;
  }

  .topbar-actions .button {
    min-width: 42px;
    padding: 0 12px;
  }

  .topbar-actions .button span:not(.material-symbols-rounded) {
    display: none;
  }
}

@media (max-width: 767px) {
  .app-shell {
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .topbar {
    display: none;
  }

  .mobile-topbar {
    background: var(--surface);
    display: block;
    position: sticky;
    top: 0;
    z-index: 30;
  }

  .mobile-topbar-inner {
    align-items: center;
    display: flex;
    gap: 8px;
    height: 64px;
    padding: 0 12px;
  }

  .mobile-topbar .search {
    min-width: 0;
  }

  .bottom-nav {
    background: var(--surface);
    border-top: 1px solid var(--border-muted);
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    left: 0;
    max-width: 100vw;
    min-height: 72px;
    overflow: hidden;
    padding: 4px 4px max(4px, env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    width: 100vw;
    z-index: 40;
  }

  .bottom-nav a {
    align-items: center;
    border-radius: var(--radius-md);
    color: var(--ink-muted);
    display: flex;
    flex-direction: column;
    font-size: 12px;
    font-weight: 600;
    gap: 4px;
    justify-content: center;
    min-height: 58px;
    min-width: 0;
    overflow: hidden;
  }

  .bottom-nav a span:not(.material-symbols-rounded) {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .bottom-nav a.active {
    color: var(--primary);
  }

  .bottom-nav .material-symbols-rounded {
    font-size: 24px;
  }
  
  .container {
    padding: 16px 16px 24px;
  }

  .hero {
    display: block;
    padding: 16px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero p {
    font-size: 15px;
  }

  .hero-image {
    display: none;
  }

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

  .stat-card {
    padding: 12px;
  }

  .stat-icon {
    height: 36px;
    width: 36px;
  }

  .stat-value {
    font-size: 22px;
  }

  .section-header {
    align-items: flex-start;
  }

  .section {
    margin-top: 34px;
  }

  .section-header h2 {
    font-size: 24px;
  }

  .sales-grid {
    display: block;
  }

  .dashboard-sales .sale-card:nth-child(n) {
    display: flex;
  }

  .sale-card {
    flex-direction: row;
    height: 108px;
    min-height: 108px;
    width: 100%;
  }

  .sale-card[data-sale-href] {
    cursor: pointer;
  }

  .sale-card + .sale-card {
    margin-top: 8px;
  }

  .sale-image-wrap {
    flex: 0 0 100px;
    min-height: 108px;
  }

  .partner-overlay,
  .sale-title,
  .sale-meta .chip,
  .sale-actions .button {
    display: none;
  }

  .sale-content {
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    padding: 8px 12px;
    position: relative;
    width: calc(100% - 100px);
  }

  .sale-brand {
    display: -webkit-box;
    font-size: 15px;
    line-height: 1.18;
    min-width: 0;
    overflow: hidden;
    padding-right: 44px;
    text-overflow: ellipsis;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .sale-mobile-partner {
    display: block;
    max-width: calc(100% - 44px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sale-actions {
    bottom: 8px;
    justify-content: flex-end;
    margin-top: 0;
    padding-top: 6px;
    position: absolute;
    right: 12px;
  }

  .sale-meta {
    min-width: 0;
    padding-right: 44px;
  }

  .sale-meta .countdown {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .follow-button {
    border: 0;
    height: 40px;
    min-width: 40px;
  }

  .mobile-ended-follow {
    display: inline-flex;
  }

  .follow-button .material-symbols-rounded {
    font-size: 20px;
  }

  .modal-backdrop {
    align-items: flex-start;
    padding: 20px 12px max(20px, env(safe-area-inset-bottom));
  }

  .modal {
    max-height: calc(100dvh - 40px);
    padding: 22px;
  }

  .otp-row {
    gap: 6px;
  }

  .otp-input {
    border-radius: var(--radius-sm);
    font-size: 20px;
    height: 48px;
  }

  .brand-grid {
    display: none;
  }

  .brand-list {
    display: block;
    margin-top: 18px;
  }

  .brand-list-item {
    align-items: center;
    display: flex;
    gap: 14px;
    margin-bottom: 8px;
    padding: 12px 14px;
  }

  .brand-list-thumb {
    align-items: center;
    background: var(--surface-muted);
    border-radius: var(--radius-sm);
    display: flex;
    flex: 0 0 48px;
    height: 48px;
    justify-content: center;
    overflow: hidden;
    width: 48px;
  }

  .brand-list-thumb img {
    height: 100%;
    object-fit: cover;
    width: 100%;
  }

  .brand-list-main {
    display: block;
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  .brand-list-title {
    color: var(--ink-strong);
    display: block;
    font-size: 15px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-list-sub {
    color: var(--ink-subtle);
    display: block;
    font-size: 12px;
    margin-top: 2px;
  }

  .brand-hero {
    display: block;
    padding: 16px;
  }

  .brand-hero-row {
    gap: 14px;
  }

  .brand-hero-image {
    flex-basis: 56px;
    height: 56px;
    padding: 8px;
    width: 56px;
  }

  .brand-hero h1 {
    font-size: 22px;
  }

  .brand-hero p {
    font-size: 13px;
  }

  .brand-hero .button {
    margin-top: 14px;
    width: 100%;
  }

  .empty-card {
    padding: 16px;
  }

  .sites-grid,
  .profile-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .site-card {
    padding: 20px;
  }

  .profile-card,
  .subscriptions-card,
  .admin-card {
    padding: 16px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

@media (min-width: 768px) {
  .sales-grid .sale-card {
    aspect-ratio: 1 / 1;
  }

  .sales-grid .sale-image-wrap {
    flex: 1 1 auto;
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .stat-grid {
    gap: 10px;
  }

  .stat-card {
    gap: 10px;
  }

  .stat-label {
    font-size: 13px;
  }

  .date-strip,
  .filter-strip {
    padding-left: 0;
    padding-right: 0;
  }
}
