/* Fashion PLM · V03 — tabelas responsivas
   Autor HTML/CSS: ChatGPT · base: 215c636 (V02)
   Progressive enhancement, sem JavaScript, sem dependências externas.
   TODAS as regras são opt-in: nenhuma tabela sem v03-* sofre alteração.
   1) .v03-card-table: tabela simples → cartões < 761px
   2) .v03-sat-grid: preservar seleção em lote e 18 chips
   3) .v03-matrix-scroll: preservar matrizes/editáveis com rolagem acessível.
*/

.v03-sr {
  position:absolute!important;width:1px!important;height:1px!important;padding:0!important;
  margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;border:0!important;clip-path:inset(50%)!important;
}

/* Integração neutra no desktop; só legendas/sinalizações acessíveis. */
.v03-inline-hint,.v03-matrix-hint{display:none;}
.v03-card-table { width:100%; border-collapse:collapse; }
.v03-card-table th[scope="col"] { vertical-align:middle; }
.v03-card-table td { overflow-wrap:break-word; }
.v03-card-table .v03-rank-barcell { width:45%; }
.v03-card-table .v03-rank-barcell .ini-bar { min-width:70px; }

/* Regiões de rolagem opt-in. Não alteram tabelas de outras páginas. */
.v03-matrix-scroll { min-width:0; max-width:100%; }
.v03-matrix-scroll:focus-visible,
.v03-sat-wrap:focus-visible {
  outline:3px solid #805000; outline-offset:3px;
}
.v03-matrix th[scope="col"]{ white-space:nowrap; }
.v03-matrix td input,
.v03-matrix td select { max-width:100%; }

