:root {
  --red: #e43f43;
  --red-dark: #cf2b31;
  --green: #087d77;
  --text: #333;
  --muted: #777;
  --line: #e8e8e8;
  --bg: #f6f6f6;
  --wrap: 1200px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font: 14px/1.6 Arial, "Microsoft YaHei", sans-serif;
}

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

img {
  display: block;
  max-width: 100%;
}

html.lang-pending body {
  visibility: hidden;
}

button,
input {
  font: inherit;
}

.wrap {
  width: min(var(--wrap), calc(100% - 64px));
  margin: 0 auto;
}

.topbar {
  background: #f2f2f2;
  color: #777;
  border-bottom: 1px solid #eee;
  font-size: 12px;
}

.topbar-inner {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 0;
}

.top-links a {
  padding: 0 13px;
  border-left: 1px solid #ddd;
  white-space: nowrap;
}

.top-links a:first-child {
  border-left: 0;
}

.site-header {
  background: #fff;
}

.header-inner {
  height: 154px;
  display: grid;
  grid-template-columns: 330px minmax(360px, 1fr) 154px;
  align-items: center;
  gap: 54px;
}

.site-header.compact .header-inner {
  height: 126px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--green);
}

.brand-mark {
  width: 82px;
  height: 82px;
  border: 4px solid var(--green);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-text strong {
  display: block;
  font-size: 29px;
  line-height: 1.05;
  letter-spacing: 0;
}

.brand-text em {
  display: block;
  font-size: 15px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0;
}

.search {
  display: flex;
  height: 38px;
}

.search input {
  min-width: 0;
  flex: 1;
  border: 1px solid #d75454;
  border-right: 0;
  padding: 0 12px;
  outline: none;
}

.search button {
  width: 100px;
  border: 0;
  background: var(--red);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.cart-pill {
  height: 35px;
  border: 1px solid var(--line);
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fff;
}

.cart-icon {
  width: 22px;
  height: 22px;
  color: #999;
  display: inline-flex;
}

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

.cart-pill b {
  color: var(--red);
  font-weight: 400;
}

.main-nav {
  height: 43px;
  background: #fff;
  border-bottom: 2px solid var(--red-dark);
}

.nav-inner {
  display: flex;
  align-items: stretch;
  height: 43px;
}

.nav-inner a {
  min-width: 112px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.nav-inner .all-goods {
  width: 230px;
  min-width: 230px;
  height: 35px;
  margin-top: 8px;
  justify-content: flex-start;
  gap: 10px;
  padding-left: 16px;
  background: var(--red-dark);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

.hamburger {
  font-size: 18px;
  line-height: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 230px minmax(520px, 1fr) 240px;
  gap: 4px;
  margin-top: 0;
}

.category-panel {
  min-height: 354px;
  background: var(--red);
  padding: 4px 0 16px;
}

.category-panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
  padding: 0 16px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.category-panel a:hover {
  background: var(--red-dark);
}

.slider {
  height: 354px;
  position: relative;
  overflow: hidden;
  background: #ddd;
}

.slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .35s ease;
}

.slider img.active {
  opacity: 1;
}

.slider-dots {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.slider-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  opacity: .95;
}

.slider-dots i.active {
  background: #f59b24;
}

.notice-card {
  background: #fff;
  min-height: 354px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.notice-head {
  height: 42px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 18px;
}

.notice-head h2 {
  margin: 0;
  padding-left: 10px;
  border-left: 2px solid #999;
  font-size: 15px;
  font-weight: 400;
}

.notice-head a,
.breadcrumb {
  color: #777;
  font-size: 12px;
}

.notice-card ul {
  list-style: none;
  margin: 8px 18px;
  padding: 0;
  overflow: hidden;
}

.notice-card li {
  margin: 14px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #555;
}

.service-row {
  height: 98px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  text-align: center;
  color: #888;
}

.service-row i {
  width: 46px;
  height: 46px;
  margin: 0 auto 6px;
  border: 2px solid #fb7e85;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ff7078;
  font-style: normal;
  font-size: 20px;
}

.service-row svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.section-block {
  margin-bottom: 28px;
}

.section-head {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-head h2 {
  margin: 0;
  padding-left: 12px;
  border-left: 5px solid var(--red);
  font-size: 20px;
  font-weight: 400;
}

.section-head a {
  color: #777;
  font-size: 13px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px 20px;
}

.product-card {
  background: #fff;
  min-height: 330px;
  padding: 15px;
  border: 0;
  transition: box-shadow .2s ease;
}

.product-card:hover {
  box-shadow: 3px 3px 8px rgba(153, 153, 153, .5);
}

.product-card.not-sale {
  cursor: not-allowed;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / .8;
  object-fit: cover;
  background: #eee;
}

.product-card .tag {
  position: relative;
  height: 29px;
  margin-top: 0;
  padding-left: 35px;
  overflow: hidden;
  color: #344256;
  font-size: 12px;
  line-height: 29px;
  white-space: nowrap;
  background: rgba(255, 255, 255, .72);
}

.product-card .tag::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 6px;
  width: 15px;
  height: 15px;
  border: 2px solid #477cff;
  border-radius: 50%;
}

.product-card h3 {
  margin: 10px 0 8px;
  height: 44px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
}

.product-card .price {
  color: #f40;
  font-family: Arial, sans-serif;
  font-size: 24px;
}

.footer {
  background: #fff;
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 28px 0;
  color: #666;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.footer h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: #444;
}

.page-main {
  padding-top: 12px;
}

.breadcrumb {
  margin-bottom: 12px;
}

.list-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 16px;
}

.filter-panel,
.table-card,
.tabs-panel,
.detail-layout,
.member-menu {
  background: #fff;
  border: 1px solid var(--line);
}

.filter-panel h2 {
  margin: 0;
  height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  background: var(--red-dark);
  color: #fff;
  font-size: 16px;
}

.filter-panel a,
.member-menu a {
  display: block;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.filter-panel a:hover,
.member-menu a:hover,
.member-menu a.active {
  color: var(--red);
  background: #fff7f7;
}

.sort-bar {
  height: 44px;
  background: #fff;
  border: 1px solid var(--line);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
}

.sort-bar button {
  border: 1px solid var(--line);
  background: #fff;
  height: 28px;
  min-width: 58px;
  color: #666;
  cursor: pointer;
}

.list-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-layout {
  display: grid;
  grid-template-columns: 390px 1fr 220px;
  gap: 26px;
  padding: 20px;
}

.detail-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
}

.favorite {
  margin-top: 14px;
  border: 1px solid var(--line);
  background: #fff;
  height: 34px;
  min-width: 96px;
  color: #666;
}

.detail-info h1 {
  margin: 0 0 10px;
  font-size: 18px;
}

.activity-strip {
  height: 32px;
  background: linear-gradient(90deg, #f14b4b, #ff6c61);
  color: #fff;
  text-align: right;
  padding: 6px 12px;
}

.price-box {
  min-height: 100px;
  background: #f5f5f5;
  display: grid;
  grid-template-columns: 70px 1fr 84px;
  align-items: center;
  padding: 12px 14px;
}

.price-box strong {
  color: var(--red);
  font-size: 30px;
  font-weight: 400;
}

.qr {
  width: 74px;
  height: 74px;
  background:
    linear-gradient(90deg, #111 12px, transparent 12px) 0 0 / 20px 20px,
    linear-gradient(#111 12px, transparent 12px) 0 0 / 20px 20px,
    #fff;
  border: 6px solid #fff;
}

.meta-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px dashed var(--line);
  border-top: 1px dashed var(--line);
  margin: 14px 0;
  padding: 10px 0;
  text-align: center;
  color: #777;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 20px 0;
}

.qty-row span {
  margin-right: 24px;
}

.qty-row button,
.qty-row input {
  width: 30px;
  height: 28px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: center;
}

.qty-row input {
  width: 42px;
  border-left: 0;
  border-right: 0;
}

.qty-row em {
  margin-left: 8px;
  color: #777;
  font-style: normal;
}

.detail-actions {
  display: flex;
  gap: 10px;
}

.btn {
  height: 46px;
  min-width: 150px;
  border: 1px solid var(--red);
  cursor: pointer;
  font-size: 16px;
}

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

.btn.disabled {
  background: #c9c9c9;
  color: #fff;
  cursor: not-allowed;
}

.btn.outline {
  background: #fff7f7;
  color: var(--red);
}

.btn.full {
  width: 100%;
}

.rank-panel {
  border-left: 1px solid var(--line);
  padding-left: 22px;
}

.rank-panel h2 {
  margin: 0 0 18px;
  color: #999;
  text-align: center;
  font-size: 14px;
  font-weight: 400;
}

.rank-item {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 10px;
  margin-bottom: 14px;
  color: #666;
  font-size: 12px;
}

.rank-item img {
  width: 62px;
  height: 62px;
  object-fit: cover;
}

.rank-item strong {
  display: block;
  height: 36px;
  overflow: hidden;
  font-weight: 400;
}

.rank-item span {
  color: var(--red);
}

.tabs-panel {
  margin-top: 16px;
}

.tabs {
  height: 45px;
  border-bottom: 1px solid var(--line);
  display: flex;
}

.tabs button {
  width: 132px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.tabs button.active {
  color: var(--red);
  border-top: 2px solid var(--red);
}

.product-desc {
  padding: 24px;
  color: #666;
}

.product-desc img {
  width: 420px;
  max-width: 100%;
  margin-bottom: 16px;
}

.auth-page {
  min-height: 100vh;
  background: #fff;
}

.auth-header {
  height: 142px;
  display: flex;
  align-items: center;
}

.auth-banner {
  min-height: 520px;
  background: #82cce7 url("/static/assets/img/login_bg.jpg") center center / cover no-repeat;
}

.auth-main {
  min-height: 520px;
  display: grid;
  grid-template-columns: 1fr 342px;
  gap: 72px;
  align-items: center;
}

.auth-visual {
  min-height: 420px;
}

.auth-box {
  width: 342px;
  background: #fff;
  border: 1px solid #e5e5e5;
  padding: 26px 20px 30px;
}

.auth-box h1 {
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  text-align: left;
  font-size: 24px;
  color: #555;
  font-weight: 400;
}

.auth-error {
  margin: -8px 0 16px;
  padding: 8px 10px;
  border-radius: 4px;
  background: #fef2f2;
  color: #b91c1c;
  text-align: center;
}

.auth-user-icon {
  width: 28px;
  height: 28px;
  display: inline-block;
  position: relative;
  color: #bcbcbc;
}

.auth-user-icon::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: currentColor;
}

.auth-user-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 2px;
  width: 22px;
  height: 12px;
  border-radius: 12px 12px 2px 2px;
  background: currentColor;
}

.auth-box label {
  display: flex;
  align-items: center;
  height: 42px;
  border: 1px solid var(--line);
  margin-bottom: 20px;
  color: #777;
}

.auth-box label span {
  width: 82px;
  padding-left: 12px;
  white-space: nowrap;
}

.auth-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding-right: 10px;
}

.auth-links {
  margin: 18px 0 0;
  text-align: center;
  color: #777;
}

.auth-links span {
  margin: 0 12px;
}

.auth-links a {
  color: var(--red-dark);
}

.auth-register {
  background: #84d4ef;
}

.auth-register-inner {
  min-height: 548px;
  display: grid;
  grid-template-columns: 1fr 342px;
  align-items: center;
  gap: 60px;
}

.register-visual img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
}

.register-box {
  padding-top: 20px;
  padding-bottom: 20px;
}

.register-box label {
  margin-bottom: 10px;
}

.table-card {
  padding: 20px;
}

.table-card h1 {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 400;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  border: 1px solid var(--line);
  padding: 12px;
  text-align: left;
}

th {
  background: #fafafa;
  font-weight: 400;
  color: #666;
}

.cart-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
  margin-right: 10px;
}

.cart-total {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
}

.cart-total strong {
  color: var(--red);
  font-size: 20px;
}

.member-layout {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 16px;
}

.pc-member-card {
  min-height: 520px;
}

.pc-save-tip {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #ecfdf5;
  color: #047857;
}

.pc-bank-locked {
  width: min(560px, 100%);
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #fed7aa;
  border-radius: 4px;
  background: #fff7ed;
  color: #ea580c;
  text-align: center;
}

.pc-error-tip {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 4px;
  background: #fff1f0;
  color: #d93025;
}

.pc-wallet-head {
  margin-bottom: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: end;
  gap: 18px;
  background: #fff7f7;
  border: 1px solid #f2d4d4;
}

.pc-wallet-head span {
  color: #666;
}

.pc-wallet-head strong {
  color: var(--red);
  font-size: 28px;
  font-weight: 400;
}

.pc-frozen-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  margin-left: 10px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff1ec;
  color: #ff4b12;
  font-size: 12px;
  font-style: normal;
  vertical-align: middle;
}

