/* Arctic Fox User Portal — aligned with AFWebsite (light-first, larger scale) */

/* Light mode = default (:root) */
:root {
  --background: 0 0% 98%;
  --foreground: 260 25% 15%;
  --card: 0 0% 100%;
  --card-foreground: 260 25% 15%;
  --primary: 258 89% 66%;
  --primary-foreground: 0 0% 100%;
  --secondary: 260 15% 92%;
  --secondary-foreground: 260 25% 15%;
  --muted: 260 10% 94%;
  --muted-foreground: 260 15% 40%;
  --accent: 258 89% 66%;
  --destructive: 0 72% 51%;
  --success: 142 71% 45%;
  --border: 260 15% 88%;
  --input: 260 15% 96%;
  --ring: 258 89% 66%;
  --radius: 0.75rem;

  --gradient-primary: linear-gradient(
    135deg,
    hsl(258 89% 66%) 0%,
    hsl(270 75% 58%) 50%,
    hsl(280 70% 52%) 100%
  );
  --gradient-page: linear-gradient(
    180deg,
    hsl(0 0% 98%) 0%,
    hsl(260 20% 96%) 35%,
    hsl(258 40% 94%) 70%,
    hsl(0 0% 98%) 100%
  );
  --gradient-card: linear-gradient(
    145deg,
    hsl(0 0% 100%) 0%,
    hsl(260 25% 98%) 55%,
    hsl(258 30% 96%) 100%
  );
  --gradient-hero-band: linear-gradient(
    180deg,
    hsl(0 0% 98%) 0%,
    hsl(260 18% 93%) 50%,
    hsl(258 25% 92%) 100%
  );

  --yeti-blue: hsl(var(--primary));
  --yeti-dark-blue: hsl(258 70% 50%);
  --site-background-color: hsl(var(--background));
  --shadow-grey: hsl(var(--border));

  --text-base: 1.125rem;
  --text-lg: 1.25rem;
  --text-xl: 1.375rem;
  --space-page-x: 2rem;
  --af-nav-height: 4.5rem;
}

/* Dark mode */
html.dark {
  --background: 260 30% 10%;
  --foreground: 0 0% 98%;
  --card: 260 25% 14%;
  --card-foreground: 0 0% 98%;
  --secondary: 260 20% 18%;
  --secondary-foreground: 0 0% 98%;
  --muted: 260 15% 20%;
  --muted-foreground: 260 10% 65%;
  --border: 260 20% 20%;
  --input: 260 22% 16%;
  --site-background-color: hsl(var(--background));

  --gradient-page: linear-gradient(
    180deg,
    hsl(260 30% 10%) 0%,
    hsl(260 28% 14%) 40%,
    hsl(258 35% 18%) 100%
  );
  --gradient-card: linear-gradient(
    145deg,
    hsl(260 25% 16%) 0%,
    hsl(260 25% 14%) 100%
  );
  --gradient-hero-band: linear-gradient(
    180deg,
    hsl(260 30% 10%) 0%,
    hsl(260 25% 14%) 50%,
    hsl(258 30% 18%) 100%
  );
}

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

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--text-base);
  line-height: 1.6;
  background: var(--gradient-page);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: hsl(var(--primary));
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: hsl(258 75% 55%);
}

/* —— Layout —— */
.af-page,
.af-auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--gradient-page);
  background-color: hsl(var(--background));
}

.af-main {
  flex: 1;
  padding: calc(var(--af-nav-height) + 0.75rem) var(--space-page-x) 4rem;
  max-width: 80rem;
  margin: 0 auto;
  width: 100%;
}

.af-main--narrow {
  max-width: 40rem;
}

.af-main--wide {
  max-width: 72rem;
}

/* —— Navbar (matches AFWebsite Navbar.tsx) —— */
.af-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}

/* Solid bar like AFWebsite on light pages (login, dashboard) */
.af-nav.af-nav--solid,
html.light .af-nav.af-nav--solid {
  background: hsl(var(--background) / 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 3px 0 hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
}

.af-nav.is-scrolled {
  background: hsl(var(--background) / 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 15px -3px hsl(0 0% 0% / 0.1), 0 4px 6px -4px hsl(0 0% 0% / 0.1);
}

.af-nav__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.af-nav__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  text-decoration: none;
}

.af-nav__brand:hover {
  color: hsl(var(--foreground));
}

.af-nav__logo {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  object-fit: contain;
}

.af-nav__desktop {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .af-nav__desktop {
    display: flex;
  }
}

.af-nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground)) !important;
  text-decoration: none !important;
  transition: color 0.2s;
}

.af-nav__link:hover {
  color: hsl(var(--foreground)) !important;
}

.af-nav__theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.af-nav__theme-btn:hover {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}

.af-nav__cta,
.af-nav__cta-mobile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  border: none;
  text-decoration: none !important;
  background: hsl(var(--primary)) !important;
  color: hsl(var(--primary-foreground)) !important;
  box-shadow: none !important;
}

