/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:      #1a1008;
  --paper:    #fdf8f0;
  --cream:    #f5ede0;
  --logo-bg:  #f3e5d2;
  --accent:   #c0392b;
  --gold:     #d4a843;
  --muted:    #8a7060;
  --white:    #ffffff;
  --shadow:   rgba(26,16,8,.12);
  --radius:   14px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
}

body.admin-login-page {
  background:
    radial-gradient(circle at top left, rgba(212, 168, 67, 0.22), transparent 42%),
    radial-gradient(circle at bottom right, rgba(192, 57, 43, 0.16), transparent 38%),
    linear-gradient(180deg, #fffaf4 0%, #f4e8d7 100%);
  position: relative;
  overflow-x: hidden;
}

body.admin-login-page::before,
body.admin-login-page::after {
  content: '';
  position: fixed;
  inset: auto;
  pointer-events: none;
  border-radius: 999px;
  opacity: .45;
}

body.admin-login-page::before {
  width: 220px;
  height: 220px;
  top: -60px;
  right: -40px;
  background: rgba(255, 255, 255, 0.48);
  filter: blur(6px);
}

body.admin-login-page::after {
  width: 280px;
  height: 280px;
  left: -80px;
  bottom: -120px;
  background: rgba(212, 168, 67, 0.12);
  filter: blur(10px);
}

/* ===== NAVBAR ===== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: linear-gradient(180deg, #f5ead8 0%, #ead7be 100%);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(26,16,8,.08);
  box-shadow: 0 8px 24px rgba(26,16,8,.08);
}

.brand { display: flex; align-items: center; gap: 8px; }
.site-logo {
  display: inline-block;
  width: 115px;
  height: 90px;
  padding: 0;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  flex: 0 0 auto;
}
.brand-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 20px;
  color: var(--ink);
  font-weight: 300;
  letter-spacing: 2px;
}

.page-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px;
}

.page-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 36px;
  font-weight: 300;
  margin-bottom: 8px;
}

.page-subtitle {
  color: var(--muted);
  margin-bottom: 36px;
  font-size: 15px;
}

.page-note {
  color: var(--muted);
  padding: 12px 0 20px;
}

.page-note-spaced {
  padding: 20px 0;
}

.section-title {
  font-family: 'Noto Serif JP', serif;
  font-weight: 400;
  font-size: 22px;
  margin-bottom: 16px;
}

.stats-row-tight {
  margin-bottom: 36px;
}

.btn-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1.5px solid #d0c0b0;
  border-radius: 8px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  background: var(--white);
}

.filter-apply,
.btn-export {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: 'DM Sans', sans-serif;
}

.filter-apply {
  background: var(--accent);
  color: var(--white);
}

.btn-export {
  background: var(--gold);
  color: var(--ink);
}

.nav-right { display: flex; align-items: center; gap: 10px; }

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(26,16,8,.18);
  border-radius: 14px;
  background: rgba(255,255,255,.3);
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
  flex: 0 0 auto;
}

.btn-report {
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  padding: 7px 14px;
  border: 1px solid rgba(26,16,8,.25);
  border-radius: 100px;
  transition: all .2s;
}
.btn-report:hover { background: rgba(26,16,8,.08); color: var(--ink); }

.cart-btn {
  background: var(--accent);
  color: var(--white);
  border: none;
  padding: 9px 18px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  transition: transform .15s;
}
.cart-btn:hover { transform: scale(1.04); }

.cart-count {
  background: var(--white);
  color: var(--accent);
  border-radius: 100px;
  min-width: 22px;
  height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  padding: 0 6px;
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,16,8,.42);
  z-index: 320;
}

.nav-overlay.open { display: block; }

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(86vw, 320px);
  height: 100vh;
  background: linear-gradient(180deg, #f7ecdd 0%, #efe0c9 100%);
  box-shadow: -16px 0 40px rgba(26,16,8,.18);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  z-index: 330;
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.nav-drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.drawer-close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: rgba(26,16,8,.08);
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(26,16,8,.08);
  font-weight: 700;
}

.drawer-link.active {
  background: var(--accent);
  color: var(--white);
  border-color: transparent;
}

.admin-login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  position: relative;
  z-index: 1;
}

.admin-login-card {
  width: min(100%, 520px);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(26,16,8,.08);
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 26px 70px rgba(26,16,8,.12);
}

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

.admin-login-logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
  border-radius: 22px;
  background: rgba(255,255,255,.75);
  padding: 8px;
  box-shadow: 0 10px 28px rgba(26,16,8,.08);
}

.admin-login-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.admin-login-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 400;
}

.admin-login-desc {
  margin-top: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.admin-login-alert {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff1f0;
  color: #a12a23;
  border: 1px solid rgba(161,42,35,.14);
  font-weight: 600;
}

.admin-login-form {
  margin-top: 20px;
  display: grid;
  gap: 16px;
}

.admin-login-form .detail-field {
  display: grid;
  gap: 8px;
}

.admin-login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 4px;
}

.admin-login-footnote {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.mobile-cart-fab {
  display: none;
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 260;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 18px 36px rgba(192,57,43,.28);
  padding: 10px 14px 10px 10px;
  cursor: pointer;
}

.mobile-cart-fab-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-cart-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-cart-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--white);
  padding: 4px;
  flex: 0 0 auto;
}

.mobile-cart-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.mobile-cart-label {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
}

.mobile-cart-sub {
  font-size: 12px;
  opacity: .9;
}

.mobile-cart-count {
  background: var(--white);
  color: var(--accent);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex: 0 0 auto;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #23160d 0%, var(--ink) 14%);
  padding: 80px 40px 90px;
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,.04);
}

.hero-content { max-width: 540px; position: relative; z-index: 2; }
.hero-sub {
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  font-weight: 600;
}
.hero-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(38px, 5vw, 62px);
  color: var(--white);
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 20px;
}
.hero-desc { color: #b0a090; font-size: 16px; line-height: 1.7; }

.hero-deco {
  position: absolute;
  right: 60px;
  font-family: 'Noto Serif JP', serif;
  font-size: 220px;
  color: rgba(212,168,67,.08);
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

/* ===== FILTER ===== */
.filter-section {
  background: var(--cream);
  padding: 24px 40px;
  border-bottom: 1px solid #e8ddd0;
}
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-btn {
  padding: 8px 22px;
  border-radius: 100px;
  border: 1.5px solid #d0c0b0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all .2s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

/* ===== CATALOG GRID ===== */
.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 40px;
  max-width: 1300px;
  margin: 0 auto;
}

.menu-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #e9e1d6;
  box-shadow: 0 10px 26px rgba(26,16,8,.10);
  display: flex;
  flex-direction: column;
  transition: transform .25s, box-shadow .25s;
  animation: fadeUp .5s ease both;
}
.menu-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(26,16,8,.18);
}
.menu-card.hidden { display: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-emoji {
  background: linear-gradient(180deg, #ffffff 0%, #fbf7f2 100%);
  font-size: 58px;
  text-align: center;
  padding: 30px 20px;
  line-height: 1;
  border-bottom: 1px solid #eee5d8;
  position: relative;
}

.card-emoji.has-image {
  background: transparent;
  padding: 0;
  border-bottom: none;
  overflow: hidden;
}

.card-emoji::after {
  content: "";
  position: absolute;
  inset: auto 18px 0 18px;
  height: 1px;
  background: rgba(255,255,255,.9);
}

.card-emoji.has-image::after {
  display: none;
}

.card-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 180px;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
}
.card-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
}
.card-desc { font-size: 13px; color: var(--muted); line-height: 1.6; flex: 1; }
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}
.card-price { font-size: 17px; font-weight: 700; color: var(--accent); }
.add-btn {
  background: var(--ink);
  color: var(--white);
  border: none;
  padding: 9px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background .2s, transform .15s;
}
.add-btn:hover { background: var(--accent); transform: scale(1.05); }

