:root {
  --bg: #f3f7f6;
  --surface: #ffffff;
  --surface-alt: #eaf0ee;
  --ink: #202525;
  --muted: #65716d;
  --line: #d7e0dd;
  --teal: #0d6f6a;
  --teal-dark: #074f4c;
  --amber: #f2b84a;
  --amber-soft: #fff0c2;
  --red: #bd4434;
  --blue: #2b5f9e;
  --green: #1b7b55;
}

@font-face {
  font-display: swap;
  font-family: "Sarchia Baran";
  font-style: normal;
  font-weight: 400;
  src: url("./assets/fonts/Sarchia_Baran.ttf") format("truetype");
}

@font-face {
  font-display: swap;
  font-family: "Sarchia Baran";
  font-style: normal;
  font-weight: 700 900;
  src: url("./assets/fonts/Sarchia_Baran-Bold.ttf") format("truetype");
}

* {
  box-sizing: border-box;
}

body {
  background:
    linear-gradient(135deg, rgba(13, 111, 106, 0.12), transparent 32%),
    linear-gradient(315deg, rgba(242, 184, 74, 0.14), transparent 32%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px !important;
  margin: -1px;
  min-height: 0 !important;
  opacity: 0;
  overflow: hidden;
  padding: 0 !important;
  pointer-events: none;
  position: absolute;
  white-space: nowrap;
  width: 1px !important;
}

.app-shell {
  background: var(--bg);
  display: grid;
  gap: 14px;
  margin: 0 auto;
  max-width: 430px;
  min-height: 100vh;
  padding: 14px;
}

.launch-shell {
  background: var(--bg);
  display: grid;
  margin: 0 auto;
  max-width: 430px;
  min-height: 100vh;
  padding: 14px;
  place-items: center;
}

.launch-shell.hidden {
  display: none;
}

.launch-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: none;
  gap: 12px;
  padding: 18px;
  width: 100%;
}

.launch-card.active {
  display: grid;
}

.launch-shell[dir="rtl"] .launch-card {
  text-align: right;
}

.launch-card h1 {
  font-size: 28px;
  letter-spacing: 0;
  margin: 0;
}

.launch-card label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}

.otp-panel {
  display: grid;
  gap: 10px;
}

.otp-panel.hidden {
  display: none;
}

.launch-language-grid {
  direction: inherit;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.launch-language-grid button {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 900;
  min-height: 46px;
}

.launch-language-grid button.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.app-shell.locked {
  display: none;
}

.app-shell[dir="rtl"] {
  font-family: "Sarchia Baran", Tahoma, Arial, sans-serif;
}

.topbar,
.tabs,
.quick-filters,
.step-header,
.counter-grid,
.toggle-grid,
.payment-methods,
.account-tabs {
  align-items: center;
  display: flex;
}

.topbar {
  justify-content: space-between;
  gap: 12px;
}

.brand {
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 6px;
}

.location-pill {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  padding: 7px 10px;
}

.language-switch {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(2, minmax(72px, auto));
  padding: 4px;
}

.language-switch button,
.tabs button,
.account-tabs button,
.payment-methods button {
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}

.language-switch button {
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  min-height: 34px;
  padding: 0 8px;
  white-space: nowrap;
}

.language-switch button.active,
.tabs button.active,
.account-tabs button.active,
.payment-methods button.active {
  background: var(--teal);
  color: #fff;
}

.tabs {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  gap: 6px;
  padding: 6px;
}

.tabs button {
  background: transparent;
  color: var(--muted);
  flex: 1;
  min-height: 42px;
}

.screen {
  display: none;
  gap: 14px;
}

.screen.active {
  display: grid;
}

.search-row {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 48px;
}

input,
select,
textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 48px;
  padding: 0 12px;
  width: 100%;
}

textarea {
  min-height: 92px;
  padding-top: 12px;
  resize: vertical;
}

.icon-button,
.primary,
.secondary {
  align-items: center;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 48px;
  padding: 0 14px;
}

.icon-button {
  background: var(--ink);
  color: #fff;
  font-size: 22px;
}

.primary {
  background: var(--teal);
  color: #fff;
  width: 100%;
}

.secondary {
  background: var(--surface-alt);
  color: var(--ink);
}

.category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
}

.category-strip button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  flex: 0 0 auto;
  font-weight: 800;
  padding: 9px 13px;
}

.category-strip button.active {
  background: var(--ink);
  color: #fff;
}

.quick-filters {
  gap: 10px;
}

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

.location-filters label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 900;
  gap: 5px;
}

.location-filters select {
  min-height: 42px;
}

.quick-filters label,
.toggle-grid label {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  flex: 1;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
}

