/* ============================================================
   メルカリサポート  –  Global Styles
   Font : Noto Sans JP  |  Navy + Coral  |  Clean Japanese Commerce
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700;900&display=swap');

:root {
  --c-primary: #e95420;
  --c-primary-dk: #c73e0d;
  --c-primary-lt: rgba(233, 84, 32, .07);
  --c-primary-glow: rgba(233, 84, 32, .22);
  --c-navy: #0f1923;
  --c-navy-2: #1c2b3a;
  --c-text: #111827;
  --c-text-2: #374151;
  --c-muted: #6b7280;
  --c-muted2: #9ca3af;
  --c-bg: #f7f8fa;
  --c-bg2: #eef0f3;
  --c-card: #ffffff;
  --c-border: rgba(0, 0, 0, .08);
  --c-border2: rgba(0, 0, 0, .13);
  --c-green: #059669;
  --c-green-bg: #ecfdf5;
  --c-green-bd: #a7f3d0;
  --c-red: #dc2626;
  --c-red-bg: #fef2f2;
  --c-red-bd: #fca5a5;
  --c-yellow: #d97706;
  --c-yellow-bg: #fffbeb;
  --c-yellow-bd: #fde68a;
  --c-blue: #2563eb;
  --c-blue-bg: #eff6ff;
  --c-blue-bd: #bfdbfe;
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-2xl: 32px;
  --sh-xs: 0 1px 3px rgba(0, 0, 0, .05);
  --sh-sm: 0 2px 8px rgba(0, 0, 0, .07);
  --sh-md: 0 8px 24px rgba(0, 0, 0, .09);
  --sh-lg: 0 20px 48px rgba(0, 0, 0, .13);
  --sh-xl: 0 32px 72px rgba(0, 0, 0, .17);
}

/* ── Reset ─────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html {
  scroll-behavior: smooth
}

body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit
}

ul {
  list-style: none
}

/* ── Layout ────────────────────────── */
.page-content {
  flex: 1
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px
}

@media(max-width:640px) {
  .container {
    padding: 0 16px
  }
}

/* ============================================================  NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--sh-xs)
}

.navbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: .95rem;
  flex-shrink: 0;
  color: var(--c-text)
}

.navbar-brand svg {
  color: var(--c-primary);
  flex-shrink: 0
}

.brand-name {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dk));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto
}

.nav-link {
  padding: 7px 13px;
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-weight: 500;
  color: var(--c-muted);
  transition: color .15s, background .15s;
  white-space: nowrap
}

.nav-link:hover {
  color: var(--c-text);
  background: var(--c-bg2)
}

.nav-link.nav-register {
  background: var(--c-primary);
  color: #fff;
  margin-left: 6px;
  box-shadow: 0 2px 8px var(--c-primary-glow)
}

.nav-link.nav-register:hover {
  background: var(--c-primary-dk)
}

.btn-logout {
  padding: 7px 13px;
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-weight: 500;
  color: var(--c-muted);
  transition: all .15s
}

.btn-logout:hover {
  color: var(--c-red);
  background: var(--c-red-bg)
}

.nav-hamburger {
  display: none;
  margin-left: auto;
  padding: 8px;
  border-radius: var(--r-sm);
  color: var(--c-text);
  flex-direction: column;
  gap: 5px
}

.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: all .25s
}

.nav-hamburger:hover {
  background: var(--c-bg2)
}

/* ============================================================  MOBILE NAVIGATION */

