:root {
  --bg: #f6f6f8;
  --card: #ffffff;
  --ink: #101114;
  --muted: #8b919e;
  --line: #e6e7ec;
  --hot: #ff6244;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #e9e9ed;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app {
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 24px 80px rgba(20, 24, 32, 0.14);
}

.screen {
  min-height: 100vh;
  padding: 18px 12px 48px;
}

.hidden {
  display: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-top {
  width: 45px;
  height: 32px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

h1 {
  margin: 0;
  color: var(--hot);
  font-size: 21px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
}

h1 span {
  color: var(--ink);
}

.service {
  position: relative;
  display: grid;
  place-items: center;
  overflow: visible;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 106, 61, 0.22);
  border-radius: 50%;
  background: linear-gradient(180deg, #fffaf7 0%, #fff2ec 100%);
  color: var(--hot);
  box-shadow:
    0 10px 22px rgba(255, 106, 61, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: customer-breathe 2.8s ease-in-out infinite;
}

.service::before {
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(255, 106, 61, 0.2);
  border-radius: 50%;
  opacity: 0.9;
  animation: customer-ring 2.8s ease-out infinite;
  content: "";
}

.service-svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 6px rgba(255, 106, 61, 0.16));
}

.service-dot {
  position: absolute;
  top: 5px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff966f 0%, var(--hot) 100%);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.92);
}

@keyframes customer-breathe {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 10px 22px rgba(255, 106, 61, 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
  50% {
    transform: scale(1.06);
    box-shadow:
      0 14px 28px rgba(255, 106, 61, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 1);
  }
}

@keyframes customer-ring {
  0% {
    transform: scale(0.96);
    opacity: 0;
  }
  18% {
    opacity: 0.6;
  }
  100% {
    transform: scale(1.22);
    opacity: 0;
  }
}

.search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 41px;
  margin-bottom: 14px;
  padding: 0 6px 0 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 15px 30px rgba(19, 22, 30, 0.06);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.search:focus-within {
  border-color: rgba(255, 98, 68, 0.72);
  box-shadow:
    0 0 0 4px rgba(255, 98, 68, 0.12),
    0 18px 34px rgba(19, 22, 30, 0.1);
  transform: translateY(-1px);
}

.image-search {
  position: relative;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: #fff3ef;
  box-shadow: 0 4px 10px rgba(255, 98, 68, 0.13);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.search:focus-within .image-search {
  background: #ffe8df;
  box-shadow: 0 6px 14px rgba(255, 98, 68, 0.22);
}

.image-search-input {
  display: none;
}

.camera-body {
  position: absolute;
  left: 9px;
  top: 11px;
  width: 14px;
  height: 12px;
  border: 2px solid var(--hot);
  border-radius: 3px;
}

.camera-body::before {
  position: absolute;
  left: 3px;
  top: -5px;
  width: 6px;
  height: 4px;
  border-radius: 2px 2px 0 0;
  background: var(--hot);
  content: "";
}

.camera-lens {
  position: absolute;
  left: 14px;
  top: 15px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--hot);
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-size: 12px;
}

.search input::placeholder {
  color: #9ba0ac;
}

.search-submit {
  width: 48px;
  height: 30px;
  border-radius: 999px;
  background: var(--hot);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.image-search-panel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 94px;
  margin: -3px 0 14px;
  padding: 10px 46px 10px 10px;
  border: 1px solid rgba(255, 98, 68, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 243, 239, 0.96), rgba(255, 255, 255, 0.96)),
    #fff;
  box-shadow: 0 18px 34px rgba(20, 24, 32, 0.08);
}

.image-search-panel.hidden,
.live-status.hidden {
  display: none;
}

.image-search-panel img {
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(20, 24, 32, 0.12);
}

.image-search-copy {
  min-width: 0;
}

.image-search-copy span {
  display: block;
  margin-bottom: 4px;
  color: var(--hot);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.8px;
}

.image-search-copy strong {
  display: block;
  color: var(--ink);
  overflow: hidden;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.24;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-search-copy p {
  margin: 5px 0 0;
  color: #737987;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.image-search-clear {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 18px;
  font-weight: 850;
  line-height: 24px;
}

.live-status {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(255, 98, 68, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 32px rgba(20, 24, 32, 0.16);
  transform: translateX(-50%);
}

.live-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hot);
  box-shadow: 0 0 0 0 rgba(255, 98, 68, 0.34);
  animation: live-pulse 1.2s ease-out infinite;
}

