/* =====================================================
   ALBERTINO ROSSI — VERSION 2 DESIGN SYSTEM

   Visual direction:
   - Monochrome platform identity
   - Calm spacing and strong typographic hierarchy
   - Inset, capsule-shaped controls
   - Minimal shadows and restrained colour
===================================================== */

:root {
  --ink: #050505;
  --muted: #686868;
  --paper: #ffffff;
  --soft: #f5f5f7;
  --brand: #050505;
  --brand-dark: #282828;
  --accent: #050505;
  --line: #dedede;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.1);
}

body {
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  letter-spacing: -0.01em;
}

h1,
h2,
h3 {
  letter-spacing: -0.045em;
}

.eyebrow {
  color: var(--ink);
  letter-spacing: 0.09em;
}

.site-header {
  height: 82px;
}

.site-header nav {
  border-radius: 22px;
}

.site-header nav a:not(.button) {
  color: #444;
}

.site-header nav a.active {
  color: #000;
}

.button {
  min-height: 46px;
  border-radius: 999px;
  background: #050505;
  color: #fff;
  padding: 12px 22px;
  box-shadow: none;
}

.button:hover {
  background: #292929;
}

.button-ghost {
  border: 0;
  background: #f1f1f3;
  color: #050505;
}

.button-ghost:hover {
  background: #e5e5e8;
}

.card,
.stat,
.dash-card {
  border: 1px solid #e3e3e3;
  border-radius: 24px;
  box-shadow: none;
}

.hero {
  min-height: calc(100vh - 82px);
  overflow: visible;
  gap: 28px;
}

.hero > div:first-child {
  position: relative;
  z-index: 3;
}

.hero h1 {
  max-width: 720px;
}

.trust {
  color: #646464;
}

.feature-icon,
.tag,
.product-card .tag,
.pills span {
  background: #f2f2f4;
  color: #111;
}

.feature.featured,
.cta {
  background: #050505;
}

.feature.featured .feature-icon {
  color: #fff;
  background: rgba(255, 255, 255, .12);
}

.feature.featured a {
  color: #fff;
}

.feature a,
.product-card a,
.lesson a,
.text-button {
  color: #111;
}

.popular {
  border-color: #050505;
}

.popular-label {
  background: #050505;
}

/* =====================================================
   HOMEPAGE IPHONE DASHBOARD

   These measurements are intentionally copied from the
   proven PaySure frame implementation. The frame image is
   1024 × 1536, which requires a locked 2:3 wrapper.
===================================================== */

.ar-phone-stage {
  width: 100%;
  display: grid;
  place-items: center;
  padding: 20px 0 34px;
  perspective: 1300px;
}

.ar-phone {
  position: relative;
  width: min(92vw, 390px);
  max-width: 390px;
  aspect-ratio: 2 / 3;
  transform: rotate(4.5deg) rotateY(-5deg);
  transform-origin: center;
  filter: drop-shadow(0 28px 28px rgba(0, 0, 0, 0.16));
}

.ar-phone-screen {
  position: absolute;
  top: 8.3%;
  left: 18.45%;
  width: 63.1%;
  height: 87.9%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 32px;
  background: #f5f5f7;
  color: #050505;
}