@media(max-width:760px) {
  .navbar-inner {
    padding: 0 16px;
    height: 56px;
    /* 稍微降低高度，更适合移动端 */
  }

  .nav-hamburger {
    display: flex;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: background-color 0.2s;
  }

  .nav-hamburger:hover {
    background: var(--c-bg2);
  }

  .nav-hamburger span {
    width: 22px;
    height: 2px;
    background: var(--c-text);
    margin: 2px 0;
    transition: 0.25s;
  }

  /* 汉堡菜单打开时的动画效果 */
  .nav-hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-hamburger.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  .navbar-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 16px;
    right: 16px;
    background: #fff;
    border-radius: 16px;
    /* 圆角设计，更现代 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 8px 0;
    flex-direction: column;
    border: 1px solid var(--c-border);
    overflow: hidden;
    z-index: 1000;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.98);
  }

  .navbar-links.open {
    display: flex !important;
    /* 使用!important确保覆盖行内样式 */
    animation: slideDown 0.25s ease;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* 重要：覆盖行内样式，确保所有菜单项在移动端正确显示 */
  .navbar-links .nav-link,
  .navbar-links .btn-logout {

    /* 覆盖行内display:none */
    padding: 14px 20px;
    font-size: 0.95rem;
    color: var(--c-text);
    border-bottom: 1px solid var(--c-border);
    margin: 0;
    border-radius: 0;
    width: 100%;
    text-align: left;
    font-weight: 500;
    transition: background-color 0.2s;
  }

  .navbar-links .nav-link:last-child,
  .navbar-links .btn-logout:last-child {
    border-bottom: none;
  }

  .navbar-links .nav-link:hover,
  .navbar-links .btn-logout:hover {
    background: var(--c-bg2);
    color: var(--c-text);
  }

  

  .navbar-links .nav-link.nav-register:hover {
    background: var(--c-primary-dk) !important;
    transform: none;
  }

  /* 登录按钮样式 */
  .navbar-links .nav-link#navLoginBtn {
    color: var(--c-primary) !important;
    font-weight: 600 !important;
  }

  /* 退出按钮样式 - 确保正确显示 */
  .navbar-links .btn-logout {
    color: var(--c-red) !important;
    background: transparent !important;
    border: none !important;
    font-family: inherit;
    cursor: pointer;
  }

  .navbar-links .btn-logout:hover {
    background: var(--c-red-bg) !important;
    color: var(--c-red) !important;
  }

  /* 管理员按钮样式 */
  .navbar-links .nav-link.nav-auth-admin {
    color: var(--c-text) !important;
  }
}

/* 更小屏幕的调整 */
@media(max-width:380px) {
  .navbar-links .nav-link.nav-register {
    margin: 8px 12px !important;
  }

  .navbar-brand span {
    font-size: 0.9rem;
  }
}

/* ============================================================  BUTTONS */
/* Large buttons used in user/auth pages */
.big-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--r-sm);
  font-size: .9rem;
  font-weight: 600;
  transition: all .15s;
  cursor: pointer;
  border: none;
  white-space: nowrap
}

.big-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none
}

.big-btn-primary {
  background: var(--c-primary);
  color: #fff;
  box-shadow: 0 2px 6px var(--c-primary-glow)
}

.big-btn-primary:hover {
  background: var(--c-primary-dk);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--c-primary-glow)
}

.big-btn-secondary {
  background: #fff;
  color: var(--c-text-2);
  border: 1.5px solid var(--c-border2)
}

.big-btn-secondary:hover {
  background: var(--c-bg);
  border-color: var(--c-muted)
}

.big-btn-ghost {
  background: transparent;
  color: var(--c-muted);
  border: 1.5px solid var(--c-border)
}

.big-btn-ghost:hover {
  color: var(--c-text);
  border-color: var(--c-border2);
  background: var(--c-bg2)
}

.big-btn-full {
  width: 100%;
  justify-content: center
}

.big-btn-sm {
  padding: 7px 14px;
  font-size: .84rem
}

/* ============================================================  FORMS */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px
}

.form-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--c-text-2)
}

.form-label .req {
  color: var(--c-red);
  margin-left: 2px
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--c-border2);
  border-radius: var(--r-sm);
  font-size: .9rem;
  color: var(--c-text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  appearance: none;
  -webkit-appearance: none
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(233, 84, 32, .1)
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--c-muted2)
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.6
}

.form-hint {
  font-size: .78rem;
  color: var(--c-muted)
}

