/* ---------- Reset & variables ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1a1d29;
  background: #f5f6fa;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
:root {
  --red: #e6002d;
  --red-dark: #b8001f;
  --ink: #1a1d29;
  --ink-soft: #565b70;
  --border: #e3e5ec;
  --surface: #ffffff;
  --bg: #f5f6fa;
  --success: #16a34a;
  --radius: 12px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.2; }
p { margin: 0 0 12px; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--ink);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: #fff; }
.brand-mark {
  background: var(--red);
  color: #fff;
  font-weight: 800;
  border-radius: 8px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.main-nav { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.main-nav a { color: #d7d9e2; font-weight: 500; font-size: 14px; padding: 8px 4px; position: relative; }
.main-nav a:hover, .main-nav a.active { color: #fff; }
.cart-link { display: flex; align-items: center; gap: 6px; }
.cart-badge {
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px; display: inline-flex;
  align-items: center; justify-content: center; padding: 0 4px;
}
.cart-badge:empty { display: none; }
.lang-switch { display: flex; gap: 6px; }
.lang-switch a {
  font-size: 12px; font-weight: 700; color: #a9adbd; padding: 4px 7px; border-radius: 6px;
}
.lang-switch a.lang-active, .lang-switch a:hover { color: #fff; background: rgba(255,255,255,0.1); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; color: var(--ink); font-weight: 600; font-size: 14px;
  cursor: pointer; transition: all .15s ease;
}
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-ghost { background: transparent; }
.btn-lg { padding: 13px 26px; font-size: 15px; width: 100%; }
.btn-small { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-btn {
  background: none; border: none; color: var(--ink-soft); font-size: 13px;
  cursor: pointer; padding: 0; text-decoration: underline;
}
.link-btn.danger { color: var(--red); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1d29 0%, #2c3050 100%);
  color: #fff;
  padding: 64px 0;
}
.hero-inner { position: relative; z-index: 2; max-width: 640px; }
.hero h1 { font-size: 38px; }
.hero p { color: #c7c9d9; font-size: 16px; margin-bottom: 24px; }

/* Fond animé du hero : lueurs RGB façon éclairage gamer + trame circuit
   imprimé + puces hexagonales en rotation lente. Purement décoratif (CSS
   only, pas de JS ni d'image externe), masqué aux lecteurs d'écran. */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
.hero-grid {
  position: absolute;
  inset: -20% -20%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  animation: hero-grid-drift 34s linear infinite;
  mask-image: radial-gradient(ellipse 70% 90% at 75% 40%, #000 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 75% 40%, #000 40%, transparent 80%);
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.5;
}
.hero-orb-1 {
  width: 300px; height: 300px;
  background: var(--red);
  top: -90px; right: 6%;
  animation: hero-float-a 15s ease-in-out infinite;
}
.hero-orb-2 {
  width: 230px; height: 230px;
  background: #3b5bfd;
  bottom: -70px; right: 22%;
  animation: hero-float-b 19s ease-in-out infinite;
}
.hero-orb-3 {
  width: 170px; height: 170px;
  background: #8b3bfd;
  top: 28%; right: 1%;
  animation: hero-float-c 17s ease-in-out infinite;
}
.hero-chip {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}
.hero-chip-1 { width: 74px; height: 74px; top: 16%; right: 14%; animation: hero-chip-spin 42s linear infinite; }
.hero-chip-2 { width: 48px; height: 48px; top: 62%; right: 32%; animation: hero-chip-spin 56s linear infinite reverse; }
.hero-chip-3 { width: 36px; height: 36px; top: 42%; right: 7%; animation: hero-chip-spin 30s linear infinite; }
.hero-spark {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.8);
  opacity: 0;
  animation: hero-spark-twinkle 6s ease-in-out infinite;
}
.hero-spark-1 { top: 22%; right: 18%; animation-delay: 0s; }
.hero-spark-2 { top: 55%; right: 10%; animation-delay: 1.5s; }
.hero-spark-3 { top: 70%; right: 28%; animation-delay: 3s; }
.hero-spark-4 { top: 12%; right: 34%; animation-delay: 4.4s; }