.pc-member-form {
  width: min(560px, 100%);
}

.pc-member-form label {
  min-height: 46px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
}

.pc-member-form label span {
  color: #555;
}

.pc-member-form input,
.pc-member-form select,
.pc-member-form textarea {
  min-width: 0;
  border: 1px solid var(--line);
  padding: 0 10px;
  outline: 0;
  font-family: inherit;
  font-size: 14px;
}

.pc-member-form input {
  height: 36px;
}

.pc-member-form select {
  height: 36px;
  background: #fff;
}

.pc-member-form textarea {
  height: 88px;
  padding-top: 8px;
  resize: vertical;
}

.pc-member-form button {
  height: 38px;
  min-width: 120px;
  margin-left: 96px;
  border: 0;
  background: var(--red);
  color: #fff;
}

.pc-record-list {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.pc-record-list article,
.pc-message-row {
  min-height: 54px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.pc-record-list strong,
.pc-record-list span,
.pc-record-list em,
.pc-message-row strong,
.pc-message-row span {
  display: block;
}

.pc-record-list strong,
.pc-message-row strong {
  color: #333;
  font-weight: 400;
}

.pc-record-list span,
.pc-record-list em,
.pc-message-row span,
.empty-row {
  margin-top: 4px;
  color: #888;
  font-size: 13px;
  font-style: normal;
}

.pc-collect-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.status {
  color: #d28a00;
}

.status.done {
  color: #22945f;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, .78);
  color: #fff;
  padding: 10px 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 20;
}

.toast.show {
  opacity: 1;
}

.admin-body {
  background: #eef2f7;
  color: #1f2937;
}

.admin-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  background:
    linear-gradient(135deg, rgba(228, 63, 67, .12), rgba(8, 125, 119, .12)),
    #eef2f7;
}

.admin-login-card {
  width: min(100%, 420px);
  padding: 34px 34px 38px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
}

.admin-login-brand,
.admin-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-login-brand {
  margin-bottom: 28px;
}

.admin-login-brand span,
.admin-logo span {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #087d77;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
}

.admin-login-brand strong,
.admin-logo strong {
  display: block;
  font-size: 22px;
  font-weight: 600;
}

.admin-login-brand em {
  display: block;
  color: #94a3b8;
  font-style: normal;
  font-size: 13px;
}

.admin-login-card label {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  height: 44px;
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #fff;
}

.admin-login-card label span {
  padding-left: 13px;
  color: #64748b;
}

.admin-login-card input,
.admin-table input,
.admin-table select,
.admin-settings-form input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0 10px;
}