.input-wrap {
  position: relative
}

.input-wrap .form-input {
  padding-right: 42px
}

.input-action-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-muted);
  transition: color .15s;
  padding: 4px;
  display: flex;
  align-items: center
}

.input-action-btn:hover {
  color: var(--c-text)
}

/* ============================================================  CARDS */
.card {
  background: var(--c-card);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
  box-shadow: var(--sh-xs)
}

.card-body {
  padding: 24px
}

/* ============================================================  BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600
}

.badge-green {
  background: var(--c-green-bg);
  color: #065f46
}

.badge-red {
  background: var(--c-red-bg);
  color: #991b1b
}

.badge-yellow {
  background: var(--c-yellow-bg);
  color: #78350f
}

.badge-gray {
  background: var(--c-bg2);
  color: var(--c-text-2)
}

.badge-blue {
  background: var(--c-blue-bg);
  color: #1e40af
}

.badge-orange {
  background: #fff7ed;
  color: #9a3412
}

/* ============================================================  ALERTS */
.alert {
  padding: 11px 14px;
  border-radius: var(--r-sm);
  font-size: .875rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5
}

.alert svg {
  flex-shrink: 0;
  margin-top: 1px
}

.alert-success {
  background: var(--c-green-bg);
  color: #065f46;
  border: 1px solid var(--c-green-bd)
}

.alert-error {
  background: var(--c-red-bg);
  color: #991b1b;
  border: 1px solid var(--c-red-bd)
}

.alert-info {
  background: var(--c-blue-bg);
  color: #1e40af;
  border: 1px solid var(--c-blue-bd)
}

.alert-warning {
  background: var(--c-yellow-bg);
  color: #92400e;
  border: 1px solid var(--c-yellow-bd)
}

/* ============================================================  BARRAGE (原版そのまま) */
#barrage-root {
  pointer-events: none;
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  width: 100%;
  max-width: 520px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px
}

.barrage-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  animation: barrageAnim 4.5s ease forwards
}

.barrage-item.success {
  background: rgba(5, 150, 105, .92)
}

.barrage-item.error {
  background: rgba(220, 38, 38, .92)
}

.barrage-item.warning {
  background: rgba(217, 119, 6, .95)
}

.barrage-item.info {
  background: rgba(37, 99, 235, .9)
}

@keyframes barrageAnim {
  0% {
    opacity: 0;
    transform: translateX(20px)
  }

  8% {
    opacity: 1;
    transform: none
  }

  85% {
    opacity: 1
  }

  100% {
    opacity: 0;
    transform: translateX(-10px)
  }
}

@media(max-width:640px) {
  #barrage-root {
    top: 64px
  }
}

/* ============================================================  MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px
}

.modal-box {
  background: #fff;
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--sh-xl);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  animation: modalUp .22s cubic-bezier(.34, 1.5, .64, 1)
}

.modal-box-md {
  max-width: 560px
}

.modal-box-lg {
  max-width: 680px
}

.modal-head {
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0
}

.modal-title {
  font-size: 1rem;
  font-weight: 700
}

.modal-close {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--c-muted);
  transition: all .15s
}

.modal-close:hover {
  background: var(--c-bg2);
  color: var(--c-text)
}

.modal-body {
  padding: 22px 24px;
  overflow-y: auto;
  flex: 1
}

.modal-foot {
  padding: 14px 24px;
  border-top: 1px solid var(--c-border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0
}

@keyframes modalUp {
  from {
    opacity: 0;
    transform: translateY(16px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

/* ============================================================  LOADING */
.spinner {
  width: 30px;
  height: 30px;
  border: 2.5px solid var(--c-border2);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin .7s linear infinite
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

.loading-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 72px 20px;
  color: var(--c-muted)
}

/* ============================================================  FOOTER */
footer {
  background: var(--c-card);
  border-top: 1px solid var(--c-border);
  padding: 22px 0;
  margin-top: auto
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px
}

