:root {
  --brand: #b76e79;
  --brand-dark: #874852;
  --ink: #302c2f;
  --muted: #6f686c;
  --line: #eadde1;
  --surface: #fff;
  --soft: #fff7f8;
  --success: #277a5b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fffafb;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

.btn {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 700;
}

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-dark);
  --bs-btn-hover-border-color: var(--brand-dark);
}

.btn-outline-primary {
  --bs-btn-color: var(--brand-dark);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
}

.form-control,
.form-select {
  border-radius: 8px;
  border-color: var(--line);
}

.form-control:focus,
.form-select:focus,
.btn:focus-visible,
button:focus-visible,
a:focus-visible {
  box-shadow: 0 0 0 .22rem rgba(183, 110, 121, .25);
  border-color: var(--brand);
  outline: 0;
}

.install-page,
.login-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #fff7f8 0%, #f7fbff 100%);
}

.install-shell,
.login-shell {
  max-width: 560px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 16px 50px rgba(66, 45, 55, .08);
}

.login-shell {
  margin: 8vh auto;
}

.login-brand {
  margin-bottom: 24px;
}

.brand-mark {
  display: block;
  width: 48px;
  height: 48px;
  background: var(--brand);
  border-radius: 8px;
  margin-bottom: 12px;
}

.form-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.form-section h2,
.form-section h3 {
  font-size: 1.05rem;
  margin: 0 0 12px;
}

.admin-page {
  background: #f8f3f5;
  padding-bottom: 84px;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 250, 251, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-topbar h1 {
  font-size: 1.05rem;
  margin: 0;
}

.admin-main {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 16px;
}

.admin-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--line);
}

.admin-bottom-nav a {
  display: grid;
  place-items: center;
  min-height: 48px;
  border-radius: 8px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
}

.admin-bottom-nav a.active {
  color: #fff;
  background: var(--brand);
}