.af-nav__cta:hover,
.af-nav__cta-mobile:hover {
  background: hsl(var(--primary) / 0.9) !important;
  color: hsl(var(--primary-foreground)) !important;
  transform: none;
  filter: none;
}

.af-nav__mobile-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .af-nav__mobile-bar {
    display: none;
  }
}

.af-nav__toggle-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  color: hsl(var(--foreground));
  cursor: pointer;
}

.af-nav__mobile {
  display: none;
  flex-direction: column;
  gap: 1rem;
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--background) / 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 1rem 1.5rem;
}

.af-nav__mobile.is-open {
  display: flex;
}

@media (min-width: 768px) {
  .af-nav__mobile {
    display: none !important;
  }
}

.af-nav__mobile .af-nav__link {
  font-size: 0.875rem;
}

.af-nav__cta-mobile {
  width: 100%;
  border-radius: 9999px;
  margin-top: 0;
}

/* —— Footer —— */
.af-footer {
  border-top: 1px solid hsl(var(--border));
  background: linear-gradient(
    180deg,
    hsl(var(--background)) 0%,
    hsl(var(--secondary) / 0.5) 100%
  );
  margin-top: auto;
}

.af-footer__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 4rem var(--space-page-x) 2.5rem;
}

.af-footer__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .af-footer__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.af-footer__title {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: hsl(var(--foreground));
}

.af-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.af-footer__links a {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground)) !important;
  text-decoration: none !important;
}

.af-footer__links a:hover {
  color: hsl(var(--foreground)) !important;
}

.af-footer__bottom {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid hsl(var(--border));
  text-align: center;
}

.af-footer__copy {
  font-size: 1rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

/* —— Typography —— */
.af-heading-1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  color: hsl(var(--foreground));
}

.af-heading-2 {
  font-size: clamp(1.5rem, 3.5vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  color: hsl(var(--foreground));
}

.af-text-muted {
  color: hsl(var(--muted-foreground));
  font-size: var(--text-lg);
  line-height: 1.6;
}

.af-text-primary {
  color: hsl(var(--primary));
}

.af-gradient-text {
  background: linear-gradient(
    135deg,
    hsl(258 89% 66%) 0%,
    hsl(220 90% 60%) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* —— Cards —— */
.af-card {
  background: var(--gradient-card);
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 6px);
  padding: 2.5rem;
  box-shadow:
    0 4px 24px hsl(258 40% 40% / 0.06),
    0 1px 3px hsl(0 0% 0% / 0.04);
}

.af-card--solid {
  background: var(--gradient-card);
}

.af-card--center {
  text-align: center;
}

.af-card--elevated {
  box-shadow:
    0 8px 40px hsl(258 50% 50% / 0.12),
    0 2px 8px hsl(0 0% 0% / 0.06);
}

/* —— Buttons —— */
.af-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.875rem 1.75rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
  text-decoration: none;
  font-family: inherit;
}

.af-btn--primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: none;
}

.af-btn--primary:hover {
  background: hsl(var(--primary) / 0.9);
  color: hsl(var(--primary-foreground));
  transform: none;
  filter: none;
}

.af-btn--outline {
  background: hsl(var(--background));
  color: hsl(var(--foreground)) !important;
  border: 1px solid hsl(var(--border));
}

.af-btn--outline:hover {
  background: hsl(var(--muted));
  color: hsl(var(--foreground)) !important;
}

.af-btn--ghost {
  background: transparent;
  color: hsl(var(--muted-foreground));
  border: none;
  border-radius: 9999px;
  padding: 0.625rem;
}

.af-btn--ghost:hover {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}

.af-btn--sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
}

.af-btn--lg {
  padding: 1rem 2.25rem;
  font-size: 1.125rem;
}

.af-btn--block {
  width: 100%;
}

.af-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* —— Forms —— */
.af-form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.af-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: hsl(var(--foreground));
}

.af-input,
input.af-input,
textarea.af-input,
select.af-input,
.form-control {
  width: 100%;
  height: 3.25rem;
  padding: 0 1.125rem;
  font-size: 1.0625rem;
  font-family: inherit;
  color: hsl(var(--foreground)) !important;
  background: hsl(var(--card)) !important;
  border: 1px solid hsl(var(--border)) !important;
  border-radius: var(--radius) !important;
  box-shadow: inset 0 1px 2px hsl(0 0% 0% / 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.af-input:focus,
.form-control:focus {
  outline: none !important;
  border-color: hsl(var(--ring)) !important;
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.2) !important;
}

textarea.af-input {
  min-height: 7rem;
  padding: 1rem 1.125rem;
  resize: vertical;
}

/* —— Alerts —— */
.af-alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 1rem;
  margin-bottom: 1.25rem;
  text-align: left;
}