.footer-copy {
  font-size: .8rem;
  color: var(--c-muted)
}

.footer-links {
  display: flex;
  gap: 20px
}

.footer-links a {
  font-size: .8rem;
  color: var(--c-muted);
  transition: color .15s
}

.footer-links a:hover {
  color: var(--c-primary)
}

/* ============================================================  AUTH PAGES */
.auth-page {
  min-height: calc(100vh - 62px);
  background: linear-gradient(135deg, #f5f7ff 0%, #edf2ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px
}

.auth-card {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 28px;
  padding: 48px 52px;
  box-shadow: 0 35px 60px -20px rgba(15, 23, 42, .25);
  border: 1px solid rgba(148, 163, 184, .15)
}

.auth-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 10px
}

.auth-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -.02em;
  line-height: 1
}

.auth-alt-link {
  color: var(--c-blue);
  font-size: .875rem;
  font-weight: 500
}

.auth-alt-link:hover {
  text-decoration: underline
}

.auth-form-body {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 8px
}

.auth-field-label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 7px
}

.auth-input {
  width: 100%;
  padding: 13px 16px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  color: #0f172a;
  font-size: 1rem;
  transition: border-color .2s, box-shadow .2s;
  outline: none
}

.auth-input:focus {
  border-color: var(--c-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1)
}

.auth-input::placeholder {
  color: #9ca3af
}

.auth-pw-wrap {
  position: relative
}

.auth-pw-wrap .auth-input {
  padding-right: 48px
}

.auth-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  transition: color .2s;
  padding: 4px;
  display: flex;
  align-items: center
}

.auth-pw-toggle:hover {
  color: #1f2937
}

.auth-submit {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  margin-top: 6px;
  font-family: inherit
}

.auth-submit:hover:not(:disabled) {
  opacity: .93;
  transform: translateY(-1px)
}

.auth-submit:active {
  transform: none
}

.auth-submit:disabled {
  opacity: .6;
  cursor: not-allowed
}

.auth-error {
  color: #b91c1c;
  background: rgba(220, 38, 38, .08);
  border: 1px solid rgba(220, 38, 38, .25);
  padding: 11px 14px;
  border-radius: 8px;
  margin-top: 10px;
  font-size: .875rem
}

.auth-success {
  color: #065f46;
  background: var(--c-green-bg);
  border: 1px solid var(--c-green-bd);
  padding: 11px 14px;
  border-radius: 8px;
  margin-top: 10px;
  font-size: .875rem
}

.auth-info-msg {
  background: rgba(251, 191, 36, .1);
  border: 1px solid rgba(251, 191, 36, .3);
  color: #b45309;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: .875rem;
  margin-bottom: 20px
}

.auth-footer {
  border-top: 1px solid #e5e7eb;
  padding-top: 22px;
  margin-top: 24px
}

.auth-terms {
  color: #64748b;
  font-size: .75rem;
  line-height: 1.7;
  margin-bottom: 16px
}

.auth-terms a {
  color: var(--c-blue)
}

.auth-forgot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--c-blue);
  font-size: .875rem;
  font-weight: 500
}

.auth-forgot:hover {
  text-decoration: underline
}

@media(max-width:580px) {
  .auth-card {
    padding: 32px 22px;
    border-radius: 20px
  }

  .auth-title {
    font-size: 1.5rem
  }
}

/* ============================================================  HOME PAGE */
.hero {
  background: linear-gradient(135deg, #0f1923 0%, #1c2b3a 45%, #2e170e 100%);
  color: #fff;
  padding: 76px 24px;
  position: relative;
  overflow: hidden;
  text-align: center
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 70% at 50% 110%, rgba(233, 84, 32, .16), transparent);
  pointer-events: none
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  padding: 5px 16px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
  margin-bottom: 22px
}

