:root {
  color-scheme: light;
  --bg: #f7f9fb;
  --surface: #ffffff;
  --ink: #172126;
  --muted: #66737b;
  --line: #dce4e8;
  --brand: #2695dc;
  --brand-dark: #1679bd;
  --title-color: #102326;
  --sidebar-bg: #102326;
  --sidebar-text: #d9e5e5;
  --sidebar-active-text: #ffffff;
  --sidebar-active-bg: rgba(255,255,255,.12);
  --amber: #f59e0b;
  --red: #dc2626;
  --blue: #2563eb;
  --auth-blue-start: #55cff1;
  --auth-blue-mid: #35aee8;
  --auth-blue-end: #2695dc;
  --auth-blue-gradient: linear-gradient(180deg, #55cff1 0%, #35aee8 42%, #2695dc 100%);
  --auth-blue-action: linear-gradient(90deg, #279dec, #37c5ef);
  --violet: #7c3aed;
  --shadow: 0 18px 50px rgba(20, 34, 39, .10);
}

* { box-sizing: border-box; }
html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
}

.shop-body {
  background: #f4f7f6;
  color: #132326;
  overflow-x: hidden;
}
.shop-body img,
.shop-body video,
.shop-body canvas,
.shop-body svg {
  max-width: 100%;
}
.shop-body main,
.shop-body footer,
.shop-body nav {
  max-width: 100vw;
  overflow-x: clip;
}
.shop-body * {
  min-width: 0;
}
.shop-container,
.shop-section {
  width: min(95%, calc(100vw - 16px));
  max-width: 1440px;
  margin-inline: auto;
}
.shop-nav {
  position: sticky;
  top: 0;
  z-index: 1080;
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: block;
  padding: 0;
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: 0 1px 0 rgba(12, 28, 31, .08);
  overflow: visible;
}
.shop-promo-bar {
  height: 42px;
  display: grid;
  grid-template-columns: 1fr auto auto 1fr;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  background: var(--auth-blue-gradient);
  color: #dfc7d4;
  font-size: 16px;
  font-weight: 900;
}
.shop-promo-bar[hidden] {
  display: none;
}
.shop-promo-bar strong {
  grid-column: 2;
}
.shop-promo-bar button {
  justify-self: end;
  grid-column: 4;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 18px;
}
.shop-nav-inner {
  width: 100%;
  max-width: 100%;
  min-height: 80px;
  gap: 20px;
  flex-wrap: nowrap;
  padding: 16px;
  background: #fff;
}
.shop-brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-weight: 900;
  color: #fff;
  text-decoration: none;
  flex: 0 0 auto;
  height: 40px;
  background: var(--auth-blue-action);
  border-radius: 2px;
  overflow: hidden;
}
.shop-brand img {
  width: 42px;
  height: 40px;
  object-fit: contain;
  padding: 8px;
  background: #ffd51b;
}
.shop-brand span {
  display: block;
  padding: 0 10px;
  color: #fff;
  font-size: 16px;
  line-height: 40px;
  letter-spacing: 0;
  font-weight: 900;
}
.vendor-pill {
  min-height: 37px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--auth-blue-action);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}
.shop-menu-toggle {
  width: 44px;
  height: 44px;
  display: none;
  place-items: center;
  border: 1px solid #dce8e6;
  border-radius: 8px;
  color: #102326;
  background: #fff;
  box-shadow: none;
}
.shop-menu-toggle i {
  font-size: 25px;
}
.shop-nav .offcanvas-body {
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 0;
}
.shop-nav-links {
  flex: 1 1 auto;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}