.af-alert--danger,
.alert-danger {
  background: linear-gradient(
    135deg,
    hsl(var(--destructive) / 0.12) 0%,
    hsl(var(--destructive) / 0.06) 100%
  );
  border: 1px solid hsl(var(--destructive) / 0.35);
  color: hsl(var(--destructive));
}

.af-alert--info,
.alert-info {
  background: linear-gradient(
    135deg,
    hsl(var(--primary) / 0.15) 0%,
    hsl(var(--primary) / 0.06) 100%
  );
  border: 1px solid hsl(var(--primary) / 0.3);
  color: hsl(258 70% 45%);
}

html.dark .af-alert--info {
  color: hsl(var(--primary));
}

/* —— Auth layout —— */
.af-auth {
  position: relative;
  overflow-x: clip;
}

.af-auth__glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(120px);
}

.af-auth__glow--1 {
  top: -15%;
  right: -5%;
  width: min(55vw, 560px);
  height: min(55vw, 560px);
  background: radial-gradient(
    circle,
    hsl(258 89% 66% / 0.35) 0%,
    hsl(258 89% 66% / 0) 70%
  );
}

.af-auth__glow--2 {
  bottom: -20%;
  left: -10%;
  width: min(45vw, 480px);
  height: min(45vw, 480px);
  background: radial-gradient(
    circle,
    hsl(220 80% 70% / 0.2) 0%,
    transparent 70%
  );
}

.af-auth__main {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--af-nav-height) + 1.5rem) 1.5rem 2.5rem;
  position: relative;
  z-index: 1;
  min-height: min-content;
}

.af-auth__card {
  width: 100%;
  max-width: 22rem;
}

.af-auth__card.af-card {
  padding: 1.5rem 1.75rem;
}

.af-auth__card .af-heading-2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.af-auth__card .af-text-muted {
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
}

.af-auth__card .af-form-group {
  margin-bottom: 1rem;
}

.af-auth__card .af-label {
  font-size: 0.875rem;
  margin-bottom: 0.375rem;
}

.af-auth__card .af-input {
  height: 2.75rem;
  font-size: 0.9375rem;
  padding: 0 0.875rem;
}

.af-auth__card .af-btn--lg {
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
}

.af-auth__card .af-btn-group {
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.af-auth__logo {
  width: min(6.5rem, 36vw);
  height: auto;
  margin: 0 auto 1rem;
  display: block;
}

.af-auth__divider {
  border: none;
  border-top: 1px solid hsl(var(--border));
  margin: 1.25rem 0;
}

/* —— App portal (logged-in dashboard) —— */
:root {
  --af-app-bar-height: 3.5rem;
  --af-app-sidebar-width: 15rem;
  --af-app-content-max: 56rem;
  --af-app-content-half: 28rem;
}

.af-page--app {
  background: hsl(var(--background));
  background-image: none;
}

.af-page--app .af-main {
  padding: 0;
  max-width: none;
}

/* Top bar */
.af-app-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: var(--af-app-bar-height);
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--card) / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.af-app-bar__inner {
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.af-app-bar__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  text-decoration: none;
}

.af-app-bar__brand:hover {
  color: hsl(var(--foreground));
}

.af-app-bar__logo {
  width: 1.5rem;
  height: 1.5rem;
}

.af-app-bar__badge {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.12);
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
}

.af-app-bar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.af-app-bar__user {
  display: none;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .af-app-bar__user {
    display: block;
  }
}

/* Shell: sidebar + main */
.af-page--app .af-app {
  padding-top: var(--af-nav-height);
}

.af-app {
  display: block;
  min-height: 100vh;
  padding-top: var(--af-app-bar-height);
}

.af-app-sidebar {
  display: none;
  width: var(--af-app-sidebar-width);
  border-right: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  padding: 1.25rem 0.75rem;
  overflow-y: auto;
  flex-direction: column;
}

@media (min-width: 900px) {
  .af-app-sidebar {
    display: flex;
    position: fixed;
    top: var(--af-nav-height);
    left: 0;
    bottom: 0;
    z-index: 20;
  }
}

.af-app-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.af-app-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.af-app-sidebar__link:hover {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}

.af-app-sidebar__link.is-active {
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
  font-weight: 600;
}

.af-app-sidebar__link--muted {
  font-size: 0.8125rem;
}

.af-app-sidebar__footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid hsl(var(--border));
}

/* Main content — column centered on the viewport (sidebar floats; does not shift center) */
.af-app-main {
  width: 100%;
  padding: 1.5rem 0 3rem;
  box-sizing: border-box;
}