.hero-title {
  font-size: clamp(1.5rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -.025em;
  margin-bottom: 16px
}

.hero-title em {
  font-style: normal;
  color: #fb923c
}

.hero-sub {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, .68);
  margin-bottom: 40px;
  line-height: 1.75
}

.hero-search-form {
  display: flex;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--r-lg);
  padding: 6px;
  gap: 6px;
  max-width: 540px;
  margin: 0 auto;
  backdrop-filter: blur(12px)
}

.hero-search-form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 9px 14px;
  color: #fff;
  font-size: .95rem;
  min-width: 0;
  font-family: inherit
}

.hero-search-form input::placeholder {
  color: rgba(255, 255, 255, .45)
}

.hero-search-btn {
  background: #fff;
  color: var(--c-primary);
  border: none;
  padding: 9px 20px;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background .15s, transform .15s;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit
}

.hero-search-btn:hover {
  background: #fff5f0;
  transform: translateY(-1px)
}

@media(max-width:480px) {
  .hero-search-form {
    flex-direction: column
  }

  .hero-search-btn {
    width: 100%;
    justify-content: center
  }

  .hero {
    padding: 52px 16px
  }
}

.products-section {
  padding: 44px 0 64px
}

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -.015em
}

.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center
}

.filter-chip {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--c-border2);
  background: #fff;
  font-size: .82rem;
  font-weight: 600;
  color: var(--c-muted);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  font-family: inherit
}

.filter-chip:hover {
  border-color: var(--c-primary);
  color: var(--c-primary)
}

.filter-chip.active {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
  box-shadow: 0 2px 8px var(--c-primary-glow)
}

.refresh-btn-sm {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--c-border2);
  background: #fff;
  font-size: .8rem;
  font-weight: 500;
  color: var(--c-muted);
  cursor: pointer;
  transition: all .15s;
  font-family: inherit
}

.refresh-btn-sm:hover {
  color: var(--c-text);
  border-color: var(--c-muted)
}

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

@media(max-width:480px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px
  }
}

.product-card {
  background: #fff;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--c-border);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-md);
  border-color: rgba(233, 84, 32, .25)
}

.product-img-wrap {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--c-bg2)
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s
}

.product-card:hover .product-img-wrap img {
  transform: scale(1.06)
}

.product-card-body {
  padding: 12px 14px
}

.product-card-name {
  font-size: .83rem;
  font-weight: 500;
  color: var(--c-text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.3em;
  margin-bottom: 7px
}

.product-card-price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--c-primary)
}

.empty-grid {
  text-align: center;
  padding: 64px 20px;
  color: var(--c-muted)
}

.empty-grid svg {
  margin: 0 auto 14px;
  opacity: .3
}

@media(max-width:480px) {
  .product-card-body {
    padding: 9px 10px
  }

  .product-card-name {
    font-size: .79rem
  }

  .product-card-price {
    font-size: .92rem
  }
}

.product-modal-layout {
  display: flex;
  gap: 22px;
  flex-direction: column
}

@media(min-width:560px) {
  .product-modal-layout {
    flex-direction: row
  }
}

.product-modal-img {
  width: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-bg2);
  aspect-ratio: 1;
  flex-shrink: 0
}

@media(min-width:560px) {
  .product-modal-img {
    width: 240px;
    height: 240px
  }
}

.product-modal-img img {
  width: 100%;
  height: 100%;
  object-fit: contain
}

.product-modal-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 13px
}

.product-modal-name {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45
}

.product-modal-price {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--c-primary);
  letter-spacing: -.02em
}

.product-modal-meta {
  font-size: .85rem;
  color: var(--c-muted)
}

.product-modal-meta li {
  padding: 7px 0;
  border-bottom: 1px solid var(--c-border)
}

/* ============================================================  USER PAGE */
.user-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px 24px;
  display: grid;
  grid-template-columns: 272px 1fr;
  gap: 24px;
  align-items: start
}

@media(max-width:880px) {
  .user-page {
    grid-template-columns: 1fr
  }
}