/* ===== CART SIDEBAR ===== */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,16,8,.45);
  z-index: 200;
  backdrop-filter: blur(2px);
}
.cart-overlay.open { display: block; }

.cart-sidebar {
  position: fixed;
  top: 0; right: 0;
  width: 380px;
  height: 100vh;
  background: var(--white);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  box-shadow: -12px 0 40px var(--shadow);
}
.cart-sidebar.open { transform: translateX(0); }

.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 24px 20px;
  border-bottom: 1px solid #eee;
  background: var(--ink);
  color: var(--white);
}
.cart-header h2 { font-size: 20px; font-weight: 600; }
.close-btn {
  background: none; border: none; color: var(--white);
  font-size: 20px; cursor: pointer; line-height: 1;
  padding: 4px 8px; border-radius: 6px;
  transition: background .2s;
}
.close-btn:hover { background: rgba(255,255,255,.15); }

.cart-items { flex: 1; overflow-y: auto; padding: 20px; }
.cart-empty { text-align: center; color: var(--muted); margin-top: 40px; font-size: 15px; }

.cart-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f0ebe5;
}
.ci-emoji { font-size: 28px; line-height: 1; }
.ci-image {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(26,16,8,.12);
  flex: 0 0 auto;
}
.ci-info { flex: 1; }
.ci-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.ci-price { font-size: 13px; color: var(--accent); font-weight: 600; }
.ci-qty {
  display: flex; align-items: center; gap: 10px;
  margin-top: 8px;
}
.qty-btn {
  width: 26px; height: 26px;
  border-radius: 50%; border: 1.5px solid #d0c0b0;
  background: none; cursor: pointer;
  font-size: 16px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.qty-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.qty-num { font-weight: 700; font-size: 15px; min-width: 20px; text-align: center; }

.cart-summary {
  display: none;
  padding: 20px 24px 30px;
  border-top: 1px solid #eee;
  background: var(--cream);
}
.summary-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 18px; font-weight: 700; margin-bottom: 16px;
}
.customer-input { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.customer-input input {
  padding: 10px 14px;
  border: 1.5px solid #d8cfc6;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: border-color .2s;
}
.customer-input input:focus { border-color: var(--accent); }
.checkout-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}
.checkout-select {
  padding: 10px 14px;
  border: 1.5px solid #d8cfc6;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: border-color .2s;
}
.checkout-select:focus { border-color: var(--accent); }
.checkout-textarea {
  padding: 10px 14px;
  border: 1.5px solid #d8cfc6;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--ink);
  outline: none;
  resize: vertical;
  min-height: 92px;
  transition: border-color .2s;
}
.checkout-textarea:focus { border-color: var(--accent); }
.payment-info-card {
  margin-top: 4px;
  margin-bottom: 4px;
  padding: 14px;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid rgba(138, 112, 96, 0.18);
  box-shadow: 0 10px 24px rgba(26,16,8,.08);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}