.welcome-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.welcome-panel h2 {
  font-size: 1.45rem;
  margin: 0;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.dashboard-stats div,
.quick-grid a {
  background: #fbfdff;
  border: 1px solid #dde9f3;
  border-radius: 8px;
  padding: 14px;
}

.dashboard-stats strong {
  display: block;
  font-size: 1.7rem;
}

.dashboard-stats span {
  color: var(--muted);
}

.subscription-notice {
  display: grid;
  gap: 3px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.subscription-notice strong {
  font-size: .95rem;
}

.subscription-notice span {
  color: var(--muted);
}

.subscription-notice.ok {
  border-color: #cfeedd;
  background: #f3fbf7;
}

.subscription-notice.warn {
  border-color: #f1d7a6;
  background: #fff8e8;
}

.subscription-notice.danger {
  border-color: #efb9b9;
  background: #fff0f0;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.quick-grid a {
  font-weight: 800;
}

.section-title,
.page-heading h2,
.product-section h2 {
  font-size: 1.25rem;
  margin: 0 0 12px;
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.empty-state {
  border: 1px dashed #d9c3ca;
  border-radius: 8px;
  padding: 22px;
  text-align: center;
  background: #fff;
}

.admin-product-row,
.admin-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.admin-product-row img,
.catalog-result img,
.manage-card-head img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--soft);
}

.admin-product-row div,
.admin-list-row div {
  flex: 1;
  min-width: 0;
}

.admin-product-row span,
.admin-list-row span {
  display: block;
  color: var(--muted);
  font-size: .9rem;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.inline-form {
  display: inline-flex;
  margin: 0;
}

.status-pill {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
}

.status-pill.ok {
  color: #0b5138;
  background: #dff4e8;
}

.status-pill.off {
  color: #81423f;
  background: #f8dddd;
}

.flow-step {
  display: none;
}

.flow-step.active {
  display: block;
}

.add-flow h2 {
  font-size: 1.5rem;
}

.search-input {
  min-height: 58px;
}

.catalog-results {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.manual-product-box {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.manual-product-box h3 {
  font-size: 1.1rem;
  margin: 0 0 12px;
}

.field-hint {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.35;
  margin-top: 6px;
}

.conditional-field {
  margin-top: 10px;
}

.conditional-field .form-label {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 800;
}

.image-library-filters {
  margin: 0 0 10px;
}

.image-library-grid,
.image-library-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  gap: 10px;
}

.image-library-grid {
  max-height: 390px;
  overflow: auto;
  padding-right: 4px;
}

.image-library-card {
  display: grid;
  gap: 6px;
  width: 100%;
  min-width: 0;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  background: #fff;
  text-align: left;
}

.image-library-card.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(183, 110, 121, .18);
}

.image-library-card img,
.image-library-admin-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  background: var(--soft);
}

.image-library-card span,
.image-library-admin-card strong {
  font-weight: 900;
  line-height: 1.2;
}

.image-library-card small,
.image-library-admin-card span {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.25;
}

.image-library-admin-card {
  display: grid;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.catalog-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.catalog-filter-grid label {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
}

.catalog-result {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  text-align: left;
}

.catalog-result small,
.selected-product span {
  display: block;
  color: var(--muted);
}

.selected-product {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.selected-product img {
  width: 120px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

.qty-control {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.qty-control.small {
  grid-template-columns: 42px 58px 42px;
  height: 42px;
}

.qty-control button,
.qty-control input {
  border: 0;
  background: #fff;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 800;
}

.qty-control button {
  background: #f6eef0;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  font-weight: 800;
  padding: 0;
}

.success-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
}

.manage-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.manage-card-head {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}

.image-edit-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffafa;
}

.image-edit-panel label {
  min-width: 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
}

.manage-card h3 {
  font-size: 1.05rem;
  margin: 2px 0;
}

.manage-card span,
.manage-card small {
  color: var(--muted);
}

.inline-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.manage-actions,
.manage-card-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.switch-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.switch-line input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
}

.save-feedback {
  min-height: 20px;
  color: var(--success);
  font-size: .9rem;
  margin-top: 8px;
}

.logo-preview,
.catalog-thumb {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 10px;
}

.logo-preview.wide {
  width: min(260px, 100%);
  height: 92px;
}

.catalog-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.catalog-admin-card {
  display: grid;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.catalog-admin-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: var(--soft);
}

.catalog-admin-card span,
.catalog-admin-card small {
  color: var(--muted);
  font-size: .88rem;
}

.floating-notice {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 88px;
  z-index: 50;
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  background: #153f31;
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  text-align: center;
  font-weight: 800;
  transition: .2s ease;
}

.floating-notice[data-type="danger"] {
  background: #7b2d2d;
}

.floating-notice[data-type="warning"] {
  background: #7a5a16;
}

.floating-notice.show {
  transform: translateY(0);
  opacity: 1;
}

.storefront-page {
  background: #fffafa;
}

.store-hero {
  position: sticky;
  top: 0;
  z-index: 30;
  isolation: isolate;
  overflow: hidden;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  box-shadow: 0 16px 42px rgba(35, 20, 27, .18);
}

.loja-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(16px) brightness(0.35);
  transform: scale(1.1);
  z-index: -2;
}

.loja-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(35, 20, 27, .34);
  z-index: -1;
}

.store-hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.store-header {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}

.store-header > div {
  min-width: 0;
}

.store-logo {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(255, 255, 255, .65);
}

.store-header h1 {
  font-size: clamp(1.24rem, 3vw, 1.8rem);
  margin: 0 0 4px;
  color: #fff;
  overflow-wrap: anywhere;
}

.store-header p {
  margin: 0;
  color: rgba(255, 255, 255, .88);
  line-height: 1.35;
}

.store-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, .82);
  font-size: .92rem;
  margin-top: 6px;
}

