:root {
  --teal: #00D6C9;
  --pink: #FF2DAA;
  --sky: #62CFFF;
  --blush: #F4A6C4;
  --gold: #E8C36A;
  --teal-deep: #14B8A6;
  --fuchsia-soft: #FF6BCB;
  --sky-deep: #3BA7E8;
  --ink: #0B0B0E;
  --charcoal: #141418;
  --panel: #1C1C22;
  --line: rgba(232, 247, 246, 0.12);
  --mist: #E8F7F6;
  --muted: #9BB4B2;
  --tap: 52px;
  --radius: 18px;
  --aslie-topbar: 64px;
  --font: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--ink); color: var(--mist); font-family: var(--font); }
body { padding-bottom: 40px; }
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
button, input, select, textarea { font: inherit; }

.wrap { width: min(1100px, calc(100% - 28px)); margin: 0 auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  height: calc(var(--aslie-topbar) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 16px 0;
  background: rgba(11, 11, 14, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.home-btn {
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--mist);
  font-weight: 700;
}
.brand-mini {
  letter-spacing: 0.28em;
  font-weight: 700;
  color: var(--teal);
}
.brand-link { display: block; flex: 0 0 auto; }
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0 10px;
}
.brand img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 0 24px rgba(0, 214, 201, 0.25);
}
.wordmark { letter-spacing: 0.28em; font-weight: 700; font-size: 1.35rem; }
.tag { color: var(--sky); letter-spacing: 0.22em; font-size: 0.68rem; margin-top: 4px; }
.search {
  display: flex;
  gap: 10px;
  margin: 14px 0;
}
.search input, .filters select, .filters input, .sheet input, .sheet select, .sheet textarea {
  width: 100%;
  min-height: var(--tap);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--mist);
  border-radius: 14px;
  padding: 0 14px;
}
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.chip, .btn {
  min-height: var(--tap);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--mist);
  border-radius: 999px;
  padding: 0 16px;
  white-space: nowrap;
}
.chip.active, .btn.primary {
  background: linear-gradient(135deg, var(--teal), var(--sky));
  color: #072422;
  border-color: transparent;
  font-weight: 700;
}
.btn.pink { background: var(--pink); color: white; border-color: transparent; }
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 220px;
}
.card img, .hero-photo img, .placeholder {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #111;
}
.card .meta, .detail { padding: 12px; }
.price { color: var(--teal); font-weight: 700; }
.badge {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--pink);
}
.kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}
.kpi b { display: block; font-size: 1.15rem; color: var(--teal); }
.kpi span { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.04em; }
.filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 12px 0 18px;
}
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 0.92rem; }
th { color: var(--sky); cursor: pointer; }
tr:active { background: rgba(0, 214, 201, 0.06); }
.backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 25;
  display: none;
}
.backdrop.open { display: block; }
.sheet {
  position: fixed;
  inset: auto 0 0 0;
  max-height: 92vh;
  overflow: auto;
  background: var(--charcoal);
  border-top: 1px solid var(--line);
  border-radius: 22px 22px 0 0;
  padding: 18px 16px 28px;
  display: none;
  z-index: 20;
}
.sheet.open { display: block; }
#detail.sheet {
  top: calc(var(--aslie-topbar) + env(safe-area-inset-top));
  right: 0;
  bottom: 0;
  left: 0;
  max-height: none;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding: 0;
  z-index: 80;
  flex-direction: column;
}
#detail.sheet.open { display: flex; }
#detail.sheet[hidden] { display: none; }
.sheet-toolbar {
  display: flex;
  gap: 8px;
  padding: max(10px, env(safe-area-inset-top)) 12px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--charcoal);
}
.sheet-toolbar .btn { flex: 1; }
.sheet-body {
  flex: 1;
  overflow: auto;
  padding: 12px 16px 18px;
}
.sheet-actions {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--charcoal);
}
.slider { position: relative; overflow: hidden; z-index: 4; }
.slider-nav,
.photo-hook {
  position: relative;
  z-index: 6;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 214, 201, 0.35);
  cursor: pointer;
  user-select: none;
}
.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  min-width: 56px;
  min-height: 56px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: rgba(11, 11, 14, 0.72);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}