.af-app-main__content {
  width: 100%;
  max-width: var(--af-app-content-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .af-app-main {
    padding-top: 2rem;
    padding-bottom: 3rem;
  }

  .af-app-main__content {
    /* Equal inset from viewport edges places the 56rem column at true page center */
    width: min(
      var(--af-app-content-max),
      calc(100vw - 2 * max(var(--af-app-sidebar-width), calc(50vw - var(--af-app-content-half))))
    );
    margin-left: max(var(--af-app-sidebar-width), calc(50vw - var(--af-app-content-half)));
    margin-right: max(var(--af-app-sidebar-width), calc(50vw - var(--af-app-content-half)));
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

.af-app-welcome {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid hsl(var(--border));
}

.af-app-welcome__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  letter-spacing: 0.02em;
}

.af-app-welcome__name {
  margin: 0 0 0.35rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: hsl(var(--foreground));
}

.af-app-welcome__email {
  margin: 0;
  font-size: 1rem;
  color: hsl(var(--muted-foreground));
}

/* Stats row */
.af-app-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

@media (max-width: 640px) {
  .af-app-stats {
    grid-template-columns: 1fr;
  }
}

.af-app-stat {
  padding: 1rem 1.125rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
}

.af-app-stat__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.35rem;
}

.af-app-stat__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  line-height: 1.2;
}

.af-app-stat__value--sm {
  font-size: 0.875rem;
  font-weight: 600;
  word-break: break-all;
}

/* Panels */
.af-app-panel {
  margin-bottom: 1.5rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
}

.af-app-panel__head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.35);
}

.af-app-panel__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
  color: hsl(var(--foreground));
}

.af-app-panel__desc {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

.af-leash-fact {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: hsl(var(--muted-foreground));
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border-left: 3px solid hsl(var(--primary));
  background: hsl(var(--primary) / 0.06);
}

.af-leash-fact strong {
  color: hsl(var(--foreground));
}

.af-leash-fact em {
  font-style: normal;
  font-weight: 600;
  color: hsl(var(--primary));
}

.af-app-panel__body {
  padding: 1rem 1.25rem 1.25rem;
}

.af-app-panel--plans {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  box-shadow: none;
}

.af-app-panel--plans .af-app-panel__body {
  padding: 0 1.25rem 1.25rem;
}

.af-app-panel__head--compact {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: none;
  background: transparent;
}

.af-plan-cards--single {
  grid-template-columns: minmax(0, 22rem);
  justify-content: center;
}

.af-plan-cards--duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 960px) {
  .af-plan-cards--duo {
    grid-template-columns: 1fr;
  }
}

/* Current tier highlight */
.af-tier-current {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.af-tier-ladder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0.25rem 0;
}

.af-tier-ladder__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  max-width: 8rem;
  position: relative;
  opacity: 0.45;
}

.af-tier-ladder__step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 0.55rem;
  left: calc(50% + 0.55rem);
  width: calc(100% - 1.1rem);
  height: 2px;
  background: hsl(var(--border));
  z-index: 0;
}

.af-tier-ladder__step.is-unlocked,
.af-tier-ladder__step.is-current {
  opacity: 1;
}

.af-tier-ladder__step.is-unlocked .af-tier-ladder__dot {
  background: hsl(var(--primary) / 0.25);
  border-color: hsl(var(--primary) / 0.5);
}

.af-tier-ladder__step.is-current .af-tier-ladder__dot {
  background: hsl(var(--primary));
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 4px hsl(var(--primary) / 0.18);
}

.af-tier-ladder__dot {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 9999px;
  border: 2px solid hsl(var(--border));
  background: hsl(var(--background));
  position: relative;
  z-index: 1;
}

.af-tier-ladder__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  color: hsl(var(--muted-foreground));
}

.af-tier-ladder__step.is-current .af-tier-ladder__label {
  color: hsl(var(--foreground));
}

.af-tier-highlight {
  padding: 1.35rem 1.35rem 1.15rem;
  border-radius: calc(var(--radius) + 6px);
  border: 2px solid hsl(var(--primary) / 0.35);
  background: linear-gradient(
    145deg,
    hsl(var(--primary) / 0.08) 0%,
    hsl(var(--card)) 50%,
    hsl(var(--card)) 100%
  );
  box-shadow: 0 12px 40px hsl(258 50% 50% / 0.08);
}

.af-tier-highlight__header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.af-tier-highlight__icon {
  flex-shrink: 0;
  margin-bottom: 0;
}

.af-tier-highlight__badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary));
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  margin-bottom: 0.35rem;
}

.af-tier-highlight__name {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.25rem;
}

.af-tier-highlight__tagline {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
  line-height: 1.5;
}

.af-tier-benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.af-tier-benefits li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: hsl(var(--foreground));
}

.af-tier-benefits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: hsl(var(--primary));
}

.af-tier-highlight__actions {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid hsl(var(--border) / 0.85);
}

.af-plan-cards-wrap {
  width: 100%;
}

.af-app-panel--plans .af-plan-cards {
  gap: 1.5rem;
}

.af-app-panel--plans .af-plan-card {
  min-height: 18rem;
}