.live-status b {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 98, 68, 0.36);
  }
  100% {
    box-shadow: 0 0 0 11px rgba(255, 98, 68, 0);
  }
}

.filter-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 16px;
}

.toggles {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 3px;
  margin-bottom: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  overflow-x: auto;
  scrollbar-width: none;
}

.brand-filter {
  flex: 0 0 auto;
  max-width: 72px;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #d94b35;
  overflow: hidden;
  font-size: 12px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-filter.active {
  border-color: var(--hot);
  color: var(--hot);
}

.brand-panel {
  position: absolute;
  top: 48px;
  right: 0;
  z-index: 20;
  width: 204px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(20, 24, 32, 0.12);
}

.brand-option {
  display: block;
  width: 100%;
  height: 47px;
  padding: 0 14px;
  border-radius: 12px;
  background: transparent;
  color: #6c7282;
  font-size: 14px;
  font-weight: 900;
  text-align: left;
}

.brand-option.active {
  background: #fff3ef;
  color: var(--ink);
}

.brand-option.active::after {
  float: right;
  color: var(--hot);
  content: "✓";
}

.toggles::-webkit-scrollbar {
  display: none;
}

.toggle {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  background: transparent;
  color: #777e8c;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.toggle.active {
  background: var(--hot);
  color: #fff;
  box-shadow: 0 5px 12px rgba(255, 98, 68, 0.18);
}

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

.product {
  overflow: hidden;
  border-radius: 15px;
  background: var(--card);
  box-shadow: 0 16px 34px rgba(20, 24, 32, 0.08);
  text-align: left;
}

.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 15px;
  background: #eceef3;
}

.media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.edit-badge {
  position: absolute;
  right: 5px;
  top: 5px;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(16, 17, 20, 0.78);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 20px;
}

.body {
  padding: 10px 8px 12px;
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 21px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f4f5f7;
  color: #6c7282;
  overflow: hidden;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-meta .brand {
  min-height: 34px;
  padding: 0 16px;
  font-size: 15px;
}

.detail-meta .price-row {
  margin-top: 16px;
}

.detail-meta .price-number {
  font-size: 31px;
}

.detail-meta .price-unit {
  font-size: 19px;
}

.title {
  display: block;
  width: 100%;
  margin-top: 8px;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-top: 7px;
  white-space: nowrap;
}

.price-number {
  color: var(--hot);
  font-size: 15px;
  font-weight: 950;
  white-space: nowrap;
}

.price-unit {
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.back {
  height: 36px;
  margin-bottom: 22px;
  padding: 0 14px;
  border: 1px solid #d9dbe3;
  border-radius: 999px;
  background: #fff;
  color: #596273;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--hot);
  font-size: 12px;
  font-weight: 950;
}

h2 {
  margin: 8px 0 10px;
  font-size: 28px;
  font-weight: 950;
}

h3 {
  margin: 26px 0 12px;
  font-size: 16px;
}

.subtitle {
  margin: 10px 0 0;
  color: #717786;
  font-size: 14px;
  line-height: 1.55;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.detail-thumb {
  overflow: hidden;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 7px;
  background: #eceef3;
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.detail-more {
  width: 100%;
  height: 42px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #596273;
  font-size: 14px;
  font-weight: 900;
}

.detail-meta {
  padding: 22px 2px 18px;
  border-bottom: 1px solid #e1e3e8;
}

.original-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.86);
}

.original-overlay img {
  width: min(100%, 900px);
  max-height: 92vh;
  border-radius: 10px;
  object-fit: contain;
}

.description {
  color: #252932;
  font-size: 15px;
  line-height: 1.72;
}

.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.specs span {
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  color: #596273;
  font-size: 13px;
  font-weight: 750;
}

.upload {
  width: 100%;
  height: 150px;
  margin: 18px 0 14px;
  border: 1px dashed #ffb8a7;
  border-radius: 18px;
  background: #fff;
}

.upload.has-image {
  border-color: rgba(255, 98, 68, 0.42);
  background: #fff8f5;
}

.admin-upload-input {
  display: none;
}

.upload-images {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: -2px 0 14px;
}

.upload-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 12px;
  background: #eceef3;
}

.upload-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.upload-thumb-remove {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(16, 17, 20, 0.78);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.upload-more {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 12px;
  background: #fff;
  color: #6c7282;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(20, 24, 32, 0.05);
}

.admin-login {
  display: flex;
  min-height: calc(100vh - 66px);
  flex-direction: column;
  justify-content: center;
  gap: 22px;
}

.admin-login-home {
  align-self: flex-start;
}

.admin-login-brand {
  padding: 4px 2px 0;
}

.admin-login-brand span {
  color: var(--hot);
  font-size: 12px;
  font-weight: 950;
}

.admin-login-brand h2 {
  margin: 8px 0 10px;
  font-size: 31px;
  line-height: 1.12;
  letter-spacing: 0;
}

.admin-login-brand p {
  max-width: 300px;
  margin: 0;
  color: #687081;
  font-size: 14px;
  line-height: 1.62;
}

.admin-login-form {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(20, 24, 32, 0.08);
}

.admin-login-form label {
  margin-top: 0;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.admin-login-form input {
  height: 48px;
  padding: 0 12px;
  border: 1px solid #dedfe5;
  border-radius: 12px;
  background: #f7f7f9;
  font-size: 18px;
}

.admin-login-error {
  margin: 10px 0 0;
  color: var(--hot);
  font-size: 13px;
  font-weight: 850;
}

.admin-nav {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 20;
  gap: 8px;
  margin: -18px -12px 16px;
  padding: 12px;
  overflow: hidden;
  background: rgba(246, 246, 248, 0.94);
  backdrop-filter: blur(14px);
}

.admin-nav-btn {
  flex: 1 1 0;
  min-width: 0;
  height: 34px;
  border-radius: 999px;
  background: #fff;
  color: #6c7282;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.admin-nav-btn.active {
  background: var(--hot);
  color: #fff;
}

.settings-card {
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 24, 32, 0.05);
}

.settings-card h3 {
  margin: 0 0 12px;
}

.setting-line,
.room-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}

.setting-toggle,
.room-toggle {
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: #eef0f3;
  color: #777e8c;
  font-size: 12px;
  font-weight: 900;
}

.setting-toggle.on,
.room-toggle.on {
  background: #fff3ef;
  color: var(--hot);
}

.room-list {
  margin-top: 8px;
}

.category-new-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-add {
  flex: 0 0 auto;
  width: 58px;
  height: 34px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.category-admin-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.upload-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.upload-category {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f4f5f7;
  color: #6c7282;
  font-size: 12px;
  font-weight: 900;
}

.upload-category.active {
  background: var(--hot);
  color: #fff;
}

.upload-category-empty,
.admin-empty {
  display: block;
  color: #8b919e;
  font-size: 13px;
  font-weight: 800;
}

.admin-empty {
  margin: 0;
  padding: 12px 2px;
}

.edit-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 14px;
}

.edit-heading strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 950;
}