.ar-iphone-frame {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

/* iOS-style status area */
.ar-ios-status {
  position: absolute;
  top: 4.4%;
  left: 18.45%;
  z-index: 7;
  width: 63.1%;
  height: 3.4%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 66px minmax(0, 1fr);
  align-items: center;
  padding: 0 17px;
  background: transparent;
  color: #050505;
  font-size: 9px;
  font-weight: 800;
  pointer-events: none;
}

.ar-ios-time {
  line-height: 1;
  justify-self: start;
}

.ar-island-space {
  width: 66px;
  height: 18px;
}

.ar-status-icons {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 5px;
  transform: scale(.88);
  transform-origin: right center;
}

.ar-signal {
  height: 10px;
  display: flex;
  align-items: flex-end;
  gap: 1.5px;
}

.ar-signal i {
  width: 2px;
  display: block;
  border-radius: 2px;
  background: #050505;
}

.ar-signal i:nth-child(1) { height: 3px; }
.ar-signal i:nth-child(2) { height: 5px; }
.ar-signal i:nth-child(3) { height: 7px; }
.ar-signal i:nth-child(4) { height: 9px; }

.ar-wifi {
  display: inline-block;
  font-size: 10px;
  transform: rotate(45deg);
}

.ar-battery {
  position: relative;
  width: 19px;
  height: 9px;
  padding: 1px;
  border: 1.5px solid #050505;
  border-radius: 2px;
}

.ar-battery::after {
  content: "";
  position: absolute;
  top: 2px;
  right: -3px;
  width: 2px;
  height: 4px;
  border-radius: 0 2px 2px 0;
  background: #050505;
}

.ar-battery i {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: 1px;
  background: #050505;
}

/* Mobile dashboard header — matches the real PWA overview hierarchy. */
.ar-mobile-overview-header {
  min-height: 82px;
  flex: 0 0 82px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 15px 15px 12px;
  border-bottom: 1px solid #ececef;
  background: #fff;
}

.ar-mobile-overview-header > div {
  display: grid;
  justify-items: start;
  line-height: 1.08;
}

.ar-mobile-overview-header p {
  margin: 0 0 8px;
  color: #666;
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: .06em;
}

.ar-mobile-overview-header span {
  color: #707070;
  font-size: 9px;
}

.ar-mobile-overview-header strong {
  margin-top: 2px;
  font-size: 18px;
  letter-spacing: -.045em;
}

.ar-mobile-overview-header button {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  display: grid;
  place-items: center;
  margin-bottom: 1px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: #050505;
  color: #fff;
  font-size: 17px;
}

/* Dashboard preview content */
.ar-mobile-header {
  height: 49px;
  flex: 0 0 49px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border-bottom: 1px solid #ececef;
  background: #fff;
}

.ar-mobile-header span:first-child {
  display: grid;
  line-height: 1.1;
}

.ar-mobile-header small {
  color: #777;
  font-size: 7.5px;
}

.ar-mobile-header strong {
  font-size: 13px;
}

.ar-mobile-avatar {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #050505;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
}

.ar-mobile-dashboard {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 11px 14px;
  background: #f5f5f7;
}

.ar-mobile-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.ar-mobile-card-grid article {
  min-width: 0;
  min-height: 72px;
  display: grid;
  align-content: space-between;
  padding: 10px;
  border: 1px solid #e5e5e7;
  border-radius: 14px;
  background: #fff;
}

.ar-mobile-card-grid small,
.ar-mobile-card-grid span,
.ar-mobile-order small {
  color: #737373;
  font-size: 7px;
  line-height: 1.15;
}

.ar-mobile-card-grid strong {
  overflow: hidden;
  font-size: 16px;
  line-height: 1;
  letter-spacing: -.045em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ar-mobile-recent {
  margin-top: 8px;
  padding: 9px 10px 4px;
  border: 1px solid #e5e5e7;
  border-radius: 14px;
  background: #fff;
}

.ar-mobile-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 4px;
}

.ar-mobile-section-title h3 {
  margin: 0;
  font-size: 10px;
  letter-spacing: -.025em;
}

.ar-mobile-section-title > span {
  font-size: 7px;
  font-weight: 700;
}

.ar-mobile-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 0;
  border-top: 1px solid #eeeeef;
  font-size: 8px;
}

.ar-mobile-order > span {
  min-width: 0;
  display: grid;
}

.ar-mobile-order b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ar-mobile-order > strong {
  flex: 0 0 auto;
  font-size: 8px;
}

.ar-mobile-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ar-mobile-intro p {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.ar-mobile-intro button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #050505;
  color: #fff;
  font-size: 13px;
}

.ar-mobile-total,
.ar-mobile-stats article,
.ar-mobile-list {
  border: 1px solid #e5e5e7;
  background: #fff;
}

.ar-mobile-total {
  display: grid;
  padding: 14px;
  border-radius: 17px;
}

.ar-mobile-total small,
.ar-mobile-stats small,
.ar-mobile-list small {
  color: #737373;
  font-size: 7.5px;
}

.ar-mobile-total strong {
  margin: 2px 0;
  font-size: 24px;
  letter-spacing: -.06em;
}

.ar-mobile-total span,
.ar-mobile-stats span {
  font-size: 7px;
  color: #777;
}

.ar-mobile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 7px;
}

.ar-mobile-stats article {
  display: grid;
  padding: 10px;
  border-radius: 14px;
}

.ar-mobile-stats strong {
  font-size: 18px;
}