.slider-nav.prev { left: 10px; }
.slider-nav.next { right: 10px; }
.photo-switch {
  position: relative;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 4px;
  pointer-events: auto;
}
.photo-hook {
  flex: 0 0 64px;
  min-width: 64px;
  min-height: 56px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: rgba(11, 11, 14, 0.72);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}
.photo-switch-label {
  flex: 1;
  min-height: 56px;
  border: 0;
  background: transparent;
  text-align: center;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
  pointer-events: auto;
  touch-action: manipulation;
  cursor: pointer;
}
.photo-switch-label span {
  display: block;
  margin-top: 2px;
  color: var(--sky);
  font-size: 0.72rem;
}
.slide-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(11, 11, 14, 0.62);
  color: var(--sky);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}
.dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 4px;
}
.dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(232, 247, 246, 0.28);
  min-height: 8px;
}
.dot.active { background: var(--teal); }
body.detail-open { overflow: hidden; }
.sheet h2 { margin: 0 0 12px; }
.sheet label { display: block; margin: 10px 0 6px; color: var(--muted); font-size: 0.82rem; }
.actions { display: flex; gap: 8px; margin-top: 14px; }
.actions .btn { flex: 1; }
.hidden { display: none; }
.empty { text-align: center; color: var(--muted); padding: 40px 12px; }
.row-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; }
.locked { text-align: center; padding: 60px 20px; }
@media (min-width: 800px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpis, .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

body.owner {
  position: relative;
  background: #1A2240;
}
body.owner .owner-stairs {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
body.owner .owner-step {
  position: relative;
  height: calc(100% / 6);
  overflow: hidden;
}
body.owner .owner-step video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}
body.owner .owner-step::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18%;
  background: linear-gradient(180deg, transparent 0%, rgba(18, 24, 48, 0.28) 70%, rgba(26, 34, 64, 0.7) 100%);
}
body.owner .owner-step::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 12%;
  background: linear-gradient(180deg, rgba(26, 34, 64, 0.55) 0%, transparent 100%);
  z-index: 1;
}
body.owner .owner-veil {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(18, 24, 48, 0.26) 0%, rgba(18, 24, 48, 0.4) 55%, rgba(18, 24, 48, 0.52) 100%);
}
body.owner .wrap {
  position: relative;
  z-index: 1;
}
body.owner .sheet {
  position: fixed;
  z-index: 50;
  display: none;
  flex-direction: column;
}
body.owner .sheet.open {
  display: flex;
}
body.owner .sheet form {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
body.owner .sheet .actions {
  position: sticky;
  bottom: 0;
  margin-top: 12px;
  padding: 12px 0 calc(8px + env(safe-area-inset-bottom));
  background: var(--charcoal);
}
body.owner .kpi,
body.owner .table-wrap,
body.owner .chip,
body.owner .brand-compact {
  backdrop-filter: blur(10px);
}
body.owner .kpi,
body.owner .table-wrap {
  background: rgba(28, 36, 72, 0.5);
}
.owner .brand-compact {
  padding: 10px 0 8px;
  gap: 10px;
}
.owner .brand-compact img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
.owner .brand-text { flex: 1; min-width: 0; }
.owner .wordmark { font-size: 1.05rem; letter-spacing: 0.08em; }
.owner .tag { margin-top: 2px; font-size: 0.62rem; }
.owner .btn-new {
  flex: 0 0 auto;
  min-width: 88px;
  padding: 0 14px;
}
.owner .kpis-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.owner .kpis-compact .kpi {
  padding: 8px 8px 7px;
  border-radius: 12px;
}
.owner .kpis-compact .kpi b { font-size: 0.78rem; }
.owner .kpis-compact .kpi span { font-size: 0.62rem; letter-spacing: 0.02em; }
.owner .filters-compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 12px;
}
.owner .date-filter {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  position: relative;
}
.owner .filter-btn {
  min-width: 120px;
}
.owner .filter-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 8;
  min-width: min(320px, 92vw);
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(22, 28, 56, 0.94);
  box-shadow: 0 16px 36px rgba(8, 10, 24, 0.35);
}
.owner .filter-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.owner .filter-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.owner .filter-custom {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}
.owner .filter-custom input {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--mist);
  padding: 0 12px;
}
.owner .btn.ghost {
  min-height: 44px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
}
.owner .chips {
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}
.owner .chip {
  min-height: 40px;
  padding: 0 12px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: #fff;
  font-weight: 700;
}
body.owner .chip.active {
  color: #fff;
}
.owner .chips-status .chip { min-height: 36px; font-size: 0.74rem; }
.photo-block { margin-bottom: 8px; }
.photo-nav, .photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.photo-status {
  margin: 8px 0 0;
  color: var(--teal);
  font-size: 0.82rem;
}
.photo-status.is-error {
  color: var(--pink);
}
.photo-nav .btn { flex: 0 0 52px; }
.photo-nav span { flex: 1; text-align: center; color: var(--muted); }
.photo-actions .btn { flex: 1; text-align: center; }
.photo-actions label.btn { display: flex; align-items: center; justify-content: center; }
.hero-photo .placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 16px;
}