.shop-nav .nav-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #26383c;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  line-height: 1.1;
}
.shop-nav .nav-link:hover,
.shop-nav .nav-link:focus-visible {
  background: #eef8f6;
  color: var(--auth-blue-end);
}
.shop-nav .nav-link i {
  flex: 0 0 18px;
  width: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--auth-blue-end);
  font-size: 15px;
  line-height: 1;
}
.shop-nav-actions {
  display: grid;
  grid-template-columns: minmax(220px, 360px) repeat(3, max-content);
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  max-width: 100%;
  min-width: 0;
}
.mobile-client-actions {
  display: none;
}
.mobile-action-btn {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #dce8e6;
  border-radius: 8px;
  background: #fff;
  color: #102326;
  font-weight: 900;
  text-align: left;
  padding: 10px 12px;
}
.mobile-action-btn b {
  min-width: 26px;
  min-height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--auth-blue-action);
  color: #fff;
  font-size: 12px;
}
.shop-search-form {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 0;
  width: 100%;
  min-width: 0;
  max-width: 560px;
  padding: 3px 3px 3px 14px;
  border: 1px solid #dedede;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 35, 38, .03);
}
.desktop-search {
  flex: 1 1 auto;
}
.shop-nav-actions .form-control,
.shop-search-form .form-control {
  width: 100%;
  min-width: 0;
}
.shop-search-form .form-control {
  border: 0;
  box-shadow: none;
  padding-inline: 0 10px;
  color: #6f7780;
  font-size: 14px;
}
.shop-search-form .form-control:focus {
  box-shadow: none;
}
.shop-search-button {
  width: 44px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--auth-blue-action);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.65);
  color: #fff;
}
.shop-search-button span {
  display: none;
}
.search-suggestions {
  position: absolute;
  z-index: 1120;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid #d7e6ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(22, 121, 189, .16);
}
.search-suggestions[hidden] {
  display: none;
}
.search-suggestions button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #102326;
  font-weight: 800;
  text-align: left;
}
.search-suggestions button:hover,
.search-suggestions button:focus-visible {
  background: #eef8fc;
}
.search-suggestions small {
  color: #66737b;
  font-size: 12px;
}
.shop-search-button img,
.shop-cart-button img,
.account-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.shop-search-button img,
.shop-cart-button img {
  filter: brightness(0) invert(1);
}
.shop-nav-actions .ghost-btn,
.shop-nav-actions .primary-btn,
.shop-cart-button,
.shop-action-btn,
.report-link {
  min-height: 38px;
  padding-inline: 10px;
  white-space: nowrap;
  max-width: 100%;
}
.shop-action-btn,
.report-link {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #dce8e6;
  border-radius: 999px;
  background: #fff;
  color: #102326;
  font-weight: 900;
  text-decoration: none;
}
.shop-action-btn:hover,
.report-link:hover {
  border-color: var(--auth-blue-end);
  color: var(--auth-blue-end);
}
.account-avatar span,
.report-link span {
  font-size: 13px;
}
.account-avatar {
  max-width: 220px;
}
.account-avatar span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.shop-cart-button {
  position: relative;
  width: 42px;
  padding: 0;
  background: var(--auth-blue-action);
  color: #fff;
  border-color: var(--auth-blue-end);
}
.shop-cart-button span {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #5f8ff2;
  color: var(--auth-blue-end);
}
.header-service {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #050505;
  white-space: nowrap;
}
.header-service i {
  font-size: 32px;
  line-height: 1;
}
.header-service strong {
  display: block;
  color: #000;
  font-size: 14px;
  font-weight: 500;
}
.header-service small {
  display: block;
  margin-top: 3px;
  color: #255de4;
  font-size: 13px;
}
.shop-lower-bar {
  height: 60px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px;
  background: #eaf2ff;
}
.shop-purchase-controls {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.category-toggle {
  justify-self: start;
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111;
  padding: 0 18px 0 3px;
  font-size: 13px;
  font-weight: 500;
}
.category-toggle i {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--auth-blue-action);
  color: #fff;
  font-size: 25px;
}
.language-pill {
  justify-self: center;
  height: 36px;
  min-width: 94px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  background: #fff;
  color: #222;
}
.currency-pill {
  position: relative;
  padding: 0 34px 0 12px;
  border: 2px solid #111;
}
.purchase-mode-pill {
  position: relative;
  min-width: 118px;
  padding: 0 34px 0 12px;
  border-color: #b8c8d8;
}
.currency-pill select,
.purchase-mode-pill select {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: #111;
  font-weight: 600;
  outline: 0;
  appearance: none;
  cursor: pointer;
}
.currency-pill i,
.purchase-mode-pill i {
  position: absolute;
  right: 12px;
  pointer-events: none;
  font-size: 13px;
}
.flag-mini {
  font-size: 22px;
  line-height: 1;
}
.shop-lower-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cart-amount {
  color: #111;
  font-size: 14px;
  font-weight: 500;
}
.shop-menu-row {
  display: none;
}
.shop-hero {
  position: relative;
  z-index: 1;
  width: min(95%, calc(100vw - 16px));
  max-width: 1440px;
  margin: 16px auto 0;
  height: clamp(320px, 42vw, 560px);
  background: #102326;
  border-radius: 8px;
  overflow: hidden;
}
body[data-shop-view="commande"] .public-shop-section,
body[data-shop-view="confirmation"] .public-shop-section,
body[data-shop-view="compte"] .public-shop-section {
  display: none;
}
.shop-hero .carousel,
.shop-hero .carousel-inner,
.shop-hero .carousel-item {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}
.shop-slide {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(12, 28, 31, .90), rgba(12, 28, 31, .35)),
    radial-gradient(circle at 75% 35%, rgba(245, 158, 11, .35), transparent 32%),
    linear-gradient(135deg, var(--auth-blue-end), #102326);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.shop-slide-copy {
  width: min(95%, calc(100vw - 16px));
  max-width: 1440px;
  margin-inline: auto;
  color: #fff;
  padding-block: 80px;
}
.shop-slide-copy h1 {
  width: min(720px, 100%);
  color: #fff;
  font-size: clamp(42px, 7vw, 82px);
  line-height: .98;
  margin-bottom: 16px;
}
.shop-slide-copy p:not(.eyebrow) {
  width: min(620px, 100%);
  color: rgba(255, 255, 255, .86);
  font-size: 18px;
}
.shop-section {
  padding-block: 58px;
}
.shop-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.catalog-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 8px;
  width: min(620px, 100%);
}
.shop-section h2 {
  font-size: clamp(28px, 4vw, 44px);
}
.category-grid,
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 18px;
}
.category-card,
.shop-product-card {
  border: 1px solid #dde8e6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 35, 38, .07);
}
.category-card {
  min-height: 170px;
  padding: 18px;
  display: grid;
  gap: 8px;
  text-align: left;
}
.category-card img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.category-card span {
  font-weight: 900;
  font-size: 18px;
}
.category-card small {
  color: #66737b;
}
.category-card b {
  color: var(--auth-blue-end);
}
.shop-product-card {
  padding: 12px;
  display: grid;
  gap: 10px;
}
.product-image-button {
  width: 100%;
  aspect-ratio: 1 / .78;
  border: 0;
  border-radius: 8px;
  background: #eef5f3;
  overflow: hidden;
}
.product-image-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  color: #66737b;
  font-size: 12px;
  font-weight: 800;
}
.product-badge {
  padding: 5px 8px;
  border-radius: 999px;
  background: #e8f4f2;
  color: #115e59;
  white-space: nowrap;
}
.shop-product-card h3 {
  font-size: 16px;
  min-height: 40px;
  line-height: 1.25;
}
.shop-product-card strong {
  font-size: 19px;
  color: #102326;
}
.product-sale-mode {
  display: block;
  color: #5d7078;
  font-size: 12px;
  font-weight: 800;
}
.product-availability {
  display: block;
  min-height: 34px;
  color: #1679bd;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}
.product-actions {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: 8px;
}
.product-actions .ghost-btn,
.product-actions .primary-btn {
  min-height: 38px;
  padding-inline: 8px;
  font-size: 13px;
}
.shop-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}
.product-detail {
  display: grid;
  grid-template-columns: minmax(240px, .85fr) 1fr;
  gap: 24px;
  padding: 24px;
  min-height: 0;
}
.product-modal-head {
  border-bottom: 1px solid #dce8e6;
}
#productModal .modal-dialog {
  max-width: min(980px, calc(100vw - 24px));
}
#productModal .modal-content {
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}
#productModalContent {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.product-detail > img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #eef5f3;
  border-radius: 8px;
  min-width: 0;
}
.product-detail > div {
  min-width: 0;
}
.product-detail dl,
.company-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.product-detail dl div,
.company-facts div,
.cart-totals div {
  border-top: 1px solid #e3ecea;
  padding-top: 8px;
}
.product-detail dt,
.company-facts dt {
  color: #66737b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.product-detail dd,
.company-facts dd {
  margin: 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.product-client-stock,
.product-client-alert {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef8fc;
  color: #145f93;
  font-weight: 900;
}
.product-client-alert {
  background: #fff7e8;
  color: #9a5a00;
}
.product-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.whatsapp-product-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 8px;
  background: #16a34a;
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}
.whatsapp-product-btn:hover,
.whatsapp-product-btn:focus-visible {
  background: #12823d;
  color: #fff;
}
.about-band {
  display: grid;
  gap: 18px;
}
.about-band > p {
  max-width: 920px;
  color: #435055;
  font-size: 17px;
}
.shop-help-section {
  scroll-margin-top: 150px;
}
.shop-help-frame {
  margin: 0;
  padding: 16px;
  border: 1px solid #dde8e6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 35, 38, .07);
}
.shop-help-frame img {
  display: block;
  width: 100%;
  max-width: 1120px;
  height: auto;
  margin-inline: auto;
  object-fit: contain;
}
.help-page {
  display: grid;
  gap: 18px;
}
.help-image-frame {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.help-image-frame img {
  display: block;
  width: 100%;
  max-width: 1120px;
  height: auto;
  margin-inline: auto;
  object-fit: contain;
}
.shop-footer {
  width: min(95%, calc(100vw - 16px));
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  gap: 0;
  padding: 0;
  background: #102326;
  color: #d9e5e5;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}
.shop-footer .shop-brand span {
  color: #fff;
}
.footer-contact-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 20px 28px;
  background: var(--auth-blue-gradient);
  color: #fff;
}
.footer-contact-band section {
  min-height: 82px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  padding: 0 18px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.28);
}
.footer-contact-band section:last-child {
  border-right: 0;
}
.footer-contact-band i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #ffd51b;
  color: #102326;
}
.footer-contact-band strong,
.shop-footer h3 {
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}
.footer-contact-band span {
  font-size: 12px;
  font-weight: 700;
}
.footer-contact-band a {
  min-width: 96px;
  display: inline-flex;
  justify-content: center;
  padding: 7px 12px;
  border: 2px solid #fff;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, minmax(0, .75fr));
  gap: 34px;
  padding: 34px;
  background: #11181a;
}
.footer-grid section {
  display: grid;
  align-content: start;
  gap: 7px;
}
.footer-brand-block {
  gap: 14px;
}
.footer-brand-block p,
.shop-footer span,
.shop-footer a {
  color: #d9e5e5;
  font-size: 13px;
  line-height: 1.45;
}
.shop-footer a {
  text-decoration: none;
}
.shop-footer a:hover,
.shop-footer a:focus-visible {
  color: #ffd51b;
}
.shop-footer h3 {
  position: relative;
  margin: 0 0 7px;
  padding-left: 14px;
}
.shop-footer h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 7px;
  height: 12px;
  border-top: 3px solid #ffd51b;
  border-right: 3px solid #ffd51b;
  border-radius: 0 3px 0 0;
}
.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.footer-socials a {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}
.shop-footer small {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 14px 34px;
  background: #050708;
  color: #aab8bb;
}
.footer-credit a {
  color: #ffd51b;
  font-weight: 900;
}
.footer-credit a:hover,
.footer-credit a:focus-visible {
  color: #fff;
}
.shop-cart .offcanvas-body,
.checkout-form,
.login-form,
.register-form {
  display: grid;
  gap: 10px;
}
.shop-cart {
  width: min(94vw, 520px) !important;
  border-left: 0;
}
.cart-header {
  align-items: flex-start;
  border-bottom: 1px solid #dce8e6;
}
.cart-header h5 {
  margin: 0;
  color: #102326;
  font-size: 24px;
  font-weight: 900;
}
.cart-lines {
  display: grid;
  gap: 8px;
}
.cart-line {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 84px 38px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e3ecea;
  border-radius: 8px;
  background: #fff;
}
.cart-line strong {
  overflow-wrap: anywhere;
  color: #102326;
  line-height: 1.25;
}
.customer-space-content .table-responsive {
  max-width: 100%;
}
.customer-space-content table {
  min-width: 760px;
}
.cart-line img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #eef5f3;
  border-radius: 8px;
}
.cart-line span {
  display: block;
  color: #66737b;
  font-weight: 800;
}
.cart-qty {
  display: grid;
  gap: 3px;
}
.cart-qty span {
  color: #66737b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.cart-qty .form-control {
  min-height: 38px;
  padding-inline: 8px;
}
.cart-totals {
  display: grid;
  gap: 8px;
  margin-block: 14px;
  padding: 12px;
  border: 1px solid #dce8e6;
  border-radius: 8px;
  background: #f8fbfa;
}
.cart-totals div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.cart-grand-total {
  margin-top: 2px;
  padding: 10px;
  border-radius: 8px;
  background: #102326;
  color: #fff;
}
.checkout-section-title {
  margin-top: 6px;
  color: #102326;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.checkout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.delivery-fields {
  display: grid;
  gap: 10px;
}
.delivery-fields[hidden] {
  display: none;
}
.checkout-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.order-workflow,
.order-confirmation {
  scroll-margin-top: 128px;
}
.order-checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: 22px;
  align-items: start;
}
.order-card {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid #dde8e6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 35, 38, .07);
}
.confirmation-card {
  width: min(760px, 100%);
  margin-inline: auto;
  text-align: center;
}
.confirm-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  border-radius: 999px;
  background: var(--auth-blue-action);
  color: #fff;
  font-size: 36px;
}
.order-confirm-meta,
.customer-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.order-confirm-meta div,
.customer-dashboard article {
  padding: 14px;
  border: 1px solid #dce8e6;
  border-radius: 8px;
  background: #f8fbfa;
}
.order-confirm-meta dt,
.customer-dashboard span {
  color: #66737b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.order-confirm-meta dd,
.customer-dashboard strong {
  display: block;
  margin: 4px 0 0;
  color: #102326;
  font-weight: 900;
}
.customer-dashboard strong {
  font-size: 24px;
}
.customer-order-list {
  display: grid;
  gap: 14px;
}
.customer-order-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #dce8e6;
  border-radius: 8px;
  background: #fff;
}
.customer-order-card header,
.customer-order-card footer,
.customer-order-items div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.customer-order-card header span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff7e6;
  color: #8a5a00;
  font-size: 12px;
  font-weight: 900;
}
.customer-order-items {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 8px;
  background: #f8fbfa;
}
.customer-order-items span {
  color: var(--auth-blue-end);
  font-weight: 900;
}
.customer-order-card footer > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.customer-order-card .ghost-btn,
.customer-order-card .primary-btn {
  min-height: 36px;
  padding: 8px 12px;
}
.customer-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.customer-sidebar {
  position: sticky;
  top: 132px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dce8e6;
  border-radius: 8px;
  background: #fff;
}
.customer-sidebar button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: #f3f8f7;
  color: #102326;
  font-weight: 900;
  text-align: left;
  padding: 10px 12px;
}
.customer-sidebar button.active,
.customer-sidebar button:hover {
  background: var(--auth-blue-action);
  color: #fff;
}
.customer-main,
.customer-profile-grid,
.customer-quick-actions {
  display: grid;
  gap: 14px;
}
.customer-profile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.customer-profile-grid article {
  padding: 16px;
  border: 1px solid #dce8e6;
  border-radius: 8px;
  background: #fff;
}
.customer-profile-grid span {
  display: block;
  color: #66737b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.customer-profile-grid strong {
  display: block;
  margin-top: 6px;
  color: #102326;
  font-size: 18px;
}
.customer-quick-actions,
.confirmation-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#authModal {
  position: fixed;
  inset: 0;
  z-index: 1080;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  padding: 16px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
}
#authModal:not(.show) {
  display: none !important;
}
#authModal.show {
  display: block !important;
}
#authModal .modal-dialog {
  min-height: calc(100dvh - 32px);
  margin: 0 auto;
  display: flex;
  align-items: center;
}
.auth-dialog {
  width: min(94vw, 760px);
  max-width: min(94vw, 760px);
}
.auth-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(255px, .96fr);
  width: 100%;
  min-height: 430px;
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border: 0;
  border-radius: 0 20px 20px 0;
  background: #fff;
  box-shadow: 0 24px 50px rgba(20, 32, 46, .26);
  opacity: 0;
  transform: translateY(18px) scale(.985);
  transition: opacity .24s ease, transform .24s ease;
}
#authModal.show .auth-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, .75);
}
.auth-brand-panel {
  position: relative;
  display: flex;
  min-height: 430px;
  padding: 42px 34px 30px;
  overflow: hidden;
  background:
    linear-gradient(180deg, #55cff1 0%, #35aee8 42%, #2695dc 100%);
  color: #fff;
}
.auth-wave {
  position: absolute;
  left: -42px;
  right: -42px;
  height: 168px;
  border-radius: 50%;
  background: rgba(38, 126, 238, .28);
  transform: rotate(9deg);
}
.auth-wave-one {
  top: 44px;
}
.auth-wave-two {
  right: auto;
  left: -64px;
  bottom: -86px;
  width: 245px;
  height: 245px;
  background: rgba(72, 176, 255, .38);
  transform: rotate(-32deg);
}
.auth-brand-copy {
  position: relative;
  z-index: 1;
  align-self: start;
  margin-inline: auto;
  text-align: center;
  line-height: 1.1;
}
.auth-brand-copy img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  margin-bottom: 8px;
  padding: 7px;
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 20px rgba(8, 65, 114, .16);
}
.auth-brand-copy p,
.auth-brand-copy span {
  margin: 0;
  font-size: 15px;
  color: rgba(255,255,255,.92);
}
.auth-brand-copy strong {
  display: block;
  margin: 3px 0;
  font-size: 19px;
  letter-spacing: 0;
}
.auth-logo-mark {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  color: #fff;
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  transform: translate(-50%, -34%);
}
.auth-brand-panel h1 {
  margin: 0;
  color: #fff;
  font-size: 42px;
  font-weight: 900;
  line-height: 1.05;
}
.auth-brand-panel p {
  margin: 0;
  color: rgba(255,255,255,.88);
  line-height: 1.7;
  font-size: 16px;
}
.auth-brand-note {
  position: absolute;
  z-index: 1;
  left: 22px;
  right: 22px;
  bottom: 24px;
  color: rgba(255,255,255,.78);
  font-size: 10px;
  line-height: 1.25;
  text-align: center;
}
.auth-form-panel {
  min-width: 0;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  display: grid;
  align-items: start;
  padding: 48px 38px;
  background: #fff;
}
.auth-form-head {
  display: grid;
  justify-items: center;
  gap: 3px;
  margin-bottom: 28px;
  text-align: center;
}
.auth-form-head h2 {
  margin: 0;
  font-size: 27px;
  font-weight: 900;
  color: #2786ee;
}
.auth-form-head p {
  margin: 0;
  color: #333;
  font-size: 10px;
  line-height: 1.4;
}
.auth-tab-content {
  min-width: 0;
}
.auth-form {
  width: min(100%, 306px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 5mm;
  animation: authPaneIn .22s ease both;
}
@keyframes authPaneIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.auth-form .form-control {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: #bfe8db;
  color: #315b57;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
.auth-password-field {
  position: relative;
  display: block;
  min-width: 0;
  margin: 0;
}
#loginForm > .form-control + .auth-password-field {
  margin-top: 2mm;
}
.auth-password-field .form-control {
  width: 100%;
  padding-right: 42px;
}
.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 9px;
  width: 28px;
  height: 24px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.54);
  color: #2a8dcc;
  font-size: 0;
}
.auth-password-toggle::before,
.auth-password-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.auth-password-toggle::before {
  width: 16px;
  height: 10px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
}
.auth-password-toggle::after {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.auth-password-toggle.is-visible {
  color: var(--auth-blue-end);
}
.auth-form .form-control:focus {
  background: #c9eee2;
  box-shadow: 0 0 0 3px rgba(39, 134, 238, .13);
}
.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5mm;
}
#registerForm .auth-grid + .auth-grid {
  margin-top: 2mm;
}
.auth-help {
  padding: 0;
  border: 0;
  background: #fff;
}
.auth-help strong {
  display: block;
  margin-bottom: 6px;
  color: #102326;
  font-size: 18px;
}
.auth-submit {
  align-self: center;
  min-width: 116px;
  min-height: 32px;
  margin-top: 10px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #279dec, #37c5ef);
  box-shadow: 0 7px 14px rgba(40, 143, 226, .28);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}