.ar-mobile-list {
  margin-top: 7px;
  padding: 4px 10px;
  border-radius: 14px;
}

.ar-mobile-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid #eeeeef;
  font-size: 8.5px;
}

.ar-mobile-list > div:last-child {
  border-bottom: 0;
}

.ar-mobile-list span {
  display: grid;
}

.ar-mobile-nav {
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  padding: 5px 10px 10px;
  border-top: 1px solid #ececef;
  background: rgba(255, 255, 255, .96);
}

.ar-mobile-nav span {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #838383;
}

.ar-mobile-nav b {
  font-size: 13px;
  line-height: 1;
}

.ar-mobile-nav small {
  font-size: 7px;
  line-height: 1;
}

.ar-mobile-nav .active {
  color: #050505;
}

.ar-home-indicator {
  position: absolute;
  left: 50%;
  bottom: 4px;
  z-index: 4;
  width: 58px;
  height: 3px;
  transform: translateX(-50%);
  border-radius: 99px;
  background: #111;
}

/* =====================================================
   MERCHANT DASHBOARD — MONOCHROME APPLICATION SHELL
===================================================== */

.dashboard-body {
  background: #f5f5f7;
}

.sidebar {
  background: rgba(10, 10, 10, .98);
}

.sidebar .brand img {
  width: 158px;
  height: auto;
  padding: 5px;
  border-radius: 12px;
  background: #fff;
}

.sidebar > .brand {
  transform: translate(10px, 10px);
}

.dash-link {
  border-radius: 14px;
}

.sidebar a.dash-link {
  display: block;
  font-size: .9rem;
}

.dash-link.active,
.dash-link:hover {
  background: #fff;
  color: #050505;
}

.view-store {
  color: #fff;
}

.dash-header {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(18px);
}

.avatar {
  background: #050505;
  color: #fff;
}

.stat,
.dash-card {
  border-color: #e2e2e4;
  border-radius: 22px;
}

.stat b {
  color: #050505;
}

.tag,
.status {
  background: #f0f0f2;
  color: #111;
}

.store-switcher,
.design-form input,
.design-form select,
#product-form input,
#product-form select,
.admin-form input,
.auth-card input {
  min-height: 46px;
  border-color: #d8d8da;
  border-radius: 13px;
  background: #fff;
}

.dash-bottom-nav {
  position: fixed;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: 10px;
  z-index: 35;
  height: 64px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 6px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 22px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .12);
  backdrop-filter: blur(20px);
}

.dash-bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #7a7a7a;
}

.dash-bottom-nav button.active {
  background: #050505;
  color: #fff;
}

.dash-bottom-nav span {
  font-size: 1rem;
  line-height: 1;
}

.dash-bottom-nav small {
  font-size: .68rem;
  line-height: 1;
}

.dashboard-body .dash-main {
  padding-bottom: 100px;
}

dialog {
  border-radius: 26px;
}

/* =====================================================
   CUSTOMER STOREFRONTS
   Merchant colour remains available, but the structure
   now follows the quieter Version 2 control language.
===================================================== */

.store-header {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(18px);
}

.storefront {
  background: #fff;
}

.fashion-art {
  background: linear-gradient(145deg, #f2f2f2, var(--store));
}

.store-product-image {
  background: linear-gradient(145deg, #f2f2f2, var(--store));
}

.store-button,
.add-cart {
  border-radius: 999px;
}

.cart-button span {
  background: var(--store);
}

.cart-drawer {
  border-radius: 28px 0 0 28px;
}

/* =====================================================
   RESPONSIVE BEHAVIOUR
===================================================== */

@media (max-width: 380px) {
  .ar-phone {
    width: min(90vw, 360px);
  }

  .ar-mobile-dashboard {
    padding-inline: 18px;
  }
}

@media (max-width: 799px) {
  .ar-phone {
    transform: none;
  }

}

@media (min-width: 800px) {
  .hero {
    grid-template-columns: minmax(0, 1.12fr) minmax(350px, .88fr);
  }

  .ar-phone-stage {
    justify-items: end;
  }

  .ar-phone {
    width: min(38vw, 440px);
    max-width: 440px;
  }
}

@media (min-width: 980px) {
  .dash-bottom-nav {
    display: none;
  }

  .dashboard-body .dash-main {
    padding-bottom: 45px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}