.store-actions {
  display: flex;
  gap: 10px;
  width: min(1120px, 100%);
  margin: 16px auto 0;
}

.store-actions .btn {
  flex: 1;
  background: rgba(255, 255, 255, .94);
}

.store-actions .btn-primary {
  color: #fff;
  background: var(--brand);
}

.store-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.store-top-icon {
  display: inline-flex;
  align-items: center;
  align-content: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  padding: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .7);
  backdrop-filter: blur(10px);
}

.store-top-icon:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.store-top-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.store-main {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 16px 16px 96px;
}

.store-main-detail {
  width: min(720px, 100%);
  padding-top: 10px;
}

.store-search {
  position: relative;
  z-index: 2;
  padding: 12px 0;
  background: rgba(255, 250, 250, .96);
  backdrop-filter: blur(10px);
}

.brand-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0 2px;
}

.brand-chips button {
  white-space: nowrap;
  min-height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0 14px;
  font-weight: 800;
}

.brand-chips button.active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.product-section {
  margin-top: 18px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(164px, 1fr));
  gap: 12px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--soft);
}

.product-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  padding: 11px;
}

.brand-name {
  color: var(--brand-dark);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-card h3 {
  min-height: 2.5em;
  font-size: 1rem;
  margin: 0;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card p {
  min-height: 3.65em;
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price-box {
  display: grid;
  gap: 2px;
  margin-top: auto;
}

.price-box del {
  color: var(--muted);
  font-size: .86rem;
}

.price-box strong,
.detail-price {
  color: #1d5c43;
  font-size: 1.15rem;
}

.product-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.product-share-icon {
  width: 42px;
  padding-inline: 0;
}

.product-share-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.promo-badge,
.soldout-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 8px;
  color: #fff;
  background: #1d5c43;
  font-size: .75rem;
  font-weight: 900;
}

.soldout-badge {
  background: #696264;
}

.promo-badge + .soldout-badge,
.soldout-badge + .promo-badge {
  top: 38px;
}

.product-detail {
  display: grid;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin: 10px 0 18px;
}

.product-detail img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--soft);
}

.product-detail h2 {
  margin: 4px 0 8px;
}

.detail-appbar {
  position: sticky;
  top: calc(var(--store-hero-height, 86px) + 8px);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid rgba(234, 221, 225, .9);
  border-radius: 8px;
  background: rgba(255, 250, 250, .94);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(66, 45, 55, .08);
}

.detail-back-button,
.detail-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
  font-weight: 900;
}

.detail-back-button {
  gap: 6px;
  padding: 0 14px 0 10px;
}

.detail-icon-button {
  width: 44px;
  padding: 0;
}

.detail-back-button svg,
.detail-icon-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-back-button:hover,
.detail-icon-button:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.pwa-install-hint {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 16px;
  z-index: 60;
  display: none;
  align-items: center;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 16px 42px rgba(45, 28, 36, .18);
}

.pwa-install-hint.show {
  display: flex;
}

.pwa-install-hint strong,
.pwa-install-hint span {
  display: block;
}

.pwa-install-hint span {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.35;
}

.pwa-install-hint button {
  flex: 0 0 auto;
  border: 0;
  background: #f6eef0;
  color: var(--brand-dark);
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 800;
}

.landing-page {
  background: #fffafa;
}

.landing-page .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  line-height: 1.2;
  text-align: center;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0;
  background: rgba(255, 250, 250, .9);
  border-bottom: 1px solid rgba(234, 221, 225, .9);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(66, 45, 55, .06);
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.landing-nav-actions .btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 10px;
  font-size: .9rem;
}

.landing-panel-icon {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 999px;
}

.landing-panel-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.landing-logo {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  color: var(--brand-dark);
}

.landing-logo img {
  width: clamp(156px, 20vw, 230px);
  height: auto;
  max-height: 72px;
  object-fit: contain;
  border-radius: 0;
}