.payment-info-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.payment-info-bank {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0;
  word-break: break-word;
}
.payment-info-account {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 0;
  word-break: break-word;
}
.payment-info-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0;
  word-break: break-word;
}
.payment-info-note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  width: 100%;
}
.copy-btn {
  margin-top: 4px;
  align-self: flex-start;
  padding: 10px 14px;
  border: 1px solid rgba(138, 112, 96, 0.22);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(26,16,8,.06);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.copy-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(192, 57, 43, 0.32);
  box-shadow: 0 10px 20px rgba(26,16,8,.09);
}
.copy-btn-dark {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}
.copy-btn-dark:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 20px rgba(26,16,8,.16);
}
.delivery-address-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pickup-info-card {
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--white);
  border: 1px solid rgba(138, 112, 96, 0.18);
  box-shadow: 0 10px 24px rgba(26,16,8,.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pickup-info-address {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
}
.pickup-map-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.pickup-map-frame {
  width: 100%;
  min-height: 260px;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #f5efe8;
  box-shadow: inset 0 0 0 1px rgba(138, 112, 96, 0.12);
}
.pickup-map-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.pickup-image-wrap {
  width: 100%;
}
.pickup-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(138, 112, 96, 0.12);
  box-shadow: 0 10px 24px rgba(26,16,8,.06);
}
.image-lightbox-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.image-lightbox-trigger:focus-visible {
  outline: 3px solid rgba(192, 57, 43, 0.22);
  outline-offset: 4px;
  border-radius: 18px;
}
.pickup-map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(192, 57, 43, 0.22);
  background: #fff7f4;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.pickup-map-link:hover {
  transform: translateY(-1px);
  border-color: rgba(192, 57, 43, 0.35);
  box-shadow: 0 10px 20px rgba(26,16,8,.08);
}
.checkout-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.5px;
  transition: background .2s, transform .15s;
}
.checkout-btn:hover { background: #a93226; transform: scale(1.02); }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--ink);
  color: var(--white);
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  z-index: 999;
  opacity: 0;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== LAPORAN PAGE ===== */
.report-page { max-width: 960px; margin: 0 auto; padding: 40px; }
.report-page h1 {
  font-family: 'Noto Serif JP', serif;
  font-size: 36px; font-weight: 300;
  margin-bottom: 8px;
}
.report-page .subtitle { color: var(--muted); margin-bottom: 36px; font-size: 15px; }

.history-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px;
}