.auth-forgot-link,
.auth-switch button {
  border: 0;
  background: transparent;
  color: #6a99cb;
  font-size: 9px;
  text-decoration: underline;
}
.auth-forgot-link {
  align-self: flex-end;
  margin-top: -8px;
  margin-bottom: 2px;
  padding: 0 4px;
}
.auth-switch {
  margin: 0;
  color: #565f66;
  font-size: 10px;
  text-align: center;
}
.auth-switch button {
  padding: 0;
}
.auth-switch-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 2px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #f2fbff;
  color: #51666f;
  font-size: 11px;
  font-weight: 700;
}
.auth-switch-card button {
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #2288dc;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 5px 12px rgba(34, 136, 220, .12);
}
.auth-switch-card button:hover,
.auth-switch-card button:focus-visible {
  color: #fff;
  background: linear-gradient(90deg, #279dec, #37c5ef);
  outline: 0;
}
.auth-register-head {
  display: grid;
  justify-items: center;
  min-height: 82px;
  margin: -48px -38px 14px;
  padding: 14px 18px 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% -14%, rgba(82, 194, 242, .55) 0 29%, transparent 30%),
    linear-gradient(180deg, #57d2f0 0%, #2fa3e1 100%);
  color: #fff;
  text-align: center;
}
.auth-register-head img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  padding: 5px;
  border-radius: 11px;
  background: rgba(255,255,255,.92);
}
.auth-register-head p,
.auth-register-head span {
  margin: 0;
  font-size: 11px;
  line-height: 1.1;
}
.auth-terms {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  color: #6b8b86;
  font-size: 8px;
}
.auth-terms input {
  width: 10px;
  height: 10px;
  accent-color: #34b7df;
}
.password-strength {
  display: grid;
  gap: 7px;
  margin-top: 2px;
}
.password-strength-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8f2ef;
}
.password-strength-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ef4444, #f59e0b);
  transition: width .2s ease, background .2s ease;
}
.password-strength[data-score="1"] .password-strength-bar span { width: 25%; }
.password-strength[data-score="2"] .password-strength-bar span { width: 50%; background: linear-gradient(90deg, #f59e0b, #38bdf8); }
.password-strength[data-score="3"] .password-strength-bar span { width: 75%; background: linear-gradient(90deg, #38bdf8, #22c55e); }
.password-strength[data-score="4"] .password-strength-bar span { width: 100%; background: linear-gradient(90deg, #2ba4e6, #18b977); }
.password-criteria {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 8px;
  color: #7a8c8a;
  font-size: 8.5px;
  font-weight: 800;
}
.password-criteria span {
  position: relative;
  padding-left: 13px;
}
.password-criteria span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbdad7;
}
.password-criteria span.is-valid {
  color: #13785f;
}
.password-criteria span.is-valid::before {
  background: #18b977;
}
.customer-tabs {
  gap: 8px;
  margin-bottom: 16px;
}
.customer-space-content {
  display: grid;
  gap: 14px;
}
.customer-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.customer-kpis article,
.customer-row {
  border: 1px solid #dce8e6;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}
.customer-kpis span,
.customer-row span,
.customer-row small {
  display: block;
  color: #66737b;
  font-size: 13px;
}
.customer-kpis strong {
  display: block;
  margin-top: 4px;
  color: #102326;
  font-size: 24px;
}
.customer-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.customer-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.empty-state {
  padding: 22px;
  border: 1px dashed #c9d8d5;
  border-radius: 8px;
  color: #66737b;
  background: #fff;
}
.toast.show {
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 1199px) {
  .shop-nav {
    z-index: 1080;
    overflow: visible;
  }
  .shop-nav-inner {
    display: grid;
    grid-template-columns: auto auto minmax(220px, 1fr) auto;
    gap: 12px;
    padding-inline: 14px;
  }
  .shop-menu-toggle {
    display: grid;
    justify-self: end;
  }
  .header-service {
    display: none;
  }
  .shop-nav .offcanvas {
    max-width: min(92vw, 420px);
    z-index: 1095;
  }
  .offcanvas-backdrop {
    z-index: 1090;
  }
  .shop-nav .offcanvas.show,
  .shop-nav .offcanvas.showing {
    visibility: visible;
  }
  .shop-nav-actions {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
    width: 100%;
  }
  .shop-nav-actions .form-control {
    width: 100%;
  }
  .shop-nav .offcanvas-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-width: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 12px;
  }
  .mobile-client-actions {
    display: grid;
    gap: 8px;
    padding: 10px 0;
  }
  .shop-nav-links {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    width: 100%;
    gap: 4px;
  }
  .shop-nav .nav-link {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    background: #f8fbfa;
    padding-inline: 12px;
    line-height: 1.15;
  }
  .shop-nav .nav-link i {
    flex: 0 0 22px;
    width: 22px;
    text-align: center;
  }
  .shop-search-form {
    grid-template-columns: minmax(0, 1fr) 44px;
  }
  .account-avatar,
  .report-link {
    width: 100%;
    justify-content: flex-start;
    padding-inline: 12px;
  }
  .shop-cart-button {
    width: 42px;
  }
  .catalog-controls {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .shop-slide-copy h1 {
    font-size: 42px;
  }
}
@media (max-width: 680px) {
  .shop-promo-bar {
    height: 36px;
    font-size: 13px;
    padding-inline: 10px;
  }
  .shop-nav {
    width: 100%;
  }
  .shop-container,
  .shop-section {
    width: calc(100vw - 20px);
  }
  .shop-section {
    padding-block: 38px;
  }
  .shop-nav-inner {
    min-height: auto;
    grid-template-columns: 1fr auto;
    padding: 10px;
  }
  .vendor-pill,
  .desktop-search {
    grid-column: 1 / -1;
  }
  .vendor-pill {
    justify-self: start;
    min-height: 34px;
  }
  .shop-brand img {
    width: 40px;
    height: 40px;
  }
  .shop-brand span {
    font-size: 14px;
  }
  .shop-lower-bar {
    height: auto;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 10px;
  }
  .shop-purchase-controls {
    grid-column: 1 / -1;
    justify-self: stretch;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .language-pill {
    display: none;
  }
  .shop-purchase-controls .language-pill {
    width: 100%;
    display: inline-flex;
  }
  .shop-lower-actions {
    gap: 6px;
  }
  .cart-amount {
    display: none;
  }
  .shop-hero,
  .shop-slide {
    min-height: 460px;
  }
  .shop-slide-copy {
    width: calc(100vw - 28px);
    padding-block: 58px;
  }
  .shop-slide-copy h1 {
    font-size: 34px;
    line-height: 1.05;
  }
  .shop-slide-copy p:not(.eyebrow) {
    font-size: 15px;
  }
  .shop-section-head,
  .product-detail {
    grid-template-columns: 1fr;
  }
  .shop-section-head {
    display: grid;
  }
  .catalog-controls,
  .customer-kpis {
    grid-template-columns: 1fr;
  }
  .product-actions,
  .product-detail dl,
  .company-facts {
    grid-template-columns: 1fr;
  }
  .auth-card {
    grid-template-columns: 1fr;
    min-height: 0;
    max-height: calc(100vh - 16px);
    border-radius: 20px;
  }
  .auth-brand-panel {
    min-height: 190px;
    padding: 28px 22px;
  }
  .auth-form-panel {
    max-height: none;
    padding: 28px 18px 24px;
  }
  .auth-form {
    padding-bottom: 10px;
  }
  .auth-grid {
    grid-template-columns: 1fr;
  }
  .auth-register-head {
    margin: -28px -18px 14px;
  }
  .cart-line {
    grid-template-columns: 44px minmax(0, 1fr) 60px 34px;
    gap: 8px;
  }
  .cart-line img {
    width: 44px;
    height: 44px;
  }
  .cart-line .form-control {
    padding-inline: 6px;
  }
  .product-actions {
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  }
  .product-detail-actions {
    display: grid;
  }
  #productModal {
    z-index: 1105;
  }
  #productModal .modal-dialog {
    margin: 8px;
    max-width: calc(100vw - 16px);
  }
  #productModal .modal-content {
    max-height: calc(100dvh - 16px);
    overflow: hidden;
  }
  #productModalContent {
    overflow-y: auto;
  }
  .product-detail {
    gap: 14px;
    padding: 14px;
  }
  .product-detail > img {
    max-height: 42vh;
  }
  .product-detail h2 {
    font-size: 24px;
    line-height: 1.15;
  }
  .product-detail-actions {
    position: sticky;
    bottom: 0;
    margin: 14px -14px -14px;
    padding: 10px 14px 14px;
    background: #fff;
    border-top: 1px solid #dce8e6;
  }
  .product-detail-actions .primary-btn,
  .product-detail-actions .whatsapp-product-btn {
    width: 100%;
  }
  .footer-contact-band,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-contact-band {
    padding: 12px;
  }
  .footer-contact-band section {
    min-height: auto;
    padding: 14px 8px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.24);
  }
  .footer-contact-band section:last-child {
    border-bottom: 0;
  }
  .footer-grid {
    gap: 22px;
    padding: 24px;
  }
  .shop-footer small {
    padding-inline: 24px;
  }
  .shop-pagination {
    flex-wrap: wrap;
  }
  .customer-shell,
  .customer-profile-grid,
  .customer-quick-actions,
  .confirmation-actions {
    grid-template-columns: 1fr;
  }
  .customer-sidebar {
    position: static;
  }
  .modal-dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    margin-inline: auto;
  }
  #authModal {
    padding: 10px;
  }
  #authModal .modal-dialog {
    width: min(100%, 760px);
    max-width: min(100%, 760px);
    min-height: calc(100dvh - 20px);
  }
}

@media (max-height: 640px) {
  #authModal .modal-dialog {
    align-items: flex-start;
  }
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 284px;
  padding: 24px;
  background: var(--sidebar-bg);
  color: #fff;
  z-index: 10;
  overflow-y: auto;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 34px;
}

.brand img { width: 3cm; height: 3cm; border-radius: 0; object-fit: contain; }
.brand span { display: block; color: var(--sidebar-text); font-size: 13px; margin-top: 2px; }