.admin-login-card button,
.admin-table button {
  border: 0;
  border-radius: 4px;
  background: #e43f43;
  color: #fff;
  cursor: pointer;
}

.admin-login-card button {
  width: 100%;
  height: 42px;
  margin-top: 8px;
  font-size: 16px;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px 1fr;
}

.admin-sidebar {
  background: #172033;
  color: #cbd5e1;
}

.admin-logo {
  height: 72px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.admin-logo span {
  width: 38px;
  height: 38px;
  background: #e43f43;
  font-size: 22px;
}

.admin-logo strong {
  color: #fff;
  font-size: 18px;
}

.admin-sidebar nav {
  padding: 14px 10px;
}

.admin-sidebar nav a {
  height: 42px;
  padding: 0 14px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
}

.admin-sidebar nav a.active,
.admin-sidebar nav a:hover {
  background: #e43f43;
  color: #fff;
}

.admin-sidebar nav i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.admin-main {
  min-width: 0;
  display: grid;
  grid-template-rows: 72px 1fr;
}

.admin-topbar {
  padding: 0 28px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-topbar h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.admin-topbar p {
  margin: 2px 0 0;
  color: #94a3b8;
  font-size: 13px;
}

.admin-account {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-sound-toggle {
  height: 32px;
  border: 1px solid #fed7aa;
  border-radius: 4px;
  padding: 0 12px;
  background: #fff7ed;
  color: #ea580c;
  cursor: pointer;
}

.admin-sound-toggle.off {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #64748b;
}

.admin-account span {
  color: #475569;
}

.admin-account a {
  height: 32px;
  padding: 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  display: flex;
  align-items: center;
  color: #64748b;
  background: #fff;
}

.admin-alert-toast {
  position: fixed;
  right: 24px;
  top: 78px;
  z-index: 90;
  max-width: 320px;
  padding: 12px 16px;
  border-radius: 6px;
  background: #111827;
  color: #fff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .22);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.admin-alert-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.admin-content {
  padding: 24px 28px;
}

.admin-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
}

.admin-card-head {
  height: 56px;
  padding: 0 18px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-card-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.admin-card-head span {
  color: #94a3b8;
  font-size: 13px;
}

.admin-success,
.admin-error {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 4px;
}

.admin-login-card .admin-error {
  margin: 0 0 16px;
}

.admin-success {
  background: #ecfdf5;
  color: #047857;
}

.admin-error {
  background: #fef2f2;
  color: #b91c1c;
}

.admin-table {
  overflow-x: auto;
}

.admin-table table {
  min-width: 900px;
  border: 0;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-left: 0;
  border-right: 0;
  border-color: #eef2f7;
  vertical-align: middle;
}

.admin-table th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 500;
}

.admin-table tbody tr:hover {
  background: #fbfdff;
}

.admin-table input {
  height: 32px;
  border: 1px solid #e5e7eb;
  border-radius: 3px;
  background: #fff;
  color: #111827;
}

.admin-table select {
  height: 32px;
  min-width: 104px;
  border: 1px solid #e5e7eb;
  border-radius: 3px;
  background: #fff;
  color: #334155;
}

.admin-table small {
  display: block;
  margin-top: 4px;
  color: #e43f43;
  font-size: 12px;
}

.admin-table .admin-number {
  max-width: 106px;
}

.admin-table .admin-number.small {
  max-width: 76px;
}

.admin-product-cell {
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-product-cell img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 3px;
  background: #eef2f7;
}

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

.admin-table button {
  min-width: 54px;
  height: 30px;
  padding: 0 12px;
  border-radius: 3px;
  background: #2563eb;
  font-size: 13px;
  line-height: 30px;
}

.admin-table button.danger {
  background: #dc2626;
}

.admin-user-table table {
  min-width: 1260px;
}

.admin-user-table td {
  height: 58px;
  white-space: nowrap;
}

.admin-user-name strong {
  color: #111827;
  font-weight: 600;
}

.admin-password-code {
  padding: 3px 7px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #334155;
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
}

.admin-bank-cell span,
.admin-bank-cell small {
  display: block;
}

.admin-bank-cell small {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 12px;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.admin-badge.ok {
  background: #ecfdf5;
  color: #047857;
}

.admin-badge.danger {
  background: #fef2f2;
  color: #dc2626;
}

.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-row-actions form {
  margin: 0;
}

.admin-action-link,
.admin-row-actions button {
  height: 30px;
  border: 0;
  border-radius: 4px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}

.admin-row-actions button.danger {
  background: #dc2626;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.admin-modal:target {
  display: flex;
}

.admin-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .48);
}

.admin-modal-card {
  position: relative;
  z-index: 1;
  width: min(760px, 96vw);
  max-height: 88vh;
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .24);
}