.history-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.history-search-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.history-search {
  flex: 1 1 280px;
  min-width: 0;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid #d8cfc6;
  background: var(--white);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
}

.history-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(192,57,43,.08);
}

.history-submit {
  min-width: 180px;
}

.history-note {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

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

.history-card {
  background: var(--white);
  border: 1px solid #e9e1d6;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(26,16,8,.08);
  padding: 18px;
}

.history-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.history-order-id {
  font-weight: 800;
  font-size: 16px;
  color: var(--ink);
  word-break: break-all;
}

.history-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

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

.history-span {
  grid-column: 1 / -1;
}

.history-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.history-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
  word-break: break-word;
}

.history-pickup-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.history-pickup-link:hover {
  text-decoration: underline;
}

.history-pickup-media {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.history-pickup-map {
  width: 100%;
  min-height: 240px;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #f5efe8;
  box-shadow: inset 0 0 0 1px rgba(138, 112, 96, 0.12);
}

.history-pickup-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(138, 112, 96, 0.12);
  box-shadow: 0 10px 24px rgba(26,16,8,.06);
}
.history-pickup-image-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.history-pickup-image-trigger:focus-visible {
  outline: 3px solid rgba(192, 57, 43, 0.22);
  outline-offset: 4px;
  border-radius: 18px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.stat-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #fff9f1 100%);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(26,16,8,.10);
  border: 1px solid #eadfce;
  border-top: 4px solid var(--accent);
}
.stat-card.gold { border-top-color: var(--gold); }
.stat-card.green { border-top-color: #27ae60; }
.stat-card.red { border-top-color: #c0392b; }

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.35) 50%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.stat-label { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--ink); }