@keyframes hero-grid-drift {
  from { transform: translate(0, 0); }
  to { transform: translate(44px, 44px); }
}
@keyframes hero-float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-34px, 26px) scale(1.08); }
}
@keyframes hero-float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(24px, -22px) scale(0.94); }
}
@keyframes hero-float-c {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-18px, -26px); }
}
@keyframes hero-chip-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes hero-spark-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  50% { opacity: 1; transform: scale(1.4); }
}

@media (max-width: 780px) {
  .hero-bg { opacity: 0.55; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-grid, .hero-orb, .hero-chip, .hero-spark { animation: none; }
}
.section-title { margin: 40px 0 20px; font-size: 22px; }
.page-title { margin: 32px 0 20px; font-size: 26px; }

/* ---------- Listing grid / cards ---------- */
.listing-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px; margin-bottom: 40px;
}
.listing-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s;
}
.listing-card:hover { box-shadow: 0 8px 24px rgba(20,20,40,0.08); transform: translateY(-2px); }
.listing-image { position: relative; aspect-ratio: 4/3; background: #eceef4; overflow: hidden; }
.listing-image img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 10px; left: 10px; background: rgba(26,29,41,0.85); color: #fff;
  font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 6px; text-transform: uppercase;
  letter-spacing: .03em;
}
.badge-recond { background: rgba(22,163,74,0.9); }
.badge-occasion { background: rgba(37,99,235,0.9); }
.badge-discount { left: auto; right: 10px; background: var(--red); }
.badge-outofstock { top: auto; bottom: 10px; left: 10px; background: rgba(0,0,0,0.75); }
.listing-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.listing-body h3 { font-size: 15px; min-height: 40px; }
.spec-list { list-style: none; padding: 0; margin: 0; font-size: 13px; color: var(--ink-soft); display: flex; flex-direction: column; gap: 3px; }
.listing-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 8px; }
.price-block { display: flex; flex-direction: column; }
.price { font-size: 18px; font-weight: 800; color: var(--ink); }
.price-original { font-size: 12px; color: #9a9db0; text-decoration: line-through; }
.price-block-lg .price { font-size: 30px; }

/* ---------- Filters ---------- */
.filters-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 28px; }
.filters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.filters-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.filters-form input, .filters-form select {
  padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit;
}
.filters-actions { display: flex; gap: 10px; margin-top: 14px; }
.empty-state { padding: 40px 0; text-align: center; color: var(--ink-soft); }