.admin-modal-head {
  min-height: 68px;
  padding: 18px 22px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-modal-head h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
}

.admin-modal-head p {
  margin: 4px 0 0;
  color: #94a3b8;
  font-size: 13px;
}

.admin-modal-head > a {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 22px;
  line-height: 1;
}

.admin-modal-head > a:hover {
  background: #f1f5f9;
}

.admin-modal-grid {
  padding: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-modal-grid label {
  display: grid;
  gap: 7px;
}

.admin-modal-grid label.wide {
  grid-column: 1 / -1;
}

.admin-modal-grid span {
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.admin-modal-grid input,
.admin-modal-grid select {
  width: 100%;
  height: 38px;
  border: 1px solid #dbe3ee;
  border-radius: 4px;
  background: #fff;
  padding: 0 10px;
  color: #111827;
}

.admin-modal-grid input[readonly] {
  background: #f8fafc;
  color: #64748b;
}

.admin-modal-foot {
  padding: 16px 22px;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.admin-modal-foot a,
.admin-modal-foot button {
  height: 34px;
  border-radius: 4px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-modal-foot a {
  border: 1px solid #dbe3ee;
  background: #fff;
  color: #64748b;
}

.admin-modal-foot button {
  border: 0;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
}

.admin-review-actions {
  min-width: 260px;
  display: grid;
  gap: 8px;
}

.admin-review-actions form {
  display: grid;
  grid-template-columns: 1fr 58px;
  gap: 6px;
  align-items: center;
}

.admin-review-actions input {
  max-width: none;
}

.admin-table button:hover,
.admin-settings-form button:hover {
  filter: brightness(.96);
}

.admin-settings-form {
  max-width: 720px;
  padding: 24px;
}

.admin-settings-form label {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-settings-form label span {
  color: #475569;
  font-weight: 600;
}

.admin-settings-form input {
  height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  color: #111827;
}

.admin-settings-form button {
  width: 120px;
  height: 38px;
  margin: 18px 0 0 132px;
  border: 0;
  border-radius: 4px;
  background: #e43f43;
  color: #fff;
  cursor: pointer;
}

@media (max-width: 760px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    display: none;
  }

  .admin-topbar {
    padding: 0 16px;
  }

  .admin-content {
    padding: 16px;
  }
}

@media (max-width: 980px) {
  .wrap {
    width: min(100% - 28px, var(--wrap));
  }

  .header-inner {
    height: auto;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 22px 0;
  }

  .brand-mark {
    width: 64px;
    height: 64px;
    font-size: 32px;
  }

  .brand-text strong {
    font-size: 23px;
  }

  .nav-inner {
    overflow-x: auto;
  }

  .hero-grid,
  .list-layout,
  .detail-layout,
  .auth-register-inner,
  .member-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-panel {
    min-height: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .notice-card {
    min-height: auto;
  }

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

  .auth-main {
    justify-content: center;
  }

  .rank-panel {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 560px) {
  .topbar-inner {
    height: auto;
    padding: 8px 0;
    align-items: flex-start;
    gap: 8px;
  }

  .top-links {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .brand-text strong {
    font-size: 20px;
  }

  .slider {
    height: 230px;
  }

  .category-panel,
  .product-grid,
  .list-grid,
  .meta-row {
    grid-template-columns: 1fr;
  }

  .detail-actions,
  .cart-total {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  th,
  td {
    padding: 8px;
  }
}

/* Site logo and language switch */
.top-links .pc-lang {
  margin: 0 0 0 13px;
  padding: 0 0 0 13px;
  border: 0;
  border-left: 1px solid #ddd;
  background: transparent;
  color: #777;
  cursor: pointer;
  white-space: nowrap;
}

.brand {
  gap: 0;
}

.brand img {
  width: 260px;
  height: auto;
  object-fit: contain;
}

.auth-logo-img {
  width: 198px;
  height: auto;
  margin: 0 auto 16px;
}