nav { display: grid; gap: 10px; }
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  margin-bottom: 24px;
  border-radius: 18px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.brand-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.08));
  border: 1px solid rgba(255,255,255,.12);
  flex-shrink: 0;
}
.brand img { width: 42px; height: 42px; border-radius: 12px; object-fit: contain; }
.brand-copy strong { display: block; color: #fff; font-size: 15px; }
.brand-copy span { display: block; color: rgba(217,229,229,.82); font-size: 12px; margin-top: 2px; }
.nav-section-label {
  display: block;
  margin: 18px 0 8px;
  padding-left: 4px;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(217,229,229,.72);
  font-weight: 800;
}
.nav-item {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 13px;
  color: var(--sidebar-text);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  font-weight: 800;
  line-height: 1.2;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.nav-item.active, .nav-item:hover {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  border-color: rgba(255,255,255,.12);
  transform: translateX(2px);
}
.nav-item span:not(.nav-caret) { min-width: 0; }
.nav-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
}
.nav-item::before {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  background-color: rgba(255,255,255,.14);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
}
.nav-icon {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}
.nav-item:hover .nav-icon,
.nav-item.active .nav-icon,
.nav-item:hover::before,
.nav-item.active::before {
  background-color: rgba(255,255,255,.22);
}
.nav-parent .nav-caret {
  margin-left: auto;
  color: inherit;
  font-size: 12px;
  font-weight: 900;
}
.nav-submenu {
  display: grid;
  gap: 6px;
  margin: 6px 0 2px 16px;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,.16);
}
.nav-submenu[hidden] { display: none; }
.nav-subitem {
  padding-block: 11px;
  font-size: 13px;
}
.nav-item[data-module-button="settings"]::before,
.nav-item[data-module-button="account"]::before,
.nav-item[data-module-button="logout"]::before {
  content: "";
}
.nav-item[data-module-button="settings"]::before {
  background-image: url("../Useful Icons/user-needs-18/svg/setting-preferences-user-interface-ui-gear-16-28625.svg");
}
.nav-item[data-module-button="account"]::before {
  background-image: url("../Useful Icons/user-needs-18/svg/lock-secure-protect-safety-safe-protection-16-28641.svg");
}
.nav-item[data-module-button="logout"]::before {
  background-image: url("../Useful Icons/user-needs-18/svg/window-export-arrow-out-right-import-document-file-16-28673.svg");
}

.app-shell {
  min-height: 100vh;
  margin-left: 284px;
  padding: 22px clamp(16px, 3vw, 34px) 46px;
}

.topbar, .toolbar, .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow { margin: 0 0 3px; color: var(--brand); font-size: 12px; font-weight: 800; text-transform: uppercase; }
h1, h2, h3 { margin: 0; letter-spacing: 0; color: var(--title-color); }
h1 { font-size: 30px; }

.top-actions { display: flex; align-items: center; gap: 10px; }
.sync-pill, .chip, .badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 700;
  background: #e8f4f2;
  color: var(--brand-dark);
}

.icon-btn, .ghost-btn, .primary-btn, .file-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  min-height: 42px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.icon-btn { width: 42px; padding: 0; }
.notification-button {
  position: relative;
}
.notification-count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}
.notification-button.has-notifications {
  border-color: var(--brand);
  color: var(--brand-dark);
}
.primary-btn { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 800; }
.ghost-btn:hover, .icon-btn:hover { border-color: var(--brand); }
.mobile-menu { display: inline-flex; }

.sidebar { transition: transform .2s ease, width .2s ease; }
.sidebar.collapsed { transform: translateX(-100%); }
body[data-sidebar-collapsed="true"] .sidebar { transform: translateX(-100%); }
body[data-sidebar-collapsed="true"] .app-shell { margin-left: 0; }

.view { display: none; animation: rise .22s ease both; }
.view.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.home-hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 20px;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid rgba(15,118,110,.14);
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f3faf9 100%);
  box-shadow: 0 22px 60px rgba(15, 23, 42, .08);
}
.home-hero-copy h2 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.08;
  margin-bottom: 10px;
}
.home-welcome {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 18px;
  max-width: 720px;
}
.home-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.home-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eaf7f5;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
}
.home-hero-side {
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(15,118,110,.08);
  border: 1px solid rgba(15,118,110,.16);
  align-self: stretch;
  display: grid;
  align-content: center;
}
.home-quote-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--brand-dark);
}
.home-quote {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.7;
  color: #123232;
  font-weight: 600;
}
.home-menu-card {
  margin-top: 24px;
  padding: clamp(20px, 2.4vw, 28px);
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid rgba(15,118,110,.12);
  box-shadow: var(--shadow);
}
.home-menu-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.home-menu-count {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f3f8f7;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  max-width: 1180px;
  margin: 24px 0 0;
}
.module-card {
  min-height: 138px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-content: center;
  align-items: center;
  column-gap: 14px;
  gap: 9px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fdfc 100%);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 14px 36px rgba(20, 34, 39, .07);
}
.module-icon {
  grid-row: 1 / 3;
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #e8f4f2 0%, #d7eeeb 100%);
  border: 1px solid #cfe5e1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.module-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.module-card:hover,
.module-card:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15,118,110,.12), 0 16px 38px rgba(20, 34, 39, .09);
  outline: 0;
  transform: translateY(-2px);
}
.module-card strong {
  grid-column: 2;
  color: #102326;
  font-size: 16px;
}
.module-card > span:not(.module-icon) {
  grid-column: 2;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .home-hero-panel {
    grid-template-columns: 1fr;
  }
  .home-menu-head {
    flex-direction: column;
  }
}

.module-placeholder {
  max-width: 720px;
  margin: clamp(28px, 8vh, 82px) auto 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 36px rgba(20, 34, 39, .07);
}
.module-placeholder h2 {
  margin-bottom: 10px;
  color: #102326;
}
.module-placeholder p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.placeholder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.sales-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.sales-stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 10px 28px rgba(20, 34, 39, .06);
}
.sales-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.sales-stat strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
}
.sales-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 12px;
  align-items: start;
}
.sales-main,
.sales-cart-panel,
.sales-history-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(20, 34, 39, .07);
}
.sales-main { padding: 14px; }
.sales-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.sales-search { min-width: 0; box-shadow: none; }
.sales-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.sales-switch input { position: absolute; opacity: 0; pointer-events: none; }
.sales-switch-track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-width: 210px;
  min-height: 44px;
  padding: 4px;
  border: 1px solid #b9d7d3;
  border-radius: 8px;
  background: #eef7f6;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.65), 0 8px 18px rgba(15, 118, 110, .08);
}
.sales-switch-track i {
  position: absolute;
  left: 4px;
  top: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 6px;
  background: var(--brand-dark);
  transition: transform .18s ease;
  z-index: 0;
}
.sales-switch-track b {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
}
.sales-switch input:not(:checked) + .sales-switch-track b:first-child,
.sales-switch input:checked + .sales-switch-track b:last-child { color: #fff; }
.sales-switch input:checked + .sales-switch-track i { transform: translateX(100%); }
.sales-product-info {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  margin-bottom: 12px;
  border: 1px solid #d7ede9;
  border-radius: 8px;
  background: #eef9f7;
}
.sales-product-info span { color: var(--muted); font-size: 13px; }
.sales-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 9px;
}
.sales-product-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.sales-product-card.active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, .10); }
.sales-product-card strong,
.sales-cart-item strong { color: #102326; }
.sales-product-card span,
.sales-product-stock span,
.sales-cart-item span,
.sales-cart-head p {
  color: var(--muted);
  font-size: 12px;
}
.sales-product-stock {
  display: grid;
  gap: 2px;
}
.sales-cart-panel {
  position: sticky;
  top: 16px;
  padding: 14px;
}
.sales-cart-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}
.sales-cart-head h2 { font-size: 18px; }
.sales-cart-list {
  display: grid;
  gap: 8px;
  max-height: 34vh;
  overflow: auto;
  padding-right: 3px;
}
.sales-cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.sales-qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sales-qty button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f7f9fb;
}
.sales-qty .sales-remove { color: var(--red); }
.sales-client-grid,
.sales-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.sales-client-grid label,
.sales-options label,
.sales-discount {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.sales-check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbfc;
  font-weight: 800;
}
.sales-total-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  background: #f7f9fb;
  border: 1px solid var(--line);
}
.sales-total-box > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.sales-total-box strong { font-size: 18px; color: #102326; }
.sales-submit {
  width: 100%;
  margin-top: 12px;
  min-height: 50px;
  font-size: 16px;
}
.sales-history-panel {
  margin-top: 14px;
  padding: 14px;
}
.sales-history-filter { max-width: 220px; }
.badge.danger { background: #fee2e2; color: #991b1b; }
.muted { color: var(--muted); font-size: 12px; }
.empty-state {
  padding: 18px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}
button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.cash-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #cfe6e2;
  border-radius: 8px;
  background: linear-gradient(135deg, #edf7f6 0%, #f8fbfd 52%, #fff7ed 100%);
}
.cash-stat {
  position: relative;
  overflow: hidden;
  min-height: 106px;
  padding: 16px;
  background: #ffffff;
  border-color: #d5e0e5;
  box-shadow: 0 12px 30px rgba(16, 35, 38, .07);
}
.cash-stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #94a3b8;
}
.cash-stat-primary {
  grid-column: span 2;
  background: linear-gradient(135deg, #0f3d3b 0%, #0f766e 58%, #d97706 130%);
  border-color: #0f766e;
  color: #fff;
  box-shadow: 0 18px 38px rgba(15, 118, 110, .24);
}
.cash-stat-primary::before {
  width: 6px;
  background: #fbbf24;
}
.cash-stat-primary span,
.cash-stat-primary strong {
  color: #fff;
}
.cash-stat-primary strong {
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: 0;
}
.cash-stat-primary small {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
  font-weight: 700;
}
.cash-gap-stat.cash-gap-ok::before { background: #16a34a; }
.cash-gap-stat.cash-gap-warning::before { background: #d97706; }
.cash-gap-stat.cash-gap-danger::before { background: #dc2626; }
.cash-gap-stat.cash-gap-ok strong { color: #166534; }
.cash-gap-stat.cash-gap-warning strong { color: #92400e; }
.cash-gap-stat.cash-gap-danger strong { color: #991b1b; }
.cash-stat span {
  margin-bottom: 8px;
  color: #5f6d75;
}
.cash-stat strong {
  color: #102326;
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.15;
}
.cash-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 374px;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border-radius: 8px;
  background: #eef6f5;
}
.cash-main-panel,
.cash-closing-panel {
  background: #ffffff;
  border: 1px solid #d5e0e5;
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(16, 35, 38, .08);
}
.cash-main-panel,
.cash-closing-panel {
  padding: 16px;
}
.cash-closing-panel {
  position: sticky;
  top: 16px;
  background: #fbfcfd;
}
.cash-closing-panel p,
.cash-head p {
  margin: 4px 0 0;
  color: var(--muted);
}
.cash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: -2px 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e1e8eb;
}
.cash-head h2,
.cash-closing-panel h2 {
  color: #102326;
  font-size: 22px;
}
.cash-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 350px;
}
.cash-date {
  display: grid;
  gap: 4px;
  min-width: 160px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.cash-actions .ghost-btn,
.cash-actions .primary-btn {
  min-height: 44px;
}
.cash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.cash-kpi {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 9px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid #dce4e8;
  border-radius: 8px;
  background: #f9fbfc;
}
.cash-kpi-strong {
  background: #eef9f7;
  border-color: #b8dad5;
}
.cash-kpi-grid span,
.cash-form-grid label,
.cash-movement-form label,
.cash-note {
  color: #5f6d75;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.cash-kpi-grid strong {
  color: #102326;
  font-size: 21px;
  line-height: 1.15;
}
.cash-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  padding: 13px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
}
.cash-status.cash-ok {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #166534;
}
.cash-status.cash-warning {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}
.cash-status.cash-danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: #991b1b;
}
.cash-status span {
  font-size: 13px;
  text-align: right;
}
.cash-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cash-table-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid #dce4e8;
  border-radius: 8px;
  background: #fbfcfd;
}
.cash-table-card .table-wrap {
  border: 1px solid #e1e8eb;
  border-radius: 8px;
  background: #fff;
  overflow: auto;
}
.cash-table-card .stock-state-table th {
  background: #f1f6f7;
}
.compact-head {
  margin-bottom: 8px;
}
.compact-head h3 {
  font-size: 17px;
}
.cash-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.cash-form-grid label,
.cash-movement-form label,
.cash-note {
  display: grid;
  gap: 6px;
}
.cash-form-grid .form-control,
.cash-movement-form .form-control,
.cash-note .form-control,
.cash-date .form-control {
  border-color: #cfdae0;
  border-radius: 8px;
  min-height: 44px;
  background: #fff;
}
.cash-form-grid .form-control:focus,
.cash-movement-form .form-control:focus,
.cash-note .form-control:focus,
.cash-date .form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .12);
}
.cash-note {
  margin-top: 10px;
}
.cash-closing-head {
  padding-bottom: 12px;
  border-bottom: 1px solid #e1e8eb;
}
.cash-movement-form {
  display: grid;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid #e1e8eb;
}
.cash-movement-form h3 {
  font-size: 16px;
  color: #102326;
}
.cash-movement-form .cash-save-btn {
  margin-top: 2px;
}
.cash-save-btn {
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  box-shadow: 0 10px 22px rgba(15, 118, 110, .18);
}

.invoice-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 12px;
  align-items: start;
}
.invoice-list-panel,
.invoice-detail-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(20, 34, 39, .07);
}
.invoice-list-panel {
  padding: 14px;
}
.invoice-detail-panel {
  position: sticky;
  top: 16px;
  min-height: 240px;
  overflow: hidden;
}
.invoice-head {
  align-items: flex-start;
}
.invoice-head p {
  margin: 4px 0 0;
  color: var(--muted);
}
.invoice-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 190px;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.invoice-search {
  min-width: 0;
  box-shadow: none;
}
.invoice-selected-row {
  background: #eef9f7;
}
.invoice-detail-empty {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}
.invoice-detail-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}
.invoice-detail-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.invoice-detail-title h2 {
  font-size: 21px;
}
.invoice-detail-title span,
.invoice-info-grid span,
.invoice-item-row span,
.invoice-cancel-note span,
.invoice-cancel-note small {
  color: var(--muted);
  font-size: 12px;
}
.invoice-info-grid,
.invoice-total-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.invoice-info-grid div,
.invoice-total-list div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}
.invoice-items-list {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
}
.invoice-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.invoice-item-row > div {
  display: grid;
  gap: 2px;
}
.invoice-cancel-note {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff1f2;
}
.invoice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.danger-action {
  border-color: #fecaca;
  color: #991b1b;
}