.landing-logo span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-hero {
  display: grid;
  gap: 28px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: calc(100vh - 82px);
  padding: 28px 0 42px;
  align-items: center;
}

.landing-kicker {
  display: inline-flex;
  color: var(--brand-dark);
  background: #fff0f3;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 900;
  margin-bottom: 14px;
}

.landing-copy h1 {
  max-width: 720px;
  font-size: 2.15rem;
  line-height: 1.08;
  margin: 0 0 16px;
  overflow-wrap: anywhere;
}

.landing-copy p {
  max-width: 640px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  margin: 0;
}

.landing-actions {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.landing-preview {
  display: grid;
  place-items: center;
}

.phone-frame {
  width: min(380px, 100%);
  max-width: calc(100vw - 32px);
  border: 10px solid #2f2a2d;
  border-radius: 34px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 22px 60px rgba(62, 45, 55, .18);
}

.phone-store-head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.phone-store-head span {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--brand);
}

.phone-store-head small {
  display: block;
  color: var(--muted);
}

.phone-search {
  height: 44px;
  border-radius: 8px;
  background: #f6eef0;
  margin: 18px 0 10px;
}

.phone-chip-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.phone-chip-row span {
  width: 78px;
  height: 32px;
  border-radius: 999px;
  background: #f1e3e7;
}

.phone-products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.phone-products article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}

.phone-products img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

.phone-products strong,
.phone-products small,
.phone-products b {
  display: block;
}

.phone-products strong {
  font-size: .9rem;
  margin-top: 6px;
}

.phone-products small {
  color: var(--muted);
}

.phone-products b {
  color: #1d5c43;
  margin-top: 3px;
}

.landing-section,
.landing-band {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 42px;
}

.landing-section h2,
.landing-band h2 {
  font-size: 1.55rem;
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}

.landing-feature-grid {
  display: grid;
  gap: 12px;
}

.featured-stores-section {
  margin-top: -8px;
}

.featured-stores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.featured-store-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.featured-store-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(66, 45, 55, .08);
}

.featured-store-card img {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff7f8;
  border: 1px solid var(--line);
}

