/* Padrão único do desktop. A primeira camada tem prioridade nas regras !important. */
@layer desktop-standard {
 :root {
  --desktop-font: "Outfit", sans-serif;
  --desktop-text-size: 14px;
  --desktop-text-weight: 400;
  --desktop-surface: oklch(1 0 0);
  --desktop-border: oklch(.94 .005 270);
  --desktop-muted: oklch(.55 .025 265);
  --desktop-accent: oklch(.56 .24 295);
  --desktop-accent-soft: oklch(.97 .018 295);
  --desktop-overlay: oklch(.2 .015 265 / .3);
  --desktop-shadow: -12px 0 40px oklch(.2 .015 265 / .14);
  --desktop-edge: 24px;
 }
 html body[data-device="desktop"],
 html body[data-device="desktop"] *,
 html body[data-device="desktop"] *::before,
 html body[data-device="desktop"] *::after {
  font-family: var(--desktop-font) !important;
  font-size: var(--desktop-text-size) !important;
  font-weight: var(--desktop-text-weight) !important;
  font-synthesis: none !important;
  letter-spacing: 0 !important;
 }
 html body[data-device="desktop"] .seller-gate-desc::before,
 html body[data-device="desktop"] .seller-gate-desc::after { content: none !important; }
 html body[data-device="desktop"] .seller-gate-logo { display: none !important; }
 html body[data-device="desktop"] .seller-access-gate { width: 420px !important; max-width: 420px !important; padding: 28px !important; }
 html body[data-device="desktop"] .seller-access-gate .field { position: relative !important; }
 html body[data-device="desktop"] .seller-access-gate .field::before,
 html body[data-device="desktop"] .seller-access-gate .field::after { display: none !important; content: none !important; background-image: none !important; }
 html body[data-device="desktop"] #sellerGateEmail,
 html body[data-device="desktop"] #sellerGatePassword { background-image: none !important; padding-left: 44px !important; min-height: 48px !important; }
 html body[data-device="desktop"] .desktop-login-icon { position: absolute !important; left: 14px !important; bottom: 14px !important; width: 20px !important; height: 20px !important; color: var(--desktop-muted) !important; pointer-events: none; }
 html body[data-device="desktop"] #overlay.seller-side-drawer {
  position: fixed !important; inset: 0 !important; display: flex !important; align-items: stretch !important; justify-content: flex-end !important;
  padding: 0 !important; background: var(--desktop-overlay) !important; overflow: hidden !important; z-index: 10000 !important;
 }
 html body[data-device="desktop"] #overlay.hidden { display: none !important; }
 html body[data-device="desktop"] #overlay.seller-side-drawer > aside.drawer {
  position: relative !important; inset: auto !important; margin: 0 !important; padding: 0 !important;
  width: 640px !important; min-width: 640px !important; max-width: 100vw !important;
  height: 100dvh !important; max-height: 100dvh !important; border-radius: 0 !important;
  background: var(--desktop-surface) !important; box-shadow: var(--desktop-shadow) !important; overflow: hidden !important; transform: none !important;
 }
 html body[data-device="desktop"] .desktop-drawer-shell { display: flex !important; flex-direction: column !important; width: 100% !important; height: 100% !important; overflow: hidden !important; }
 html body[data-device="desktop"] .desktop-drawer-shell > .drawer-head {
  position: relative !important; inset: auto !important; flex: 0 0 auto !important; display: flex !important; align-items: center !important; justify-content: space-between !important;
  width: 100% !important; margin: 0 !important; padding: 22px var(--desktop-edge) !important; gap: 16px !important; box-sizing: border-box !important;
  background: var(--desktop-surface) !important; border-bottom: 1px solid var(--desktop-border) !important;
 }
 html body[data-device="desktop"] .desktop-drawer-shell .drawer-head h2 { margin: 0 !important; line-height: 1.5 !important; }
 html body[data-device="desktop"] .desktop-drawer-shell .sd-modal-sub { margin: 4px 0 0 !important; line-height: 1.5 !important; }
 html body[data-device="desktop"] .desktop-drawer-shell .close { display: grid !important; place-items: center !important; flex: 0 0 40px !important; width: 40px !important; height: 40px !important; margin: 0 !important; padding: 0 !important; }
 html body[data-device="desktop"] .desktop-drawer-content {
  flex: 1 1 auto !important; min-height: 0 !important; width: 100% !important; padding: var(--desktop-edge) !important;
  overflow-y: auto !important; overflow-x: hidden !important; box-sizing: border-box !important; overscroll-behavior: contain;
 }
 html body[data-device="desktop"] .desktop-drawer-content *,
 html body[data-device="desktop"] .desktop-drawer-content *::before,
 html body[data-device="desktop"] .desktop-drawer-content *::after { box-sizing: border-box !important; }
 html body[data-device="desktop"] .desktop-drawer-content > form,
 html body[data-device="desktop"] .desktop-drawer-content .sd-launch-form,
 html body[data-device="desktop"] .desktop-drawer-content .coupon-hub-body { width: 100% !important; max-width: 100% !important; margin: 0 !important; padding: 0 !important; }
 html body[data-device="desktop"] .desktop-drawer-content .field { min-width: 0 !important; }
 html body[data-device="desktop"] .desktop-drawer-content input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
 html body[data-device="desktop"] .desktop-drawer-content select,
 html body[data-device="desktop"] .desktop-drawer-content textarea { max-width: 100% !important; min-height: 44px !important; }
 html body[data-device="desktop"] .desktop-drawer-content .sd-modal-footer,
 html body[data-device="desktop"] .desktop-drawer-content .drawer-actions,
 html body[data-device="desktop"] .desktop-drawer-content .form-actions {
  position: sticky !important; bottom: calc(-1 * var(--desktop-edge)) !important; margin: 24px 0 0 !important; padding: 16px 0 !important;
  width: 100% !important; display: flex !important; flex-wrap: wrap !important; gap: 12px !important; background: var(--desktop-surface) !important; border-top: 1px solid var(--desktop-border) !important; z-index: 5 !important;
 }
 html body[data-device="desktop"] .coupon-hub-choices { display: grid !important; grid-template-columns: 1fr !important; gap: 12px !important; margin: 0 0 28px !important; }
 html body[data-device="desktop"] .coupon-type-card {
  display: grid !important; grid-template-columns: 44px minmax(0,1fr) auto !important; grid-template-rows: auto auto !important;
  gap: 4px 14px !important; align-items: center !important; width: 100% !important; min-height: 80px !important; padding: 14px !important;
  text-align: left !important; border: 1px solid var(--desktop-border) !important; border-radius: 8px !important; background: var(--desktop-surface) !important;
 }
 html body[data-device="desktop"] .coupon-type-card .coupon-type-icon { grid-column: 1 !important; grid-row: 1 / 3 !important; width: 44px !important; height: 44px !important; display: grid !important; place-items: center !important; border-radius: 8px !important; background: var(--desktop-accent-soft) !important; }
 html body[data-device="desktop"] .coupon-type-card strong { grid-column: 2 !important; grid-row: 1 !important; }
 html body[data-device="desktop"] .coupon-type-card small { grid-column: 2 !important; grid-row: 2 !important; color: var(--desktop-muted) !important; white-space: normal !important; }
 html body[data-device="desktop"] .coupon-type-card b { grid-column: 3 !important; grid-row: 1 / 3 !important; color: var(--desktop-accent) !important; }
 html body[data-device="desktop"] .coupon-admin-list-head { display: flex !important; flex-direction: column !important; align-items: flex-start !important; gap: 8px !important; margin-bottom: 20px !important; }
 html body[data-device="desktop"] .coupon-admin-list-head :is(h3,p,span) { margin: 0 !important; line-height: 1.5 !important; }
 html body[data-device="desktop"] .coupon-admin-card { display: flex !important; flex-wrap: wrap !important; gap: 14px !important; }
 html body[data-device="desktop"] .coupon-admin-copy { flex: 1 1 240px !important; min-width: 0 !important; }
 html body[data-device="desktop"] .coupon-admin-actions { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; }
 /* Resumo junto ao quadro, sem alterar a página mobile. */
 html body[data-device="desktop"] .orders-board .ob-kanban {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
 }
 html body[data-device="desktop"] .sv-kanban-footer {
  margin: 16px 0 0 !important;
  padding: 0 !important;
  row-gap: 12px !important;
 }
 html body[data-device="desktop"] .sv-kanban-footer .sv-kf-date {
  min-height: 0 !important;
  padding: 0 !important;
 }

 /* Correções exclusivas do desktop: prioridade na primeira camada !important. */
 @media (min-width: 900px) {
  html body[data-device="desktop"] {
   --desktop-card-hover-shadow: 0 6px 18px oklch(.3 .015 265 / .07);
   --desktop-chat-surface: oklch(.98 .006 295);
  }
   
   
   /* Remove somente a divisória horizontal do cabeçalho principal. */
   html body[data-device="desktop"] :is(.topbar,.seller-panel-topbar) {
    border-bottom: 0 !important;
    box-shadow: none !important;
   }
   /* A seta continua com o mesmo botão/evento: maior e colada ao nome. */
   html body[data-device="desktop"] .ob-card .ob-name-row {
    display: grid !important;
    grid-template-columns: 18px minmax(0, max-content) auto !important;
    align-items: start !important;
    justify-content: start !important;
    column-gap: 2px !important;
   }
   html body[data-device="desktop"] .ob-card .ob-customer-copy {
    min-width: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    flex: 0 1 auto !important;
   }
   html body[data-device="desktop"] .ob-card .ob-chev {
    margin: -3px 0 0 !important;
    width: auto !important;
    min-width: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    font-size: 32px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    color: var(--desktop-accent) !important;
    background: transparent !important;
    box-shadow: none !important;
   }
   
   /* Contador real de conversas no canto superior direito do título. */
   html body[data-device="desktop"] .seller-support-heading {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start !important;
    gap: 6px 12px !important;
   }
   html body[data-device="desktop"] .seller-support-heading-icon { display: none !important; }
   html body[data-device="desktop"] .seller-support-heading-copy { display: contents !important; }
   html body[data-device="desktop"] .seller-support-heading-copy h2 {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    margin: 0 !important;
   }
   html body[data-device="desktop"] .seller-support-heading-copy p {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    margin: 0 !important;
   }
   html body[data-device="desktop"] .seller-support-count {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-self: end !important;
    white-space: nowrap !important;
    margin: 0 !important;
   }
  html body[data-device="desktop"].sdf-chat-view #overlay.support-chat-overlay.is-open {
   position: fixed !important;
   inset: var(--sdf-top, 64px) 0 0 calc(var(--sdf-side, 218px) + var(--sdf-list, 380px)) !important;
   display: flex !important; align-items: stretch !important; justify-content: stretch !important;
   width: auto !important; height: auto !important; min-width: 0 !important;
   background: transparent !important; padding: 0 !important; backdrop-filter: none !important;
  }
  html body[data-device="desktop"].sdf-chat-view #overlay.support-chat-overlay.is-open > aside.drawer {
   flex: 1 1 auto !important; width: 100% !important; min-width: 0 !important; max-width: 100% !important;
   height: 100% !important; min-height: 0 !important; max-height: 100% !important;
   background: var(--desktop-chat-surface) !important; box-shadow: none !important;
  }
  html body[data-device="desktop"].sdf-chat-view #overlay.support-chat-overlay .desktop-drawer-content {
   display: flex !important; overflow: hidden !important; padding: 0 !important;
  }
  html body[data-device="desktop"].sdf-chat-view #overlay.support-chat-overlay .support-chat-shell {
   display: flex !important; flex-direction: column !important;
   flex: 1 1 auto !important; min-width: 0 !important; min-height: 0 !important;
   width: 100% !important; height: 100% !important; max-height: 100% !important;
  }
  html body[data-device="desktop"].sdf-chat-view #overlay.support-chat-overlay :is(.support-chat-header,.support-chat-compose-wrap) { flex: 0 0 auto !important; }
  /* Cabeçalho com espaço próprio: X e nome não cruzam a divisória. */
  html body[data-device="desktop"].sdf-chat-view #overlay.support-chat-overlay .support-chat-header {
   display: grid !important; grid-template-columns: 36px minmax(0, 1fr) !important;
   align-items: center !important; gap: 12px !important;
   flex: 0 0 72px !important; height: 72px !important; min-height: 72px !important; max-height: 72px !important;
   padding: 16px 28px !important; box-sizing: border-box !important; overflow: hidden !important;
   background: var(--desktop-surface) !important; border-bottom: 1px solid var(--desktop-border) !important;
  }
  html body[data-device="desktop"].sdf-chat-view #overlay.support-chat-overlay #closeSupportChat {
   position: static !important; transform: none !important; margin: 0 !important; padding: 0 !important;
   width: 36px !important; min-width: 36px !important; max-width: 36px !important;
   height: 36px !important; min-height: 36px !important; max-height: 36px !important;
   display: grid !important; place-items: center !important; line-height: 1 !important;
  }
  html body[data-device="desktop"].sdf-chat-view #overlay.support-chat-overlay .support-chat-header-info {
   min-width: 0 !important; margin: 0 !important; padding: 0 !important; align-self: center !important;
  }
  html body[data-device="desktop"].sdf-chat-view #overlay.support-chat-overlay .support-chat-store-name {
   margin: 0 !important; padding: 0 !important; line-height: 24px !important;
   white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important;
  }
  html body[data-device="desktop"].sdf-chat-view #overlay.support-chat-overlay .support-chat-messages {
   flex: 1 1 auto !important; min-height: 0 !important; overflow-y: auto !important;
  }
  html body[data-device="desktop"].sdf-chat-view .seller-support-card { cursor: pointer !important; }
  html body[data-device="desktop"].sdf-chat-view .seller-support-card:focus-visible { outline-offset: -2px !important;
  }
 }
}
