/* Oshop247 Affiliate Portal — design system */
:root {
  --af-bg: #F4F6F9;
  --af-surface: #FFFFFF;
  --af-surface-2: #F8FAFC;
  --af-surface-dark: #0A0A0A;
  --af-border: #E2E8F0;
  --af-border-light: #F1F5F9;
  --af-text: #0F172A;
  --af-text-2: #64748B;
  --af-text-3: #94A3B8;
  --af-accent: #FF5722;
  --af-accent-hover: #E64A19;
  --af-accent-soft: rgba(255, 87, 34, 0.1);
  --af-accent-ring: rgba(255, 87, 34, 0.25);
  --af-success: #059669;
  --af-success-soft: rgba(5, 150, 105, 0.1);
  --af-warning: #D97706;
  --af-warning-soft: rgba(217, 119, 6, 0.1);
  --af-danger: #DC2626;
  --af-danger-soft: rgba(220, 38, 38, 0.1);
  --af-info: #2563EB;
  --af-info-soft: rgba(37, 99, 235, 0.1);
  --af-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --af-shadow: 0 4px 16px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --af-shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
  --af-radius: 10px;
  --af-radius-lg: 14px;
  --af-radius-xl: 18px;
  --af-sidebar: 272px;
  --af-font: "DM Sans", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.af-body {
  margin: 0;
  font-family: var(--af-font);
  background: var(--af-bg);
  color: var(--af-text);
  line-height: 1.55;
  font-size: 15px;
}

body.af-nav-open { overflow: hidden; }

a { color: var(--af-accent); text-decoration: none; }
a:hover { color: var(--af-accent-hover); }

/* ── App shell ── */
.af-wrapper { display: flex; min-height: 100vh; }

.af-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 45;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.af-sidebar-overlay.is-visible { display: block; opacity: 1; }

.af-sidebar {
  width: var(--af-sidebar);
  background: var(--af-surface-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  transition: transform 0.25s ease;
}

.af-sidebar__head {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.af-brand { display: flex; align-items: center; gap: 12px; }
.af-brand__mark {
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(135deg, #FF5722, #FF7043);
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 18px;
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.35);
}
.af-brand__title { font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.af-brand__pill {
  display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 600;
  color: rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.08);
  padding: 3px 9px; border-radius: 999px;
}

.af-nav { flex: 1; padding: 14px 12px; overflow-y: auto; }
.af-nav__label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.35);
  padding: 8px 12px 6px;
}
.af-nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--af-radius);
  color: rgba(255, 255, 255, 0.65); font-size: 14px; font-weight: 500;
  margin-bottom: 2px; transition: background 0.15s, color 0.15s;
}
.af-nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; text-decoration: none; }
.af-nav a.active {
  background: rgba(255, 87, 34, 0.18); color: #fff; font-weight: 600;
  box-shadow: inset 3px 0 0 var(--af-accent);
}
.af-nav a i { width: 18px; text-align: center; font-size: 14px; opacity: 0.9; }
.af-nav__badge {
  margin-left: auto; background: var(--af-accent); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; min-width: 18px; text-align: center;
}

