:root {
  --bg: #f3f4f7;
  --panel: #ffffff;
  --panel-soft: #f8f9fb;
  --line: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --red: #d7151f;
  --red-dark: #9c0712;
  --black: #09090b;
  --orange: #ff7a2f;
  --white: #ffffff;
  --success: #0f9f56;
  --success-bg: #eaf9f0;
  --warning: #d97706;
  --warning-bg: #fff4e5;
  --danger: #c81e1e;
  --danger-bg: #fff1f2;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
  --shadow-soft: 0 10px 26px rgba(17, 24, 39, 0.06);
  --radius: 24px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
button { border: 0; }

.flash {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 700;
  border: 1px solid transparent;
}
.flash-success { background: var(--success-bg); color: #0b7b43; border-color: rgba(15, 159, 86, 0.18); }
.flash-error { background: #fff0f2; color: var(--danger); border-color: rgba(200, 30, 30, 0.18); }
.flash-warning { background: var(--warning-bg); color: var(--warning); border-color: rgba(217, 119, 6, 0.18); }

.primary-btn,
.secondary-btn,
.text-btn,
.cod-primary-btn,
.admin-logout-btn {
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.primary-btn,
.cod-primary-btn,
.admin-logout-btn {
  background: linear-gradient(180deg, #ff7e37 0%, #ff5a2f 48%, #d7151f 100%);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(215, 21, 31, 0.2);
}
.primary-btn:hover,
.cod-primary-btn:hover,
.admin-logout-btn:hover,
.secondary-btn:hover,
.text-btn:hover {
  transform: translateY(-1px);
}
.primary-btn { min-height: 46px; padding: 0 22px; }
.secondary-btn {
  min-height: 44px;
  padding: 0 18px;
  color: var(--text);
  background: #fff;
  border: 1px solid rgba(17, 24, 39, 0.12);
}
.text-btn {
  min-height: 38px;
  padding: 0 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}
.text-btn.danger-text { color: var(--danger); }
.full-width { width: 100%; }
.compact-btn { min-height: 42px; padding-inline: 18px; }

.muted { color: var(--muted); }
.hidden { display: none !important; }
.desktop-only { display: block; }
.mobile-only { display: none; }

/* ---------- site ---------- */
.theme-site {
  background:
    linear-gradient(90deg, rgba(0,0,0,0.05), transparent 14%, transparent 86%, rgba(0,0,0,0.05)),
    #ededed;
}
.site-page-shell,
.cod-page {
  width: min(592px, 100%);
  margin: 0 auto;
}
.site-page-shell { padding: 8px 12px 0; }

.refined-homepage,
.refined-result-page {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.cod-hero-card { background: #fff; }
.cod-banner-carousel { position: relative; overflow: hidden; background: #111; }
.banner-slide { display: none; }
.banner-slide.active { display: block; }
.cod-banner-carousel img {
  width: 100%;
  aspect-ratio: 592 / 300;
  object-fit: cover;
}
.hero-overlay-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
  padding: 36px 34px;
  color: #fff;
  background: linear-gradient(90deg, rgba(0,0,0,0.65), rgba(0,0,0,0.15) 42%, rgba(125, 5, 11, 0.28) 100%);
}
.hero-overlay-copy.compact-overlay { justify-content: center; }

.cod-banner-placeholder {
  min-height: 300px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 36px 34px;
  color: #fff;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 33%, rgba(255,255,255,0.2) 0 11%, transparent 13%),
    linear-gradient(90deg, #050505 0%, #0f1117 52%, #92020a 100%);
}
.cod-banner-placeholder.compact { min-height: 260px; }
.cod-banner-hero-only::after {
  content: "";
  position: absolute;
  top: 44px;
  right: 70px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  filter: blur(2px);
}
.cod-eyebrow {
  display: inline-flex;
  min-height: 56px;
  padding: 0 22px;
  align-items: center;
  border-radius: 999px;
  background: linear-gradient(90deg, #d7151f 0%, #e91818 100%);
  color: #fff;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}
.cod-banner-placeholder h1,
.cod-banner-placeholder h2,
.hero-overlay-copy h1,
.hero-overlay-copy h2 {
  margin: 0;
  max-width: 470px;
  font-size: clamp(2.6rem, 10vw, 4.15rem);
  line-height: 1.08;
  letter-spacing: 0.02em;
}
.cod-strip {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #020202 0%, #090909 100%);
  color: #fff;
  font-size: clamp(1.15rem, 4.7vw, 1.55rem);
  font-weight: 800;
  letter-spacing: 0.56em;
  padding-left: 0.56em;
}
.cod-form-card {
  padding: 34px 28px 36px;
  background: #fff;
}
.cod-order-form { display: grid; gap: 10px; }
.cod-field { display: grid; gap: 8px; }
.cod-field label {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.cod-field input,
.cod-field textarea {
  width: 100%;
  min-height: 62px;
  border: 3px solid rgba(215, 21, 31, 0.76);
  border-radius: 12px;
  padding: 14px 18px;
  outline: none;
  font-size: 1rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.cod-field input::placeholder,
.cod-field textarea::placeholder { color: #bcbcbc; }
.cod-field input:focus,
.cod-field textarea:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 4px rgba(215, 21, 31, 0.12);
}
.cod-field small {
  font-size: 0.96rem;
  color: #111;
  font-weight: 700;
}
.cod-submit-wrap { display: flex; justify-content: center; padding: 30px 0 6px; }
.cod-primary-btn {
  min-width: 208px;
  min-height: 82px;
  padding: 18px 36px;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.system-message {
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: #fff1f2;
  border: 1px solid rgba(215, 21, 31, 0.15);
  color: var(--danger);
  font-weight: 700;
}
.dark-intro-card {
  margin: 0 0 0;
  min-height: 290px;
  padding: 46px 28px;
  background: linear-gradient(180deg, #07090d 0%, #060708 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.dark-intro-card h2 {
  margin: 0 0 22px;
  font-size: clamp(2rem, 9vw, 2.95rem);
  font-weight: 500;
  letter-spacing: 0.06em;
}
.dark-intro-card p {
  margin: 0;
  max-width: 470px;
  font-size: 1rem;
  line-height: 1.9;
  color: rgba(255,255,255,0.92);
  white-space: pre-line;
}
.cod-bottom-note {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0c0d0f;
  color: var(--red);
  font-size: 1rem;
  letter-spacing: 0.06em;
}
.site-footer {
  padding: 0 0 18px;
  color: var(--muted);
  text-align: center;
  font-size: 0.88rem;
}
.site-footer .site-page-shell { padding-top: 14px; }

.cod-result-content {
  padding: 32px 28px 72px;
  text-align: center;
  background: #fff;
}
.cod-reminder-block { padding: 0 0 24px; }
.cod-reminder-block p {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.75;
}
.cod-red-line { color: var(--red); }
.cod-fail-strip {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #0b0b0b 0%, #d7151f 50%, #0b0b0b 100%);
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.16em;
  padding-inline: 12px;
}
.cod-order-code {
  margin: 34px 0 20px;
  font-size: 1.35rem;
  font-weight: 900;
}
.cod-order-code span { display: block; margin-top: 12px; color: var(--red); font-size: clamp(1.9rem, 7vw, 2.55rem); }
.cod-result-notice {
  margin: 0 auto 30px;
  max-width: 480px;
  line-height: 1.8;
  color: #374151;
}
.cod-service-btn { min-width: 236px; }

/* ---------- admin ---------- */
.theme-admin {
  background:
    radial-gradient(circle at top right, rgba(215,21,31,0.1), transparent 28%),
    linear-gradient(180deg, #f7f8fb 0%, #eef1f7 100%);
}
.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}
.admin-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  background: linear-gradient(180deg, #060709 0%, #0b0e14 68%, #11131b 100%);
  color: #fff;
}
.admin-brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}
.admin-brand-mark {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--orange) 0%, var(--red) 100%);
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
  box-shadow: 0 15px 28px rgba(215, 21, 31, 0.28);
}
.admin-brand-text {
  display: grid;
  gap: 4px;
}
.admin-brand-text strong { font-size: 1.55rem; }
.admin-brand-text span { color: rgba(255,255,255,0.72); font-size: 1.1rem; }
.admin-nav { display: grid; gap: 10px; }
.admin-nav-link {
  min-height: 58px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  border-radius: 18px;
  color: rgba(255,255,255,0.78);
  font-size: 1.1rem;
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.admin-nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.admin-nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(255,255,255,0.11), rgba(255,255,255,0.05));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.admin-sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 16px;
}
.language-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lang-chip {
  min-height: 36px;
  min-width: 68px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
  font-size: 0.92rem;
  font-weight: 700;
}
.lang-chip.active {
  background: linear-gradient(180deg, #ff7d38, #d7151f);
  color: #fff;
}
.admin-logout-btn { width: 100%; min-height: 46px; }

.admin-main {
  min-width: 0;
  padding: 30px;
}
.admin-topbar {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.admin-topbar-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.admin-topbar h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.1;
}

.panel-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.single-column { grid-template-columns: minmax(0, 1fr); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}
.stat-card,
.panel-card {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(17,24,39,0.06);
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
}
.stat-card {
  min-height: 138px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stat-card span {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
}
.stat-card strong {
  font-size: clamp(2.1rem, 4vw, 3rem);
  line-height: 1;
}
.stat-card.accent-red {
  background: linear-gradient(135deg, #111827 0%, #171c2b 52%, rgba(215,21,31,0.92) 100%);
  color: #fff;
}
.stat-card.accent-red span { color: rgba(255,255,255,0.8); }
.panel-card { padding: 24px; }
.panel-card-header {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.panel-card-header h2 {
  margin: 0;
  font-size: 1.55rem;
}
.panel-card-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.split-header {
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.quick-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.quick-link-item {
  min-height: 116px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fafbff 0%, #f4f6fb 100%);
  border: 1px solid rgba(17,24,39,0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.quick-link-item strong { font-size: 1.08rem; }
.quick-link-item span { color: var(--muted); line-height: 1.6; }
.empty-state {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  border: 1px dashed rgba(17,24,39,0.14);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(248,250,252,0.8);
}
.empty-state h3,
.empty-state p,
.compact-empty p { margin: 0; }
.compact-empty { min-height: 120px; }

.filter-bar {
  margin-bottom: 20px;
  display: grid;
  gap: 14px;
  grid-template-columns: 1.6fr 0.8fr auto;
  align-items: end;
}
.filter-field { display: grid; gap: 8px; }
.filter-field label {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}
.filter-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-form,
.login-form { display: grid; gap: 18px; }
.form-group { display: grid; gap: 8px; }
.form-group label {
  font-size: 0.98rem;
  font-weight: 800;
}
.form-group input,
.form-group textarea,
.form-group select,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(215, 21, 31, 0.45);
  box-shadow: 0 0 0 4px rgba(215, 21, 31, 0.08);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.between-row { justify-content: space-between; }
.preview-image {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid rgba(17,24,39,0.08);
  background: #fff;
  padding: 10px;
}
.settings-section-title {
  margin-top: 8px;
  padding-top: 6px;
  color: #111827;
  font-size: 1.03rem;
  font-weight: 900;
}
.inline-upload-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.banner-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}
.banner-admin-card {
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(17,24,39,0.08);
  background: #fff;
  display: grid;
  gap: 14px;
}
.banner-admin-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 16px;
}
.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.checkbox-row input { width: 18px; height: 18px; }

.table-wrap {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(17,24,39,0.06);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.data-table th,
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(17,24,39,0.06);
  text-align: left;
  vertical-align: top;
  font-size: 0.95rem;
}
.data-table thead th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.data-table tbody tr:hover { background: #fcfcfd; }
.wrap-col { min-width: 180px; white-space: normal; }
.action-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.action-cell form { margin: 0; }
.table-link {
  color: var(--red);
  font-weight: 800;
}
.status-badge,
.log-action-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}
.status-pending { background: #fff3e7; color: #c25b0f; }
.status-reviewed { background: #eef2ff; color: #4f46e5; }
.status-confirmed { background: #e7f7ef; color: #0f9f56; }
.status-shipping { background: #eaf5ff; color: #2563eb; }
.status-completed { background: #ecfdf3; color: #15803d; }
.status-failed { background: #fff1f2; color: #be123c; }
.log-action-pill { background: rgba(17,24,39,0.08); color: #111827; }

.pagination-bar {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mobile-card-list { display: grid; gap: 12px; }
.mobile-order-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(17,24,39,0.08);
  background: #fff;
  display: grid;
  gap: 10px;
}
.mobile-order-card p,
.mobile-order-card small { margin: 0; }
.mobile-order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.mobile-card-actions { display: flex; justify-content: flex-end; }

.timeline-list { display: grid; gap: 16px; }
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 14px;
}
.timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 20px;
  bottom: -16px;
  width: 2px;
  background: rgba(17,24,39,0.08);
}
.timeline-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--orange), var(--red));
  box-shadow: 0 6px 14px rgba(215, 21, 31, 0.24);
}
.timeline-item strong,
.timeline-item p,
.timeline-item small { display: block; }
.timeline-item strong { margin-bottom: 4px; }
.timeline-item p { margin: 8px 0 0; color: #374151; line-height: 1.7; }
.timeline-item small { color: var(--muted); }

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background:
    radial-gradient(circle at 16% 22%, rgba(255, 123, 55, 0.18), transparent 20%),
    radial-gradient(circle at 84% 20%, rgba(215, 21, 31, 0.16), transparent 22%),
    linear-gradient(135deg, #0a0a0d 0%, #12040a 45%, #1a0b12 100%);
}
.premium-login-card {
  width: min(100%, 520px);
  padding: 34px;
  border-radius: 30px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 24px 60px rgba(0,0,0,0.24);
}
.login-hero { margin-bottom: 24px; }
.admin-login-pill {
  display: inline-flex;
  min-height: 34px;
  padding: 0 14px;
  align-items: center;
  border-radius: 999px;
  background: rgba(215,21,31,0.1);
  color: var(--red);
  font-weight: 900;
  letter-spacing: 0.14em;
  margin-bottom: 14px;
}
.login-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 2.8rem);
}
.login-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.narrow-form { max-width: 720px; }
.password-panel { max-width: 860px; }

@media (max-width: 1080px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: static;
    min-height: auto;
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
  }
  .admin-main { padding: 24px 16px 28px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .desktop-only { display: none; }
  .mobile-only { display: block; }

  .site-page-shell,
  .cod-page { width: 100%; }
  .cod-banner-placeholder,
  .hero-overlay-copy { padding: 28px 22px; }
  .cod-eyebrow {
    min-height: 42px;
    font-size: 1rem;
    padding-inline: 16px;
    letter-spacing: 0.14em;
  }
  .cod-banner-placeholder h1,
  .cod-banner-placeholder h2,
  .hero-overlay-copy h1,
  .hero-overlay-copy h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }
  .cod-strip {
    min-height: 52px;
    font-size: 1rem;
    letter-spacing: 0.4em;
    padding-left: 0.4em;
  }
  .cod-form-card { padding: 24px 20px 30px; }
  .cod-field input,
  .cod-field textarea { min-height: 56px; }
  .cod-primary-btn {
    min-width: 206px;
    min-height: 74px;
    font-size: 1rem;
  }
  .dark-intro-card {
    min-height: 260px;
    padding: 38px 20px;
  }

  .admin-sidebar { padding: 22px 16px; }
  .admin-brand-mark { width: 60px; height: 60px; font-size: 1.7rem; }
  .admin-brand-text strong { font-size: 1.35rem; }
  .admin-topbar { flex-direction: column; align-items: flex-start; }
  .stats-grid { grid-template-columns: 1fr; }
  .quick-link-grid,
  .grid-2,
  .filter-bar { grid-template-columns: 1fr; }
  .split-header { flex-direction: column; }
  .pagination-bar { flex-direction: column; align-items: flex-start; }
  .premium-login-card { padding: 28px 20px; }
}


/* front form v3: keep logo + brand + banner, bottom follows screenshot */
.with-brand-header { box-shadow: 0 0 0 1px rgba(0,0,0,0.06); background: #fff; }
.cod-brand-card {
  background: #f6f6f6;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.cod-brand-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 72px;
}
.cod-logo {
  max-width: 132px;
  max-height: 48px;
  object-fit: contain;
}
.cod-logo-placeholder {
  min-width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(180deg, #ff7e37 0%, #d7151f 100%);
  color: #fff;
  font-weight: 900;
  font-size: 1.1rem;
}
.cod-brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #202020;
}
.legacy-top-banner .cod-banner-carousel img,
.legacy-top-banner .cod-banner-placeholder {
  width: 100%;
  aspect-ratio: 592 / 320;
  object-fit: cover;
}
.simple-banner-carousel { background: #fff; }
.legacy-banner-placeholder {
  min-height: 320px;
  justify-content: center;
}
.refined-form-card { padding-top: 34px; }
@media (max-width: 720px) {
  .cod-brand-card { padding: 12px 18px; }
  .cod-brand-link { min-height: 58px; }
  .cod-logo { max-width: 110px; max-height: 42px; }
  .cod-brand-name { font-size: 1.08rem; }
  .legacy-top-banner .cod-banner-carousel img,
  .legacy-top-banner .cod-banner-placeholder { aspect-ratio: 592 / 300; }
}


/* front language switch */
.site-lang-float {
  position: fixed;
  top: 18px;
  right: max(8px, calc((100vw - 592px) / 2 + 10px));
  z-index: 50;
}
.site-lang-menu {
  position: relative;
}
.site-lang-menu summary {
  list-style: none;
}
.site-lang-menu summary::-webkit-details-marker {
  display: none;
}
.site-lang-trigger {
  min-width: 86px;
  min-height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 0 0 0 14px;
  background: rgba(255,255,255,0.96);
  color: #111827;
  box-shadow: 0 10px 25px rgba(17,24,39,0.12);
  cursor: pointer;
  border: 1px solid rgba(17,24,39,0.08);
}
.site-lang-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
}
.site-lang-icon svg,
.site-lang-chevron svg {
  width: 100%;
  height: 100%;
  display: block;
}
.site-lang-text {
  font-size: 0.95rem;
  font-weight: 800;
}
.site-lang-chevron {
  width: 12px;
  height: 12px;
  display: inline-flex;
  transition: transform 0.18s ease;
}
.site-lang-menu[open] .site-lang-chevron {
  transform: rotate(180deg);
}
.site-lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 136px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(17,24,39,0.08);
  box-shadow: 0 16px 30px rgba(17,24,39,0.14);
  display: grid;
  gap: 4px;
}
.site-lang-option {
  min-height: 38px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  border-radius: 10px;
  font-size: 0.92rem;
  color: #374151;
}
.site-lang-option:hover,
.site-lang-option.active {
  background: rgba(215,21,31,0.08);
  color: var(--red);
  font-weight: 800;
}

/* keep brand + banner layout on both site pages */
.refined-homepage,
.refined-result-page {
  position: relative;
  overflow: hidden;
}
.cod-brand-card {
  position: relative;
}
.simple-banner-carousel {
  background: #fff;
}
.simple-banner-carousel img {
  width: 100%;
  aspect-ratio: 592 / 330;
  object-fit: cover;
}
.legacy-banner-placeholder {
  min-height: 310px;
  justify-content: center;
}
.cod-result-page .cod-strip,
.cod-form-page .cod-strip {
  border-top: 1px solid rgba(0,0,0,0.04);
}

@media (max-width: 720px) {
  .site-lang-float {
    top: 4px;
    right: 2px;
  }
  .site-lang-trigger {
    min-width: 74px;
    min-height: 40px;
    padding-inline: 10px;
  }
  .site-lang-dropdown {
    min-width: 122px;
  }
  .simple-banner-carousel img {
    aspect-ratio: 592 / 295;
  }
}