.table-wrap { overflow-x: auto; }
table {
  width: 100%; border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
}
thead { background: var(--ink); }
th {
  padding: 16px 20px; text-align: left;
  color: var(--white); font-size: 13px;
  font-weight: 600; letter-spacing: 1px;
}
td {
  padding: 14px 20px; font-size: 14px;
  border-bottom: 1px solid #f0ebe5;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--cream); }

.badge {
  display: inline-block;
  padding: 4px 12px; border-radius: 100px;
  font-size: 12px; font-weight: 700;
}
.badge-success { background: #e8f8f0; color: #27ae60; }
.badge-warning { background: #fff4de; color: #c27b00; }
.badge-info { background: #eaf4ff; color: #2471a3; }
.badge-pending { background: #fbe9e7; color: #de9e15; }
.badge-danger { background: #fce8e8; color: #b33939; }

.btn-detail,
.status-btn {
  border: none;
  border-radius: 999px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, background .2s, color .2s, border-color .2s;
}

.btn-detail {
  padding: 8px 16px;
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
}

.btn-detail:hover,
.status-btn:hover {
  transform: translateY(-1px);
}

.btn-detail:hover {
  background: var(--accent);
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,16,8,.52);
  z-index: 400;
  backdrop-filter: blur(3px);
}

.modal-overlay.open { display: block; }

.order-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.98);
  width: min(720px, calc(100vw - 32px));
  max-height: min(86vh, 860px);
  overflow: hidden;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(26,16,8,.28);
  z-index: 500;
  display: none;
}

.order-modal.open {
  display: block;
  animation: modalIn .2s ease-out both;
}

@keyframes modalIn {
  from { opacity: 0; transform: translate(-50%, -47%) scale(.96); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.order-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 18px;
  background: linear-gradient(135deg, var(--ink), #2d1a10);
  color: var(--white);
}

.modal-kicker {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 700;
}

.order-modal-header h2 {
  font-family: 'Noto Serif JP', serif;
  font-weight: 400;
  font-size: 28px;
}

.close-modal {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: var(--white);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.order-modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(86vh - 94px);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.detail-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.detail-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.detail-section {
  padding: 20px;
  border: 1px solid #f0e6da;
  border-radius: 16px;
  background: #fffdf9;
}

.detail-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f0e8dc;
}

.detail-item:last-child { border-bottom: none; padding-bottom: 0; }
.detail-item:first-child { padding-top: 0; }

.detail-item-name {
  font-weight: 700;
  margin-bottom: 4px;
}

.detail-item-meta {
  font-size: 13px;
  color: var(--muted);
}

.detail-payment-proof {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payment-proof-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.payment-proof-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  align-items: flex-start;
}

.payment-proof-link-text {
  gap: 4px;
}

.payment-proof-thumb {
  width: 100%;
  max-width: 240px;
  border-radius: 14px;
  border: 1px solid rgba(138, 112, 96, 0.18);
  box-shadow: 0 8px 20px rgba(26,16,8,.08);
  object-fit: cover;
  transition: box-shadow .18s ease;
}

.payment-proof-caption {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.payment-proof-preview-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.payment-proof-caption.small {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.payment-proof-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.payment-proof-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 999px;
  text-decoration: none;
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--ink);
}

.payment-proof-action.secondary {
  background: var(--white);
  color: var(--ink);
  border-color: rgba(26,16,8,.16);
}

.payment-proof-lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
}

.payment-proof-lightbox.open {
  display: block;
}

.payment-proof-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26,16,8,.72);
  backdrop-filter: blur(3px);
}

.payment-proof-lightbox-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(92vw, 960px);
  max-height: 92vh;
  transform: translate(-50%, -50%);
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(26,16,8,.3);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.payment-proof-lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.payment-proof-lightbox-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.payment-proof-lightbox-close {
  border: 1px solid rgba(26,16,8,.14);
  background: var(--white);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.payment-proof-lightbox-img {
  width: 100%;
  max-height: calc(92vh - 90px);
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(138, 112, 96, 0.16);
}

.detail-item-total {
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.detail-empty {
  color: var(--muted);
  font-size: 14px;
}

.detail-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.detail-total {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-total span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-total strong {
  font-size: 24px;
}

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

.status-btn {
  padding: 10px 16px;
  font-size: 13px;
  background: #f1ece6;
  color: var(--ink);
}

.status-btn.primary {
  background: var(--gold);
  color: var(--ink);
}

.status-btn.success {
  background: #27ae60;
  color: var(--white);
}

.status-btn.danger {
  background: #c0392b;
  color: var(--white);
}

.status-btn:disabled,
.status-btn.is-disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

.filter-date {
  display: flex; gap: 12px; flex-wrap: wrap;
  align-items: center; margin-bottom: 28px;
}
.filter-date input, .filter-date select {
  padding: 10px 14px; border: 1.5px solid #d8cfc6;
  border-radius: 8px; font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  background: var(--white); color: var(--ink);
  outline: none;
}
.filter-date input,
.filter-date select,
.table-filter input,
.table-filter select {
  min-height: 44px;
}
.filter-date button {
  padding: 10px 22px; background: var(--accent);
  color: #fff; border: none; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.filter-date .btn-export {
  background: var(--gold); color: var(--ink);
}

.status-filter-form {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.table-filter-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.table-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.table-filter-wide {
  grid-column: span 1;
}

.table-filter input,
.table-filter select {
  padding: 10px 14px;
  border: 1.5px solid #d8cfc6;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--ink);
  outline: none;
}

.product-filter-form {
  margin-bottom: 28px;
}

.date-filter-row {
  width: 100%;
}

.date-range-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 12px;
}

.date-filter {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
}

.date-filter-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.date-filter input {
  padding: 10px 14px;
  border: 1.5px solid #d8cfc6;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--ink);
  outline: none;
}

.status-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.status-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.status-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  padding: 12px 18px;
  border-radius: 12px;
  background: #d6b24b;
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  transition: transform .15s, box-shadow .2s, background .2s;
  box-shadow: 0 6px 18px rgba(214,178,75,.18);
}

.status-chip input:checked + span {
  background: var(--ink);
  color: var(--white);
}

.status-chip:hover span {
  transform: translateY(-1px);
}

.status-filter-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, background .2s;
}

.status-filter-btn:hover {
  background: #a93226;
  transform: translateY(-1px);
}

.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); text-decoration: none;
  font-weight: 600; font-size: 14px; margin-bottom: 30px;
}
.back-link:hover { text-decoration: underline; }

.text-accent { color: var(--accent); }
.cell-strong { font-weight: 700; }
.small-muted { font-size: 16px; color: var(--muted); }
.item-list { font-size: 13px; }

/* ===== CHECKOUT SUCCESS PAGE ===== */
.success-page {
  min-height: 80vh;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; text-align: center; padding: 40px;
}
.success-icon { font-size: 80px; margin-bottom: 20px; }
.success-page h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: 36px; font-weight: 300; margin-bottom: 12px;
}
.success-page p { color: var(--muted); font-size: 16px; line-height: 1.7; max-width: 400px; }
.order-detail {
  background: var(--white); border-radius: var(--radius);
  padding: 24px 32px; margin: 28px auto;
  box-shadow: 0 4px 20px var(--shadow);
  max-width: 440px; text-align: left; width: 100%;
}
.detail-page .order-detail {
  max-width: 560px;
}
.order-detail h3 {
  font-size: 14px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.order-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f0ebe5; font-size: 14px; }