.listing-list,
.account-list {
  display: grid;
  gap: 10px;
}

.listing-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 118px 1fr;
  padding: 10px;
  text-align: start;
  width: 100%;
}

.app-shell[dir="rtl"] .listing-card {
  grid-template-columns: 1fr 118px;
}

.listing-card img {
  aspect-ratio: 1;
  border-radius: 8px;
  height: 118px;
  object-fit: cover;
  width: 118px;
}

.listing-copy {
  display: grid;
  gap: 5px;
}

.listing-copy h2,
.sell-summary h1,
.profile-band h1 {
  letter-spacing: 0;
  margin: 0;
}

.listing-copy h2 {
  font-size: 16px;
}

.meta,
.helper,
.profile-band p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}

.price {
  color: var(--teal-dark);
  font-size: 18px;
  font-weight: 900;
}

.muted-price {
  color: var(--muted);
  font-size: 13px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 8px;
}

.badge.reduced {
  background: var(--amber-soft);
  color: #7a5200;
}

.badge.whatsapp,
.badge.active {
  background: #daf2ea;
  color: var(--green);
}

.badge.hidden,
.badge.expired {
  background: #e7edf8;
  color: var(--blue);
}

.badge.sold {
  background: #ffe2dc;
  color: var(--red);
}

.sell-summary,
.profile-band,
.step-card,
.account-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

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

.stat-card.mini {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.stat-card.mini small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.stat-card.mini strong {
  color: var(--teal-dark);
  font-size: 20px;
}

.reputation-card,
.reputation-inline {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.reputation-inline {
  margin: 8px 0;
}

.reputation-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.stars {
  color: #7a5200;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.star-picker {
  display: flex;
  gap: 6px;
}

.star-picker button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #7a5200;
  font-size: 20px;
  font-weight: 900;
  height: 38px;
  width: 38px;
}

.feedback-form {
  display: grid;
  gap: 8px;
}

.feedback-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.sell-summary {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.sell-summary strong {
  color: var(--teal);
  font-size: 20px;
  white-space: nowrap;
}

.eyebrow {
  color: #8a5b2d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 5px;
  text-transform: uppercase;
}

.step-card {
  display: grid;
  gap: 12px;
}

.step-header {
  gap: 10px;
}

.step-header span {
  align-items: center;
  background: var(--amber);
  border-radius: 999px;
  display: inline-flex;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.step-header h2 {
  font-size: 16px;
  margin: 0;
}

.counter-grid,
.toggle-grid,
.payment-methods {
  gap: 10px;
}

.counter-grid > *,
.toggle-grid > *,
.payment-methods > * {
  flex: 1;
}

.counter-grid label,
.step-card > label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}

.photo-upload {
  align-items: center;
  background: var(--surface-alt);
  border: 1px dashed var(--teal);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  gap: 12px;
  min-height: 74px;
  padding: 12px;
}

.photo-upload-icon {
  align-items: center;
  background: var(--teal);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 36px;
  font-size: 26px;
  font-weight: 900;
  height: 36px;
  justify-content: center;
  line-height: 1;
  width: 36px;
}

.photo-upload strong,
.photo-upload small {
  display: block;
}

.photo-upload small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-top: 3px;
}

.photo-preview-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.photo-preview-grid .helper {
  grid-column: 1 / -1;
}

.photo-thumb {
  aspect-ratio: 1;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

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

.photo-thumb span {
  align-items: center;
  background: rgba(10, 15, 15, 0.72);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  height: 22px;
  justify-content: center;
  inset: 6px 6px auto auto;
  position: absolute;
  width: 22px;
}

.app-shell[dir="rtl"] .photo-thumb span {
  inset: 6px auto auto 6px;
}

.payment-methods button {
  background: var(--surface-alt);
  color: var(--ink);
  min-height: 42px;
}

.account-tabs {
  gap: 7px;
  overflow-x: auto;
}

.account-tabs button {
  background: var(--surface);
  color: var(--muted);
  flex: 1;
  min-height: 42px;
  min-width: 76px;
}

.account-logout {
  width: 100%;
}

.account-item {
  display: grid;
  gap: 8px;
}

.account-item h2 {
  font-size: 16px;
  margin: 0;
}

dialog {
  border: 0;
  border-radius: 8px;
  max-width: 410px;
  padding: 0;
  width: calc(100% - 24px);
}

dialog::backdrop {
  background: rgba(10, 15, 15, 0.45);
}

.detail-view {
  background: var(--surface);
  display: grid;
  gap: 12px;
  padding: 12px;
}

.detail-view img {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
  width: 100%;
}

.detail-view h2 {
  margin: 0;
}

.detail-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 460px) {
  .app-shell {
    max-width: none;
  }
}