.settings-shell {
  display: grid;
  gap: 14px;
}
.settings-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid #d8e4e7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(20, 34, 39, .07);
}
.settings-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, #edf7f6 0%, #ffffff 60%, #fff7ed 100%);
}
.settings-hero p:not(.eyebrow),
.settings-card-head p {
  margin: 5px 0 0;
  color: var(--muted);
}
.settings-actions,
.settings-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.settings-option-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(105px, 1fr));
  gap: 12px;
}
.settings-option {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 130px;
  padding: 14px 10px;
  border: 1px solid #d8e4e7;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 12px 26px rgba(20, 34, 39, .06);
  text-align: center;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.settings-option:hover,
.settings-option.active {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 16px 32px rgba(15, 118, 110, .16);
}
.settings-option-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}
.settings-option strong {
  color: var(--title-color);
  font-size: 14px;
}
.settings-option small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.settings-detail-panel {
  display: none;
}
.settings-detail-panel.active {
  display: block;
}
.settings-wide {
  grid-column: 1 / -1;
}
.settings-fields {
  display: grid;
  gap: 11px;
  margin-top: 12px;
}
.settings-fields.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.settings-fields.color-grid {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}
.settings-color-input {
  width: 100%;
  min-height: 48px;
  padding: 4px;
  cursor: pointer;
}
.settings-fields label,
.settings-panel > label,
.settings-check,
.settings-switch {
  color: #5f6d75;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.settings-fields label,
.settings-panel > label {
  display: grid;
  gap: 6px;
}
.settings-check,
.settings-switch {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
}
.settings-check input,
.settings-switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}
.settings-secret {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
}
.settings-status {
  margin-top: 13px;
  padding: 12px 13px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 800;
}
.settings-status.is-ready {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #166534;
}
.settings-dirty {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.topbar h1,
.section-head h2,
.settings-panel h3,
.cash-head h2,
.cash-closing-panel h2,
.cash-movement-form h3,
.invoice-detail-title h2,
.dashboard-card h3,
.sales-total-box strong,
.sales-cart-item strong {
  color: var(--title-color);
}
.topbar p,
.section-head p,
.settings-hero p:not(.eyebrow),
.settings-card-head p,
.cash-head p,
.cash-closing-panel p,
.invoice-head p,
.dashboard-card p {
  color: var(--muted);
}
.chip.active {
  background: var(--title-color);
  border-color: var(--title-color);
}

@media (max-width: 1180px) {
  .sales-shell { grid-template-columns: 1fr; }
  .sales-cart-panel { position: static; }
  .sales-cart-list { max-height: none; }
  .cash-shell { grid-template-columns: 1fr; }
  .cash-closing-panel { position: static; }
  .invoice-shell { grid-template-columns: 1fr; }
  .invoice-detail-panel { position: static; }
  .settings-option-grid { grid-template-columns: repeat(3, minmax(105px, 1fr)); }
  .user-permission-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .user-permission-actions .form-control {
    grid-column: span 3;
  }
}

@media (max-width: 760px) {
  .sales-dashboard,
  .cash-dashboard { grid-template-columns: 1fr 1fr; }
  .cash-head,
  .cash-actions { display: grid; grid-template-columns: 1fr; }
  .cash-actions { min-width: 0; }
  .cash-status { display: grid; }
  .user-permission-matrix {
    grid-template-columns: 1fr;
  }
  .user-permission-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .user-permission-actions {
    grid-template-columns: 1fr;
  }
  .user-permission-actions .form-control {
    grid-column: auto;
  }
  .cash-status span { text-align: left; }
  .cash-kpi-grid,
  .cash-tables,
  .cash-form-grid,
  .settings-grid,
  .settings-fields.two-cols,
  .settings-fields.color-grid { grid-template-columns: 1fr; }
  .settings-option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-hero,
  .settings-card-head,
  .settings-actions { align-items: stretch; flex-direction: column; }
  .sales-toolbar,
  .sales-client-grid,
  .sales-options,
  .supplier-dashboard,
  .invoice-toolbar,
  .invoice-info-grid,
  .invoice-total-list { grid-template-columns: 1fr; }
  .sales-switch-track { width: 100%; }
  .sales-products { grid-template-columns: 1fr; }
  .sales-cart-item { grid-template-columns: 1fr; }
  .invoice-item-row { grid-template-columns: 1fr; }
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, .75fr) minmax(560px, 1.6fr);
  align-items: stretch;
}
.search-box {
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.search-box input { width: 100%; border: 0; outline: 0; min-height: 48px; background: transparent; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.legacy-filters { display: none; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--muted); }
.chip.active { background: #102326; color: #fff; border-color: #102326; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.tools-panel.ribbon {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfc 100%);
  border: 1px solid #d3e0e4;
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(20, 34, 39, .08);
}
.module-ribbon {
  display: block;
  align-items: stretch;
  margin: -4px 0 16px;
  padding: 8px;
}
.module-ribbon .search-box {
  min-width: 0;
  box-shadow: none;
  border-color: #d3e0e4;
}
.ribbon-main {
  min-width: 0;
  border: 1px solid #dfe9ec;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.ribbon-head {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px 7px 12px;
  border-bottom: 1px solid #dfe9ec;
  background: #f2f7f8;
}
.ribbon-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}
.ribbon-tab {
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: #41545b;
  font-size: 12px;
  font-weight: 900;
}
.ribbon-tab:hover,
.ribbon-tab.active {
  border-color: #ccdadd;
  background: #fff;
  color: var(--brand-dark);
}
.ribbon-head strong {
  display: block;
  font-size: 13px;
  line-height: 1.1;
}
.ribbon-kicker {
  display: block;
  color: var(--brand-dark);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}
.ribbon-toggle {
  width: 32px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #ccdadd;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}
.ribbon-toggle:hover,
.ribbon-toggle:focus-visible {
  border-color: var(--brand);
  color: var(--brand-dark);
  outline: 0;
}
.tools-grid.ribbon-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(124px, .75fr)) minmax(360px, auto);
  align-items: center;
  gap: 6px;
  padding: 8px;
  overflow: hidden auto;
  transition: max-height .22s ease, padding .22s ease, opacity .18s ease;
  max-height: 260px;
}
.ribbon-panel[hidden] { display: none !important; }
.search-panel {
  grid-column: 1 / -1;
  min-width: 0;
}
.search-panel .search-box {
  min-height: 48px;
}
body[data-ribbon-tab="search"] #ribbonBody.tools-grid.ribbon-body {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  padding: 10px;
  max-height: 560px;
  background: #fbfdfd;
}
body[data-ribbon-tab="search"][data-ribbon-collapsed="true"] #ribbonBody.tools-grid.ribbon-body {
  max-height: 0;
}
.search-row {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 0;
}
.search-caption {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.search-caption span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid #dbe7ea;
  border-radius: 8px;
  background: #f4f8f9;
  color: #41545b;
  font-size: 11px;
  font-weight: 900;
}
.search-row .search-box {
  min-height: 52px;
  border-color: #bfd4d8;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(15,118,110,.04);
}
.search-row .search-box span {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #e7f3f1;
  color: var(--brand-dark);
  font-weight: 900;
}
.search-row .search-box input {
  min-height: 50px;
  font-size: 14px;
}
.ribbon-search-control {
  min-width: 0;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid #dbe7ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(20, 34, 39, .04);
}
.ribbon-search-control.search-display { grid-column: span 2; }
.ribbon-search-control.search-sort { grid-column: span 3; }
.ribbon-search-control.search-order { grid-column: span 2; }
.ribbon-search-control.search-category { grid-column: span 3; }
.ribbon-search-control.search-packaging { grid-column: span 2; }
.ribbon-search-control .tool-icon {
  width: 36px;
  height: 36px;
  min-height: 36px;
  background: #eef7f6;
}
.ribbon-search-control .tool-label {
  align-self: end;
  color: #607178;
  font-size: 10px;
}
.ribbon-search-control select {
  min-height: 28px;
  padding: 2px 6px 4px 0;
  border-radius: 0;
  color: #172126;
  font-size: 12px;
  line-height: 1.2;
}
.ribbon-search-control:hover,
.ribbon-search-control:focus-within {
  border-color: #9fc8c2;
  box-shadow: 0 0 0 3px rgba(15,118,110,.10);
}
.status-filter-panel {
  grid-column: 1 / -1;
  min-height: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px;
  border: 1px solid #dbe7ea;
  border-radius: 8px;
  background: #f4f8f9;
  overflow: visible;
}
.status-filter-panel .icon-chip {
  min-width: auto;
  height: 36px;
  min-height: 36px;
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border-color: #d1dede;
  background: #fff;
  color: #25343f;
  white-space: nowrap;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.status-filter-panel .icon-chip:hover {
  border-color: #9fc8c2;
  background: #f6fbfb;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 118, 110, .08);
}
.status-filter-panel .icon-chip span:first-child {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #dff4f1;
  color: var(--brand-dark);
  font-size: 11px;
  flex-shrink: 0;
}
.status-filter-panel .icon-chip.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 10px 30px rgba(15, 118, 110, .2);
}
.status-filter-panel .icon-chip.active span:first-child {
  background: rgba(255,255,255,.18);
  color: #fff;
}
.status-filter-panel .icon-chip.active:hover {
  transform: translateY(-1px);
}
body[data-ribbon-collapsed="true"] #ribbonBody,
body[data-stock-ribbon-collapsed="true"] #stockRibbonBody,
body[data-transfer-ribbon-collapsed="true"] #transferRibbonBody {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  pointer-events: none;
}
.tool-field.icon-select,
.ribbon-group {
  min-height: 46px;
  padding: 5px 7px;
  border-right: 1px solid #dde7ea;
}
.filters-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, minmax(128px, 1fr));
  gap: 6px;
}
.tool-field.icon-select {
  display: grid;
  grid-template-columns: 30px minmax(92px, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 6px;
}
.tool-field.icon-select:last-child,
.ribbon-group:last-child { border-right: 0; }
.tool-icon,
.icon-chip,
.icon-action {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  font-size: 15px;
  font-weight: 900;
}
.tool-icon {
  grid-row: 1 / 3;
  color: var(--brand-dark);
  background: #e7f3f1;
  border: 1px solid #c9e3df;
}
.tool-label {
  color: #41545b;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
.tool-field select {
  grid-column: 2;
  width: 100%;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  outline: 0;
}
.tool-field:hover select,
.tool-field select:focus {
  border-color: #cfdde1;
  background: #fff;
}
.tools-grid .filters,
.list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  align-items: center;
}
.tools-grid .filters { grid-column: auto; }
.list-actions { grid-column: 1 / -1; }
.ribbon-panel.list-actions {
  display: flex;
  min-width: 0;
}
.tools-panel .chip {
  min-height: 34px;
  padding: 0;
}
.icon-chip {
  border: 1px solid #d5e1e5;
  background: #fff;
  color: var(--muted);
}
.filters .icon-chip {
  width: auto;
  min-width: 86px;
  padding: 0 10px;
  gap: 6px;
}
.icon-chip.active {
  background: #102326;
  color: #fff;
  border-color: #102326;
  box-shadow: 0 8px 18px rgba(16, 35, 38, .16);
}
.status-filter-panel .icon-chip {
  display: inline-flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: auto;
  white-space: nowrap;
}
.icon-action {
  text-decoration: none;
  border: 1px solid #d5e1e5;
  background: #fff;
  color: var(--ink);
}
.icon-action:hover,
.icon-action:focus-visible {
  border-color: var(--brand);
  color: var(--brand-dark);
  outline: 0;
}
.list-actions .primary-btn.icon-action {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.ribbon-action {
  min-height: 38px;
  max-width: 220px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid #d5e1e5;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
}
.ribbon-action span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ribbon-action.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.danger-text {
  color: var(--red);
}
.ribbon-action:hover,
.ribbon-action:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15,118,110,.12);
  outline: 0;
}
.download-menu {
  position: relative;
  display: inline-block;
}
.download-menu summary {
  list-style: none;
}
.download-menu summary::-webkit-details-marker {
  display: none;
}
.download-menu > div {
  position: absolute;
  z-index: 20;
  right: 0;
  top: calc(100% + 6px);
  min-width: 150px;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.download-menu > div button {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-weight: 800;
}
.download-menu > div button:hover {
  background: #e8f4f2;
  color: var(--brand-dark);
}
.download-menu.compact > div {
  left: 0;
  right: auto;
}
.access-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: -6px 0 14px;
}
.access-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid #d5e1e5;
  border-radius: 999px;
  background: #fff;
  color: #26383d;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(20, 34, 39, .05);
}
.access-pill span:first-child {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #edf6f5;
  color: var(--brand-dark);
  font-size: 11px;
  flex: 0 0 auto;
}
.access-pill.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.access-pill.primary span:first-child {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}
.access-pill:hover,
.access-pill:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15,118,110,.12), 0 10px 22px rgba(20, 34, 39, .08);
  outline: 0;
}
.selection-col { width: 60px; min-width: 60px; }
body[data-selection-visible="false"] .selection-col { display: none; }
.select-product { width: 18px; min-height: 18px; padding: 0; }