@media(max-width:640px) {
  .user-page {
    padding: 20px 16px;
    gap: 14px
  }
}



.profile-card {
  background: linear-gradient(155deg, var(--c-navy) 0%, var(--c-navy-2) 100%);
  color: #fff;
  border-radius: var(--r-xl);
  padding: 26px 22px;
  position: relative;
  overflow: hidden
}

.profile-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(233, 84, 32, .1)
}

.profile-card::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .04)
}

.profile-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dk));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 800;
  color: #fff;
  border: 3px solid rgba(255, 255, 255, .2);
  position: relative;
  z-index: 1;
  text-transform: uppercase
}

.profile-name {
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3px;
  position: relative;
  z-index: 1
}

.profile-email {
  font-size: .77rem;
  color: rgba(255, 255, 255, .55);
  text-align: center;
  margin-bottom: 14px;
  word-break: break-all;
  position: relative;
  z-index: 1
}

.profile-status-row {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
  position: relative;
  z-index: 1
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1
}

.pstat {
  background: rgba(255, 255, 255, .1);
  border-radius: var(--r-sm);
  padding: 11px;
  text-align: center
}

.pstat-num {
  font-size: 1.5rem;
  font-weight: 800;
  display: block;
  line-height: 1.2
}

.pstat-label {
  font-size: .71rem;
  color: rgba(255, 255, 255, .55);
  display: block;
  margin-top: 3px
}

.profile-refresh-btn {
  width: 100%;
  padding: 9px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: inherit
}

.profile-refresh-btn:hover {
  background: rgba(255, 255, 255, .2)
}

.profile-refresh-btn:disabled {
  opacity: .5;
  cursor: not-allowed
}

.user-main {
  display: flex;
  flex-direction: column;
  gap: 18px
}

.balance-card {
  background: linear-gradient(135deg, var(--c-navy) 0%, var(--c-navy-2) 100%);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 24px 28px
}

.balance-label {
  font-size: .75rem;
  color: rgba(255, 255, 255, .5);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 8px
}

.balance-amount {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.03em
}

.balance-unit {
  font-size: .95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .55);
  margin-left: 6px
}

.balance-sub {
  font-size: .75rem;
  color: rgba(255, 255, 255, .38);
  margin-top: 8px
}

.sec-heading {
  font-size: .95rem;
  font-weight: 700;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px
}

.sec-heading::before {
  content: '';
  display: block;
  width: 3px;
  height: 15px;
  background: var(--c-primary);
  border-radius: 2px;
  flex-shrink: 0
}

.wd-tabbar {
  display: flex;
  border-bottom: 2px solid var(--c-border);
  margin-bottom: 22px
}

.wd-tab-btn {
  padding: 10px 20px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--c-muted);
  cursor: pointer;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: inherit
}

.wd-tab-btn:hover {
  color: var(--c-text)
}

.wd-tab-btn.active {
  color: var(--c-primary);
  border-bottom-color: var(--c-primary)
}

.wd-panel {
  display: none
}

.wd-panel.active {
  display: block
}

.info-table {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 13px;
  background: var(--c-bg);
  border-radius: var(--r-sm);
  font-size: .875rem;
  gap: 10px;
  flex-wrap: wrap
}

.info-key {
  color: var(--c-muted);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0
}

.info-val {
  font-weight: 600;
  color: var(--c-text);
  text-align: right;
  word-break: break-all
}

.info-val.empty {
  color: var(--c-muted2);
  font-weight: 400;
  font-style: italic
}

.wd-form {
  display: flex;
  flex-direction: column;
  gap: 15px
}

.wd-notice {
  background: rgba(233, 84, 32, .05);
  border: 1px solid rgba(233, 84, 32, .14);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  font-size: .82rem;
  color: #9a2c05;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 8px
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: var(--c-bg);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: .875rem;
  cursor: pointer
}

.consent-row input[type=checkbox] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--c-primary);
  width: 15px;
  height: 15px
}

.field-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px
}