@media (max-width:760px) {
  /* Inicio: tabela única, elementos nativos e cabeçalho acessível. */
  .v01.v02-inicio .v03-card-wrap.gradewrap {
    overflow:visible; background:transparent; border:0; border-radius:0;
  }
  .v01.v02-inicio table.v03-card-table,
  .v01.v02-inicio table.v03-card-table tbody {
    display:block; width:100%; min-width:0; border:0; border-collapse:separate;
    background:transparent; box-shadow:none;
  }
  .v01.v02-inicio table.v03-card-table thead {
    position:absolute!important; width:1px!important; height:1px!important;
    overflow:hidden!important; clip:rect(0,0,0,0)!important;
    clip-path:inset(50%)!important; white-space:nowrap!important;
  }
  .v01.v02-inicio table.v03-card-table tbody {
    display:grid; grid-template-columns:minmax(0,1fr); gap:12px;
  }
  .v01.v02-inicio table.v03-card-table tbody tr {
    display:block; min-width:0; padding:7px 14px;
    background:#fff; border:1px solid #DDE3EC; border-radius:12px;
    box-shadow:0 2px 8px rgba(31,42,68,.055);
  }
  .v01.v02-inicio table.v03-card-table tbody tr:hover { background:#fff; }
  .v01.v02-inicio table.v03-card-table tbody tr:focus-within {
    border-color:#7C91B3; box-shadow:0 0 0 2px rgba(31,42,68,.08);
  }
  .v01.v02-inicio table.v03-card-table tbody td {
    display:grid; grid-template-columns:minmax(82px,35%) minmax(0,1fr);
    gap:9px; align-items:start; width:100%; min-width:0; height:auto;
    padding:9px 0; margin:0; border:0;
    border-bottom:1px solid #EDF0F5; background:transparent;
    text-align:left!important; white-space:normal!important;
    font-size:13px;line-height:1.5;overflow-wrap:anywhere;
  }
  .v01.v02-inicio table.v03-card-table tbody td:last-child {
    border-bottom:0; padding-bottom:7px;
  }
  .v01.v02-inicio table.v03-card-table tbody td::before {
    content:attr(data-label); display:block; padding-top:2px;
    font:700 10.5px/1.35 "Archivo","IBM Plex Sans",Arial,sans-serif;
    text-transform:uppercase;letter-spacing:.065em;color:#566172;
    white-space:normal;overflow-wrap:anywhere;
  }
  .v01.v02-inicio table.v03-card-table tbody td:first-child {
    display:flex; align-items:center; justify-content:space-between;
    flex-wrap:wrap; gap:8px; padding:8px 0 10px;
    color:#1F2A44; font-weight:700;
  }
  .v01.v02-inicio table.v03-card-table tbody td:first-child::before {
    content:attr(data-label); flex:none; align-self:center;
  }
  .v01.v02-inicio table.v03-card-table tbody td .btn,
  .v01.v02-inicio table.v03-card-table tbody td button,
  .v01.v02-inicio table.v03-card-table tbody td summary {
    min-height:42px;
  }
  .v01.v02-inicio table.v03-card-table tbody td .ini-acoes,
  .v01.v02-inicio table.v03-card-table tbody td .ini-aviso {
    min-width:0; max-width:100%;
  }
  .v01.v02-inicio table.v03-card-table tbody td .ini-acoes {
    display:flex;flex-wrap:wrap;gap:8px;
  }
  .v01.v02-inicio table.v03-card-table tbody td .ini-aviso form {
    min-width:0;max-width:100%;
  }
  .v01.v02-inicio table.v03-card-table tbody td .ini-aviso input {
    width:100%;max-width:100%;min-width:0;
  }
  /* Barras de ranking seguem a mesma coluna responsiva. */
  .v01.v02-inicio table.v03-card-table .v03-rank-barcell {
    width:100%;
  }
  .v01.v02-inicio table.v03-card-table .v03-rank-barcell .ini-bar {
    width:100%; max-width:240px; margin-top:5px;
  }
  .v01.v02-inicio table.v03-card-table .v02-status {
    max-width:100%;white-space:normal;
  }

  /* SAT: já era cartão em plm.css. Melhorar títulos sem alterar seleção e trilha. */
  .v03-sat-wrap { overflow-x:visible; }
  table.v03-sat-grid tbody tr {
    background:#fff; border:1px solid #DDE3EC; border-radius:12px;
    margin:0 0 12px;box-shadow:0 2px 8px rgba(31,42,68,.055);
  }
  table.v03-sat-grid td.c-trilha {
    overflow:visible;max-width:100%;min-width:0;
  }
  table.v03-sat-grid td.c-trilha::before {
    content:attr(data-label); display:block;
    font:700 10px/1.4 "Archivo","IBM Plex Sans",Arial,sans-serif;
    text-transform:uppercase;letter-spacing:.07em;color:#566172;
    margin-bottom:7px;
  }
  table.v03-sat-grid td.c-trilha .trilha {
    display:flex; box-sizing:border-box;
    max-width:100%;width:100%;min-width:0;
    overflow-x:auto;overflow-y:hidden;
    padding:3px 1px 8px;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:thin;scrollbar-color:#8594AC #EDF1F6;
  }
  table.v03-sat-grid td.c-trilha .trilha .chip{flex:0 0 auto;}
  .v03-inline-hint,.v03-matrix-hint {
    display:block; font:500 11px/1.5 "IBM Plex Sans",Arial,sans-serif;
    color:#59667A; margin:2px 0 6px;
  }
  .v03-matrix-hint{margin:5px 0 8px;}

  table.v03-sat-grid td.c-item { overflow-wrap:anywhere; }
  table.v03-sat-grid td.c-item .nm { white-space:normal; }
  table.v03-sat-grid input.sel { accent-color:#1F2A44; }

  /* ST / SAT: matrizes de aprovação e prazos não viram cartões.
     A relação etapa↔campo deve permanecer tabular e editável. */
  .v03-matrix-scroll {
    display:block;overflow-x:auto;overflow-y:visible;
    overscroll-behavior-inline:contain;
    -webkit-overflow-scrolling:touch;
    max-width:100%;border:1px solid #DDE3EC;border-radius:10px;
    background:#fff;
    scrollbar-width:auto;scrollbar-color:#8594AC #EDF1F6;
  }
  .v03-matrix-scroll::-webkit-scrollbar { height:10px; }
  .v03-matrix-scroll::-webkit-scrollbar-thumb { background:#8594AC;border-radius:6px; }
  .v03-matrix-scroll .v03-matrix {
    min-width:640px;width:100%;margin:0;
  }
  .v03-matrix-scroll .v03-matrix th,
  .v03-matrix-scroll .v03-matrix td { white-space:normal;vertical-align:top; }
  .v03-matrix-scroll .v03-matrix th:first-child,
  .v03-matrix-scroll .v03-matrix td:first-child {
    position:sticky;left:0;z-index:2;
    min-width:110px;max-width:170px;
    background:#fff; box-shadow:1px 0 0 #DDE3EC;
  }
  .v03-matrix-scroll .v03-matrix th:first-child {
    background:#F5F7FA;z-index:3;
  }
  .v03-matrix-scroll .v03-matrix input[type="date"] { min-width:135px; }
  .v03-matrix-scroll .v03-matrix .f-cor { min-width:190px; }
}
@media (max-width:390px) {
  .v01.v02-inicio table.v03-card-table tbody td {
    grid-template-columns:minmax(74px,33%) minmax(0,1fr);gap:7px;
  }
  .v01.v02-inicio table.v03-card-table tbody tr { padding:7px 12px; }
}
@media print {
  .v03-matrix-scroll { overflow:visible!important;border:0!important; }
  .v03-card-table { display:table!important; }
  .v03-card-table thead { display:table-header-group!important; }
}
@media (forced-colors:active) {
  .v03-card-table tbody tr { border:1px solid CanvasText!important; }
  .v03-matrix-scroll { border:1px solid CanvasText!important; }
}
