/* ============================================================
   DFPet — camada visual do DESKTOP (acima de 900px)
   Aplica o novo layout sem mexer em rota, banco ou Tiny.
   Carregue DEPOIS de style.css e ANTES dos style-mobile*.css
   ============================================================ */

@media (min-width: 901px) {

  /* ---------- Barra lateral ---------- */
  .sidebar {
    width: 246px;
    border-right: 1px solid var(--border, rgba(11,11,11,.11));
    background: var(--surface, #fff);
    padding: 0;
    gap: 0;
  }
  .sidebar-top { padding: 22px 20px 14px; }
  .sidebar-nav {
    padding: 4px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .sidebar-nav a,
  .sidebar-footer a,
  .sidebar-footer .perfil-menu-toggle {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 10px;
    border-radius: 9px;
    font-size: .875rem;
    color: var(--ink);
    white-space: nowrap;
    transition: background .12s ease;
  }
  .sidebar-nav a .icon,
  .sidebar-footer a .icon { width: 17px; height: 17px; flex: none; }
  .sidebar-nav a:hover,
  .sidebar-footer a:hover { background: rgba(11,11,11,.06); }
  .sidebar-nav a.active {
    background: rgba(201,162,39,.18);
    color: #7D5A0B;
    font-weight: 500;
  }
  .sidebar-footer { border-top: 1px solid rgba(11,11,11,.06); padding: 12px; }

  /* títulos de grupo (Vender / Acompanhar / Crescer / Escritório) */
  .sidebar-grupo {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    text-align: left;
    font: inherit;
    font-size: .625rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(11,11,11,.55);
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 7px 10px;
    cursor: pointer;
  }
  .sidebar-grupo:hover { background: rgba(11,11,11,.06); }
  .sidebar-grupo .chev { margin-left: auto; font-size: 9px; transition: transform .15s ease; }
  .sidebar-grupo[aria-expanded="false"] .chev { transform: rotate(-90deg); }
  .sidebar-grupo[aria-expanded="false"] + .sidebar-grupo-itens { display: none; }
  .sidebar-grupo-itens { display: flex; flex-direction: column; gap: 2px; }
  .sidebar-grupo-bloco { display: flex; flex-direction: column; gap: 2px; }

  /* botão de encolher no rodapé */
  .sidebar-encolher {
    margin-top: 4px;
    height: 32px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--border, rgba(11,11,11,.11));
    background: transparent;
    color: rgba(11,11,11,.55);
    border-radius: 9px;
    font: inherit;
    font-size: .75rem;
    cursor: pointer;
  }
  .sidebar-encolher:hover { border-color: var(--gold); color: #7D5A0B; }

  html.sidebar-collapsed .sidebar { width: 68px; }
  html.sidebar-collapsed .sidebar-nav a,
  html.sidebar-collapsed .sidebar-footer a,
  html.sidebar-collapsed .sidebar-grupo,
  html.sidebar-collapsed .perfil-menu-toggle {
    font-size: 0;
    justify-content: center;
    gap: 0;
    padding-left: 0;
    padding-right: 0;
  }
  html.sidebar-collapsed .sidebar-nav a .label,
  html.sidebar-collapsed .sidebar-footer .label,
  html.sidebar-collapsed .sidebar-grupo span:not(.chev),
  html.sidebar-collapsed .sidebar-brand-logo-full,
  html.sidebar-collapsed .sidebar-encolher span { display: none; }
  html.sidebar-collapsed .sidebar-grupo .chev { display: none; }
  html.sidebar-collapsed .sidebar-grupo-itens { display: flex !important; }

  /* ---------- Cabeçalho da página ---------- */
  .container { max-width: none; padding: 22px 34px 56px; }
  .container > h1 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 2rem;
    line-height: 1.1;
    margin: 0 0 18px;
  }

  /* ---------- Tira de números (resumo-barra) ---------- */
  .resumo-barra {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    background: var(--surface, #fff);
    border: 1px solid var(--border, rgba(11,11,11,.11));
    border-radius: var(--radius-md, 14px);
    box-shadow: var(--shadow-sm, none);
    overflow: hidden;
    margin-bottom: 20px;
    gap: 0;
  }
  .resumo-barra-item {
    padding: 13px 14px;
    border-right: 1px solid rgba(11,11,11,.06);
    min-width: 0;
    overflow: hidden;
  }
  .resumo-barra-item:last-child { border-right: none; }
  .resumo-barra-num {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(12px, 1.15vw, 19px);
    font-weight: 600;
    letter-spacing: -.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .resumo-barra-label {
    display: block;
    font-size: .6875rem;
    color: rgba(11,11,11,.55);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ---------- Barra de filtros ---------- */
  .catalogo-filtros,
  .filtros-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: nowrap;
  }
  .busca-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, rgba(11,11,11,.11));
    border-radius: 9px;
    padding: 0 12px;
    height: 34px;
    flex: 1 1 160px;
    max-width: 320px;
    min-width: 130px;
  }
  .busca-wrap input[type="search"],
  .busca-wrap input[type="text"] {
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: .8125rem;
    width: 100%;
    min-width: 0;
    height: auto;
    padding: 0;
  }
  .filtros-toolbar select,
  .catalogo-filtros select {
    height: 34px;
    border: 1px solid var(--border, rgba(11,11,11,.11));
    border-radius: 9px;
    background: var(--surface, #fff);
    font: inherit;
    font-size: .78rem;
    padding: 0 8px;
    min-width: 0;
  }

  /* botões só com ícone (filtros, colunas, exportar) */
  .btn-icone {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border, rgba(11,11,11,.11));
    background: var(--surface, #fff);
    color: var(--ink);
    border-radius: 9px;
    cursor: pointer;
    padding: 0;
  }
  .btn-icone .btn-icon,
  .btn-icone svg { width: 15px; height: 15px; }
  .btn-icone:hover { border-color: var(--gold); color: #7D5A0B; }
  .btn-icone.ativo {
    background: rgba(201,162,39,.18);
    border-color: var(--gold);
    color: #7D5A0B;
  }
  .btn-microfone { border: none; background: transparent; width: 24px; height: 24px; }

  /* ---------- Tabelas em cartão ---------- */
  .tabela-scroll {
    background: var(--surface, #fff);
    border: 1px solid var(--border, rgba(11,11,11,.11));
    border-radius: var(--radius-md, 14px);
    box-shadow: var(--shadow-sm, none);
    overflow-x: auto;
  }
  .tabela-scroll > table { min-width: 760px; border-collapse: collapse; width: 100%; }
  .tabela-scroll thead th {
    background: #FAF8F2;
    border-bottom: 1px solid var(--border, rgba(11,11,11,.11));
    padding: 11px 14px;
    font-size: .655rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(11,11,11,.55);
    text-align: left;
    white-space: nowrap;
  }
  .tabela-scroll tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(11,11,11,.06);
    font-size: .84rem;
    vertical-align: middle;
  }
  .tabela-scroll tbody tr:hover { background: #FAF8F2; }
  .tabela-scroll tbody tr:last-child td { border-bottom: none; }
  .tabela-scroll td a { color: #7D5A0B; text-decoration: none; }
  .tabela-scroll td a:hover { text-decoration: underline; }

  /* nome de cliente em destaque */
  .tabela-scroll td .cliente-nome {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    line-height: 1.2;
    color: #7D5A0B;
    display: block;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* bolinha de situação + etiqueta */
  .dot-situacao { width: 11px; height: 11px; border-radius: 50%; display: inline-block; cursor: help; }
  .col-dot-situacao { width: 30px; }
  .etiqueta {
    display: inline-block;
    white-space: nowrap;
    font-size: .75rem;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: 20px;
    background: #FAF8F2;
    color: rgba(11,11,11,.55);
  }
  .etiqueta-ok { background: #E4F0E9; color: #2F6B4F; }
  .etiqueta-alerta { background: #FBF0D6; color: #7D5A0B; }
  .etiqueta-erro { background: #F7E7E3; color: #9C4A3C; }

  /* botão (i) de texto cortado */
  .btn-info-texto {
    flex: none;
    width: 17px;
    height: 17px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--border, rgba(11,11,11,.11));
    background: transparent;
    color: rgba(11,11,11,.55);
    font-family: var(--font-serif);
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .btn-info-texto:hover { border-color: var(--gold); color: #7D5A0B; }

  /* ---------- Ações nas linhas ---------- */
  .acoes-linha { display: flex; gap: 6px; justify-content: flex-end; }
  .btn-acao {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border, rgba(11,11,11,.11));
    background: var(--surface, #fff);
    color: var(--ink);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
  }
  .btn-acao:hover { border-color: var(--gold); color: #7D5A0B; }
  .btn-compartilhar {
    border-color: #1B8A4B;
    background: #1FA855;
    color: #fff;
  }
  .btn-compartilhar:hover { filter: brightness(1.08); border-color: #1B8A4B; color: #fff; }

  /* ---------- Cartões de produto ---------- */
  .produto-card {
    border-radius: var(--radius-md, 14px);
    border: 1px solid var(--border, rgba(11,11,11,.11));
    box-shadow: var(--shadow-sm, none);
    overflow: hidden;
  }
  .produto-card:hover { border-color: var(--gold); }
  .produto-foto-wrap { background: #fff; border-bottom: 1px solid rgba(11,11,11,.06); position: relative; }
  .produto-nome { font-size: .8125rem; line-height: 1.3; }
  .preco-atual { font-family: 'IBM Plex Mono', monospace; font-size: 1rem; font-weight: 500; }

  /* ---------- Botões gerais ---------- */
  .btn-primario,
  button[type="submit"].btn-primario {
    height: 34px;
    padding: 0 14px;
    border-radius: 9px;
    font-size: .8125rem;
    font-weight: 600;
  }
  .btn-outline {
    height: 34px;
    padding: 0 13px;
    border-radius: 9px;
    font-size: .78rem;
  }
  .chip { border-radius: 20px; font-size: .78rem; }

  /* ---------- Colunas que recolhem em telas menores ---------- */
  @media (max-width: 1180px) {
    .col-secundaria { display: none !important; }
  }
}