.order-row:last-child { border-bottom: none; font-weight: 700; font-size: 15px; }
.detail-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.detail-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #f3ece4;
  font-size: 14px;
}
.detail-item-row:last-child {
  border-bottom: none;
}
.detail-form {
  max-width: 560px;
  width: 100%;
  margin: 0 auto 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}
.detail-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-field label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
}
.detail-input {
  width: 100%;
  padding: 15px 18px;
  border-radius: 16px;
  border: 1.5px solid rgba(138, 112, 96, 0.22);
  background: linear-gradient(180deg, #fff 0%, #fffcf8 100%);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.4;
  box-shadow: 0 8px 18px rgba(26,16,8,.04);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease, background .2s ease;
}
.detail-input::placeholder {
  color: #b2a295;
}
.detail-input:hover {
  border-color: rgba(192, 57, 43, 0.28);
}
.detail-input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(192,57,43,.08), 0 12px 24px rgba(26,16,8,.08);
  transform: translateY(-1px);
}
.detail-input.is-invalid {
  border-color: #c0392b;
  background: #fff7f6;
  box-shadow: 0 0 0 4px rgba(192,57,43,.10);
}
.detail-input.is-invalid:focus {
  border-color: #b33939;
  box-shadow: 0 0 0 4px rgba(192,57,43,.16), 0 12px 24px rgba(26,16,8,.08);
}
.detail-select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 46px;
}
.detail-textarea {
  min-height: 120px;
  resize: vertical;
}
.detail-file {
  padding-top: 12px;
  padding-bottom: 12px;
}
.payment-proof-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.field-error {
  min-height: 18px;
  font-size: 12px;
  line-height: 1.4;
  color: #b33939;
  font-weight: 600;
  margin-top: -2px;
}
.checkout-note {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}
.bank-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 0 auto 10px;
  box-shadow: 0 10px 24px rgba(26,16,8,.10);
  max-width: 440px;
  text-align: left;
  width: 100%;
  border: 1px solid rgba(138, 112, 96, 0.18);
}
.bank-card-label {
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 10px;
}
.bank-card-bank {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.bank-card-number {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--accent);
  margin-bottom: 6px;
}
.bank-card-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.bank-card-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.btn-back {
  display: inline-block; margin-top: 10px;
  padding: 14px 36px; background: var(--ink);
  color: #fff; text-decoration: none;
  border-radius: 100px; font-weight: 600; font-size: 15px;
  transition: background .2s;
}
.btn-back:hover { background: var(--accent); }

/* ===== PRODUCT ADMIN PAGE ===== */
.panel-card {
  background: var(--white);
  border-radius: 20px;
  border: 1px solid #e9e1d6;
  box-shadow: 0 10px 26px rgba(26,16,8,.08);
  padding: 24px;
  margin-top: 20px;
}