.table-wrap {
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.list-pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.list-pager button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-dark);
  font-weight: 900;
}
.list-pager button:disabled {
  opacity: .45;
  cursor: not-allowed;
}
table { width: 100%; border-collapse: collapse; min-width: 980px; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th, td { white-space: nowrap; }
td:nth-child(3) {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}
th { font-size: 12px; text-transform: uppercase; color: var(--muted); background: #f1f5f6; }
tr:last-child td { border-bottom: 0; }
.thumb { width: 44px; height: 44px; border-radius: 0; object-fit: cover; background: #e6edef; }
.row-actions { display: flex; gap: 6px; align-items: center; }
.row-actions button { min-height: 34px; padding: 7px 9px; border-radius: 8px; }
.actions-cell .row-actions { flex-wrap: nowrap; }
.action-btn {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}
.action-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.action-btn span { display: none; }
.action-btn:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
  background: #e8f4f2;
  color: var(--brand-dark);
}
.action-btn.danger:hover {
  border-color: var(--red);
  background: #fee2e2;
  color: var(--red);
}

.status-actif { background: #dcfce7; color: #166534; }
.status-rupture { background: #fee2e2; color: #991b1b; }
.status-suspendu { background: #ede9fe; color: #5b21b6; }
.status-perime { background: #e5e7eb; color: #111827; }
.status-archive { background: #dbeafe; color: #1e40af; }
.stock-low { background: #fef3c7; color: #92400e; }

.product-form { display: grid; gap: 14px; max-width: 1180px; }
.form-progress {
  position: sticky;
  top: 10px;
  z-index: 5;
  display: grid;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid #b8d7d3;
  border-radius: 8px;
  background: #f3fbfa;
  box-shadow: 0 12px 28px rgba(20, 34, 39, .08);
}
.progress-copy {
  color: #123235;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.45;
}
.form-progress .progress {
  height: 13px;
  background: #dbe7e8;
}
.form-progress .progress-bar {
  background: var(--brand);
  font-size: 10px;
  font-weight: 900;
  line-height: 13px;
  transition: width .22s ease;
}
.product-accordion {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.product-accordion .accordion-item {
  border-color: var(--line);
}
.product-accordion .accordion-button {
  min-height: 48px;
  padding: 13px 16px;
  color: var(--ink);
  background: #f1f5f6;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: none;
}
.product-accordion .accordion-button:not(.collapsed) {
  color: #fff;
  background: #102326;
}
.product-accordion .accordion-button:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15,118,110,.14);
}
.product-accordion .accordion-body {
  padding: 14px;
  background: var(--surface);
}
.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 9px;
  border-radius: 8px;
  background: rgba(15,118,110,.12);
  font-size: 16px;
}
.accordion-button:not(.collapsed) .section-icon {
  background: rgba(255,255,255,.16);
}
.product-form .row {
  --bs-gutter-x: .5rem;
  --bs-gutter-y: .5rem;
  align-items: end;
}
.general-grid .description-field {
  flex: 0 0 100%;
  max-width: 100%;
}
.product-form .form-control {
  min-height: 35px;
  height: 35px;
  padding: 7px 10px;
  font-size: 14px;
  color: #172126;
  border-color: #b9c7cc;
  background-color: #fff;
}
.product-form textarea.form-control {
  height: auto;
  min-height: 70px;
}
.product-form select.form-control {
  cursor: pointer;
  border-color: #78939b;
  background-color: #faffff;
  background-image: linear-gradient(45deg, transparent 50%, #102326 50%), linear-gradient(135deg, #102326 50%, transparent 50%);
  background-position: calc(100% - 17px) 14px, calc(100% - 11px) 14px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
  appearance: none;
}
.product-form .select-field {
  color: #102326;
}
.product-form .btn-sm {
  min-height: 35px;
}
.product-form label.btn {
  display: inline-flex;
  width: auto;
  margin: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.product-form label.btn.btn-secondary {
  background: #6c757d;
  border-color: #6c757d;
}
.product-form label.btn.btn-secondary:hover {
  background: #5c636a;
  border-color: #565e64;
}
.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.commercial-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 6px;
  padding: 12px;
  border: 1px solid #cfe4e1;
  border-radius: 8px;
  background: #f3fbfa;
}
.commercial-summary label {
  color: #123235;
}
.commercial-summary input[readonly] {
  color: #0f766e;
  font-weight: 900;
  background: #fff;
}
.stats-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}
.stats-strip div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(20, 34, 39, .06);
}
.stats-strip span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.stats-strip strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 16px;
}
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.supply-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.supply-card {
  min-height: 132px;
  border-radius: 8px;
}
.supply-ribbon {
  margin-bottom: 16px;
}
body[data-supply-ribbon-collapsed="true"] #supplyRibbonBody {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  pointer-events: none;
}
#supplyView .section-head {
  align-items: flex-end;
}
#supplyView .table-wrap table {
  min-width: 860px;
}
.supply-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: 16px;
  align-items: start;
}
.stock-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.supplier-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 12px;
  margin-bottom: 14px;
}
.supplier-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}
.supplier-kpi {
  min-height: 72px;
  margin: 0;
  border-radius: 8px;
}
.supplier-top-card {
  margin: 0;
}
.supplier-detail-card h4 {
  margin: 14px 0 8px;
  color: var(--title-color);
  font-size: 13px;
}
.supplier-detail-empty,
.supplier-profile,
.supplier-mini-list {
  display: grid;
  gap: 8px;
}
.supplier-detail-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.supplier-profile {
  padding: 10px;
  border: 1px solid #e6edf0;
  border-radius: 8px;
  background: #f8fbfc;
}
.supplier-profile strong,
.supplier-mini-list strong {
  color: var(--ink);
}
.supplier-profile span,
.supplier-mini-list span {
  color: var(--muted);
  font-size: 12px;
}
.supplier-mini-list div {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid #e6edf0;
  border-radius: 8px;
  background: #fff;
}
.user-privilege-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d9e6ea;
  border-radius: 8px;
  background: #fbfdfd;
}
.user-privilege-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.user-privilege-head h4 {
  margin: 0 0 4px;
  color: var(--title-color);
  font-size: 14px;
}
.user-privilege-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.user-privilege-head > span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8f4f2;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 900;
}
.user-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.user-role-card {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  min-height: 78px;
  padding: 10px;
  border: 1px solid #dfe9ec;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.user-role-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.user-role-card.is-selected,
.user-role-card:has(input:checked) {
  border-color: var(--brand);
  background: #f0fdfa;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .08);
}
.user-role-check {
  width: 18px;
  height: 18px;
  border: 1px solid #b9c9ce;
  border-radius: 5px;
  background: #fff;
}
.user-role-card:has(input:checked) .user-role-check {
  border-color: var(--brand);
  background: var(--brand);
}
.user-role-card:has(input:checked) .user-role-check::after {
  content: "";
  display: block;
  width: 8px;
  height: 5px;
  margin: 4px auto 0;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}
.user-role-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.user-role-copy strong {
  color: var(--ink);
  font-size: 13px;
}
.user-role-copy small,
.user-role-copy em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.3;
}
.user-permission-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content)) repeat(2, minmax(150px, 1fr));
  gap: 8px;
  align-items: center;
}
.user-permission-actions .form-control {
  min-height: 36px;
  padding: 7px 9px;
  font-size: 12px;
}
.user-permission-matrix {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  gap: 10px;
}
.user-permission-menu {
  display: grid;
  align-content: start;
  gap: 6px;
}
.user-permission-menu button {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 8px 9px;
  border: 1px solid #dfe9ec;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.user-permission-menu button.active {
  border-color: var(--brand);
  background: #f0fdfa;
}
.user-permission-menu strong {
  font-size: 12px;
}
.user-permission-menu span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.user-permission-list {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 10px;
  border: 1px solid #dfe9ec;
  border-radius: 8px;
  background: #fff;
}
.user-permission-list h5 {
  margin: 0 0 2px;
  color: var(--title-color);
  font-size: 13px;
}
.rbac-switch {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 44px;
  padding: 8px;
  border: 1px solid #edf2f4;
  border-radius: 8px;
  background: #fbfdfd;
  cursor: pointer;
}
.rbac-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.rbac-switch span {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #cbd5d8;
  transition: background .2s ease;
}
.rbac-switch span::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .18);
  transition: transform .2s ease;
}
.rbac-switch:has(input:checked) {
  border-color: rgba(15, 118, 110, .28);
  background: #f0fdfa;
}
.rbac-switch:has(input:checked) span {
  background: var(--brand);
}
.rbac-switch:has(input:checked) span::after {
  transform: translateX(16px);
}
.rbac-switch strong,
.rbac-switch small {
  grid-column: 2;
  min-width: 0;
}
.rbac-switch strong {
  color: var(--ink);
  font-size: 12px;
}
.rbac-switch small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}
.permission-group-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.permission-group-card + .permission-group-card {
  margin-top: 10px;
}
.permission-group-card h4 {
  margin: 0;
  color: var(--title-color);
  font-size: 13px;
}
.permission-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}
.permission-check {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 9px;
  border: 1px solid #e1eaed;
  border-radius: 8px;
  background: #fbfdfd;
  cursor: pointer;
  font-weight: 800;
}
.permission-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.permission-check span {
  width: 16px;
  height: 16px;
  border: 1px solid #b9c9ce;
  border-radius: 4px;
  background: #fff;
}
.permission-check:has(input:checked) {
  border-color: var(--brand);
  background: #f0fdfa;
}
.permission-check:has(input:checked) span {
  border-color: var(--brand);
  background: var(--brand);
}
.permission-check:has(input:checked) span::after {
  content: "";
  display: block;
  width: 7px;
  height: 4px;
  margin: 4px auto 0;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}