.af-app-empty {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
  padding: 0.5rem 0;
}

/* Platform download buttons */
.af-download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .af-download-grid {
    grid-template-columns: 1fr;
  }
}

.af-download-platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--background));
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

a.af-download-platform:hover {
  border-color: hsl(var(--primary) / 0.5);
  background: hsl(var(--primary) / 0.06);
  box-shadow: 0 4px 16px hsl(258 50% 50% / 0.1);
  color: inherit;
}

.af-download-platform.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: hsl(var(--muted) / 0.25);
}

.af-download-platform__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}

.af-download-platform.is-disabled .af-download-platform__icon {
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

.af-download-platform__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.af-download-platform__status {
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--primary));
}

.af-download-platform.is-disabled .af-download-platform__status {
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}

.af-mt-2 {
  margin-top: 0.75rem;
}

/* Resource rows */
.af-app-resource-row {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.af-app-resource {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  background: hsl(var(--background));
  transition: border-color 0.15s, background 0.15s;
}

.af-app-resource:hover {
  border-color: hsl(var(--primary) / 0.4);
  background: hsl(var(--muted) / 0.4);
  color: inherit;
}

.af-app-resource--secondary {
  background: hsl(var(--muted) / 0.25);
}

.af-app-resource__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}

.af-app-resource__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.af-app-resource__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.af-app-resource__hint {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

.af-app-resource__action {
  font-size: 0.8125rem;
  font-weight: 600;
  color: hsl(var(--primary));
}

/* Status pills */
.af-status-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

.af-status-pill--sm {
  font-size: 0.6875rem;
  padding: 0.2rem 0.5rem;
}

.af-status-pill--success {
  background: hsl(var(--success) / 0.15);
  color: hsl(142 55% 32%);
}

html.dark .af-status-pill--success {
  color: hsl(var(--success));
}

.af-status-pill--warning {
  background: hsl(38 92% 50% / 0.15);
  color: hsl(32 80% 38%);
}

.af-status-pill--neutral {
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

/* Tags */
.af-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  background: hsl(var(--secondary));
  color: hsl(var(--muted-foreground));
}

.af-tag--core {
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
}

/* Portal tables */
.af-table--portal th {
  font-size: 0.75rem;
}

.af-table--portal td {
  font-size: 0.875rem;
  vertical-align: middle;
}

.af-table__desc {
  color: hsl(var(--muted-foreground));
  max-width: 20rem;
}

.af-table__col-action {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}

.af-table--catalog tbody tr:hover {
  background: hsl(var(--muted) / 0.35);
}

/* Packages: Love It featured + standalone leashes */
.af-packages-layout {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.af-plan-featured {
  padding: 1.5rem 1.5rem 1.25rem;
  border: 2px solid hsl(var(--primary) / 0.35);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(
    145deg,
    hsl(var(--primary) / 0.08) 0%,
    hsl(var(--card)) 45%,
    hsl(var(--card)) 100%
  );
  box-shadow: 0 8px 32px hsl(258 50% 50% / 0.1);
}

.af-plan-featured__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
}

.af-plan-featured__badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary));
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
}

.af-plan-featured__title {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
  color: hsl(var(--foreground));
}

.af-plan-featured__tagline {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--primary));
  margin: 0;
}

.af-plan-featured__price {
  font-size: 1.125rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin: 0.35rem 0 0;
}

.af-plan-featured__desc {
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.55;
  margin: 0 0 1.25rem;
  max-width: 42rem;
}

.af-plan-featured__includes-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.5rem;
}

.af-plan-featured__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.af-plan-featured__list li {
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
}

/* Standalone leashes — compact list */
.af-packages-standalone {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid hsl(var(--border));
}

.af-packages-standalone__title {
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: hsl(var(--foreground));
}

.af-packages-standalone__desc {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  margin: 0 0 1.25rem;
  line-height: 1.45;
}

/* Individual plan cards — Normie, Curious, Wizard */
.af-plan-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (max-width: 960px) {
  .af-plan-cards {
    grid-template-columns: 1fr;
  }
}

.af-plan-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.35rem 1.35rem 1.15rem;
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid hsl(var(--border));
  background: var(--gradient-card);
  box-shadow:
    0 1px 2px hsl(260 30% 20% / 0.04),
    0 12px 40px hsl(258 50% 50% / 0.06);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.af-plan-card:hover {
  border-color: hsl(var(--primary) / 0.45);
  box-shadow:
    0 4px 12px hsl(258 50% 50% / 0.1),
    0 20px 48px hsl(258 50% 50% / 0.12);
  transform: translateY(-2px);
}

.af-plan-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: calc(var(--radius) + 2px);
  margin-bottom: 1.1rem;
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
}

.af-plan-card--normie .af-plan-card__icon {
  background: linear-gradient(145deg, hsl(210 85% 55% / 0.18), hsl(258 89% 66% / 0.12));
  color: hsl(210 75% 42%);
}