@media(max-width:480px) {
  .field-2col {
    grid-template-columns: 1fr
  }
}

.modal-msg {
  font-size: .85rem;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  margin-top: 4px
}

.modal-msg.ok {
  background: var(--c-green-bg);
  color: #065f46
}

.modal-msg.err {
  background: var(--c-red-bg);
  color: #991b1b
}

.tx-list {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.tx-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--c-bg);
  transition: background .15s
}

.tx-item:hover {
  background: var(--c-bg2)
}

.tx-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center
}

.tx-icon.add {
  background: #dcfce7
}

.tx-icon.sub {
  background: #fee2e2
}

.tx-body {
  flex: 1;
  min-width: 0
}

.tx-reason {
  font-size: .875rem;
  font-weight: 500;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.tx-date {
  font-size: .75rem;
  color: var(--c-muted);
  margin-top: 2px
}

.tx-delta {
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0
}

.tx-delta.pos {
  color: var(--c-green)
}

.tx-delta.neg {
  color: var(--c-red)
}

.tx-empty {
  text-align: center;
  padding: 36px 20px;
  background: var(--c-bg);
  border-radius: var(--r-md);
  border: 1.5px dashed var(--c-border2);
  color: var(--c-muted)
}

.tx-empty-title {
  font-weight: 600;
  color: var(--c-text-2);
  margin-bottom: 6px;
  font-size: .95rem
}

/* ============================================================  ADMIN PAGE */
.admin-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 24px
}

@media(max-width:640px) {
  .admin-page {
    padding: 18px 14px
  }
}

.admin-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px
}

.admin-heading {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.015em
}

.admin-btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.notice-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  margin-bottom: 16px;
  font-size: .875rem;
  font-weight: 500;
  gap: 10px
}

.notice-banner button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: inherit;
  opacity: .75;
  margin-left: 4px
}

.notice-banner button:hover {
  opacity: 1
}

.notice-info {
  background: var(--c-blue-bg);
  color: #1e40af;
  border: 1px solid var(--c-blue-bd)
}

.notice-success {
  background: var(--c-green-bg);
  color: #065f46;
  border: 1px solid var(--c-green-bd)
}

.notice-warning {
  background: var(--c-yellow-bg);
  color: #92400e;
  border: 1px solid var(--c-yellow-bd)
}

.notice-error {
  background: var(--c-red-bg);
  color: #991b1b;
  border: 1px solid var(--c-red-bd)
}

.search-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--sh-xs)
}

.search-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}

.search-row .form-input {
  flex: 1;
  min-width: 180px
}

.search-status {
  margin-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  background: var(--c-blue-bg);
  border: 1px solid var(--c-blue-bd);
  border-radius: var(--r-xs);
  font-size: .82rem;
  color: #1e40af
}

.search-status button {
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 700;
  color: inherit;
  font-size: .9rem
}

.table-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-xs)
}

.table-wrap {
  overflow-x: auto
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem
}

.admin-table th {
  padding: 11px 12px;
  text-align: left;
  background: #f8f9fa;
  border-bottom: 2px solid var(--c-border2);
  font-weight: 700;
  white-space: nowrap;
  color: var(--c-text-2)
}

.admin-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--c-border);
  vertical-align: middle
}

.admin-table tr:hover td {
  background: #fafafa
}

.empty-row td {
  text-align: center;
  padding: 36px;
  color: var(--c-muted);
  font-style: italic
}

/* Admin cell helpers */
.tel-cell {
  font-family: ui-monospace, monospace;
  font-size: .8rem
}

.bank-cell {
  font-size: .78rem;
  line-height: 1.5
}

.link-cell {
  max-width: 180px
}

.link-row {
  display: flex;
  align-items: center;
  gap: 4px
}

.link-input {
  flex: 1;
  padding: 3px 7px;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  font-size: .76rem;
  background: var(--c-bg);
  min-width: 0;
  cursor: pointer
}

.link-input:focus {
  outline: none;
  border-color: var(--c-primary)
}