.af-sidebar__widgets { padding: 14px 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.af-tier {
  background: rgba(255, 255, 255, 0.06); border-radius: var(--af-radius-lg);
  padding: 14px; margin-bottom: 10px; border: 1px solid rgba(255, 255, 255, 0.06);
}
.af-tier__label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.45); font-weight: 600; }
.af-tier__name { font-weight: 700; text-transform: capitalize; margin-top: 4px; font-size: 16px; }
.af-balance {
  background: linear-gradient(145deg, rgba(255, 87, 34, 0.15), rgba(255, 87, 34, 0.05));
  border: 1px solid rgba(255, 87, 34, 0.25); border-radius: var(--af-radius-lg); padding: 14px;
}
.af-balance__label { font-size: 12px; color: rgba(255, 255, 255, 0.6); }
.af-balance__amount { font-size: 24px; font-weight: 700; color: #FFAB91; margin: 6px 0 12px; letter-spacing: -0.02em; }

.af-sidebar__foot {
  padding: 14px 12px; border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.af-user { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.af-user__avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255, 87, 34, 0.25); color: #FFAB91;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.af-user__meta { min-width: 0; }
.af-user__name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.af-user__email { font-size: 11px; color: rgba(255, 255, 255, 0.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.af-main { flex: 1; margin-left: var(--af-sidebar); min-width: 0; display: flex; flex-direction: column; }

.af-topbar {
  min-height: 64px; background: var(--af-surface);
  border-bottom: 1px solid var(--af-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; position: sticky; top: 0; z-index: 30; gap: 12px;
}
.af-topbar__left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.af-topbar__menu {
  display: none; width: 40px; height: 40px; border: 1px solid var(--af-border);
  border-radius: var(--af-radius); background: var(--af-surface); cursor: pointer; color: var(--af-text);
}
.af-topbar__title { font-size: 18px; font-weight: 700; margin: 0; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-topbar__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.af-topbar__icon {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: var(--af-radius); border: 1px solid var(--af-border);
  color: var(--af-text-2); background: var(--af-surface); position: relative;
}
.af-topbar__icon:hover { background: var(--af-surface-2); color: var(--af-text); text-decoration: none; }
.af-topbar__dot {
  position: absolute; top: 7px; right: 7px; width: 8px; height: 8px;
  background: var(--af-accent); border-radius: 50%; border: 2px solid var(--af-surface);
}

.af-content { padding: 24px 24px 40px; flex: 1; }

/* ── Page sections ── */
.af-page-head { margin-bottom: 24px; }
.af-page-head__title { font-size: 26px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.03em; }
.af-page-head__sub { color: var(--af-text-2); margin: 0; font-size: 15px; }
.af-page-head__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.af-section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.af-section-head h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }

/* ── Cards & grid ── */
.af-card {
  background: var(--af-surface); border-radius: var(--af-radius-lg);
  border: 1px solid var(--af-border-light); box-shadow: var(--af-shadow-sm);
  padding: 20px;
}
.af-card + .af-card { margin-top: 16px; }
.af-card--flat { box-shadow: none; }
.af-card--highlight {
  background: linear-gradient(135deg, rgba(255, 87, 34, 0.06), rgba(255, 87, 34, 0.02));
  border-color: rgba(255, 87, 34, 0.15);
}

.af-grid { display: grid; gap: 16px; }
.af-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.af-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.af-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.af-kpi {
  position: relative; overflow: hidden;
}
.af-kpi__icon {
  width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center; font-size: 16px; margin-bottom: 14px;
}
.af-kpi__icon--accent { background: var(--af-accent-soft); color: var(--af-accent); }
.af-kpi__icon--success { background: var(--af-success-soft); color: var(--af-success); }
.af-kpi__icon--info { background: var(--af-info-soft); color: var(--af-info); }
.af-kpi__icon--warning { background: var(--af-warning-soft); color: var(--af-warning); }
.af-kpi__label { font-size: 13px; color: var(--af-text-2); font-weight: 500; }
.af-kpi__value { font-size: 28px; font-weight: 700; margin-top: 4px; letter-spacing: -0.03em; line-height: 1.15; }
.af-kpi__meta { font-size: 12px; color: var(--af-text-3); margin-top: 8px; }

/* ── Chart bars ── */
.af-chart { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding-top: 8px; }
.af-chart__bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.af-chart__bar {
  width: 100%; max-width: 36px; border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--af-accent), #FF7043); min-height: 4px;
  transition: height 0.3s ease;
}
.af-chart__label { font-size: 11px; color: var(--af-text-3); font-weight: 600; }

/* ── Referral strip ── */
.af-referral-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 16px 18px; background: var(--af-surface);
  border: 1px solid var(--af-border); border-radius: var(--af-radius-lg);
  margin-bottom: 20px;
}
.af-referral-strip__code-block { flex-shrink: 0; }
.af-referral-strip__link-wrap { flex: 1; min-width: min(100%, 240px); }
.af-referral-strip__manage { flex-shrink: 0; }
.af-referral-strip__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; font-weight: 600; color: var(--af-text);
  background: var(--af-surface-2); padding: 8px 12px; border-radius: var(--af-radius);
  border: 1px dashed var(--af-border);
}

/* ── Buttons ── */
.af-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--af-radius);
  padding: 10px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit; line-height: 1.2; transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.af-btn:active { transform: scale(0.98); }
.af-btn--primary { background: var(--af-accent); color: #fff; }
.af-btn--primary:hover { background: var(--af-accent-hover); color: #fff; text-decoration: none; }
.af-btn--ghost { background: var(--af-surface); border-color: var(--af-border); color: var(--af-text); }
.af-btn--ghost:hover { background: var(--af-surface-2); text-decoration: none; }
.af-btn--dark { background: var(--af-surface-dark); color: #fff; border-color: var(--af-surface-dark); }
.af-btn--sm { padding: 7px 12px; font-size: 13px; }
.af-btn--block { width: 100%; }
.af-btn.is-copied { background: var(--af-success); border-color: var(--af-success); color: #fff; }

/* ── Forms ── */
.af-input, .af-select, .af-textarea {
  width: 100%; border: 1px solid var(--af-border); border-radius: var(--af-radius);
  padding: 11px 14px; font: inherit; background: #fff; color: var(--af-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.af-input:focus, .af-select:focus, .af-textarea:focus {
  outline: none; border-color: var(--af-accent);
  box-shadow: 0 0 0 3px var(--af-accent-ring);
}
.af-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--af-text); }
.af-field { margin-bottom: 16px; }
.af-field-hint { font-size: 12px; color: var(--af-text-3); margin-top: 4px; }

/* ── Tables ── */
.af-table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.af-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.af-table th, .af-table td { padding: 13px 12px; border-bottom: 1px solid var(--af-border-light); text-align: left; vertical-align: middle; }
.af-table th {
  color: var(--af-text-2); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.05em; background: var(--af-surface-2);
}
.af-table th:first-child { border-radius: var(--af-radius) 0 0 0; }
.af-table th:last-child { border-radius: 0 var(--af-radius) 0 0; }
.af-table tbody tr:hover { background: var(--af-surface-2); }
.af-table tbody tr:last-child td { border-bottom: none; }

/* ── Badges ── */
.af-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; text-transform: capitalize; white-space: nowrap;
}
.af-badge--success { background: var(--af-success-soft); color: var(--af-success); }
.af-badge--warning { background: var(--af-warning-soft); color: var(--af-warning); }
.af-badge--danger { background: var(--af-danger-soft); color: var(--af-danger); }
.af-badge--info { background: var(--af-info-soft); color: var(--af-info); }
.af-badge--neutral { background: var(--af-surface-2); color: var(--af-text-2); }

/* ── Alerts ── */
.af-alert {
  padding: 14px 16px; border-radius: var(--af-radius); margin-bottom: 16px;
  font-size: 14px; border: 1px solid transparent;
}
.af-alert--success { background: var(--af-success-soft); color: #065F46; border-color: rgba(5, 150, 105, 0.2); }
.af-alert--error { background: var(--af-danger-soft); color: #991B1B; border-color: rgba(220, 38, 38, 0.2); }
.af-alert--info { background: var(--af-info-soft); color: #1E40AF; border-color: rgba(37, 99, 235, 0.2); }

/* ── Filters ── */
.af-filters {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px;
  padding: 14px; background: var(--af-surface); border: 1px solid var(--af-border-light);
  border-radius: var(--af-radius-lg);
}
.af-filters .af-select, .af-filters .af-input { width: auto; min-width: 140px; }

/* ── Empty state ── */
.af-empty {
  text-align: center; padding: 48px 24px; color: var(--af-text-2);
}
.af-empty__icon {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--af-surface-2); display: grid; place-items: center;
  font-size: 22px; color: var(--af-text-3);
}
.af-empty__title { font-weight: 700; color: var(--af-text); margin: 0 0 6px; font-size: 16px; }
.af-empty__text { margin: 0 0 16px; font-size: 14px; max-width: 360px; margin-left: auto; margin-right: auto; }

/* ── Notifications list ── */
.af-notif-list { display: flex; flex-direction: column; gap: 0; }
.af-notif-item {
  display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--af-border-light);
}
.af-notif-item:last-child { border-bottom: none; }
.af-notif-item.is-unread { background: linear-gradient(90deg, var(--af-accent-soft), transparent); margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.af-notif-item__icon {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--af-surface-2); display: grid; place-items: center; color: var(--af-accent);
}
.af-notif-item__title { font-weight: 600; font-size: 14px; margin: 0 0 4px; }
.af-notif-item__msg { color: var(--af-text-2); font-size: 14px; margin: 0; }
.af-notif-item__time { font-size: 12px; color: var(--af-text-3); margin-top: 6px; }

/* ── Detail list ── */
.af-dl { display: grid; grid-template-columns: minmax(120px, 160px) 1fr; gap: 12px 20px; margin: 0; }
.af-dl dt { color: var(--af-text-2); font-size: 13px; font-weight: 500; margin: 0; }
.af-dl dd { margin: 0; font-weight: 500; }

.af-muted { color: var(--af-text-2); font-size: 13px; }
.af-copy-box {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--af-surface-2); border: 1px solid var(--af-border);
  border-radius: var(--af-radius); padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px;
}
.af-copy-box__text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-all;
  line-height: 1.5;
}
.af-copy-box__btn { flex-shrink: 0; }
[data-copy].is-copied { background: var(--af-success, #16a34a) !important; border-color: var(--af-success, #16a34a) !important; color: #fff !important; }
[data-copy].is-copy-error { background: #dc2626 !important; border-color: #dc2626 !important; color: #fff !important; }

/* ── Pagination ── */
.af-pagination { margin-top: 20px; }
.af-pagination nav { display: flex; justify-content: center; }
.af-pagination .pagination { display: flex; gap: 4px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; justify-content: center; }
.af-pagination .page-link {
  display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px;
  border-radius: var(--af-radius); border: 1px solid var(--af-border);
  color: var(--af-text); font-size: 13px; font-weight: 500; background: var(--af-surface);
}
.af-pagination .page-item.active .page-link { background: var(--af-accent); border-color: var(--af-accent); color: #fff; }
.af-pagination .page-item.disabled .page-link { opacity: 0.45; }

/* ── Auth pages ── */
.af-auth {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
}
.af-auth__main {
  display: flex; align-items: center; justify-content: center;
  padding: 32px 24px; background: var(--af-bg);
}
.af-auth__card {
  width: 100%; max-width: 480px;
  background: var(--af-surface); border-radius: var(--af-radius-xl);
  border: 1px solid var(--af-border-light); box-shadow: var(--af-shadow-lg);
  padding: 32px 28px;
}
.af-auth__logo {
  display: flex; align-items: center; gap: 10px; margin-bottom: 24px;
}
.af-auth__logo-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #FF5722, #FF7043);
  color: #fff; display: grid; place-items: center; font-weight: 800;
}
.af-auth__logo .platform-brand__img {
    max-width: 180px;
}
.af-auth__title { margin: 0 0 8px; font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.af-auth__sub { color: var(--af-text-2); margin: 0 0 20px; font-size: 15px; }

.af-auth__aside {
  background: linear-gradient(160deg, #0A0A0A 0%, #1a1a2e 50%, #16213e 100%);
  color: #fff; padding: 48px 40px; display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.af-auth__aside::before {
  content: ""; position: absolute; top: -20%; right: -20%; width: 60%; height: 60%;
  background: radial-gradient(circle, rgba(255, 87, 34, 0.2), transparent 70%);
  pointer-events: none;
}
.af-auth__aside h2 { margin: 0 0 14px; font-size: 32px; font-weight: 700; letter-spacing: -0.03em; position: relative; }
.af-auth__aside p { color: rgba(255, 255, 255, 0.7); font-size: 16px; line-height: 1.65; position: relative; }
.af-auth__perks { list-style: none; padding: 0; margin: 28px 0 0; position: relative; }
.af-auth__perks li {
  display: flex; align-items: flex-start; gap: 12px; padding: 10px 0;
  color: rgba(255, 255, 255, 0.85); font-size: 15px;
}
.af-auth__perks li i { color: var(--af-accent); margin-top: 3px; }

.af-auth__steps { display: flex; flex-direction: column; gap: 16px; margin: 24px 0; }
.af-auth__step {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px; background: var(--af-surface-2); border-radius: var(--af-radius-lg);
  border: 1px solid var(--af-border-light);
}
.af-auth__step-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--af-accent-soft); color: var(--af-accent);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.af-auth__step strong { display: block; font-size: 14px; margin-bottom: 2px; }
.af-auth__step span { font-size: 13px; color: var(--af-text-2); }

.af-auth__status-icon {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 20px;
  display: grid; place-items: center; font-size: 28px;
}
.af-auth__status-icon--pending { background: var(--af-warning-soft); color: var(--af-warning); }
.af-auth__status-icon--rejected { background: var(--af-danger-soft); color: var(--af-danger); }

.af-auth--centered {
  grid-template-columns: 1fr;
  min-height: 100vh;
}
.af-auth--centered .af-auth__main {
  min-height: 100vh;
  width: 100%;
  max-width: none;
}

/* ── QR card ── */
.af-qr-card { text-align: center; }
.af-qr-card img {
  border-radius: var(--af-radius-lg); border: 1px solid var(--af-border);
  box-shadow: var(--af-shadow-sm); max-width: 100%; height: auto;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .af-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .af-grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .af-sidebar {
    transform: translateX(-100%);
    box-shadow: var(--af-shadow-lg);
  }
  .af-sidebar.is-open { transform: translateX(0); }
  .af-main { margin-left: 0; }
  .af-topbar__menu { display: grid; place-items: center; }
  .af-content { padding: 18px 16px 32px; }
  .af-auth { grid-template-columns: 1fr; }
  .af-auth__aside { display: none; }
}

@media (max-width: 640px) {
  .af-grid--4, .af-grid--3, .af-grid--2 { grid-template-columns: 1fr; }
  .af-kpi__value { font-size: 24px; }
  .af-page-head__title { font-size: 22px; }
  .af-page-head__sub { font-size: 14px; }
  .af-filters .af-select, .af-filters .af-input { width: 100%; min-width: 0; }
  .af-dl { grid-template-columns: 1fr; gap: 4px; }
  .af-dl dt { font-size: 12px; }
  .af-auth__card { padding: 24px 20px; }

  /* Top bar */
  .af-topbar { padding: 0 12px; min-height: 56px; }
  .af-topbar__left { gap: 10px; }
  .af-topbar__title { font-size: 16px; white-space: normal; line-height: 1.2; }
  .af-topbar__actions { gap: 8px; }
  .af-topbar__share-label { display: none; }
  .af-topbar__share { padding: 7px 10px; }

  /* Referral strip — stack vertically */
  .af-referral-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
  }
  .af-referral-strip__link-wrap {
    min-width: 0;
    width: 100%;
  }
  .af-referral-strip__code {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
  .af-copy-box {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .af-copy-box__text {
    font-size: 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--af-border-light);
    border-radius: var(--af-radius);
  }
  .af-copy-box__btn,
  .af-referral-strip__manage {
    width: 100%;
    justify-content: center;
  }

  /* Section headers */
  .af-section-head {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 6px;
  }

  /* Chart */
  .af-chart { height: 100px; gap: 4px; }
  .af-chart__label { font-size: 10px; }
  .af-chart__bar { max-width: 28px; }

  /* Cards with side-by-side content */
  .af-card--highlight[style*="flex"] {
    flex-direction: column !important;
  }
}