.permission-check strong {
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.supplier-row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.supplier-action-btn {
  width: 34px;
  min-height: 34px;
  border-radius: 8px;
  font-size: 17px;
  line-height: 1;
}
.supplier-action-btn.danger {
  color: var(--red);
  border-color: rgba(220, 38, 38, .24);
}
.supplier-action-btn.danger:hover {
  border-color: var(--red);
  background: #fff5f5;
}
.stock-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 14px;
  align-items: start;
}
.stock-main-panel,
.stock-side-panel {
  min-width: 0;
}
.stock-main-panel .table-wrap,
.sales-history-panel .table-wrap {
  max-height: min(62vh, 680px);
}
.transfer-workspace .stock-main-panel {
  display: grid;
  align-content: start;
}
.transfer-workspace #transferHistoryWrap {
  min-height: 420px;
}
.stock-side-panel {
  display: grid;
  gap: 12px;
}
.stock-summary-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.stock-summary-card h3 {
  margin-bottom: 12px;
  font-size: 15px;
}
.stock-priority-list {
  display: grid;
  gap: 8px;
}
.stock-priority-item {
  display: grid;
  gap: 3px;
  padding: 10px 11px;
  border: 1px solid #e6edf0;
  border-radius: 8px;
  background: #f8fbfc;
  color: inherit;
  text-decoration: none;
}
.stock-priority-item:hover {
  border-color: var(--brand);
  background: #f0fdfa;
}
.stock-priority-item strong {
  font-size: 13px;
}
.stock-priority-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.stock-state-table td:first-child {
  min-width: 220px;
  white-space: normal;
}
.stock-location-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-height: 44px;
  padding: 4px;
  border: 1px solid #b9d7d3;
  border-radius: 999px;
  background: #eef7f6;
  color: #365156;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.65), 0 8px 18px rgba(15, 118, 110, .08);
}
.stock-location-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.stock-location-toggle .toggle-track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 158px;
  min-height: 34px;
  border-radius: 999px;
}
.stock-location-toggle i {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(16, 34, 38, .16);
  transition: transform .22s ease;
}
.stock-location-toggle input:checked + .toggle-track i {
  transform: translateX(100%);
}
.stock-location-toggle .toggle-off,
.stock-location-toggle .toggle-on {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0 10px;
  transition: color .2s ease;
  white-space: nowrap;
}
.stock-location-toggle .toggle-off {
  color: var(--brand-dark);
}
.stock-location-toggle .toggle-on {
  color: #94a3a6;
}
.stock-location-toggle:has(input:checked) .toggle-on {
  color: var(--brand-dark);
}
.stock-location-toggle:has(input:checked) .toggle-off {
  color: #94a3a6;
}
.stock-current-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.stock-current-strip div {
  padding: 14px;
  border: 1px solid #cfe4e1;
  border-radius: 8px;
  background: #f3fbfa;
}
.stock-current-strip span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.stock-current-strip strong {
  display: block;
  margin-top: 5px;
  color: var(--brand-dark);
  font-size: 22px;
}
.supply-inventory-panel {
  min-width: 0;
}
.supply-action-panel {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .05);
}
.supply-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.supply-panel-head h3,
.supply-notice h3 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 15px;
}
.supply-inline-form {
  display: grid;
  gap: 10px;
}
.supply-inline-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.supply-product-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}
.supply-product-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.supply-product-card span {
  color: var(--muted);
  font-size: 12px;
}
.supply-product-card strong {
  color: var(--ink);
  text-align: right;
}
.supply-notice,
.supply-side-history {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.stock-transfer-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.stock-transfer-panel.is-collapsed .transfer-form {
  display: none;
}
.transfer-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.transfer-form .supply-product-card,
.transfer-form label:has(textarea),
.transfer-form button[type="submit"] {
  grid-column: 1 / -1;
}
.transfer-form textarea {
  min-height: 72px;
}
.transfer-alert-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.transfer-alert-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #fffdf7;
}
.transfer-alert-card strong {
  color: var(--ink);
}
.transfer-alert-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.transfer-alert-card button,
.card-export-actions button {
  width: max-content;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-dark);
  font-weight: 800;
  padding: 6px 9px;
}
.card-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.supply-notification-list,
.supply-side-history-list {
  display: grid;
  gap: 8px;
}
.supply-notification-item,
.supply-side-history-item {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
}
.supply-notification-item {
  color: inherit;
  text-decoration: none;
}
.supply-notification-item:hover {
  border-color: var(--brand);
  background: #f0fdfa;
}
.supply-notification-item strong,
.supply-side-history-item strong {
  color: var(--ink);
}
.supply-notification-item span,
.supply-side-history-item span {
  color: var(--muted);
  font-size: 12px;
}
.selected-supply-row {
  outline: 2px solid rgba(15, 118, 110, .24);
  outline-offset: -2px;
  background: #f0fdfa;
}
.compact-table {
  box-shadow: none;
}
.compact-table table {
  min-width: 620px;
}
.dashboard-card {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .04);
  display: flex;
  flex-direction: column;
}
.dashboard-card h3 {
  margin: 0 0 5px;
  color: var(--brand-dark);
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.dashboard-card strong {
  display: block;
  font-size: 20px;
  margin-bottom: 5px;
  color: #102226;
}
.dashboard-card p {
  margin: 0 0 8px;
  color: #52656d;
  font-size: 12px;
  line-height: 1.3;
  flex-grow: 1;
}
.dashboard-card.card-action {
  position: relative;
}
.card-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
  justify-content: flex-end;
}
.card-export-btn {
  padding: 4px 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 4px;
  font-size: 11px;
  color: var(--brand);
  cursor: pointer;
  transition: all .2s;
}
.card-export-btn:hover {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel summary {
  padding: 17px 18px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
  border-bottom: 1px solid var(--line);
}
.panel summary::-webkit-details-marker { display: none; }
.panel > :not(summary) { margin: 16px 18px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
label { display: grid; gap: 7px; color: #314047; font-size: 13px; font-weight: 900; }
input, select, textarea {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  outline: 0;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,118,110,.14); }
input[readonly] { background: #eef3f4; }

.conditional, .packaging-only, .packaging-price, .perishable-only {
  display: grid;
  max-height: 46px;
  opacity: .62;
  overflow: hidden;
  filter: grayscale(.15);
  transition: max-height .24s ease, opacity .2s ease, filter .2s ease, transform .2s ease;
}
.product-form .conditional:not(.visible),
.product-form .packaging-only:not(.visible),
.product-form .packaging-price:not(.visible),
.product-form .perishable-only:not(.visible) {
  display: none;
}
.conditional:not(.visible), .packaging-only:not(.visible), .packaging-price:not(.visible), .perishable-only:not(.visible) {
  transform: translateY(-2px);
}
.conditional:not(.visible) input,
.conditional:not(.visible) select,
.conditional:not(.visible) textarea,
.packaging-only:not(.visible) input,
.packaging-only:not(.visible) select,
.packaging-only:not(.visible) textarea,
.packaging-price:not(.visible) input,
.packaging-price:not(.visible) select,
.packaging-price:not(.visible) textarea,
.perishable-only:not(.visible) input,
.perishable-only:not(.visible) select,
.perishable-only:not(.visible) textarea {
  visibility: hidden;
}
.conditional.visible, .packaging-only.visible, .packaging-price.visible, .perishable-only.visible {
  max-height: 360px;
  opacity: 1;
  filter: none;
  transform: none;
}
.product-form .conditional.visible,
.product-form .packaging-only.visible,
.product-form .packaging-price.visible {
  display: block;
}
.perishable-only.visible { display: grid; }
.product-form .row.perishable-only.visible { display: flex; }

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  padding: 10px 0;
}
.switch-row input { display: none; }
.switch {
  width: 56px;
  height: 30px;
  border-radius: 999px;
  background: #cbd5d8;
  position: relative;
  transition: .2s ease;
}
.switch::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #fff;
  transition: .2s ease;
  box-shadow: 0 2px 7px rgba(0,0,0,.2);
}
.switch-row input:checked + .switch { background: var(--brand); }
.switch-row input:checked + .switch::after { transform: translateX(26px); }

.photo-zone {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f8fbfb;
}
.photo-zone img { width: 112px; height: 112px; object-fit: cover; border-radius: 8px; }
.file-btn input { display: none; }
.simulation, .danger-badge, .stock-alert {
  border-radius: 8px;
  padding: 12px 14px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 800;
}
.danger-badge { display: inline-flex; background: #fee2e2; color: var(--red); }
.stock-alert {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #991b1b;
}
.stock-alert strong { font-size: 14px; }
.stock-alert span {
  color: #7f1d1d;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}
.form-actions { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 14px 0; background: var(--bg); }

.mobile-cards, .record-grid, .product-views { display: none; }
.record-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.view.active .history-grid { display: grid; }
.history-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(190px, 260px);
  gap: 10px;
  margin-bottom: 14px;
}
.history-tools .search-box {
  min-width: 0;
  box-shadow: none;
}
.history-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}
.history-metrics div {
  min-width: 0;
  padding: 8px;
  border: 1px solid #e8eef1;
  border-radius: 8px;
  background: #f8fbfc;
}
.history-metrics dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.history-metrics dd {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  overflow-wrap: anywhere;
}
.product-views { gap: 14px; }
body[data-product-mode="list"] .product-views { display: none; }
body[data-product-mode="list"] .table-wrap { display: block; }
body[data-product-mode="mosaic"] .table-wrap,
body[data-product-mode="mini"] .table-wrap,
body[data-product-mode="details"] .table-wrap { display: none; }
body[data-product-mode="mosaic"] .product-views,
body[data-product-mode="details"] .product-views {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
body[data-product-mode="mini"] .product-views {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
body[data-product-mode="mini"] .product-card {
  gap: 8px;
  padding: 10px;
}
body[data-product-mode="mini"] .product-card .meta,
body[data-product-mode="mini"] .product-card .row-actions { display: none; }
body[data-product-mode="mini"] .product-card-head {
  display: grid;
  grid-template-columns: auto 1fr;
}
body[data-product-mode="mini"] .product-card-head .thumb {
  grid-column: 1 / -1;
  width: 100%;
  height: 112px;
}
body[data-product-mode="details"] .product-card { align-content: start; }
.record-card, .product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  transition: all 0.2s ease;
}
.record-card:hover, .product-card:hover {
  border-color: #0f7670;
  box-shadow: 0 4px 16px rgba(15,118,110,.12);
}
.product-card { display: grid; gap: 12px; align-content: start; }
.product-card .action-btn {
  width: auto;
  min-width: 108px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
}
.product-card .action-btn span { display: inline; }
.product-card .row-actions,
.record-card .row-actions { flex-wrap: wrap; }
.product-card-head { display: flex; gap: 14px; align-items: center; }
.product-card-head .thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #e6edef;
  flex-shrink: 0;
}
.product-card h3, .record-card h3 { 
  font-size: 15px; 
  font-weight: 700;
  line-height: 1.4;
  color: #0c181c;
  margin: 0;
}
.meta { color: #6b7f86; font-size: 12px; line-height: 1.5; margin: 0; }
.product-card-title { min-width: 0; }
.product-card-title h3 {
  overflow-wrap: anywhere;
}
.product-card-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.product-card-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid #e0e6eb;
  border-bottom: 1px solid #e0e6eb;
}
.product-card-metrics div {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #e8eef1;
  border-radius: 8px;
  background: #f8fbfc;
}
.product-card-metrics dt {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.product-card-metrics dd {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.product-card-extra {
  display: grid;
  gap: 8px;
}
.product-card-extra p {
  display: grid;
  grid-template-columns: minmax(92px, .45fr) 1fr;
  gap: 10px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.product-card-extra span {
  font-weight: 800;
  text-transform: uppercase;
}
.product-card-extra strong {
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.modal {
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: block;
  width: min(760px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  border: 0;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 20px 70px rgba(0,0,0,.24);
  overflow: hidden;
}
.compact-modal {
  width: min(420px, calc(100vw - 24px));
}
.compact-modal form {
  padding: 20px;
  background: #fff;
}
.supplier-modal form {
  gap: 16px;
  max-height: calc(100vh - 24px);
  padding: 20px;
  background: #fff;
  overflow: auto;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}
.modal-head h3 {
  margin: 2px 0 0;
  color: var(--title-color);
}
.supplier-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.supplier-form-grid label:nth-last-child(1),
.supplier-form-grid label:has(textarea[name="address"]) {
  grid-column: 1 / -1;
}
.modal:not([open]) { display: none; }
.modal::backdrop { background: rgba(12, 24, 28, .65); }
.modal > * { display: flex; flex-direction: column; }
.notification-panel {
  gap: 14px;
  padding: 20px;
  background: #fff;
}
.notification-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.notification-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.notification-list {
  display: grid;
  gap: 10px;
  max-height: min(58vh, 460px);
  overflow-y: auto;
}
.notification-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: #fffdf7;
  color: inherit;
  text-decoration: none;
}
.notification-item:hover {
  border-color: var(--brand);
  border-left-color: var(--brand);
  background: #f0fdfa;
}
.notification-item strong {
  color: var(--ink);
}
.notification-item span,
.notification-empty {
  color: var(--muted);
  font-size: 13px;
}
.notification-kind {
  width: max-content;
  border-radius: 999px;
  padding: 3px 8px;
  background: #e8f4f2;
  color: var(--brand-dark) !important;
  font-size: 11px !important;
  font-weight: 800;
  text-transform: uppercase;
}
#detailContent {
  max-height: 85vh;
  overflow-y: auto;
  padding: 0;
}
.detail-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e0e6eb;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.detail-photo { 
  width: 100%; 
  max-height: 300px; 
  object-fit: cover; 
  border-radius: 0;
  background: linear-gradient(135deg, #e6edef 0%, #d4dfe5 100%);
}
.detail-body { padding: 24px; }
.detail-title {
  font-size: 20px;
  font-weight: 700;
  color: #0c181c;
  margin: 0 0 6px 0;
}
.detail-code {
  color: #6b7f86;
  font-size: 13px;
  margin: 0 0 12px 0;
}
.detail-grid { 
  display: grid; 
  grid-template-columns: repeat(2, 1fr); 
  gap: 14px; 
  margin: 16px 0;
}
.detail-box { 
  background: #f8fafb;
  border: 1px solid #e0e6eb;
  border-radius: 8px; 
  padding: 14px;
  text-align: center;
}
.detail-box strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #6b7f86;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}
.detail-box > span {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #0f7670;
}
.detail-description {
  background: #f8fafb;
  border-radius: 8px;
  padding: 14px;
  margin: 12px 0;
  font-size: 13px;
  line-height: 1.6;
  color: #2d3e45;
}
.history { 
  max-height: 200px; 
  overflow-y: auto; 
  border-top: 1px solid #e0e6eb; 
  margin-top: 16px; 
  padding-top: 16px; 
}
.history strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #6b7f86;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 10px;
}
.history .meta {
  padding: 6px 0;
  border-bottom: 1px solid #e0e6eb;
}
.history .meta:last-child { border-bottom: none; }

@media (max-width: 900px) {
  .order-checkout-grid,
  .order-confirm-meta,
  .customer-dashboard {
    grid-template-columns: 1fr;
  }
  .customer-order-card header,
  .customer-order-card footer,
  .customer-order-items div {
    align-items: flex-start;
    flex-direction: column;
  }
  .customer-order-card footer > div,
  .checkout-actions {
    width: 100%;
    grid-template-columns: 1fr;
  }
}
.dialog-actions { 
  display: flex; 
  justify-content: flex-end; 
  gap: 10px; 
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e0e6eb;
}
.approv-product-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  background: #f7f9fb;
  border-radius: 8px;
  font-size: 13px;
}
.approv-product-info .info-item {
  display: flex;
  flex-direction: column;
}
.approv-product-info .label {
  color: #66737b;
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 2px;
  text-transform: uppercase;
}
.approv-product-info .value {
  color: #172126;
  font-weight: 500;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.form-row.full {
  grid-template-columns: 1fr;
}
.form-group {
  display: flex;
  flex-direction: column;
}
.form-group label {
  color: #66737b;
  font-size: 12px;
  margin-bottom: 4px;
  font-weight: 500;
}
.form-group input,
.form-group textarea {
  padding: 8px 10px;
  border: 1px solid #dce4e8;
  border-radius: 6px;
  font-size: 13px;
  color: #172126;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .1);
}
.form-group textarea {
  resize: vertical;
  min-height: 60px;
  font-family: monospace;
}
#lotsTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
#lotsTable th {
  background: #f7f9fb;
  border: 1px solid #dce4e8;
  padding: 10px;
  text-align: left;
  font-weight: 600;
  color: #66737b;
}
#lotsTable td {
  border: 1px solid #dce4e8;
  padding: 10px;
  color: #172126;
}
#lotsTable tbody tr:nth-child(odd) {
  background: #fafbfc;
}
#lotsTable tbody tr:hover {
  background: #f3f6f8;
}
.lot-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.lot-status.actif {
  background: #d1f0e3;
  color: #065f46;
}
.lot-status.perime {
  background: #fed7d7;
  color: #7f1d1d;
}
.lot-status.consomme {
  background: #e5e7eb;
  color: #374151;
}
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  transform: translateY(130%);
  transition: .25s ease;
  background: #102326;
  color: #fff;
  border-radius: 8px;
  padding: 13px 15px;
  z-index: 50;
}
.toast.show { transform: translateY(0); }