.featured-store-card span {
  min-width: 0;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.landing-feature-grid article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.landing-feature-grid strong {
  font-size: 1.05rem;
}

.landing-feature-grid p,
.landing-band p {
  color: var(--muted);
  margin: 8px 0 0;
  line-height: 1.55;
}

.landing-band {
  display: grid;
  gap: 16px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

@media (min-width: 720px) {
  .store-header h1 {
    font-size: 2.4rem;
  }

  .admin-bottom-nav {
    left: 50%;
    transform: translateX(-50%);
    width: min(520px, calc(100% - 32px));
    border: 1px solid var(--line);
    border-radius: 8px 8px 0 0;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .product-detail {
    grid-template-columns: minmax(280px, 420px) 1fr;
    align-items: center;
  }

  .landing-hero {
    grid-template-columns: 1.05fr .95fr;
  }

  .landing-copy h1 {
    font-size: 4rem;
  }

  .landing-copy p {
    font-size: 1.08rem;
  }

  .landing-actions {
    display: flex;
  }

  .landing-feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .landing-band {
    grid-template-columns: 1fr auto;
  }

  .landing-section h2,
  .landing-band h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 540px) {
  .store-hero {
    padding: 10px 12px;
  }

  .store-hero-bar {
    gap: 8px;
  }

  .store-header {
    gap: 10px;
  }

  .store-logo {
    width: 78px;
    height: 78px;
    flex-basis: 78px;
  }

  .store-header h1 {
    font-size: 1.16rem;
    line-height: 1.12;
  }

  .store-header p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .82rem;
  }

  .store-meta {
    font-size: .82rem;
  }

  .store-hero-actions {
    gap: 6px;
  }

  .store-top-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .image-edit-panel {
    grid-template-columns: 1fr;
  }

  .featured-stores-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .featured-store-card {
    min-height: 74px;
    gap: 8px;
    padding: 8px;
    text-align: left;
  }

  .featured-store-card img {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .featured-store-card span {
    font-size: .86rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .product-card-body {
    padding: 8px;
    gap: 5px;
  }

  .brand-name {
    font-size: .66rem;
  }

  .product-card h3 {
    min-height: 2.55em;
    font-size: .86rem;
  }

  .product-card p {
    min-height: 3.1em;
    font-size: .76rem;
    -webkit-line-clamp: 2;
  }

  .price-box del {
    font-size: .72rem;
  }

  .price-box strong,
  .detail-price {
    font-size: .92rem;
  }

  .product-actions {
    gap: 6px;
  }

  .product-actions .btn {
    min-height: 36px;
    padding: 6px 7px;
    font-size: .74rem;
  }

  .product-share-icon {
    width: 36px;
  }
}

@media (max-width: 390px) {
  .inline-edit-grid,
  .catalog-filter-grid,
  .image-edit-panel,
  .quick-grid {
    grid-template-columns: 1fr;
  }

  .selected-product {
    grid-template-columns: 1fr;
  }

  .selected-product img {
    width: 100%;
  }

  .store-logo {
    width: 68px;
    height: 68px;
    flex-basis: 68px;
  }

  .store-top-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .landing-nav {
    align-items: center;
    width: min(100% - 24px, 1120px);
    padding: 12px 0;
  }

  .landing-nav-actions {
    flex: 0 0 auto;
  }

  .landing-nav-actions .btn {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
  }

  .landing-logo img {
    width: min(190px, 58vw);
    max-height: 64px;
  }

  .landing-copy h1 {
    font-size: 1.85rem;
  }

  .featured-stores-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .featured-store-card {
    min-height: 74px;
    gap: 8px;
    padding: 8px;
    text-align: left;
  }

  .featured-store-card img {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .featured-store-card span {
    font-size: .86rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .product-card-body {
    padding: 8px;
    gap: 5px;
  }

  .brand-name {
    font-size: .66rem;
  }

  .product-card h3 {
    font-size: .86rem;
  }

  .product-card p {
    min-height: 34px;
    font-size: .76rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .price-box del {
    font-size: .72rem;
  }

  .price-box strong,
  .detail-price {
    font-size: .92rem;
  }

  .product-actions {
    gap: 6px;
  }

  .product-actions .btn {
    min-height: 36px;
    padding: 6px 7px;
    font-size: .74rem;
  }

  .phone-frame {
    border-width: 7px;
    border-radius: 26px;
    padding: 12px;
  }

  .phone-products {
    gap: 8px;
  }
}

.share-modal-open {
  overflow: hidden;
}

.share-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 14px;
  background: rgba(18, 18, 24, .48);
}

.share-modal-backdrop.show {
  display: flex;
}

.share-modal-card {
  width: min(100%, 440px);
  max-height: calc(100vh - 28px);
  overflow: auto;
  background: #fffafa;
  border: 1px solid var(--line);
  border-radius: 14px 14px 10px 10px;
  padding: 16px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .22);
}

.share-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.share-modal-header span {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}

.share-modal-header h2 {
  margin: 2px 0 0;
  font-size: 1.1rem;
  line-height: 1.25;
}

.share-modal-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
}

.share-modal-preview {
  white-space: pre-line;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: .92rem;
  line-height: 1.45;
}

.share-modal-actions {
  display: grid;
  gap: 10px;
}

.share-modal-action {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}

.share-modal-action:nth-child(2),
.share-modal-action:nth-child(3) {
  background: #fff;
  color: var(--brand);
}

@media (min-width: 700px) {
  .share-modal-backdrop {
    align-items: center;
  }

  .share-modal-card {
    border-radius: 12px;
  }
}

.admin-bottom-nav {
  grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
}

.clients-stats {
  grid-template-columns: repeat(4, 1fr);
}

.client-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.clients-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.clients-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 150px);
  overflow: auto;
  position: sticky;
  top: 84px;
}

.client-list-item {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.client-list-item.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(183, 110, 121, .14);
}

.client-list-item strong,
.sale-card-head strong {
  line-height: 1.25;
}

.client-list-item span,
.client-list-item small,
.sale-card-head span,
.next-due,
.client-notes {
  color: var(--muted);
  font-size: .9rem;
}

.client-profile-panel h2 {
  margin: 0;
}

.client-profile-panel p {
  margin: 4px 0 0;
}

.client-mini-stats {
  grid-template-columns: repeat(4, 1fr);
}

.client-mini-stats strong,
.clients-stats strong {
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}

.client-notes {
  margin: 12px 0 0;
  padding: 10px;
  border-radius: 8px;
  background: var(--soft);
}

.sale-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.sale-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sale-card-head > div {
  display: grid;
  gap: 2px;
}

.sale-card-head b {
  color: var(--success);
  white-space: nowrap;
}

.sale-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.sale-summary-grid span {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid #dde9f3;
  border-radius: 8px;
  background: #fbfdff;
  color: var(--muted);
  font-size: .82rem;
}

.sale-summary-grid strong {
  color: var(--ink);
  font-size: .95rem;
}

.next-due {
  padding: 10px;
  border-radius: 8px;
  background: #fff8e8;
  border: 1px solid #f1d7a6;
  color: #7a5318;
  font-weight: 800;
}

.installment-list {
  display: grid;
  gap: 8px;
}

.installment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.installment-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 800;
}

.installment-row input {
  width: 22px;
  height: 22px;
  accent-color: var(--brand);
}

.installment-row small {
  color: var(--muted);
  white-space: nowrap;
}

.installment-row.paid {
  border-color: #cfeedd;
  background: #f3fbf7;
}

.installment-row.paid label,
.installment-row.paid strong {
  color: var(--success);
}

.installment-row.late {
  border-color: #efb9b9;
  background: #fff0f0;
}

@media (max-width: 820px) {
  .clients-layout,
  .client-form-grid {
    grid-template-columns: 1fr;
  }

  .clients-list {
    display: flex;
    position: static;
    max-height: none;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .client-list-item {
    min-width: 220px;
  }

  .clients-stats,
  .client-mini-stats,
  .sale-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 420px) {
  .admin-bottom-nav a {
    font-size: .78rem;
  }

  .installment-row {
    grid-template-columns: 1fr auto;
  }

  .installment-row small {
    grid-column: 1 / -1;
    padding-left: 30px;
  }
}

.sale-card-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.sale-card-actions form {
  margin: 0;
}

.installment-row {
  grid-template-columns: minmax(140px, 1fr) auto auto;
}

.installment-paid-toggle {
  margin: 0;
}

.installment-values {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.installment-values em {
  color: var(--brand-dark);
  font-size: .78rem;
  font-style: normal;
  font-weight: 800;
}

.installment-payment-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin: 0;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.installment-payment-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.installment-payment-form .form-control {
  min-height: 40px;
}

.installment-row.partial {
  border-color: #f1d7a6;
  background: #fff8e8;
}

.installment-row.partial label,
.installment-row.partial .installment-values strong {
  color: #7a5318;
}

@media (max-width: 520px) {
  .sale-card-head {
    display: grid;
  }

  .sale-card-actions {
    justify-items: stretch;
  }

  .installment-row {
    grid-template-columns: 1fr auto;
  }

  .installment-row > small {
    grid-column: 1 / -1;
    padding-left: 30px;
  }

  .installment-payment-form {
    grid-template-columns: 1fr;
  }
}

.installment-payment-form input.form-control {
  width: 100%;
  height: auto;
  accent-color: auto;
}