.chip.tone-teal { border-color: rgba(0, 214, 201, 0.7); color: #fff; background: rgba(0, 214, 201, 0.12); }
.chip.tone-fuchsia { border-color: rgba(255, 45, 170, 0.7); color: #fff; background: rgba(255, 45, 170, 0.12); }
.chip.tone-sky { border-color: rgba(98, 207, 255, 0.7); color: #fff; background: rgba(98, 207, 255, 0.14); }
.chip.tone-blush { border-color: rgba(244, 166, 196, 0.75); color: #fff; background: rgba(244, 166, 196, 0.14); }
.chip.tone-gold { border-color: rgba(232, 195, 106, 0.75); color: #fff; background: rgba(232, 195, 106, 0.14); }
.chip.tone-teal-deep { border-color: rgba(20, 184, 166, 0.7); color: #fff; background: rgba(20, 184, 166, 0.14); }
.chip.tone-fuchsia-soft { border-color: rgba(255, 107, 203, 0.7); color: #fff; background: rgba(255, 107, 203, 0.14); }
.chip.tone-sky-deep { border-color: rgba(59, 167, 232, 0.7); color: #fff; background: rgba(59, 167, 232, 0.14); }

.chip.tone-teal.active,
.chip.tone-teal-deep.active { background: var(--teal); color: #fff; border-color: transparent; box-shadow: 0 0 0 2px rgba(0, 214, 201, 0.35); }
.chip.tone-fuchsia.active,
.chip.tone-fuchsia-soft.active { background: var(--pink); color: #fff; border-color: transparent; box-shadow: 0 0 0 2px rgba(255, 45, 170, 0.35); }
.chip.tone-sky.active,
.chip.tone-sky-deep.active { background: var(--sky); color: #072422; border-color: transparent; box-shadow: 0 0 0 2px rgba(98, 207, 255, 0.35); }
.chip.tone-blush.active { background: var(--blush); color: #3a1020; border-color: transparent; box-shadow: 0 0 0 2px rgba(244, 166, 196, 0.4); }
.chip.tone-gold.active { background: var(--gold); color: #2b2108; border-color: transparent; box-shadow: 0 0 0 2px rgba(232, 195, 106, 0.4); }
.chip.chip-status.active {
  background: linear-gradient(135deg, var(--teal), var(--sky));
  color: #072422;
  border-color: transparent;
  box-shadow: 0 0 0 2px rgba(0, 214, 201, 0.28);
}

@media (min-width: 800px) {
  .owner .kpis-compact { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

body.catalog {
  --ink: #2C3760;
  --charcoal: #354272;
  --panel: #3D4A7A;
  --line: rgba(232, 247, 246, 0.12);
  --muted: #C5D0E6;
  background:
    radial-gradient(920px 460px at 50% -10%, rgba(255, 140, 210, 0.22), transparent 54%),
    radial-gradient(760px 400px at 100% 0%, rgba(120, 210, 255, 0.18), transparent 50%),
    linear-gradient(180deg, #3A4878 0%, #2C3760 46%, #273256 100%);
  color: var(--mist);
  --aslie-topbar: 92px;
}
body.catalog .hero-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: calc(-1 * (var(--aslie-topbar) + env(safe-area-inset-top)));
  padding-top: calc(var(--aslie-topbar) + env(safe-area-inset-top));
  padding-bottom: 18px;
}
body.catalog .hero-media,
body.catalog .hero-veil {
  position: absolute;
  inset: 0;
}
body.catalog .hero-media { z-index: 0; }
body.catalog .hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}
body.catalog .hero-veil {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(32, 42, 78, 0.28) 0%, rgba(32, 42, 78, 0.18) 38%, rgba(39, 50, 86, 0.55) 78%, rgba(44, 55, 96, 0.88) 100%),
    linear-gradient(90deg, rgba(28, 36, 72, 0.22), transparent 18%, transparent 82%, rgba(28, 36, 72, 0.22));
  pointer-events: none;
}
body.catalog .hero-content {
  position: relative;
  z-index: 2;
}
body.catalog .catalog-main { padding-top: 8px; }
body.catalog .topbar {
  background: rgba(44, 55, 96, 0.28);
  border-bottom-color: transparent;
  gap: 16px;
  padding-left: 18px;
  padding-right: 18px;
}
body.catalog .brand-mini {
  font-size: 2.85rem;
  letter-spacing: 0.04em;
  font-weight: 800;
  line-height: 1;
  color: var(--teal);
}
body.catalog .home-btn {
  background: rgba(61, 74, 122, 0.72);
  border-color: rgba(232, 247, 246, 0.1);
}
body.catalog .brand {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px 0 4px;
  gap: 0;
}
body.catalog .brand img {
  width: 210px;
  height: 210px;
  border-radius: 32px;
  box-shadow: 0 18px 44px rgba(12, 16, 40, 0.36), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
body.catalog .search {
  margin: 10px 0 16px;
}
body.catalog .search input {
  background: rgba(61, 74, 122, 0.72);
  border-color: rgba(232, 247, 246, 0.12);
  text-align: center;
}
body.catalog .chips {
  gap: 10px;
  padding-bottom: 14px;
  justify-content: flex-start;
}
body.catalog .chip {
  border: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
}
body.catalog .chip.tone-teal { background: #14B8A6; color: #062422; }
body.catalog .chip.tone-fuchsia { background: #FF2DAA; color: #fff; }
body.catalog .chip.tone-sky { background: #62CFFF; color: #072433; }
body.catalog .chip.tone-blush { background: #F4A6C4; color: #3A1020; }
body.catalog .chip.tone-gold { background: #E8C36A; color: #2B2108; }
body.catalog .chip.tone-teal-deep { background: #0F766E; color: #E8F7F6; }
body.catalog .chip.tone-fuchsia-soft { background: #FF6BCB; color: #3A1028; }
body.catalog .chip.tone-sky-deep { background: #3BA7E8; color: #062033; }
body.catalog .chip.active,
body.catalog .chip.tone-teal.active,
body.catalog .chip.tone-fuchsia.active,
body.catalog .chip.tone-sky.active,
body.catalog .chip.tone-blush.active,
body.catalog .chip.tone-gold.active,
body.catalog .chip.tone-teal-deep.active,
body.catalog .chip.tone-fuchsia-soft.active,
body.catalog .chip.tone-sky-deep.active {
  background: linear-gradient(135deg, var(--teal), var(--sky));
  color: #072422;
  box-shadow: 0 0 0 2px rgba(98, 207, 255, 0.38);
}
body.catalog .wrap {
  width: min(1760px, calc(100% - 20px));
}
body.catalog .grid {
  gap: 18px;
}
body.catalog .card {
  position: relative;
  background: rgba(61, 74, 122, 0.78);
  border-color: rgba(232, 247, 246, 0.08);
  box-shadow: 0 10px 24px rgba(12, 16, 40, 0.16);
}
body.catalog .card .meta {
  font-size: 1.05rem;
}
body.catalog .card .price { font-size: 1.12rem; }
body.catalog .card img,
body.catalog .hero-photo img,
body.catalog .placeholder { background: #2A3560; }
body.catalog .card-photo-count {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(11, 11, 14, 0.62);
  color: #fff;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}
body.catalog .card .meta { padding: 14px 14px 16px; }
body.catalog #detail.sheet,
body.catalog .sheet-toolbar,
body.catalog .sheet-actions {
  background: #2F3C6A;
}
@media (min-width: 800px) {
  body.catalog .brand img {
    width: 268px;
    height: 268px;
    border-radius: 36px;
  }
  body.catalog .wrap { width: min(1760px, calc(100% - 28px)); }
  body.catalog .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
  }
}