.login-body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, .08), rgba(37, 99, 235, .06)),
    #f5f8f8;
  color: #102326;
}
.login-shell {
  width: min(430px, 100%);
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
}
.login-panel {
  width: 100%;
  background: #fff;
  border: 1px solid #dbe6e8;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(16, 35, 38, .12);
  padding: 30px;
}
.login-brand {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 7px;
  margin-bottom: 24px;
}
.login-brand img {
  width: 92px;
  height: 92px;
  object-fit: contain;
}
.login-product-name {
  font-size: 14px;
  letter-spacing: .08em;
}
.login-brand h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}
.login-brand p {
  margin: 0;
  color: #63747a;
  font-size: 13px;
  line-height: 1.5;
}
.login-form {
  display: grid;
  gap: 13px;
}
.login-form label {
  display: grid;
  gap: 6px;
  font-weight: 800;
  color: #30434a;
}
.login-check {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 8px !important;
  font-weight: 700 !important;
}
.login-help,
.login-error {
  margin: 0;
  color: #66737b;
  font-size: 13px;
}
.login-error {
  min-height: 18px;
  color: #b42318;
  font-weight: 800;
}
.login-install {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(390px, calc(100vw - 36px));
  padding: 16px;
  padding-right: 42px;
  display: grid;
  gap: 10px;
  border: 1px solid #cfe0df;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 58px rgba(16, 35, 38, .18);
  z-index: 80;
  animation: installPopupIn .22s ease both;
}
.login-install strong {
  color: var(--title-color);
  font-size: 15px;
}
.login-install span {
  color: #596b72;
  font-size: 13px;
  line-height: 1.45;
}
.login-install div {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.login-install-close {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 28px;
  height: 28px;
  border: 1px solid #dbe6e8;
  border-radius: 8px;
  background: #f8fbfc;
  color: #51656c;
  font-size: 18px;
  line-height: 1;
}
.login-install[hidden] { display: none; }
@keyframes installPopupIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .supply-workspace,
  .stock-workspace {
    grid-template-columns: 1fr;
  }
  .stock-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .supply-action-panel {
    position: static;
    max-height: none;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: .2s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .app-shell { margin-left: 0; padding-bottom: 88px; }
  .mobile-menu { display: inline-flex; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { grid-template-columns: 1fr; }
  .filters { justify-content: flex-start; }
  .tools-panel { min-width: 0; }
  .tools-grid.ribbon-body {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
    gap: 6px;
  }
  body[data-ribbon-tab="search"] #ribbonBody.tools-grid.ribbon-body {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    max-height: 470px;
  }
  .ribbon-search-control.search-display,
  .ribbon-search-control.search-order,
  .ribbon-search-control.search-packaging {
    grid-column: span 2;
  }
  .ribbon-search-control.search-sort,
  .ribbon-search-control.search-category {
    grid-column: span 3;
  }
  .list-actions { grid-column: 1 / -1; }
  .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-field.icon-select,
  .ribbon-group {
    border-right: 0;
    border-bottom: 1px solid #dde7ea;
  }
  .tools-grid .filters,
  .list-actions { grid-column: auto; }
}

@media (max-width: 760px) {
  .login-shell {
    min-height: calc(100vh - 28px);
  }
  .login-panel {
    padding: 22px;
  }
  .login-brand h1 {
    font-size: 25px;
  }
  .login-body {
    padding: 14px;
  }
  .login-install {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}

@media (max-width: 680px) {
  .app-shell { padding-inline: 12px; }
  .topbar { align-items: flex-start; }
  h1 { font-size: 24px; }
  .table-wrap { display: none; }
  #supplyView .table-wrap,
  #stockView .table-wrap { display: block; }
  .stock-dashboard {
    grid-template-columns: 1fr;
  }
  body[data-product-mode="list"] .table-wrap { display: block; }
  .mobile-cards { display: grid; gap: 12px; }
  .record-grid { display: grid; }
  .search-box {
    position: sticky;
    top: 8px;
    z-index: 4;
    min-width: 0;
  }
  .ribbon-head { padding-inline: 10px; }
  .tools-grid.ribbon-body {
    grid-template-columns: 1fr;
    max-height: 560px;
  }
  body[data-ribbon-tab="search"] #ribbonBody.tools-grid.ribbon-body {
    grid-template-columns: 1fr;
    max-height: 720px;
  }
  .ribbon-search-control.search-display,
  .ribbon-search-control.search-sort,
  .ribbon-search-control.search-order,
  .ribbon-search-control.search-category,
  .ribbon-search-control.search-packaging {
    grid-column: 1 / -1;
  }
  .tool-field.icon-select {
    grid-template-columns: 34px 1fr;
  }
  .ribbon-group {
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .tools-grid .filters,
  .list-actions {
    flex-wrap: wrap;
  }
  .ribbon-action {
    width: calc(50% - 4px);
    max-width: none;
  }
  .ribbon-action span:last-child {
    white-space: normal;
  }
  .filters .icon-chip {
    min-width: calc(50% - 4px);
  }
  .status-filter-panel {
    overflow-x: visible;
  }
  .status-filter-panel .icon-chip {
    min-width: calc(50% - 4px);
    flex: 1 1 calc(50% - 4px);
  }
  .commercial-summary,
  .stats-strip,
  .history-tools,
  .history-metrics {
    grid-template-columns: 1fr;
  }
  .grid, .detail-grid { grid-template-columns: 1fr; }
  .photo-zone { align-items: flex-start; flex-direction: column; }
  .form-actions {
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .form-actions .primary-btn { grid-column: 1 / -1; }
  .row-actions { flex-wrap: wrap; }
  .top-actions { flex-direction: column; align-items: flex-end; }
  .modal {
    width: calc(100vw - 12px);
    max-height: 90vh;
  }
  .supplier-form-grid {
    grid-template-columns: 1fr;
  }
  #detailContent {
    max-height: 80vh;
  }
  .detail-body {
    padding: 16px;
  }
  .detail-title {
    font-size: 18px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .product-card-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