.panel-spaced {
  margin-top: 18px;
}

.notice {
  padding: 14px 16px;
  border-radius: 14px;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 600;
}

.notice-success {
  background: rgba(39, 174, 96, .12);
  color: #1f7a43;
  border: 1px solid rgba(39, 174, 96, .18);
}

.notice-error {
  background: rgba(192, 57, 43, .10);
  color: #922b21;
  border: 1px solid rgba(192, 57, 43, .16);
}

.product-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

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

.field-wide {
  grid-column: 1 / -1;
}

.field label,
.field-check {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #d8cfc6;
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.field input[type="file"] {
  padding: 10px 12px;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(192,57,43,.08);
}

.field-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  font-size: 14px;
}

.field-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.field-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.modal-image-preview {
  display: none;
  margin-top: 12px;
  width: 100%;
  max-width: 240px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e9e1d6;
  background: #faf6ef;
}

.modal-image-preview img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 100px;
  border: 1.5px solid #d8cfc6;
  color: var(--ink);
  background: rgba(255,255,255,.7);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: transform .15s, background .2s, border-color .2s;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  background: var(--white);
  border-color: var(--gold);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.product-table-wrap {
  overflow-x: auto;
}

.product-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.product-table th,
.product-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #eee5d8;
  text-align: left;
  vertical-align: top;
}

.product-table th {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  background: #fbf6ee;
}

.product-table thead {
  background: #fbf6ee;
}

.product-name-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-name-cell strong {
  font-size: 15px;
  color: var(--ink);
}

.product-name-cell span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-on {
  background: rgba(39, 174, 96, .12);
  color: #1f7a43;
}

.status-off {
  background: rgba(192, 57, 43, .12);
  color: #922b21;
}

.row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.row-action:hover {
  background: var(--accent);
}

.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.pagination-info {
  font-size: 14px;
  color: var(--muted);
}

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

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid #d8cfc6;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: transform .15s, background .2s, border-color .2s;
}

.pagination-btn:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
}

.pagination-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.pagination-btn.disabled {
  pointer-events: none;
  opacity: .45;
}

.page-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.page-head-row .page-subtitle {
  margin-bottom: 0;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,16,8,.55);
  z-index: 400;
  backdrop-filter: blur(2px);
}

.modal-overlay.open {
  display: block;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  padding: 24px;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
}

.modal.open {
  display: flex;
}

.modal-card {
  width: min(920px, 100%);
  background: var(--white);
  border-radius: 24px;
  border: 1px solid #e9e1d6;
  box-shadow: 0 24px 70px rgba(26,16,8,.22);
  padding: 24px;
  position: relative;
  animation: fadeUp .22s ease both;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-head h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 6px;
}

.modal-head p {
  color: var(--muted);
  font-size: 14px;
}

.modal .drawer-close {
  background: #f3eadf;
  color: var(--ink);
}

.modal-form {
  margin-top: 0;
}

body.modal-open {
  overflow: hidden;
}

.row-action {
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}


/* ===== NOT FOUND PAGE ===== */
.not-found-page {
  min-height: 100vh;
  padding: 40px 20px;
}

.not-found-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: #efe0c8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.not-found-icon {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 42px;
  background: linear-gradient(180deg, #f8efdf 0%, #efe0c8 100%);
  box-shadow: 0 14px 34px rgba(26,16,8,.08);
  margin-bottom: 24px;
}

.not-found-page h2 {
  margin-top: 4px;
}

