:root {
  font-family: Arial, sans-serif;
  --app-bg: #f4f5f1;
  --surface: #ffffff;
  --primary: #17251d;
  --accent: #00c9c8;
  --accent-soft: #d7f7f5;
  --primary-soft: #dce4e0;
  --text: #171a17;
  --muted: #657069;
  --on-primary: #ffffff;
  --border: #dfe4df;
  --input-bg: #ffffff;
  --action-turquoise: #0aa8a7;
  --action-blue: #126fd1;
  --action-violet: #7b46b5;
  --action-orange: #e77c18;
  --danger: #9b477f;
  --stock-green-bg: #d9f7e6;
  --stock-green-text: #17633a;
  --stock-orange-bg: #ffead0;
  --stock-orange-text: #8a4c08;
  --stock-red-bg: #ffe0dc;
  --stock-red-text: #9b2d20;
  --circuit-orange: #00c9c8;
  --circuit-gray: #238ccf;
}

* { box-sizing: border-box; }
html { background: var(--app-bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 0 28%, var(--accent-soft) 0, transparent 34%),
    radial-gradient(circle at 100% 76%, #bceff2 0, transparent 32%),
    linear-gradient(135deg, #d8edf9 0%, var(--app-bg) 46%, #d9f8f6 100%);
  background-attachment: fixed;
}
.app-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom));
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(145deg, #031d48 0%, #075a7d 58%, #00bfc0 100%);
  transition: opacity .35s ease, visibility .35s ease;
}
.app-splash.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.app-splash-glow { position: absolute; width: 78vw; height: 78vw; max-width: 520px; max-height: 520px; border-radius: 50%; background: #50fff02e; filter: blur(28px); }
.app-splash img { position: relative; width: 116px; height: 116px; border-radius: 27px; box-shadow: 0 20px 54px #00163166; animation: splashPulse 1.35s ease-in-out infinite alternate; }
.app-splash strong { position: relative; font-size: 30px; letter-spacing: -.03em; }
.app-splash span { position: relative; font-size: 8px; font-weight: 900; letter-spacing: .33em; text-align: center; opacity: .82; }
@keyframes splashPulse { from { transform: translateY(0); box-shadow: 0 20px 54px #00163166; } to { transform: translateY(-5px); box-shadow: 0 25px 65px #00fff255; } }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .46;
  background:
    linear-gradient(135deg, transparent 0 48%, #ffffff 48.2% 48.7%, transparent 49%) 0 0 / 360px 360px,
    linear-gradient(45deg, transparent 0 48%, var(--primary-soft) 48.3% 48.7%, transparent 49%) 90px 45px / 460px 460px;
  mask-image: linear-gradient(to bottom, #000, #0008 68%, transparent);
}
.hidden { display: none !important; }
.role-hidden { display: none !important; }
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center start;
  padding: clamp(22px, 5vw, 76px);
  background:
    linear-gradient(90deg, #041a3bd9 0, #06285cb3 29%, #06285c26 58%, transparent 76%),
    url("/connectstock-login-logistics.png?v=1100-app") center / cover no-repeat;
}
.card, .panel {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 16px 45px #00183312, inset 0 1px 0 #ffffff70;
}
.auth .card {
  width: min(430px, 100%);
  border-color: #ffffff8c;
  background: #fffffff2;
  box-shadow: 0 28px 75px #00152f66, inset 0 1px 0 #ffffff;
  backdrop-filter: blur(14px);
}
.install-area { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.install-area .install-app-button { width: 100%; margin: 0; color: #ffffff; background: linear-gradient(100deg, #031d48, #008b9c, #00c8c2); box-shadow: 0 8px 22px #007f9138; }
.install-area p { margin: 9px 4px 0; color: #4b5b68; font-size: 12px; line-height: 1.45; text-align: center; }
.brand-logo { display: block; width: 100%; height: auto; object-fit: contain; object-position: center; }
.goldphone-logo { display: inline-block; margin: 4px 0 8px; font-size: 22px; font-weight: 1000; letter-spacing: -1px; color: #ffffff; -webkit-text-stroke: 1px #111111; text-shadow: 1px 1px 0 #111111; }
.goldphone-logo span { -webkit-text-stroke: 1px #111111; }
.goldphone-yellow span { color: #f4c400; }
.goldphone-orange span { color: #f07a22; }
.goldphone-rose span { color: #b76e79; }
.shop-custom-logo { display: block; width: min(220px, 100%); height: 72px; object-fit: contain; object-position: left center; margin: 0 0 8px; }
.auth-logo-plate, .header-logo-plate {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 8px 22px #00000020;
}
.auth-logo-plate { width: 100%; padding: 8px 12px 11px; margin-bottom: 16px; }
.header-logo-plate { width: min(340px, 55vw); padding: 5px 10px 8px; flex: 0 0 auto; overflow: visible; box-shadow: 0 10px 28px #00152f30; background: #ffffff; }
.brand-kicker { display: block; margin-top: 5px; color: #687383; font-size: 9px; font-weight: 800; letter-spacing: .34em; text-align: center; }
h1 { margin: 5px 0 12px; }
h2 { margin-top: 0; }
p { color: var(--muted); }
label { display: block; margin-top: 10px; font-size: 13px; font-weight: 800; color: var(--muted); }
input, select, textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 6px 0;
  font-size: 16px;
  font-family: inherit;
  background: var(--input-bg);
  color: var(--text);
}
textarea { resize: vertical; }
input[type="color"] { min-height: 48px; padding: 5px; cursor: pointer; }
input[type="file"] { padding: 10px; }
.password-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; align-items: center; margin: 6px 0; }
.password-field input { margin: 0; }
.password-field button { min-height: 48px; padding: 8px 10px; font-size: 10px; }
.file-picker { display: flex; align-items: center; gap: 10px; min-width: 0; margin: 6px 0; }
.file-picker input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-picker label { flex: 0 0 auto; margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--primary); color: var(--on-primary); cursor: pointer; font-size: 13px; }
.file-picker span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
button {
  border: 0;
  border-radius: 11px;
  padding: 12px 16px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 800;
  cursor: pointer;
}
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #4d9fff88; outline-offset: 2px; }
button:disabled { opacity: .5; cursor: not-allowed; }
form > button { width: 100%; margin-top: 10px; }
header {
  position: relative;
  z-index: 2;
  width: 100%;
  background: linear-gradient(105deg, #031d48 0%, #074e76 50%, #00bfc0 100%);
  color: #ffffff;
  padding: 10px max(20px, calc((100vw - 1180px) / 2 + 20px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
header > div:last-child { text-align: right; }
.header-brand { flex: 0 0 auto; }
.header-motto { margin-left: auto; padding-left: 22px; border-left: 3px solid #7ff9f0; color: #ffffffd9; font-size: 10px; font-weight: 800; line-height: 1.65; letter-spacing: .28em; text-transform: uppercase; }
.header-motto span { display: block; }
.header-account-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; flex-wrap: wrap; }
.account-private-note { margin: 0; padding: 10px; border-radius: 10px; background: var(--app-bg); border: 1px solid var(--border); }
.account-lock-alert { padding: 11px; border-radius: 10px; background: var(--stock-red-bg); color: var(--stock-red-text); border: 1px solid var(--stock-red-text); font-size: 12px; font-weight: 900; }
.ghost { background: #ffffff12; color: #ffffff; border: 1px solid #ffffff99; font-size: 11px; padding: 7px; margin-left: 8px; }
#app { position: relative; min-height: 100vh; overflow: hidden; }
.cyber-backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .38; }
.cyber-backdrop svg { width: 100%; height: 100%; }
.cyber-backdrop path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.circuit-muted { stroke: var(--circuit-gray); stroke-width: 1.1; opacity: .3; }
.circuit-accent { fill: var(--circuit-orange); stroke: var(--circuit-orange); stroke-width: 1.35; opacity: .56; }
main { position: relative; z-index: 1; max-width: 1180px; margin: auto; padding: 14px 20px 20px; }
nav {
  display: flex;
  gap: 6px;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px;
  border-radius: 16px;
  margin-bottom: 18px;
  box-shadow: 0 10px 28px #0018330d;
}
.app-footer {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 5px 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 11px;
}
.app-footer span { display: flex; align-items: center; gap: 12px; }
.app-footer i { display: inline-block; width: 1px; height: 18px; background: var(--muted); opacity: .55; }
.app-footer strong { font-size: 9px; letter-spacing: .42em; white-space: nowrap; }
.app-footer b { color: var(--circuit-orange); }
.section-kicker { margin: -5px 0 12px; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .38em; text-transform: uppercase; }
nav button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  background: transparent;
  color: var(--text);
  transition: color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
nav button::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 2px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), #ffffff, var(--accent), transparent);
  opacity: 0;
  transform: scaleX(.25);
  transition: opacity .18s ease, transform .18s ease;
}
nav button:hover:not(.active) { background: var(--primary-soft); color: var(--primary); transform: translateY(-1px); }
nav button:hover::after { opacity: .82; transform: scaleX(1); }
nav button.active { background: var(--primary); color: var(--on-primary); box-shadow: inset 0 -3px 0 var(--accent); }
nav button.nav-click::after { animation: navFlash .42s ease-out; }
.mobile-more-control, .mobile-more-menu { display: none; }
@keyframes navFlash {
  0% { opacity: 0; transform: translateX(-90%) scaleX(.25); }
  45% { opacity: 1; transform: translateX(0) scaleX(1); filter: brightness(1.8); }
  100% { opacity: 0; transform: translateX(90%) scaleX(.25); }
}
.unread-badge {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #6945c4, #a747b3);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 0 3px var(--surface), 0 5px 13px #2f276b42;
}
.unread-orders { background: linear-gradient(135deg, #0769b5, #00a0b5); }
.unread-claims { background: linear-gradient(135deg, #d47624, #ac477c); }
.unread-access { background: linear-gradient(135deg, #6945c4, #a747b3); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 128px;
  padding: 18px 18px 18px 76px;
  border-radius: 18px;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 #ffffff70, 0 9px 25px #0018330b;
}
.stat::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -14%;
  bottom: -72%;
  width: 78%;
  height: 120%;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff00, #ffffff4d);
  transform: rotate(-12deg);
}
.stat-icon {
  position: absolute;
  left: 18px;
  top: 20px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff72;
  border: 1px solid #ffffff9c;
}
.stat-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.stat b { display: block; font-size: 30px; margin-top: 14px; }
.stat.neutral { background: linear-gradient(135deg, var(--surface), var(--primary-soft)); color: var(--text); border-color: var(--border); }
.stock-good { background: linear-gradient(135deg, #daf8e7, #bcefd5) !important; color: var(--stock-green-text) !important; }
.stock-watch { background: linear-gradient(135deg, #fff0dc, #ffd6a4) !important; color: var(--stock-orange-text) !important; }
.stock-low { background: linear-gradient(135deg, #ffe7e4, #ffc5be) !important; color: var(--stock-red-text) !important; }
.stock-out { background: linear-gradient(135deg, #ff3131, #d90018) !important; color: #ffffff !important; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-bottom: 1px solid var(--border); }
.row:last-child { border: 0; }
.row-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.muted { font-size: 12px; color: var(--muted); }
.badge { display: inline-block; border-radius: 30px; padding: 6px 10px; font-size: 11px; font-weight: 800; background: var(--app-bg); color: var(--text); white-space: nowrap; }
.qty { display: flex; align-items: center; gap: 10px; }
.qty button { padding: 8px 12px; min-width: 40px; font-size: 18px; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.two { display: grid; grid-template-columns: 1.35fr .65fr; gap: 16px; }
.scan { display: flex; gap: 8px; }
.scan input { margin: 0; }
.shop-filter { max-width: 260px; }
.danger { display: inline-flex; align-items: center; justify-content: center; gap: 9px; background: linear-gradient(135deg, #6546b6, #914ab0); color: #ffffff; box-shadow: 0 8px 20px #63345c28; transition: transform .18s ease, filter .18s ease, box-shadow .18s ease; }
.danger:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 11px 25px #63345c38; }
.danger svg, .mini-danger svg { width: 19px; height: 19px; flex: 0 0 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.success { background: linear-gradient(135deg, #078a83, #10ae93); color: #ffffff; box-shadow: 0 8px 20px #087b6c24; }
.notice { border-radius: 14px; padding: 13px; background: var(--app-bg); border: 1px solid var(--border); color: var(--text); }
.ghost-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.history-action { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 10px 16px; border: 0; color: #fff; box-shadow: 0 8px 20px #001b4630; }
.history-action svg, .shop-access-button svg, .shop-edit-button svg, .shop-more-menu svg, .shop-menu-action svg, .access-archive-tabs svg { width: 23px; height: 23px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.history-sales { background: linear-gradient(135deg, #079aa5, #13b9b3); }
.history-orders { background: linear-gradient(135deg, #075ab9, #147fe7); }
.history-claims { background: linear-gradient(135deg, #dc6c08, #ff941f); }
.history-action:hover { filter: brightness(1.06); transform: translateY(-1px); }
.order-card { border: 1px solid var(--border); border-radius: 16px; margin-top: 12px; overflow: hidden; background: var(--surface); }
.order-card .row { border-bottom: 0; }
.tracking-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 12px 12px;
  padding: 14px;
  border-radius: 13px;
  background: var(--app-bg);
  border: 1px solid var(--border);
}
.tracking-info > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tracking-label { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.tracking-info code { font-size: 16px; font-weight: 900; color: var(--text); overflow-wrap: anywhere; }
.tracking-info small { color: var(--muted); }
.shipping-form { margin: 0 12px 12px; padding: 15px; border-radius: 14px; background: var(--app-bg); border: 1px solid var(--border); }
.shipping-form h3 { margin: 0 0 8px; }
.optional-label { display: inline-block; margin-left: 5px; padding: 4px 7px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 10px; text-transform: uppercase; vertical-align: middle; }
.shipping-fields { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 10px; align-items: end; }
.shipping-form .actions { margin-top: 10px; }

.stock-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.stock-summary .stat { min-height: 122px; padding: 14px 14px 14px 64px; }
.stock-summary .stat b { margin-top: 6px; font-size: 24px; }
.stock-summary .stat small { display: block; margin-top: 4px; font-weight: 800; opacity: .82; }
.grid.stats .stat small { display: block; margin-top: 6px; font-weight: 800; opacity: .82; }
.dashboard-product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dashboard-product-card { overflow: hidden; border: 1px solid var(--border); border-radius: 17px; background: var(--surface); }
.dashboard-product-head { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 14px; padding: 14px; }
.dashboard-product-head .product-photo, .dashboard-product-head .photo-placeholder { width: 112px; height: 112px; border-radius: 14px; object-fit: cover; border: 1px solid var(--border); background: var(--app-bg); }
.dashboard-product-head h3 { margin: 0 0 8px; }
.dashboard-product-head b { display: block; margin-bottom: 8px; font-size: 24px; }
.dashboard-product-card details { border-top: 1px solid var(--border); }
.dashboard-product-card summary { padding: 12px 14px; color: var(--primary); font-size: 13px; font-weight: 900; cursor: pointer; list-style-position: inside; }
.dashboard-series-list { padding: 0 14px 8px; }
.dashboard-series-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.dashboard-series-row > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dashboard-series-row .product-thumb, .dashboard-series-row .photo-placeholder { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 9px; object-fit: cover; border: 1px solid var(--border); background: var(--app-bg); }
.dashboard-series-row span, .dashboard-series-row small { display: block; }
.dashboard-series-row small { margin-top: 3px; color: var(--muted); }
.dashboard-series-row > b { white-space: nowrap; }
.stock-defective { background: linear-gradient(135deg, #8662cf, #5933a3); color: #ffffff; }
.stock-missing { background: linear-gradient(135deg, #238fb9, #135c8a); color: #ffffff; }
.claim-stat small { line-height: 1.35; }
.claim-stat small strong { font-size: 13px; }
.shop-stock-reset { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 14px; }
.shop-stock-reset .muted { flex: 1; }
.stock-tools { display: grid; grid-template-columns: minmax(0, 1fr) repeat(2, minmax(190px, .32fr)); gap: 10px; margin: 4px 0 14px; }
.pending-photo { position: relative; display: inline-grid; }.pending-photo img { width: 100%; height: 100%; object-fit: cover; }
.pending-photo button { position: absolute; top: 5px; right: 5px; width: 28px; height: 28px; padding: 0; border-radius: 50%; background: #7b2431; color: #fff; font-size: 20px; line-height: 1; }
.stock-product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stock-product-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
}
.stock-product-card .product-photo, .stock-product-card .photo-placeholder {
  width: 116px;
  height: 116px;
  border-radius: 15px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--app-bg);
}
.stock-product-card .photo-placeholder { display: grid; place-items: center; font-size: 40px; }
.stock-product-info { min-width: 0; }
.stock-model { margin: 4px 0; font-size: 13px; color: var(--text); }
.product-description { margin: 7px 0; color: var(--text); font-size: 13px; line-height: 1.4; white-space: pre-line; }
.empty-description { color: var(--muted); font-style: italic; }
.stock-quantity { display: flex; flex-direction: column; align-items: center; min-width: 92px; }
.stock-quantity > strong { font-size: 34px; line-height: 1; }
.stock-quantity > span:not(.badge) { margin: 3px 0 9px; color: var(--muted); font-size: 12px; }
.stock-client-correction { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 10px; }
.stock-client-correction h3 { margin: 0 0 6px; font-size: 15px; }
.stock-correction-fields { display: grid; grid-template-columns: minmax(130px, .45fr) minmax(0, 1fr); gap: 8px; align-items: end; }
.stock-correction-fields label { margin: 0; }
.stock-correction-fields input { margin-bottom: 0; }
.stock-correction-fields button { grid-column: 1 / -1; width: 100%; min-height: 48px; white-space: normal; }
.professional-list { display: grid; gap: 10px; }
.professional-card { display: flex; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; }
.professional-card > div:first-child { display: grid; gap: 4px; }
.professional-card strong { color: var(--primary); }
.professional-card span { color: var(--muted); white-space: pre-line; }
.professional-tools { display: grid; gap: 12px; min-width: min(430px, 46%); }
.professional-tools > .actions { justify-content: flex-end; }
.compact-shop-card { display: grid; grid-template-columns: 150px minmax(260px, 1fr) auto; align-items: center; gap: 18px; padding: 17px 20px; background: linear-gradient(135deg, var(--surface), var(--input-bg)); box-shadow: 0 7px 22px #001b4612; overflow: visible; }
.compact-shop-card > div:first-child { display: flex; }
.compact-shop-logo { align-items: center; justify-content: center; min-height: 88px; }
.compact-shop-logo .shop-custom-logo { width: 100px; height: 88px; object-fit: contain; }
.compact-shop-logo .goldphone-logo { font-size: 19px; }
.compact-shop-logo .shop-no-logo { display: grid; place-items: center; width: 100px; min-height: 72px; border: 1px dashed var(--border); border-radius: 12px; text-align: center; font-size: 12px; }
.compact-shop-info { display: grid; gap: 4px; min-width: 0; }
.compact-shop-info > span { color: var(--muted); font-size: 13px; }
.compact-shop-info > strong { color: var(--text); font-size: 21px; line-height: 1.2; }
.compact-shop-info > small { color: var(--muted); white-space: normal; overflow-wrap: anywhere; }
.compact-shop-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.shop-access-button, .shop-edit-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; white-space: nowrap; }
.shop-access-button { background: linear-gradient(135deg, #075ab9, #147fe7); color: #fff; }
.shop-edit-button { background: var(--surface); color: #075ab9; border: 1px solid #147fe7; }
.shop-more-menu { position: relative; }
.shop-more-menu > summary { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--border); border-radius: 12px; background: var(--input-bg); color: var(--text); cursor: pointer; list-style: none; }
.shop-more-menu > summary::-webkit-details-marker { display: none; }
.shop-more-menu[open] > summary { background: var(--primary-soft); color: var(--primary); }
.shop-more-menu > div { position: absolute; z-index: 25; top: calc(100% + 8px); right: 0; display: grid; width: min(330px, 82vw); padding: 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 18px 50px #00152f38; }
.shop-more-menu input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.shop-menu-action { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font: inherit; font-weight: 750; text-align: left; cursor: pointer; }
.shop-menu-action:hover { background: var(--primary-soft); color: var(--primary); }
.shop-menu-action.destructive { color: #8744a6; background: #f5effb; }
.shop-menu-action.destructive:hover { background: #eadcf7; color: #64318c; }
.access-archive-tabs { display: grid; grid-template-columns: 1fr 1fr; }
.access-archive-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; }
.shop-logo-editor { padding: 12px; border-radius: 12px; background: var(--app-bg); border: 1px solid var(--border); }
.shop-logo-editor .file-picker { margin: 8px 0; }
.shop-no-logo { display: inline-flex; align-items: center; width: fit-content; min-height: 34px; padding: 6px 10px; border: 1px dashed var(--border); border-radius: 9px; color: var(--muted); font-size: 12px; font-weight: 800; }
.shop-account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.shop-account-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; padding: 15px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.shop-account-card label { margin: 0; }
.shop-account-card .wide, .shop-account-card > button, .shop-account-title { grid-column: 1 / -1; }
.shop-account-title { display: flex; align-items: center; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.shop-account-title > div { display: grid; gap: 3px; }
.shop-account-title span { color: var(--muted); font-size: 13px; }
.account-self-form { max-width: 620px; }
.purchase-invoice-import { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: stretch; }
.purchase-invoice-import .file-picker { margin: 0; }
.purchase-invoice-import > button { margin: 0; min-width: 210px; }
.purchase-invoice-list { margin-top: 14px; border-top: 1px solid var(--border); }
.claim-line { display: grid; grid-template-columns: minmax(220px, 1fr) 130px minmax(260px, 1fr) auto; gap: 10px; align-items: end; padding: 12px; margin: 10px 0; border: 1px solid var(--border); border-radius: 14px; background: var(--app-bg); }
.claim-line label { margin: 0; }
.claim-line input, .claim-line select, .claim-line .file-picker { margin-bottom: 0; }
.claim-card { padding: 14px; margin-top: 12px; border: 2px solid var(--border); border-radius: 15px; }
.claim-pending { border-left-color: #d58a1f; }
.claim-approved { border-left-color: #1e8c4f; }
.claim-refused { border-left-color: #b7342b; opacity: .8; }
.claim-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); }
.claim-credit { padding: 10px; border-radius: 10px; background: #e8f7ed; color: #185d37; }
.claim-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.claim-entry { display: flex; flex-direction: column; padding: 16px; border: 2px solid var(--border); border-radius: 15px; background: var(--surface); }
.claim-entry h3 { margin-top: 0; }
.claim-entry-defective { border-top-color: #7557b8; }
.claim-entry-missing { border-top-color: #2879a8; }
.claim-entry > button { margin-top: auto; }
.empty-state { padding: 24px; text-align: center; color: var(--muted); }
.product-thumb, .photo-placeholder {
  width: 58px;
  height: 58px;
  border-radius: 13px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--app-bg);
}
.photo-placeholder { display: grid; place-items: center; font-size: 25px; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.product-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
}
.product-card .product-photo, .product-card .photo-placeholder {
  width: 112px;
  height: 112px;
  border-radius: 15px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--app-bg);
}
.product-card .photo-placeholder { display: grid; place-items: center; font-size: 40px; }
.product-info { min-width: 0; }
.product-name { display: block; margin-bottom: 4px; }
.price { display: block; font-size: 18px; margin: 8px 0; }
.lot-note { font-size: 12px; color: var(--muted); margin: 7px 0; }
.catalog-stock { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin: 9px 0; padding: 9px 11px; border-radius: 11px; font-size: 12px; }
.catalog-stock b { font-size: 14px; white-space: nowrap; }
.cart-total { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }

.admin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.span-all { grid-column: 1 / -1; }
.photo-preview {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-top: 8px;
}
.photo-preview-grid { display:grid; grid-template-columns:repeat(5,minmax(72px,120px)); gap:9px; margin-top:8px; }
.compact-photo-preview { flex:1 1 100%; width:100%; }
.photo-preview-grid img { width:100%; aspect-ratio:1; object-fit:cover; border:1px solid var(--border); border-radius:12px; background:var(--surface); }
.photo-manager { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.photo-card { border: 1px solid var(--border); border-radius: 16px; padding: 12px; background: var(--surface); }
.photo-card .product-thumb, .photo-card .photo-placeholder { width: 100%; height: 130px; margin-bottom: 8px; }
.photo-card input { font-size: 12px; }
.photo-card button { width: 100%; }
.product-editor-card label { margin-top: 8px; }
.product-editor-card input, .product-editor-card textarea { font-size: 14px; padding: 11px; }
.product-editor-card button + label { margin-top: 14px; }
.product-delete-action { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; margin-top: 8px; border: 0; color: #ffffff; background: linear-gradient(135deg, #7045b8, #a64388); box-shadow: 0 8px 20px #5426622b; }
.product-delete-action svg { flex: 0 0 20px; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.product-delete-action:hover { transform: translateY(-1px); filter: brightness(1.07); }
.stock-editor {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--app-bg);
}
.stock-editor h3 { margin: 0 0 5px; font-size: 16px; }
.stock-editor p { margin: 0 0 8px; line-height: 1.4; }
.stock-field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stock-field-grid label { margin-top: 0; }
.stock-field-grid input { background: var(--surface); }
.stock-correction button { width: 100%; margin-top: 10px; }
.product-editor-card .stock-field-grid { grid-template-columns: 1fr; }
.billing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.billing-grid label { margin-top: 0; }
.billing-address { grid-column: 1 / -1; }

.theme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.theme-choice {
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
  text-align: left;
  min-height: 105px;
}
.theme-choice.active { border-color: var(--primary); box-shadow: 0 0 0 2px #4d9fff33; }
.theme-swatches { display: flex; gap: 6px; margin-top: 12px; }
.theme-swatches i { display: block; width: 27px; height: 27px; border-radius: 50%; border: 1px solid #00000022; }
.custom-theme { margin-top: 16px; }
.color-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.fixed-stock-colors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.fixed-stock-colors span { border-radius: 12px; padding: 10px; text-align: center; font-size: 12px; font-weight: 900; }

#toast {
  position: fixed;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  color: #ffffff;
  display: none;
  z-index: 110;
  width: min(92vw, 540px);
  padding: 13px 18px;
  border-radius: 17px;
  box-shadow: 0 18px 48px #00152f55;
}
.toast-modern { align-items: center; gap: 12px; background: linear-gradient(135deg, #126e7b, #0b9f8a); }
.toast-modern[style*="display: block"] { display: flex !important; }
.toast-orders { background: linear-gradient(135deg, #075ea8, #0088a8); }
.toast-claims { background: linear-gradient(135deg, #b85f17, #9b3f71); }
.toast-sales { background: linear-gradient(135deg, #087c74, #11a681); }
.toast-error { background: linear-gradient(135deg, #7b3ca6, #b44582); }
.toast-symbol { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 13px; background: #ffffff24; }
.toast-symbol svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.toast-modern strong { line-height: 1.35; text-align: left; }
.history-delete-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.history-delete-action { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 14px 18px; border: 0; border-radius: 17px; color: #fff; text-align: left; box-shadow: 0 10px 25px #15243a25; }
.history-delete-sales { background: linear-gradient(135deg, #6840c6, #a43eb6); }
.history-delete-orders { background: linear-gradient(135deg, #075ea8, #0088a8); }
.history-delete-symbol { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; border-radius: 15px; background: #ffffff26; }
.history-delete-action svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.history-delete-action strong, .history-delete-action small { display: block; }
.history-delete-action small { margin-top: 4px; color: #ffffffd4; font-size: 12px; }
.history-delete-action:hover { transform: translateY(-2px); filter: brightness(1.06); }
.history-delete-action:active { transform: translateY(0); }
.panel > .section-title > svg { width: 30px; height: 30px; fill: none; stroke: var(--primary); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.notification-popup {
  --notification-accent: #078b91;
  --notification-accent-soft: #078b9122;
  --notification-action: #087c74;
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 120;
  display: grid;
  gap: 9px;
  width: min(390px, calc(100vw - 36px));
  padding: 18px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(145deg, #126e7b, #0b9f8a);
  color: #ffffff;
  box-shadow: 0 22px 65px #00152f5c;
}
.notification-orders { background: linear-gradient(145deg, #075798, #1782c4); }
.notification-claims { background: linear-gradient(145deg, #b85f17, #9b3f71); }
.notification-access { background: linear-gradient(145deg, #6040ae, #9448ad); }
.notification-heading { display: flex; align-items: center; gap: 9px; padding-right: 32px; }
.notification-heading small { padding: 5px 9px; border-radius: 999px; background: #ffffff24; color: #ffffff; font-size: 11px; font-weight: 850; letter-spacing: .07em; }
.notification-symbol { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: #ffffff24; color: #ffffff; }
.notification-symbol svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notification-popup strong { padding-right: 28px; font-size: 17px; }
.notification-popup > span { color: #ffffffdb; font-size: 13px; line-height: 1.45; }
.notification-popup > button:last-child { justify-self: start; width: auto; padding: 10px 15px; border: 1px solid #ffffff4a; background: #061a2a33; color: #ffffff; }
.notification-close { position: absolute; top: 9px; right: 9px; min-width: 34px; width: 34px; padding: 5px; border-radius: 11px; background: #ffffff24; color: #ffffff; font-size: 21px; }

.sales-history-title { margin-bottom: 10px; }
.sales-history-panel { margin-top: 16px; }
.scanner-ready { display: grid; grid-template-columns: 16px auto 1fr; align-items: center; gap: 10px; margin-top: 14px; padding: 13px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--app-bg); }
.scanner-ready > span { width: 13px; height: 13px; border-radius: 50%; background: #20c77a; box-shadow: 0 0 0 6px #20c77a22, 0 0 18px #20c77a; animation: scannerPulse 1.5s infinite; }
.scanner-ready small { color: var(--muted); }
@keyframes scannerPulse { 50% { opacity: .55; transform: scale(.82); } }
.sale-scan-overlay { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; pointer-events: none; background: #00152f5c; backdrop-filter: blur(5px); }
.sale-scan-orb { display: flex; width: min(560px, 88vw); min-height: min(560px, 88vw); aspect-ratio: 1; align-items: center; justify-content: center; flex-direction: column; gap: 9px; padding: 46px; border-radius: 50%; color: #fff; text-align: center; background: radial-gradient(circle at 32% 20%, #43f3cf, #058d9b 45%, #06285c 100%); border: 7px solid #ffffffcc; box-shadow: 0 0 0 14px #00d2b833, 0 30px 90px #00152f99; animation: saleOrbIn .22s ease-out; }
.sale-scan-photo { display: grid; place-items: center; width: 108px; height: 108px; overflow: hidden; border-radius: 26px; background: #ffffffee; color: #078b91; font-size: 65px; font-weight: 900; box-shadow: 0 10px 28px #00152f33; }
.sale-scan-photo .product-photo, .sale-scan-photo .photo-placeholder { width: 100%; height: 100%; border-radius: 0; object-fit: cover; }
.sale-scan-orb > strong { font-size: clamp(24px, 4vw, 42px); letter-spacing: .04em; }
.sale-scan-orb > span { max-width: 80%; font-size: clamp(17px, 2.4vw, 25px); }
.sale-scan-orb > b { font-size: clamp(46px, 8vw, 78px); line-height: 1; }
.sale-scan-orb > small { font-size: 17px; font-weight: 800; }
.sale-scan-orb > p { max-width: 78%; margin: 7px 0 0; font-size: 14px; font-weight: 700; }
.sale-scan-overlay.is-error .sale-scan-orb { background: radial-gradient(circle at 32% 20%, #ff8a7d, #db3e3e 48%, #6b1010); }
.sale-scan-overlay.is-closing .sale-scan-orb { background: radial-gradient(circle at 32% 20%, #8affb9, #16a864 48%, #07543a); }
@keyframes saleOrbIn { from { opacity: 0; transform: scale(.78); } to { opacity: 1; transform: scale(1); } }
.last-sale-chip { position: fixed; z-index: 45; right: 18px; bottom: 18px; display: grid; grid-template-columns: auto auto; gap: 2px 12px; padding: 11px 16px; border: 1px solid var(--border); border-radius: 14px; color: var(--text); background: var(--surface); box-shadow: 0 12px 35px #00152f44; }
.last-sale-chip span { grid-column: 1 / -1; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.last-sale-chip b { font-size: 18px; }.last-sale-chip small { align-self: center; }
.transaction-list { display: grid; gap: 8px; }
.sale-transaction { border: 1px solid var(--border); border-radius: 13px; background: var(--app-bg); overflow: hidden; }
.history-dialog { width: min(1050px, calc(100vw - 28px)); max-height: 90vh; overflow: auto; border: 0; border-radius: 20px; padding: 22px; background: var(--surface); color: var(--text); box-shadow: 0 25px 80px #00152f66; }
.history-dialog::backdrop { background: #00152f88; backdrop-filter: blur(3px); }
.history-presets, .access-archive-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.history-presets button.active, .access-archive-tabs button.active { background: var(--primary); color: var(--on-primary); }
.history-filters { display: grid; grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(140px, .6fr)) auto; gap: 10px; align-items: end; margin: 14px 0; }
.history-filters label { display: grid; gap: 5px; font-weight: 700; }
.history-summary { margin: 14px 0; }
.history-results { display: grid; gap: 8px; }
.history-row { border: 1px solid var(--border); border-radius: 12px; background: var(--app-bg); overflow: hidden; }
.history-row summary { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(220px, 1.6fr) auto; gap: 12px; align-items: center; padding: 11px 13px; cursor: pointer; }
.history-row > div { padding: 4px 14px 14px; border-top: 1px solid var(--border); }
.history-row p { margin: 8px 0; }
.archived-shop-card { opacity: .94; }
.sale-transaction summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 11px 14px; cursor: pointer; list-style: none; }
.sale-transaction summary::-webkit-details-marker { display: none; }
.sale-transaction summary > span:first-child { display: grid; gap: 2px; }.sale-transaction summary small { color: var(--muted); }
.transaction-status { min-width: 76px; padding: 5px 8px; border-radius: 999px; color: var(--primary); background: var(--accent-soft); text-align: center; font-size: 11px; font-weight: 800; }
.transaction-body { padding: 5px 12px 12px; border-top: 1px solid var(--border); }
.transaction-line { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto auto; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.transaction-line > span { display: grid; min-width: 0; }.transaction-line small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transaction-line.is-cancelled { opacity: .5; text-decoration: line-through; }
.photo-button { width: 42px; height: 42px; padding: 0; overflow: hidden; border-radius: 9px; background: transparent; }
.photo-button .product-thumb, .photo-button .photo-placeholder { width: 42px; height: 42px; border-radius: 9px; }
.mini-danger, .mini-secondary { width: auto; padding: 6px 8px; font-size: 10px; }.mini-danger { display: inline-flex; align-items: center; gap: 5px; background: linear-gradient(135deg, #6546b6, #914ab0); color: #fff; }.mini-secondary { background: var(--primary); }
.transaction-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; padding-top: 10px; }.transaction-actions button { width: auto; }
.analytics-dialog { width: min(1050px, calc(100vw - 28px)); }.analytics-shell { padding: 22px; }
.analytics-period { display: flex; gap: 8px; margin: 8px 0 16px; }.analytics-period button { width: auto; background: var(--app-bg); color: var(--text); border: 1px solid var(--border); }.analytics-period button.active { color: var(--on-primary); background: var(--primary); }
.analytics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }.analytics-card { overflow: hidden; border: 1px solid var(--border); border-radius: 13px; }.analytics-card h3 { margin: 0; padding: 12px; background: var(--app-bg); }.analytics-card table { width: 100%; border-collapse: collapse; }.analytics-card th, .analytics-card td { padding: 9px; border-top: 1px solid var(--border); text-align: left; font-size: 12px; }.analytics-card td:last-child { white-space: nowrap; }.analytics-card small { display: block; color: var(--muted); }.reference-link { width: auto; padding: 3px 7px; color: var(--on-primary); background: var(--primary); }
.product-photo-dialog { width: min(560px, calc(100vw - 28px)); padding: 22px; border: 1px solid var(--border); border-radius: 20px; color: var(--text); background: var(--surface); text-align: center; }.product-photo-dialog::backdrop { background: #06172b99; backdrop-filter: blur(3px); }.product-photo-dialog img { max-width: 100%; max-height: 65vh; border-radius: 16px; }.photo-dialog-close { float: right; width: 40px; height: 40px; padding: 0; border-radius: 50%; }.product-photo-dialog .photo-placeholder { width: 180px; height: 180px; margin: auto; }
.sales-report-panel { margin-top: 16px; }
.sales-report-filters { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto; align-items: end; gap: 10px; }
.sales-report-filters label { margin: 0; }
.sales-report-filters button { min-height: 46px; }
.sales-report-content { margin-top: 18px; }
.report-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.report-totals > div { display: grid; gap: 6px; padding: 15px; border: 1px solid var(--border); border-radius: 14px; background: var(--app-bg); }
.report-totals span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.report-totals b { font-size: 21px; }
.daily-detail, .report-period { margin-top: 22px; }
.report-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
.report-table { width: 100%; min-width: 680px; border-collapse: collapse; }
.report-table th { color: var(--on-primary); background: var(--primary); }
.report-table th, .report-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.report-table tbody tr:last-child td { border-bottom: 0; }
.ranking-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ranking-card { min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--app-bg); }
.ranking-card h3 { margin: 0 0 10px; }
.ranking-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.ranking-row:last-child { border-bottom: 0; }
.ranking-position { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--on-primary); background: linear-gradient(135deg, var(--primary), var(--accent)); font-weight: 900; }
.ranking-row > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.ranking-row b { overflow: hidden; text-overflow: ellipsis; }
.ranking-row small { color: var(--muted); }
.ranking-row strong { white-space: nowrap; }
.sale-check { position: relative; flex: 0 0 30px; width: 30px; height: 30px; margin: 0; cursor: pointer; }
.sale-check input { position: absolute; opacity: 0; pointer-events: none; }
.sale-check span { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid var(--border); border-radius: 8px; background: var(--input-bg); transition: .18s ease; }
.sale-check input:checked + span { border-color: var(--accent); background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 0 0 3px var(--accent-soft); }
.sale-check input:checked + span::after { content: "✓"; color: #ffffff; font-size: 19px; font-weight: 900; }
.invoice-dialog { width: min(700px, calc(100vw - 28px)); padding: 0; border: 1px solid var(--border); border-radius: 20px; color: var(--text); background: var(--surface); box-shadow: 0 25px 80px #00152f55; }
.invoice-dialog::backdrop { background: #06172b99; backdrop-filter: blur(3px); }
.invoice-dialog form { padding: 24px; }
.invoice-dialog .dialog-close { width: auto; margin: 0; }
.invoice-customer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.invoice-customer-grid .wide { grid-column: 1 / -1; }
.shop-access-page { max-width: 850px; margin: 0 auto; }
.shop-access-heading { padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.shop-access-heading button { width: auto; }
.focused-shop-account { border: 0; padding: 0; }
.shop-edit-dialog { width: min(760px, calc(100vw - 28px)); }
.shop-edit-dialog form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.shop-edit-dialog .section-title, .shop-edit-dialog form > button, .shop-edit-dialog label:nth-of-type(4) { grid-column: 1 / -1; }
.shop-edit-dialog h2 { display: flex; align-items: center; gap: 9px; margin: 0; }
.shop-edit-dialog h2 svg { flex: 0 0 24px; width: 24px; height: 24px; fill: none; stroke: var(--primary); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.shop-edit-dialog label { margin: 0; }
.shop-edit-dialog input, .shop-edit-dialog textarea { margin-bottom: 0; }
.shop-edit-dialog form > button, #shopContactForm > button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; }
.shop-edit-dialog form > button svg, #shopContactForm > button svg { flex: 0 0 21px; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.shop-edit-dialog form > button { justify-self: start; width: auto; padding-inline: 22px; }
#shopContactForm > button { width: auto; padding-inline: 20px; background: linear-gradient(135deg, #087c74, #0c9d88); }
.grand-reset-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-color: #d7646455; background: linear-gradient(135deg, var(--surface), #c9343410); }
.grand-reset-panel h2 { margin: 5px 0 7px; }.grand-reset-panel p { max-width: 760px; margin: 0; color: var(--muted); }
.grand-reset-kicker { color: #bb3333; font-size: 11px; font-weight: 900; letter-spacing: .11em; }
.grand-reset-open { display: inline-flex; width: auto; flex: 0 0 auto; align-items: center; gap: 9px; padding-inline: 20px; background: linear-gradient(135deg, #7b2431, #c64545); }
.grand-reset-open svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.grand-reset-dialog { width: min(720px, calc(100vw - 28px)); }
.grand-reset-fixed { display: grid; gap: 3px; margin: 14px 0; padding: 14px 16px; border: 1px solid #1c9e8855; border-radius: 14px; background: #1c9e8810; }
.grand-reset-fixed span { color: var(--muted); font-size: 13px; }
.grand-reset-shops { display: grid; gap: 8px; margin: 14px 0; padding: 14px; border: 1px solid var(--border); border-radius: 14px; }
.grand-reset-shops legend { padding: 0 7px; font-weight: 850; }
.grand-reset-shops label { display: flex; align-items: center; gap: 10px; margin: 0; padding: 9px 11px; border-radius: 10px; background: var(--app-bg); cursor: pointer; }
.grand-reset-shops input { width: 19px; height: 19px; margin: 0; }
.grand-reset-select-all { color: var(--primary); font-weight: 900; }
.grand-reset-warning { display: grid; gap: 4px; margin: 14px 0; padding: 14px 16px; border-left: 4px solid #d14b4b; border-radius: 10px; background: #d14b4b12; }
.grand-reset-warning span { color: var(--muted); font-size: 13px; line-height: 1.45; }

@media (max-width: 900px) {
  .header-motto { display: none; }
  .shop-account-grid { grid-template-columns: 1fr; }
  .product-grid, .photo-manager { grid-template-columns: 1fr 1fr; }
  .stock-product-grid, .dashboard-product-grid { grid-template-columns: 1fr; }
  .theme-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
  .grand-reset-panel { align-items: stretch; flex-direction: column; }.grand-reset-open { width: 100%; justify-content: center; }
  .history-delete-grid { grid-template-columns: 1fr; }
  .history-delete-action { min-height: 72px; }
  .history-filters { grid-template-columns: 1fr; }
  .history-row summary { grid-template-columns: 1fr; gap: 4px; }
  .history-action { width: 100%; }
  .access-archive-tabs { grid-template-columns: 1fr; }
  .access-archive-tabs button { width: 100%; }
  .shop-edit-dialog form { grid-template-columns: 1fr; }
  .shop-edit-dialog .section-title, .shop-edit-dialog form > button, .shop-edit-dialog label:nth-of-type(4) { grid-column: 1; }
  .compact-shop-card { grid-template-columns: 94px minmax(0, 1fr); gap: 12px; padding: 13px; }
  .compact-shop-logo .shop-custom-logo, .compact-shop-logo .shop-no-logo { width: 82px; }
  .compact-shop-info > strong { font-size: 17px; }
  .compact-shop-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 48px; }
  .shop-access-button, .shop-edit-button { padding: 9px; font-size: 12px; }
  .auth { min-height: 100dvh; place-items: end center; padding: calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom)); background-position: 62% center; }
  .auth .card { width: min(470px, 100%); }
  .shop-account-card { grid-template-columns: 1fr; }
  .shop-account-card .wide, .shop-account-card > button, .shop-account-title { grid-column: 1; }
  .professional-card { flex-direction: column; }
  .professional-tools { min-width: 0; }
  .professional-tools > .actions { justify-content: flex-start; }
  .purchase-invoice-import { grid-template-columns: 1fr; }
  .purchase-invoice-import > button { min-width: 0; }
  .shop-stock-reset { align-items: stretch; flex-direction: column; }
  .claim-line { grid-template-columns: 1fr; }
  .claim-entry-grid { grid-template-columns: 1fr; }
  .claim-item { align-items: flex-start; flex-direction: column; }
  .grid, .two, .admin-grid { grid-template-columns: 1fr; }
  .grid.stats { grid-template-columns: repeat(3, 1fr); }
  .stat { min-height: 116px; padding: 12px 12px 12px 55px; }
  .stat-icon { left: 10px; top: 13px; width: 36px; height: 36px; }
  .stat-icon svg { width: 21px; height: 21px; }
  .stat b { font-size: 24px; }
  .stat span { font-size: 11px; }
  main { padding: 10px 12px calc(92px + env(safe-area-inset-bottom)); }
  nav { position: fixed; z-index: 30; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); margin: 0 auto; padding: 6px; border-radius: 18px; overflow: visible; box-shadow: 0 12px 38px #00183342; }
  nav button:not(.mobile-primary):not(.mobile-more-control) { display: none !important; }
  nav button.mobile-primary, nav .mobile-more-control { display: inline-flex; flex: 1 1 20%; min-width: 0; min-height: 52px; justify-content: center; padding: 8px 3px; border-radius: 12px; font-size: 10px; }
  nav .unread-badge { position: absolute; right: 2px; top: 2px; min-width: 17px; height: 17px; padding: 0 4px; font-size: 9px; }
  .mobile-more-menu { position: fixed; z-index: 29; inset: 0; display: flex; align-items: flex-end; padding: 16px 12px calc(80px + env(safe-area-inset-bottom)); background: #00152f66; backdrop-filter: blur(3px); }
  .mobile-more-menu.hidden { display: none !important; }
  .mobile-more-sheet { width: 100%; max-height: min(70dvh, 560px); overflow: auto; padding: 14px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: 0 24px 65px #00152f66; }
  .mobile-more-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 20px; }
  .mobile-more-heading button { width: 40px; height: 40px; padding: 0; border-radius: 50%; background: var(--app-bg); color: var(--text); font-size: 25px; }
  .mobile-more-items { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .mobile-more-items button { min-height: 52px; padding: 10px; background: var(--app-bg); color: var(--text); border: 1px solid var(--border); }
  .mobile-more-items button.active { background: var(--primary); color: var(--on-primary); }
  .stock-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .stock-summary .stat { display: flex; min-width: 0; min-height: 158px; padding: 12px 8px; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
  .stock-summary .stat-icon { position: static; width: 39px; height: 39px; margin-bottom: 7px; }
  .stock-summary .stat span { max-width: 100%; font-size: 11px; overflow-wrap: anywhere; }
  .stock-summary .stat b { max-width: 100%; margin-top: 7px; font-size: 21px; line-height: 1.12; overflow-wrap: anywhere; }
  .stock-summary .stat small { max-width: 100%; font-size: 10px; line-height: 1.28; overflow-wrap: anywhere; }
  header small { display: none; }
  .brand-kicker { letter-spacing: .2em; }
  .header-logo-plate { width: min(245px, 62vw); }
  .panel { padding: 15px; }
  .section-title { align-items: flex-start; flex-direction: column; }
  .shop-filter { max-width: none; }
  .stock-tools { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .theme-grid { grid-template-columns: repeat(2, 1fr); }
  .color-fields { grid-template-columns: 1fr; }
  .stock-field-grid { grid-template-columns: 1fr; }
  .shipping-fields, .tracking-info { grid-template-columns: 1fr; }
  .billing-grid { grid-template-columns: 1fr; }
  .invoice-customer-grid { grid-template-columns: 1fr; }
  .invoice-customer-grid .wide { grid-column: 1; }
  .report-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ranking-grid { grid-template-columns: 1fr; }
  .analytics-grid { grid-template-columns: 1fr; }
  .sale-scan-orb { width: min(430px, 92vw); min-height: min(430px, 92vw); padding: 30px; }
  .last-sale-chip { right: 12px; bottom: calc(82px + env(safe-area-inset-bottom)); }
  .sale-transaction summary { grid-template-columns: minmax(0, 1fr) auto; }.transaction-status { grid-column: 1 / -1; justify-self: start; }
  .transaction-line { grid-template-columns: 38px minmax(0, 1fr) auto; }.transaction-line > button:not(.photo-button), .transaction-line > em { grid-column: auto; }.transaction-line small { white-space: normal; }
  .app-footer { align-items: flex-start; flex-direction: column; gap: 10px; }
}

@media (max-width: 480px) {
  header { padding: calc(8px + env(safe-area-inset-top)) 10px 8px; gap: 7px; }
  .header-logo-plate { width: min(205px, 62vw); padding: 3px 6px; border-radius: 10px; }
  .header-brand .brand-kicker { display: none; }
  .app-footer strong { letter-spacing: .24em; }
  .ghost { margin-left: 0; padding: 7px 6px; }
  .product-card { grid-template-columns: 88px 1fr; padding: 10px; }
  .product-card .product-photo, .product-card .photo-placeholder { width: 88px; height: 100px; }
  .stock-product-card { grid-template-columns: 82px minmax(0, 1fr); padding: 10px; gap: 10px; }
  .stock-product-card .product-photo, .stock-product-card .photo-placeholder { width: 82px; height: 96px; }
  .stock-quantity { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; gap: 6px; width: 100%; }
  .stock-quantity > strong { font-size: 27px; }
  .stock-quantity > span:not(.badge) { margin: 0 8px 0 0; }
  .stock-correction-fields { grid-template-columns: 1fr; }
  .professional-card { flex-direction: column; }
  .file-picker { align-items: stretch; flex-direction: column; }
  .file-picker label { text-align: center; }
  .photo-manager { grid-template-columns: 1fr; }
  .fixed-stock-colors { grid-template-columns: 1fr; }
  .sales-report-filters { grid-template-columns: 1fr; }
  .scanner-ready { grid-template-columns: 14px 1fr; }.scanner-ready small { grid-column: 1 / -1; }
  .row { align-items: flex-start; }
  .grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { min-height: 108px; padding: 11px 8px 11px 49px; border-radius: 15px; }
  .stat-icon { left: 8px; top: 12px; width: 33px; height: 33px; }
  .stat b { font-size: 21px; }
  .stat span { font-size: 10px; }
  .app-footer { display: none; }
  .auth .card { max-height: calc(100dvh - 34px); overflow-y: auto; padding: 18px; border-radius: 18px; }
  .auth-logo-plate { margin-bottom: 10px; }
}

@media (max-width: 360px) {
  .grid.stats { grid-template-columns: 1fr; }
  .header-logo-plate { width: min(176px, 56vw); }
}

@media (display-mode: standalone) {
  body { overscroll-behavior-y: none; -webkit-user-select: none; user-select: none; }
  input, textarea { -webkit-user-select: text; user-select: text; }
}

@media (prefers-reduced-motion: reduce) {
  .app-splash img { animation: none; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Produits compacts : une photo par type, puis modèle > couleur. */
.product-admin-grid { grid-template-columns: 1fr; }
.product-group-form { background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--primary) 5%, var(--surface))); }
.product-base-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.product-base-fields label { display:flex; flex-direction:column; gap:7px; font-weight:700; }
.model-picker-title { display:flex; align-items:end; justify-content:space-between; gap:16px; margin-top:18px; }
.inline-custom-model { display:flex; gap:8px; }
.model-picker { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:12px 0 18px; max-height:520px; overflow:auto; padding:3px; }
.variant-model { border:1px solid var(--border); border-radius:14px; background:var(--surface); overflow:hidden; }
.model-check { display:flex; align-items:center; gap:9px; padding:12px; font-weight:800; cursor:pointer; }
.model-check input { width:20px; height:20px; }
.variant-colors { padding:0 10px 10px; border-top:1px solid var(--border); }
.variant-color { display:grid; grid-template-columns:minmax(0,1fr) 90px 38px; gap:7px; margin-top:9px; }
.variant-color input { min-width:0; }
.icon-button { padding:6px; min-width:38px; background:#eef3f8; color:#44556b; }
.add-color { width:100%; margin-top:8px; }
.group-create-button { background:linear-gradient(135deg,#087f88,#00a99d); box-shadow:0 10px 24px #087f8830; }
.compact-product-list { display:grid; gap:12px; margin-top:14px; }
.compact-product-group { border:1px solid var(--border); border-radius:18px; background:var(--surface); overflow:hidden; box-shadow:0 8px 22px #1b36560b; }
.compact-product-group > summary { list-style:none; display:grid; grid-template-columns:88px minmax(0,1fr) auto; align-items:center; gap:16px; padding:13px 16px; cursor:pointer; }
.compact-product-group > summary::-webkit-details-marker,.compact-model > summary::-webkit-details-marker,.compact-variant.editor > summary::-webkit-details-marker { display:none; }
.compact-product-group > summary .product-photo,.compact-product-group > summary .photo-placeholder { width:88px; height:72px; object-fit:cover; border-radius:13px; }
.product-gallery-trigger { width:88px; min-width:88px; height:72px; margin:0; padding:0; border:0; border-radius:13px; overflow:hidden; background:transparent; box-shadow:none; }
.product-gallery-trigger:hover { transform:none; box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 30%,transparent); }
.compact-group-name { display:flex; flex-direction:column; min-width:0; }
.compact-group-name small { color:var(--primary); text-transform:uppercase; font-weight:800; letter-spacing:.06em; }
.compact-group-name b { font-size:20px; }
.compact-group-name span { color:var(--muted); }
.compact-product-group > summary > strong { color:var(--primary); font-size:12px; }
.compact-model-list { padding:0 14px 14px; display:grid; gap:8px; }
.compact-model { border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.compact-model > summary { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:12px; padding:11px 14px; cursor:pointer; background:color-mix(in srgb,var(--primary) 5%,var(--surface)); }
.compact-model > summary span { color:var(--muted); }
.compact-variant-list { display:grid; }
.compact-variant { display:grid; grid-template-columns:minmax(180px,1fr) 190px auto; align-items:center; gap:14px; padding:12px 14px; border-top:1px solid var(--border); }
.compact-variant.editor { display:block; }
.compact-variant-info { display:flex; min-width:0; flex-direction:column; overflow-wrap:anywhere; }
.compact-variant small { color:var(--muted); }
.compact-variant input { width:120px; }
.compact-variant-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; }
.compact-variant-actions button { width:auto; margin:0; }
.compact-variant.with-action { grid-template-columns:minmax(180px,1fr) 190px 110px auto; }
.compact-variant.editor > summary { display:grid; grid-template-columns:minmax(180px,1fr) 190px auto; align-items:center; gap:14px; padding:12px 14px; cursor:pointer; }
.barcode-preview { display:block; justify-self:center; width:170px; height:52px; object-fit:contain; border:1px solid #dce5ed; border-radius:9px; background:#fff; }
.mini-pdf { display:inline-flex; align-items:center; justify-content:center; gap:6px; width:auto; min-height:34px; margin:0; padding:7px 11px; border:1px solid #0b8f9229; color:#076e78; background:linear-gradient(135deg,#e9fbfa,#e8f2ff); font-size:11px; box-shadow:none; }
.mini-pdf:hover { color:#fff; background:linear-gradient(135deg,#087f88,#185cba); }
.mini-pdf svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; }
.compact-editor-fields { padding:12px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; background:var(--app-bg); }
.compact-editor-fields label { display:flex; min-width:0; flex-direction:column; gap:5px; color:var(--muted); font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.compact-editor-fields input,.compact-editor-fields textarea { width:100%; min-width:0; color:var(--text); font-size:14px; text-transform:none; letter-spacing:normal; }
.compact-description-field { grid-column:span 2; }
.compact-save-action,.product-delete-action { align-self:end; width:auto; min-height:42px; margin:0; padding:10px 15px; }
.compact-save-action { background:linear-gradient(135deg,#087f88,#00a99d); }
.compact-group-actions { padding:0 14px 14px; display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.compact-group-actions button { width:auto; margin:0; }
.compact-group-actions .group-delete-action { margin-left:auto; }
.compact-group-actions svg,.compact-photo-picker svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; vertical-align:middle; }
.compact-photo-picker { flex:1 1 250px; margin:0; }
.product-list-heading { align-items:center; }
.all-labels-download { flex:0 0 auto; }
.all-labels-download svg,.section-title > button svg { width:17px !important; height:17px !important; flex:none; }
.gallery-actions { display:flex; align-items:center; justify-content:center; gap:12px; }
.gallery-actions button { width:auto; margin:0; padding:9px 13px; }
.order-item-details { line-height:1.55; }
.order-main { min-width:0; }
.order-shop-name { margin-top:3px; }
.order-products { display:grid; gap:3px; margin-top:8px; padding-top:8px; border-top:1px solid var(--border); color:var(--text); }
.catalog-variant .qty { margin:0; }
.photo-spacer { display:block; width:42px; height:42px; }
@media (max-width:800px) {
  .product-base-fields,.model-picker,.compact-editor-fields { grid-template-columns:1fr; }
  .model-picker-title { align-items:stretch; flex-direction:column; }
  .compact-product-group > summary { grid-template-columns:64px minmax(0,1fr); }
  .compact-product-group > summary > strong { grid-column:1/-1; }
  .compact-product-group > summary .product-photo,.compact-product-group > summary .photo-placeholder { width:64px; height:64px; }
  .product-gallery-trigger { width:64px; min-width:64px; height:64px; }
  .compact-model > summary { grid-template-columns:minmax(0,1fr) auto; }
  .compact-model > summary .mini-pdf { grid-column:1/-1; justify-self:start; }
  .photo-preview-grid { grid-template-columns:repeat(2,minmax(72px,120px)); }
  .compact-variant,.compact-variant.with-action,.compact-variant.editor > summary { grid-template-columns:1fr; }
  .barcode-preview { grid-column:auto; width:min(100%,260px); height:58px; }
  .compact-variant input { width:100%; }
  .compact-description-field { grid-column:auto; }
}

/* 1.13.12 — style validé appliqué uniquement aux Produits enregistrés. */
.product-count-pill { display:inline-flex; align-items:center; min-height:28px; margin-left:7px; padding:3px 9px; border-radius:999px; color:var(--muted); background:color-mix(in srgb,var(--primary) 9%,var(--surface)); font-size:12px; font-weight:800; vertical-align:middle; letter-spacing:0; }
.product-list-heading + .compact-product-list { gap:15px; }
.product-list-heading + .compact-product-list .compact-product-group { border-radius:14px; box-shadow:0 8px 22px color-mix(in srgb,var(--primary) 7%,transparent); }
.product-list-heading + .compact-product-list .compact-product-group > summary { min-height:108px; grid-template-columns:112px minmax(0,1fr) auto; gap:20px; padding:17px 19px; }
.product-list-heading + .compact-product-list .compact-product-group > summary .product-photo,
.product-list-heading + .compact-product-list .compact-product-group > summary .photo-placeholder,
.product-list-heading + .compact-product-list .product-gallery-trigger { width:112px; min-width:112px; height:84px; border-radius:11px; }
.product-list-heading + .compact-product-list .compact-group-name small { font-size:15px; }
.product-list-heading + .compact-product-list .compact-group-name b { font-size:22px; }
.product-list-heading + .compact-product-list .compact-group-name span { margin-top:4px; font-size:14px; }
.product-list-heading + .compact-product-list .compact-model-list { padding:0 18px 18px; gap:10px; }
.product-list-heading + .compact-product-list .compact-model { border-radius:11px; }
.product-list-heading + .compact-product-list .compact-model > summary { padding:13px 16px; }
.product-list-heading + .compact-product-list .compact-variant,
.product-list-heading + .compact-product-list .compact-variant.editor > summary { min-height:76px; grid-template-columns:minmax(190px,1fr) 190px auto; gap:20px; padding:11px 17px; }
.product-list-heading + .compact-product-list .compact-variant-info { gap:3px; }
.product-list-heading + .compact-product-list .compact-variant-info b { font-size:15px; }
.product-list-heading + .compact-product-list .variant-color-label { display:flex; align-items:center; gap:10px; }
.product-list-heading + .compact-product-list .variant-color-dot { display:inline-block; width:27px; height:27px; flex:0 0 27px; border:1px solid color-mix(in srgb,var(--text) 38%,var(--border)); border-radius:50%; background:var(--variant-color); box-shadow:inset 0 0 0 1px #ffffff80; }
.product-list-heading + .compact-product-list .barcode-preview { width:178px; height:52px; }
.product-list-heading + .compact-product-list .compact-variant-actions { gap:10px; }
.product-list-heading + .compact-product-list .compact-variant-actions > strong:not(.badge) { min-width:78px; text-align:center; }
.product-list-heading + .compact-product-list .edit-variant-hint { display:inline-flex; align-items:center; gap:7px; padding:9px 11px; border:1px solid color-mix(in srgb,var(--primary) 25%,var(--border)); border-radius:8px; color:var(--primary); font-size:12px; font-weight:800; white-space:nowrap; }
.product-list-heading + .compact-product-list .edit-variant-hint svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.9; }
.product-list-heading + .compact-product-list .compact-editor-fields { grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; padding:17px; border-top:1px solid var(--border); background:color-mix(in srgb,var(--primary) 4%,var(--surface)); }
.product-list-heading + .compact-product-list .compact-description-field { grid-column:span 2; }

@media (max-width:800px) {
  .product-list-heading + .compact-product-list .compact-product-group > summary { grid-template-columns:64px minmax(0,1fr); min-height:86px; padding:12px; gap:11px; }
  .product-list-heading + .compact-product-list .compact-product-group > summary .product-photo,
  .product-list-heading + .compact-product-list .compact-product-group > summary .photo-placeholder,
  .product-list-heading + .compact-product-list .product-gallery-trigger { width:64px; min-width:64px; height:64px; }
  .product-list-heading + .compact-product-list .compact-product-group > summary > strong { grid-column:1/-1; }
  .product-list-heading + .compact-product-list .compact-model-list { padding:0 10px 10px; }
  .product-list-heading + .compact-product-list .compact-variant,
  .product-list-heading + .compact-product-list .compact-variant.editor > summary,
  .product-list-heading + .compact-product-list .compact-editor-fields { grid-template-columns:1fr; }
  .product-list-heading + .compact-product-list .barcode-preview { width:min(100%,240px); justify-self:center; }
  .product-list-heading + .compact-product-list .compact-description-field { grid-column:auto; }
}

/* 1.13.15 — vente détaillée et grand reset administrateur sécurisé. */
.stock-retail-row { grid-template-columns:minmax(180px,1fr) 190px minmax(150px,190px) auto; }
.retail-price-field { display:grid; gap:4px; margin:0; color:var(--muted); font-size:11px; font-weight:800; }
.retail-price-field input { width:100%; margin:0; }
.profitability-dashboard { overflow:hidden; }
.profit-kpis { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:18px 0; }
.profit-kpis > div { display:grid; gap:4px; min-height:118px; padding:17px; border:1px solid var(--border); border-radius:15px; background:var(--app-bg); }
.profit-kpis span { color:var(--muted); font-size:12px; font-weight:850; text-transform:uppercase; }
.profit-kpis b { font-size:clamp(25px,3vw,38px); }
.profit-kpis small { color:var(--muted); }
.profit-kpis .is-positive { border-color:#1e9f7055; background:#e9f8f1; color:#136c4d; }
.profit-kpis .is-negative { border-color:#df7c4655; background:#fff3ec; color:#a44b22; }
.profit-layout { display:grid; grid-template-columns:minmax(0,2.2fr) minmax(260px,.8fr); gap:16px; }
.profit-layout > section,.profit-layout > aside { min-width:0; padding:17px; border:1px solid var(--border); border-radius:15px; background:var(--app-bg); }
.profit-layout aside { display:grid; align-content:start; gap:4px; }
.profit-layout aside h3 { margin:0 0 10px; }
.profit-layout aside > div { display:flex; justify-content:space-between; gap:12px; padding:9px 0; border-bottom:1px solid var(--border); }
.profit-layout aside > button { margin-top:14px; }
.profit-daily-cost { color:var(--primary); font-size:15px; }
.profit-chart-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.profit-chart-heading h3 { margin:0; }.profit-chart-heading p { margin:5px 0 0; color:var(--muted); font-size:12px; }
.profit-metric-switch { display:flex; gap:6px; }
.profit-metric-switch button { width:auto; padding:8px 10px; border:1px solid var(--border); background:var(--surface); color:var(--text); font-size:10px; }
.profit-metric-switch button.active { background:var(--primary); color:var(--on-primary); }
.profit-chart { display:grid; grid-template-columns:38px minmax(0,1fr); height:310px; margin-top:18px; }
.profit-axis { display:flex; justify-content:space-between; flex-direction:column; padding-bottom:25px; color:var(--muted); font-size:10px; text-align:right; }
.profit-bars { display:flex; align-items:stretch; gap:5px; min-width:0; padding:0 5px; border-left:1px solid var(--border); border-bottom:1px solid var(--border); background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(25% - 1px),var(--border) 25%); }
.profit-hour { display:grid; grid-template-rows:minmax(0,1fr) 21px; flex:1 1 0; min-width:12px; }
.profit-bar-track { position:relative; min-width:0; height:100%; }
.profit-bar { position:absolute; right:0; bottom:0; left:0; height:var(--bar-height,0%); min-height:0; border-radius:7px 7px 2px 2px; transition:height .65s ease,background .45s ease,filter .3s ease; }
.profit-bar > span { position:absolute; left:50%; bottom:calc(100% + 3px); transform:translateX(-50%); max-width:72px; color:var(--text); font-size:9px; font-weight:850; white-space:nowrap; }
.profit-hour > small { padding-top:5px; color:var(--muted); font-size:9px; text-align:center; }
.profit-hour.is-current .profit-bar { outline:3px solid color-mix(in srgb,var(--accent) 35%,transparent); animation:currentProfitHour 1.6s ease-in-out infinite; }
@keyframes currentProfitHour { 50% { filter:brightness(1.22); transform:scaleX(.92); } }
.profit-level-0 { background:#ef874d; }.profit-level-1 { background:#27a875; }.profit-level-2 { background:#247cc2; }.profit-level-3 { background:linear-gradient(180deg,#ffe795,#c79822); }
.profit-legend { display:flex; flex-wrap:wrap; gap:8px; margin-top:13px; }
.profit-legend span { padding:5px 8px; border-radius:999px; color:#fff; font-size:10px; font-weight:800; }
.profit-legend .profit-level-3 { color:#604604; }
.profitability-settings form { display:grid; gap:18px; }
.profitability-settings form > section { padding:17px; border:1px solid var(--border); border-radius:15px; background:var(--app-bg); }
.schedule-grid,.employee-list { display:grid; gap:8px; }
.schedule-row { display:grid; grid-template-columns:minmax(130px,1fr) minmax(130px,.7fr) minmax(130px,.7fr); gap:12px; align-items:end; padding:10px 12px; border-bottom:1px solid var(--border); }
.schedule-row label { margin:0; }.schedule-open { display:flex; align-items:center; gap:9px; min-height:46px; }.schedule-open input { width:20px; margin:0; }
.employee-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.employee-add { width:45px; height:45px; padding:0; border-radius:50%; font-size:25px; }
.employee-row { display:grid; grid-template-columns:100px minmax(170px,1fr) minmax(170px,1fr) 42px; gap:11px; align-items:end; padding:12px; border:1px solid var(--border); border-radius:13px; background:var(--surface); }
.employee-row label { margin:0; }.employee-row strong { align-self:center; }.employee-remove { width:42px; height:42px; padding:0; background:#984579; }
.profitability-preview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.profitability-preview span { padding:13px; border:1px solid var(--border); border-radius:12px; background:var(--app-bg); }
.profit-layout aside.is-locked b { letter-spacing:1px; }
.profit-privacy-button { background:color-mix(in srgb,var(--primary) 11%,var(--surface)); color:var(--primary); border:1px solid color-mix(in srgb,var(--primary) 30%,var(--border)); }
.profitability-unlock-dialog { width:min(440px,calc(100vw - 28px)); text-align:center; }
.profitability-unlock-dialog form { display:grid; gap:15px; padding:26px; }
.profitability-unlock-dialog h2,.profitability-unlock-dialog p { margin:0; }
.profitability-unlock-dialog p { color:var(--muted); }
.profitability-unlock-icon { display:grid; place-items:center; width:62px; height:62px; margin:auto; border-radius:50%; background:color-mix(in srgb,var(--primary) 12%,var(--surface)); font-size:28px; }
.profitability-unlock-dialog label { text-align:left; }
.profitability-unlock-actions { display:grid; grid-template-columns:1fr 1.4fr; gap:10px; }
@media (max-width:800px) {
  .stock-retail-row,.profit-kpis,.profit-layout,.schedule-row,.employee-row,.profitability-preview { grid-template-columns:1fr; }
  .profit-chart-heading { flex-direction:column; }.profit-metric-switch { width:100%; }.profit-metric-switch button { flex:1; }
  .profit-chart { height:260px; }.profit-hour > small { writing-mode:vertical-rl; }
}