/* ---------- Product page ---------- */
.product-page { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; padding: 32px 20px 60px; }
.product-gallery { display: flex; flex-direction: column; gap: 12px; }
.product-image { background: #eceef4; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { font-size: 26px; margin-top: 10px; }
.stock-status { font-weight: 700; font-size: 14px; }
.stock-status.in-stock { color: var(--success); }
.stock-status.out-of-stock { color: var(--red); }
.warranty-note { color: var(--ink-soft); font-size: 14px; }
.warranty-note.warranty-none { background: #f0f1f6; border-radius: 8px; padding: 8px 12px; }
.warranty-note.warranty-none a { color: var(--red); font-weight: 600; }
.add-to-cart-form { display: flex; gap: 12px; align-items: end; margin: 20px 0; flex-wrap: wrap; }
.qty-picker { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.qty-picker input { width: 80px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; }
.add-to-cart-form .btn { flex: 1; }
.warranty-addon {
  display: flex; flex-direction: column; gap: 2px; width: 100%; order: 3;
  background: #fff8e6; border: 1px solid #ffe8ad; border-radius: 8px; padding: 10px 14px; font-size: 13px;
  font-weight: 600; color: var(--ink); cursor: pointer;
}
.warranty-addon input { margin-right: 8px; }
.warranty-addon small { font-weight: 400; color: var(--ink-soft); margin-left: 24px; }
.spec-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.spec-table th, .spec-table td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.spec-table th { width: 40%; color: var(--ink-soft); font-weight: 600; }
.product-description { color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.product-description p { margin: 0 0 14px; }
.product-description h3 {
  color: var(--ink); font-size: 15px; font-weight: 800; margin: 24px 0 10px;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.product-description h3:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.product-description ul { margin: 0 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.product-description li { font-size: 14px; }

@media (max-width: 860px) {
  .product-page { grid-template-columns: 1fr; }
}

/* ---------- Cart ---------- */
.cart-page { padding-bottom: 60px; }
.cart-lines { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.cart-line {
  display: grid; grid-template-columns: 70px 1fr auto auto auto; gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px;
}
.cart-line-image { width: 70px; height: 56px; border-radius: 8px; overflow: hidden; background: #eceef4; }
.cart-line-image img { width: 100%; height: 100%; object-fit: cover; }
.cart-line-info { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.cart-line-info a { font-weight: 600; }
.cart-line-warranty-tag { font-size: 12px; color: #a06a00; }
.cart-qty-form { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.cart-qty-form label { display: flex; flex-direction: column; font-size: 12px; color: var(--ink-soft); gap: 4px; }
.cart-qty-form input[type="number"] { width: 64px; padding: 7px; border: 1px solid var(--border); border-radius: 6px; }
.cart-warranty-toggle { flex-direction: row !important; align-items: center; gap: 6px !important; font-size: 12px; }
.cart-warranty-toggle input { width: auto; }
.cart-line-total { font-weight: 700; }
.cart-summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.cart-total-row { display: flex; justify-content: space-between; font-size: 18px; margin-bottom: 16px; }
.cart-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }

@media (max-width: 700px) {
  .cart-line { grid-template-columns: 60px 1fr; grid-template-areas: "img info" "qty qty" "total remove"; }
}

/* ---------- Checkout ---------- */
.checkout-page { padding-bottom: 60px; }
.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.checkout-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.checkout-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.checkout-form input, .checkout-form select, .checkout-form textarea {
  padding: 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit;
}
.form-row { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 12px; }
.payment-choice { display: flex; gap: 12px; }
.payment-option {
  display: flex; align-items: center; gap: 10px; border: 2px solid var(--red); border-radius: 10px;
  padding: 12px 16px; font-weight: 600; background: #fff5f6; flex-direction: row;
}
.twint-logo {
  background: #000; color: #ffe600; font-weight: 800; font-size: 13px; padding: 4px 10px; border-radius: 6px;
  letter-spacing: .02em;
}
.twint-logo-lg { font-size: 22px; padding: 8px 18px; border-radius: 10px; }
.secure-note { font-size: 13px; color: var(--ink-soft); }
.checkout-summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; position: sticky; top: 84px; }
.summary-line { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.summary-line-sub { border-bottom: none; padding: 0 0 6px 14px; font-size: 12px; color: var(--ink-soft); }
.summary-total { display: flex; justify-content: space-between; font-size: 18px; margin-top: 14px; }

/* ---------- Legal / CGV page ---------- */
.legal-page { max-width: 820px; padding-bottom: 70px; }
.legal-updated { color: var(--ink-soft); font-size: 13px; margin-bottom: 4px; }
.legal-intro { font-size: 15px; color: var(--ink-soft); margin-bottom: 28px; }
.legal-sections { display: flex; flex-direction: column; gap: 26px; }
.legal-section h2 { font-size: 17px; margin-bottom: 8px; scroll-margin-top: 84px; }
.legal-section p { color: var(--ink-soft); font-size: 14px; margin-bottom: 8px; }

@media (max-width: 860px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- TWINT payment page ---------- */
.twint-page { display: flex; justify-content: center; padding: 48px 20px 70px; }
.twint-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px; max-width: 420px; width: 100%; text-align: center;
}
.twint-header { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 12px; }
.twint-qr { display: flex; justify-content: center; margin: 20px 0; padding: 16px; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.twint-amount { display: flex; justify-content: space-between; font-size: 18px; margin: 16px 0; padding: 12px 0; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); }
.order-ref { font-size: 13px; color: var(--ink-soft); }
.demo-disclaimer { font-size: 12px; color: #c07a00; background: #fff8e6; border: 1px solid #ffe8ad; border-radius: 8px; padding: 8px 10px; margin-top: 14px; }

/* ---------- Confirmation ---------- */
.confirmation-page { display: flex; justify-content: center; padding: 48px 20px 80px; }
.confirmation-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 40px; max-width: 460px; width: 100%; text-align: center;
}
.confirmation-icon {
  width: 56px; height: 56px; border-radius: 50%; background: var(--success); color: #fff;
  font-size: 28px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
.summary-line-list { margin: 20px 0; text-align: left; }

/* ---------- Flash messages ---------- */
.flash { border-radius: 10px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
.flash-error { background: #fdeceb; color: #b8001f; border: 1px solid #f6c4c1; }
.flash-success { background: #eafaf0; color: #14803c; border: 1px solid #b8ecc9; }
.flash-info { background: #eef2ff; color: #3546c9; border: 1px solid #c9d2fb; }
.flash ul { margin: 0; padding-left: 18px; }
.flash-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #a9adbd; padding: 24px 0; margin-top: 40px; font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.footer-sub { margin-top: 4px; color: #8b8fa3; }
.footer-links { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.footer-links a { color: #c7c9d9; text-decoration: underline; }
.footer-links a:hover { color: #fff; }

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  background: var(--ink); color: #e3e5ec; padding: 14px 0;
  box-shadow: 0 -6px 20px rgba(0,0,0,0.25);
}
.cookie-banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cookie-banner-inner p { margin: 0; font-size: 13px; max-width: 760px; color: #c7c9d9; }
.cookie-banner-inner a:not(.btn) { color: #fff; text-decoration: underline; }
.cookie-banner .btn { flex-shrink: 0; }

/* ---------- Admin ---------- */
.admin-body { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--ink); color: #fff; padding: 20px; display: flex; flex-direction: column; }
.admin-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 24px; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.admin-nav a { padding: 10px 12px; border-radius: 8px; color: #c7c9d9; font-size: 14px; font-weight: 500; }
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,0.08); color: #fff; }
.admin-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 13px; }
.admin-user { color: #a9adbd; margin-bottom: 8px; word-break: break-all; }
.admin-footer .link-btn { color: #c7c9d9; }
.admin-content { padding: 32px 40px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.admin-quick-actions { display: flex; gap: 12px; margin-top: 8px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 8px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.stat-label { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.stat-value { font-size: 26px; font-weight: 800; }

.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.admin-table th, .admin-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.admin-table th { background: #f0f1f6; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
.listing-cell { display: flex; align-items: center; gap: 12px; }
.thumb { width: 48px; height: 40px; object-fit: cover; border-radius: 6px; background: #eceef4; }
.thumb-empty { background: #eceef4; }
.listing-cell-title { font-weight: 600; }
.listing-cell-sub { font-size: 12px; color: var(--ink-soft); }
.pill { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 20px; text-transform: uppercase; }
.pill-published { background: #eafaf0; color: #14803c; }
.pill-draft { background: #f0f1f6; color: var(--ink-soft); }
.pill-order-pending { background: #fff8e6; color: #c07a00; }
.pill-order-paid { background: #eafaf0; color: #14803c; }
.pill-order-shipped { background: #eef2ff; color: #3546c9; }
.pill-order-cancelled { background: #fdeceb; color: #b8001f; }
.actions-cell { display: flex; gap: 12px; align-items: center; }

.listing-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; max-width: 900px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.form-grid input, .form-grid select, .form-grid textarea {
  padding: 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit;
}
.field-hint { font-size: 12px; color: var(--ink-soft); margin: 6px 0; }
.existing-images { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.existing-image {
  display: flex; flex-direction: column; gap: 4px; font-size: 12px;
  position: relative; border: 1px solid var(--border); border-radius: 8px; padding: 6px; background: var(--surface);
}
.existing-image:has(input[name="cover_image_id"]:checked) { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.existing-image img { width: 90px; height: 70px; object-fit: cover; border-radius: 6px; }
.cover-tag {
  position: absolute; top: 2px; left: 2px; background: var(--red); color: #fff; font-size: 9px;
  font-weight: 700; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: .02em;
}
.existing-image-actions { display: flex; flex-direction: column; gap: 2px; }
.existing-image-radio { display: flex; align-items: center; gap: 4px; font-weight: 400; cursor: pointer; }
.form-actions { display: flex; gap: 12px; margin-top: 20px; }

.order-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.order-detail-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.order-detail-card select { padding: 8px; border-radius: 8px; border: 1px solid var(--border); margin-right: 10px; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: sticky; top: 0; z-index: 10; flex-direction: row; align-items: center; padding: 12px 20px; }
  .admin-nav { flex-direction: row; }
  .admin-footer { display: none; }
  .admin-content { padding: 20px; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ---------- Login ---------- */
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--ink); }
.login-card { background: var(--surface); border-radius: var(--radius); padding: 36px; max-width: 380px; width: 100%; }
.login-card h1 { font-size: 20px; margin: 10px 0 20px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.login-card input { padding: 11px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: 90px 20px; }
.error-page h1 { font-size: 72px; color: var(--red); margin: 0; }