.not-found-page p {
  max-width: 520px;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 100px;
  border: 1.5px solid #d8c8b2;
  color: var(--ink);
  background: rgba(255,255,255,.7);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  transition: transform .15s, background .2s, border-color .2s;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  background: var(--white);
  border-color: var(--gold);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .navbar {
    padding: 12px 16px;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .brand {
    justify-content: flex-start;
    min-width: 0;
  }

  .site-logo {
    width: 115px;
    height: 90px;
    padding: 0;
    border-radius: 0;
  }

  .navbar .brand-name {
    display: none;
    font-size: 18px;
    letter-spacing: 1px;
  }

  .nav-drawer .brand-name {
    display: inline;
    font-size: 18px;
    letter-spacing: 1px;
  }

  .nav-right {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .mobile-cart-fab {
    display: block;
  }

  .page-shell {
    padding: 24px 16px;
  }

  .page-title {
    font-size: 30px;
  }

  .page-subtitle {
    margin-bottom: 28px;
  }

  .section-title {
    font-size: 20px;
  }

  .page-note-spaced {
    padding: 16px 0;
  }

  .btn-reset,
  .filter-apply,
  .btn-export,
  .btn-secondary {
    width: 100%;
  }

  .page-head-row {
    flex-direction: column;
    align-items: stretch;
  }

  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .product-table {
    min-width: 700px;
  }

  .product-table-wrap {
    margin-left: 0;
    margin-right: 0;
    padding-left: 8px;
    padding-right: 8px;
  }

  .panel-card {
    padding: 18px;
  }

  .modal {
    padding: 12px;
  }

  .modal-card {
    padding: 18px;
    border-radius: 18px;
  }

  .modal-head h2 {
    font-size: 24px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .form-actions {
    gap: 10px;
  }

  .pagination-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination {
    justify-content: center;
  }

  .pagination-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
  }

  .hero {
    padding: 42px 16px 48px;
  }

  .hero-title {
    font-size: clamp(32px, 11vw, 44px);
  }

  .hero-desc {
    font-size: 15px;
  }

  .hero-deco {
    display: none;
  }

  .filter-section {
    padding: 14px 16px;
  }

  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  .filter-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 16px;
    font-size: 13px;
  }

  .catalog {
    padding: 16px 16px 120px;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr);
  }

  .menu-card {
    border-radius: 16px;
  }

  .card-emoji {
    padding: 24px 18px;
    font-size: 48px;
  }

  .card-body {
    padding: 16px;
    gap: 6px;
  }

  .card-name {
    font-size: 18px;
  }

  .card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .card-price {
    text-align: left;
  }

  .add-btn {
    width: 100%;
    padding: 11px 16px;
  }

  .cart-sidebar {
    width: 100%;
    max-width: 100vw;
    height: 100dvh;
  }

  .cart-header,
  .cart-summary {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cart-items {
    padding: 16px;
  }

  .report-page {
    padding: 20px 16px;
  }

  .history-page {
    padding: 20px 16px;
  }

  .report-page h1 {
    font-size: 30px;
  }

  .stats-row {
    gap: 14px;
    margin-bottom: 28px;
  }

  .stat-card {
    padding: 18px;
  }

  .stat-value {
    font-size: 24px;
  }

  .filter-date {
    gap: 10px;
  }

  .filter-date input,
  .filter-date select,
  .filter-date button,
  .filter-date a {
    width: 100%;
  }

  .filter-date button,
  .filter-date .btn-export {
    text-align: center;
  }

  .status-filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .date-range-grid {
    grid-template-columns: 1fr;
  }

  .table-filter-row {
    grid-template-columns: 1fr;
  }

  .status-filter-chips {
    gap: 8px;
  }

  .status-chip span {
    min-width: 0;
    width: 100%;
    padding: 11px 16px;
  }

  .status-filter-btn {
    width: 100%;
  }

  .history-toolbar {
    align-items: stretch;
  }

  .history-search,
  .history-toolbar .btn-reset {
    width: 100%;
  }

  .history-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    margin-left: 0;
    margin-right: 0;
    padding-left: 8px;
    padding-right: 8px;
  }

  table {
    min-width: 760px;
    border-radius: 14px;
  }

  th,
  td {
    padding: 12px 14px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .order-modal {
    width: calc(100vw - 16px);
    max-height: 92vh;
    border-radius: 16px;
  }

  .order-modal-body {
    padding: 16px;
  }

  .order-modal-header {
    padding: 16px;
  }

  .order-modal-header h2 {
    font-size: 22px;
  }

  .detail-footer {
    flex-direction: column;
  }

  .status-actions {
    width: 100%;
  }

  .status-btn {
    flex: 1 1 calc(50% - 10px);
  }

  .success-page {
    padding: 28px 16px;
  }

  .success-page h2 {
    font-size: 30px;
  }

  .order-detail {
    padding: 18px;
  }

  .btn-back {
    width: 100%;
    text-align: center;
  }
}