.af-plan-card--curious .af-plan-card__icon {
  background: linear-gradient(145deg, hsl(160 55% 42% / 0.16), hsl(258 89% 66% / 0.1));
  color: hsl(160 45% 32%);
}

.af-plan-card--wizard .af-plan-card__icon {
  background: linear-gradient(145deg, hsl(280 70% 55% / 0.18), hsl(258 89% 66% / 0.12));
  color: hsl(280 55% 48%);
}

html.dark .af-plan-card--normie .af-plan-card__icon {
  color: hsl(210 80% 72%);
}

html.dark .af-plan-card--curious .af-plan-card__icon {
  color: hsl(160 50% 62%);
}

html.dark .af-plan-card--wizard .af-plan-card__icon {
  color: hsl(280 65% 75%);
}

.af-plan-card__svg {
  width: 1.65rem;
  height: 1.65rem;
}

.af-plan-card__body {
  flex: 1;
  min-height: 0;
}

.af-plan-card__name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
  color: hsl(var(--foreground));
}

.af-plan-card__price {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
  color: hsl(var(--foreground));
}

.af-plan-card__price--muted {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}

.af-plan-card__desc {
  font-size: 0.875rem;
  line-height: 1.55;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

.af-plan-card__footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid hsl(var(--border) / 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
}

.af-plan-card__cta {
  width: 100%;
}

.af-leash-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--background));
  overflow: hidden;
}

.af-leash-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid hsl(var(--border));
}

.af-leash-list__item:last-child {
  border-bottom: none;
}

.af-leash-list__item:hover {
  background: hsl(var(--muted) / 0.35);
}

.af-leash-list__info {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.4;
}

.af-leash-list__name {
  font-weight: 600;
  color: hsl(var(--foreground));
}

.af-leash-list__sep {
  margin: 0 0.35rem;
  color: hsl(var(--border));
}

.af-leash-list__desc {
  color: hsl(var(--muted-foreground));
}

@media (max-width: 520px) {
  .af-leash-list__info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
  }

  .af-leash-list__sep {
    display: none;
  }
}

.af-leash-list__link {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: hsl(var(--primary)) !important;
  text-decoration: none !important;
  padding: 0.35rem 0;
}

.af-leash-list__link:hover {
  text-decoration: underline !important;
}

@media (max-width: 640px) {
  .af-plan-featured__header .af-btn--lg {
    width: 100%;
  }
}

/* Mobile section nav */
.af-app-mobile-nav {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 900px) {
  .af-app-mobile-nav {
    display: none;
  }
}

.af-app-mobile-nav a {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--muted-foreground)) !important;
  text-decoration: none !important;
}

.af-app-mobile-nav a:hover {
  border-color: hsl(var(--primary) / 0.4);
  color: hsl(var(--foreground)) !important;
}

/* Legacy marketing dashboard (unused) */
.af-dashboard {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

/* Hero v2 — split layout like AFWebsite */
.af-dashboard-hero-v2 {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0 0.5rem;
}

@media (min-width: 768px) {
  .af-dashboard-hero-v2 {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    padding: 2.5rem 0 1rem;
  }
}

.af-dashboard-hero-v2__glow {
  position: absolute;
  top: -20%;
  left: -10%;
  width: min(70vw, 520px);
  height: min(70vw, 520px);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    hsl(258 89% 66% / 0.22) 0%,
    hsl(258 89% 66% / 0) 70%
  );
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.af-dashboard-hero-v2__content {
  position: relative;
  z-index: 1;
}

.af-dashboard-hero-v2__eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: hsl(var(--primary));
  margin: 0 0 0.75rem;
}

.af-dashboard-hero-v2__title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 1rem;
  color: hsl(var(--foreground));
}

.af-dashboard-hero-v2__title .af-gradient-text {
  display: inline;
  word-break: break-all;
}

.af-dashboard-hero-v2__subtitle {
  font-size: var(--text-lg);
  color: hsl(var(--muted-foreground));
  max-width: 32rem;
  margin: 0;
  line-height: 1.6;
}

.af-dashboard-hero-v2__visual {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.af-dashboard-hero-v2__fox {
  width: min(100%, 18rem);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 16px 40px hsl(258 50% 50% / 0.25));
  animation: af-float 5s ease-in-out infinite;
}

@keyframes af-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Section headers */
.af-dashboard-section__header {
  margin-bottom: 1.5rem;
}

.af-dashboard-section__header--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.af-dashboard-section__title {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  color: hsl(var(--foreground));
}