.edit-heading span {
  max-width: 120px;
  overflow: hidden;
  color: #6c7282;
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-images {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 14px;
}

.edit-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 12px;
  background: #eceef3;
}

.edit-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.edit-image button {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(16, 17, 20, 0.78);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.category-admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 24, 32, 0.05);
}

.category-admin-item strong {
  color: var(--ink);
  font-size: 15px;
}

.category-toggle {
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: #eef0f3;
  color: #777e8c;
  font-size: 12px;
  font-weight: 900;
}

.category-toggle.on {
  background: #fff3ef;
  color: var(--hot);
}

.upload strong,
.upload span {
  display: block;
}

.upload span {
  margin-top: 8px;
  color: #8a909d;
  font-size: 13px;
}

label,
.metrics article,
.visitor {
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 24, 32, 0.05);
}

label {
  display: block;
  margin-top: 12px;
  padding: 12px;
  color: #596273;
  font-size: 13px;
  font-weight: 850;
}

label input,
textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.primary,
.secondary,
.danger {
  width: 100%;
  height: 48px;
  margin-top: 14px;
  border-radius: 14px;
  font-weight: 900;
}

.primary {
  background: var(--ink);
  color: #fff;
}

.secondary {
  border: 1px solid #d9dbe3;
  background: #fff;
  color: #596273;
}

.danger {
  border: 1px solid rgba(255, 98, 68, 0.26);
  background: #fff3ef;
  color: var(--hot);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.metrics article {
  min-height: 92px;
  padding: 14px;
}

.metrics span {
  color: #717786;
  font-size: 13px;
}

.metrics strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
}

.visitor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 14px;
}

.visitor span {
  display: block;
  margin-top: 4px;
  color: #84786c;
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 74px;
  transform: translateX(-50%);
  width: min(320px, calc(100% - 40px));
  padding: 13px 16px;
  border-radius: 999px;
  background: rgba(16, 17, 20, 0.92);
  color: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}