.link-copy-btn {
  padding: 3px 8px;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  background: var(--c-bg2);
  font-size: .8rem;
  cursor: pointer;
  display: flex;
  align-items: center
}

.link-copy-btn:hover {
  background: var(--c-border2)
}

/* Action cells */
.actions-cell {
  min-width: 440px
}

.adjust-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  align-items: center;
  flex-wrap: wrap
}

.action-row {
  display: flex;
  gap: 5px;
  margin-bottom: 4px;
  flex-wrap: wrap;
  align-items: center
}

.small-input {
  width: 86px;
  padding: 4px 8px;
  border: 1px solid var(--c-border2);
  border-radius: var(--r-xs);
  font-size: .79rem;
  font-family: inherit
}

.reason-input {
  width: 165px;
  padding: 4px 8px;
  border: 1px solid var(--c-border2);
  border-radius: var(--r-xs);
  font-size: .79rem;
  font-family: inherit
}

/* ── Admin tiny buttons – exact class names from admin.js ── */
.btn-sm {
  padding: 5px 10px;
  font-size: .79rem;
  border-radius: var(--r-xs);
  border: none;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.3
}

.btn-primary {
  background: #2563eb;
  color: #fff
}

.btn-primary:hover {
  background: #1d4ed8
}

.btn-danger {
  background: #dc2626;
  color: #fff
}

.btn-danger:hover {
  background: #b91c1c
}

.btn-warning {
  background: #d97706;
  color: #fff
}

.btn-warning:hover {
  background: #b45309
}

.btn-gray {
  background: #6b7280;
  color: #fff
}

.btn-gray:hover {
  background: #4b5563
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid var(--c-border2)
}

.btn-secondary:hover {
  background: #e5e7eb
}

.btn-paypay-approve {
  background: #10b981;
  color: #fff
}

.btn-paypay-approve:hover {
  background: #059669
}

.btn-paypay-reject {
  background: #ef4444;
  color: #fff
}

.btn-paypay-reject:hover {
  background: #dc2626
}

.btn-bank-edit {
  background: #6366f1;
  color: #fff
}

.btn-bank-edit:hover {
  background: #4f46e5
}

.btn-bank-approve {
  background: #0891b2;
  color: #fff
}

.btn-bank-approve:hover {
  background: #0e7490
}

.btn-bank-reject {
  background: #f97316;
  color: #fff
}

.btn-bank-reject:hover {
  background: #ea580c
}

.btn-icon {
  padding: 3px 7px;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  background: var(--c-bg2);
  font-size: .8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center
}

.btn-icon:hover {
  background: var(--c-border2)
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  font-size: .82rem;
  color: var(--c-muted);
  border-top: 1px solid var(--c-border)
}

.pagination button {
  padding: 5px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xs);
  background: #fff;
  font-size: .82rem;
  cursor: pointer;
  font-family: inherit
}

.pagination button:hover:not(:disabled) {
  background: var(--c-bg2)
}

.pagination button:disabled {
  opacity: .38;
  cursor: not-allowed
}

.admin-modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px
}

.mmsg {
  font-size: .83rem;
  padding: 8px 12px;
  border-radius: var(--r-xs);
  margin-top: 6px
}

.mmsg.ok {
  background: var(--c-green-bg);
  color: #065f46;
  border: 1px solid var(--c-green-bd)
}

.mmsg.err {
  background: var(--c-red-bg);
  color: #991b1b;
  border: 1px solid var(--c-red-bd)
}

.admin-gate {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px
}

.admin-gate-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 40px;
  max-width: 380px;
  width: 100%;
  box-shadow: var(--sh-md);
  text-align: center
}

.admin-gate-card svg {
  margin: 0 auto 16px;
  color: var(--c-muted)
}

.admin-gate-card h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px
}

.admin-gate-card p {
  font-size: .875rem;
  color: var(--c-muted);
  margin-bottom: 24px
}