.af-dashboard-section__lead {
  font-size: 1rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

/* Quick actions — bento tiles */
.af-quick-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .af-quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

.af-quick-action {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  text-decoration: none;
  color: inherit;
  background: hsl(var(--card) / 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 6px);
  box-shadow:
    0 4px 24px hsl(258 40% 40% / 0.06),
    inset 0 1px 0 hsl(0 0% 100% / 0.6);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}

html.dark .af-quick-action {
  background: hsl(var(--card) / 0.5);
  box-shadow: 0 4px 24px hsl(0 0% 0% / 0.2);
}

.af-quick-action::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.25s;
}

.af-quick-action:hover {
  transform: translateY(-4px);
  border-color: hsl(var(--primary) / 0.45);
  box-shadow: 0 12px 40px hsl(258 50% 50% / 0.14);
  color: inherit;
}

.af-quick-action:hover::before {
  opacity: 0.04;
}

.af-quick-action__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: calc(var(--radius) + 2px);
  background: linear-gradient(
    145deg,
    hsl(var(--primary) / 0.15) 0%,
    hsl(var(--secondary)) 100%
  );
  color: hsl(var(--primary));
  position: relative;
  z-index: 1;
  transition: background 0.2s, color 0.2s;
}

.af-quick-action:hover .af-quick-action__icon {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.af-quick-action__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  position: relative;
  z-index: 1;
}

.af-quick-action__label {
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.af-quick-action__desc {
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
}

.af-quick-action__arrow {
  flex-shrink: 0;
  color: hsl(var(--muted-foreground));
  opacity: 0.6;
  transition: transform 0.2s, opacity 0.2s, color 0.2s;
  position: relative;
  z-index: 1;
}

.af-quick-action:hover .af-quick-action__arrow {
  transform: translateX(4px);
  opacity: 1;
  color: hsl(var(--primary));
}

/* Package grid */
.af-package-grid {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.af-package-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--gradient-card);
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 2px 12px hsl(258 40% 40% / 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.af-package-card:hover {
  border-color: hsl(var(--primary) / 0.35);
  box-shadow: 0 8px 28px hsl(258 50% 50% / 0.1);
}

.af-package-card__info {
  flex: 1;
  min-width: 12rem;
}

.af-package-card__badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  margin-bottom: 0.4rem;
}

.af-package-card__name {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: hsl(var(--foreground));
}

.af-package-card__desc {
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
  line-height: 1.45;
}

/* Legacy dashboard (other pages may still reference) */
.af-dashboard-hero {
  position: relative;
  text-align: center;
  padding: 2rem 0 3rem;
  margin-top: -0.75rem;
  margin-bottom: 2rem;
}

.af-welcome {
  font-size: var(--text-xl);
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.5rem;
}

.af-welcome span {
  color: hsl(var(--foreground));
  font-weight: 600;
}

/* —— Hero band (marketplace) —— */
.af-hero {
  padding: 8rem var(--space-page-x) 4rem;
  text-align: center;
  background: var(--gradient-hero-band);
  border-bottom: 1px solid hsl(var(--border));
  position: relative;
}

.af-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, 600px);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    hsl(var(--primary) / 0.4) 50%,
    transparent 100%
  );
}

.af-hero__title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  background: linear-gradient(
    135deg,
    hsl(var(--foreground)) 0%,
    hsl(var(--primary)) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html.dark .af-hero__title {
  background: linear-gradient(
    135deg,
    hsl(0 0% 98%) 0%,
    hsl(var(--primary)) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
}

.af-hero__eyebrow {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.5rem;
}

.af-hero__subtitle {
  font-size: var(--text-lg);
  color: hsl(var(--muted-foreground));
  max-width: 40rem;
  margin: 0 auto;
  line-height: 1.6;
}

/* —— Tables —— */
.af-table-wrap {
  overflow-x: auto;
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) + 6px);
  background: var(--gradient-card);
  box-shadow: 0 4px 20px hsl(0 0% 0% / 0.04);
}

.af-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.af-table th,
.af-table td {
  padding: 1.125rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid hsl(var(--border));
}

.af-table th {
  font-weight: 600;
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(var(--muted-foreground));
  background: linear-gradient(
    180deg,
    hsl(var(--secondary) / 0.8) 0%,
    hsl(var(--muted) / 0.5) 100%
  );
}

.af-admin-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

.af-admin-badge--admin {
  background: hsl(var(--primary) / 0.15);
  color: hsl(var(--primary));
}

.af-table-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
  text-decoration: none;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
}

.af-table-sort:hover {
  color: hsl(var(--primary));
}

.af-table-sort.is-active {
  color: hsl(var(--foreground));
}

.af-table-sort__icon {
  font-size: 0.65rem;
  line-height: 1;
  opacity: 0.85;
}

/* —— Marketplace tiles —— */
body {
  background: var(--gradient-page) !important;
  background-color: hsl(var(--background)) !important;
}

.tilesWrap {
  margin: 2rem auto 4rem !important;
}

.tilesWrap li {
  background: var(--gradient-card) !important;
  border: 1px solid hsl(var(--border)) !important;
  border-radius: calc(var(--radius) + 8px) !important;
  font-family: inherit !important;
  min-width: 320px !important;
  min-height: 320px !important;
  padding: 2.5rem 2rem 2rem !important;
  box-shadow: 0 8px 32px hsl(258 40% 40% / 0.08) !important;
}

.tilesWrap li h2 {
  font-size: 4rem !important;
  opacity: 0.15 !important;
}

.tilesWrap li h1,
.tilesWrap li h3 {
  color: hsl(var(--foreground)) !important;
  font-size: 1.375rem !important;
}

.tilesWrap li p {
  color: hsl(var(--muted-foreground)) !important;
  font-size: 1.0625rem !important;
  line-height: 1.5 !important;
}

.tilesWrap li button,
.tilesWrap li .af-btn {
  background: hsl(var(--primary)) !important;
  border: none !important;
  border-radius: 9999px !important;
  color: hsl(var(--primary-foreground)) !important;
  font-size: 1rem !important;
  padding: 0.75rem 1.5rem !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.newTile {
  background: var(--gradient-card) !important;
  border: 1px solid hsl(var(--border)) !important;
  border-radius: calc(var(--radius) + 4px) !important;
}

.applicationLabel {
  color: hsl(var(--foreground)) !important;
  font-weight: 600 !important;
  font-size: 1.125rem !important;
}

/* Bootstrap overrides */
.navbar {
  background: transparent !important;
  border: none !important;
  margin-bottom: 0 !important;
}

.btn-primary,
.login-button,
.login-button-af {
  background: hsl(var(--primary)) !important;
  border: none !important;
  border-radius: 9999px !important;
  font-size: 1.0625rem !important;
  padding: 0.75rem 1.5rem !important;
  box-shadow: none !important;
}

.panel {
  background: var(--gradient-card) !important;
  border-color: hsl(var(--border)) !important;
  color: hsl(var(--foreground));
  border-radius: calc(var(--radius) + 4px) !important;
}

/* Utilities */
.af-text-center { text-align: center; }
.af-mb-1 { margin-bottom: 0.5rem; }
.af-mb-2 { margin-bottom: 1rem; }
.af-mb-3 { margin-bottom: 1.5rem; }
.af-mb-4 { margin-bottom: 2rem; }
.af-mt-4 { margin-top: 2rem; }

/* Legacy Yeti form */
.centerColumn,
.centerColumnContent {
  color: hsl(var(--foreground));
}

.titleText {
  color: hsl(var(--foreground)) !important;
  font-size: 2.25rem !important;
  font-weight: 800 !important;
}

.titleSubText,
.formHeader {
  color: hsl(var(--muted-foreground)) !important;
  font-size: 1.125rem !important;
}

.circle {
  border-color: hsl(var(--primary)) !important;
  background: linear-gradient(
    145deg,
    hsl(var(--secondary)) 0%,
    hsl(var(--muted)) 100%
  ) !important;
}

/* In-portal Square checkout */
.af-leash-status {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.af-leash-status--included {
  color: hsl(var(--primary));
}

.af-leash-status--subscribed {
  color: hsl(var(--success));
}

.af-leash-list__link--btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

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

.af-checkout-modal[hidden] {
  display: none !important;
}

.af-checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.af-checkout-modal__backdrop {
  position: absolute;
  inset: 0;
  background: hsl(0 0% 0% / 0.55);
}

.af-checkout-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 28rem;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid hsl(var(--border));
  padding: 1.5rem;
  box-shadow: 0 24px 48px hsl(0 0% 0% / 0.2);
}

.af-checkout-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
}

.af-checkout-modal__title {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.af-checkout-modal__product {
  margin: 0 0 0.25rem;
  font-weight: 600;
}

.af-checkout-modal__price {
  margin: 0 0 0.35rem;
  font-size: 1.375rem;
  font-weight: 800;
  color: hsl(var(--foreground));
  letter-spacing: -0.02em;
}

.af-leash-list__price {
  font-size: 0.8125rem;
  font-weight: 700;
  color: hsl(var(--primary));
  white-space: nowrap;
}

.af-checkout-modal__hint {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
}

.af-checkout-modal__error {
  margin-bottom: 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  background: hsl(0 70% 50% / 0.12);
  color: hsl(0 70% 40%);
  font-size: 0.875rem;
}

.af-checkout-modal__success {
  margin-bottom: 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  background: hsl(145 50% 40% / 0.12);
  color: hsl(145 45% 32%);
  font-size: 0.875rem;
}

.af-checkout-card {
  min-height: 5rem;
  margin-bottom: 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 0.75rem;
}

.af-checkout-modal__submit {
  width: 100%;
}

.af-checkout-modal__actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.75rem;
}

@media (min-width: 400px) {
  .af-checkout-modal__actions {
    flex-direction: row;
  }

  .af-checkout-modal__actions .af-btn {
    flex: 1;
  }
}
