/* Histórico de comandas: tabela no computador, cartões no celular. */
.closed-tickets{--closed-bg:#fff;--closed-soft:#F4F7FD;--closed-line:#DBE5F2;--closed-ink:#101D35;--closed-muted:#556981;--closed-accent:#0759DB;--closed-avatar:#EAF2FF;--closed-ok:#086D53;--closed-ok-bg:#EAF7F1;--closed-danger:#B72B42}
html[data-theme="dark"] .closed-tickets{--closed-bg:#0D2342;--closed-soft:#142D4B;--closed-line:#2A4261;--closed-ink:#EEF3FB;--closed-muted:#A8BAD2;--closed-accent:#9CC6FF;--closed-avatar:#1C3C65;--closed-ok:#94E6CB;--closed-ok-bg:#153B3B;--closed-danger:#FF9BAD}
.closed-tickets .closed-mobile{display:none}
.closed-tickets .closed-header{gap:1rem;margin-bottom:1rem}
.closed-tickets .closed-header h2{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;margin:0;font-size:1.15rem;line-height:1.4}
.closed-tickets .closed-count{padding:2px 8px;border-radius:8px;background:var(--closed-avatar);color:var(--closed-accent);font-size:.75rem;font-weight:700}
.closed-tickets .closed-search{display:flex;align-items:center;gap:.6rem;min-width:0;width:100%;max-width:320px;margin:0;padding:0 .8rem;border:1px solid var(--closed-line);border-radius:14px;background:var(--closed-bg);color:var(--closed-muted)}
.closed-tickets .closed-search svg{flex:none}
/* O contorno e o foco pertencem ao campo composto, não ao input interno. */
html[data-theme] body[data-brand="aura"] .closed-tickets .closed-search input{flex:1 1 0;width:0;min-width:0;max-width:none;height:46px;padding:0;border:0!important;border-radius:0!important;background:transparent!important;color:var(--closed-ink);font-size:.85rem;box-shadow:none!important}
.closed-tickets .closed-search input::placeholder{color:var(--closed-muted);opacity:1}
.closed-tickets .closed-search:focus-within{outline:2px solid var(--closed-accent);outline-offset:2px}
.closed-tickets .closed-search input:focus{outline:0}
.closed-tickets .closed-person{min-width:0;gap:.7rem}
.closed-tickets .closed-person>.avatar{flex:none}
.closed-tickets .closed-person>span:last-child{display:flex;flex-direction:column;min-width:0;gap:3px}
.closed-tickets .closed-person b{color:var(--closed-ink);font-size:.9rem;line-height:1.45;overflow-wrap:anywhere}
.closed-tickets .closed-person small{color:var(--closed-muted);font-size:.75rem;line-height:1.5}
.closed-tickets .closed-note{display:flex;align-items:flex-start;gap:.5rem;margin:1rem 0 0;color:var(--closed-muted);font-size:.78rem;line-height:1.6}
.closed-tickets .closed-note svg{flex:none;margin-top:3px}
.closed-tickets .closed-actions{display:flex;flex-wrap:nowrap;justify-content:flex-end;gap:.5rem}
.closed-tickets .closed-actions .btn{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.closed-tickets .closed-actions .btn svg{flex:none}
@media(max-width:900px){
  html[data-theme] body[data-brand="aura"] .card.closed-tickets{padding:0;border:0;background:transparent;box-shadow:none}
  .closed-tickets .closed-header{flex-direction:column;align-items:stretch;gap:.8rem}
  .closed-tickets .closed-search{max-width:none}
  .closed-tickets .closed-mobile{display:block}
  html[data-theme] body[data-brand="aura"] .closed-tickets #ecl .scroll{background:none;border:0;box-shadow:none;overflow:visible}
  .closed-tickets #ecl table,.closed-tickets #ecl tbody,.closed-tickets #ecl tr,.closed-tickets #ecl td{display:block;width:100%;min-width:0!important;max-width:100%;box-sizing:border-box}
  .closed-tickets #ecl table{table-layout:auto;min-width:0!important}
  .closed-tickets #ecl thead{display:none}
  .closed-tickets #ecl tbody{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:14px}
  .closed-tickets #ecl tbody tr,.closed-tickets #ecl tbody tr:hover{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:"num num" "who who" "dt tot" "act act";align-items:start;gap:12px;padding:16px;margin:0;border:1px solid var(--closed-line);border-radius:20px;background:var(--closed-bg);color:var(--closed-ink)}
  .closed-tickets #ecl td{width:auto;padding:0;border:0;text-align:left}
  .closed-tickets #ecl td:nth-child(1){grid-area:num;justify-self:stretch;border-radius:0;background:none;font-weight:400}
  .closed-tickets .closed-top{display:flex;align-items:center;justify-content:space-between;gap:.5rem}
  .closed-tickets .closed-number{font-size:.78rem;font-weight:700;color:var(--closed-accent)}
  .closed-tickets .closed-number .closed-mobile{display:inline}
  .closed-tickets .closed-status{display:inline-flex;align-items:center;gap:4px;padding:4px 7px;border-radius:8px;background:var(--closed-ok-bg);color:var(--closed-ok);font-size:.65rem;font-weight:650;line-height:1.4}
  .closed-tickets #ecl td:nth-child(2){grid-area:who;padding-bottom:2px}
  .closed-tickets .closed-person .avatar:not(.ph){background:var(--closed-avatar)!important;color:var(--closed-accent)!important}
  .closed-tickets #ecl td:nth-child(3){grid-area:dt;font-size:.8rem;line-height:1.5;color:var(--closed-ink)}
  .closed-tickets #ecl td:nth-child(4){grid-area:tot;font-size:1rem;line-height:1.5;text-align:right;color:var(--closed-ink)}
  .closed-tickets #ecl td:nth-child(3),.closed-tickets #ecl td:nth-child(4){padding-top:10px;border-top:1px solid var(--closed-line)}
  .closed-tickets .closed-field{margin-bottom:4px;font-size:.65rem;font-weight:500;letter-spacing:.04em;text-transform:uppercase;line-height:1.5;color:var(--closed-muted)}
  .closed-tickets .closed-total{font-size:1rem;line-height:1.5;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
  .closed-tickets #ecl td:nth-child(5){grid-area:act;width:100%!important;padding:0;border:0;text-align:left}
  .closed-tickets #ecl .closed-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  html[data-theme] body[data-brand="aura"] .closed-tickets #ecl .closed-actions .btn{min-width:0;min-height:44px;height:auto;margin:0;padding:.65rem .5rem;border:1px solid var(--closed-line);border-radius:12px;background:var(--closed-soft);color:var(--closed-ink);font-size:.82rem;line-height:1.4;white-space:normal;box-shadow:none;transform:none}
  html[data-theme] body[data-brand="aura"] .closed-tickets #ecl .closed-actions .closed-reopen{background:#1263F1;border-color:#1263F1;color:#fff}
  html[data-theme] body[data-brand="aura"] .closed-tickets #ecl .closed-actions .closed-cancel{grid-column:1/-1;background:transparent;border-color:transparent;color:var(--closed-danger)}
  .closed-tickets #ecl .closed-actions .btn:focus-visible{outline:2px solid var(--closed-accent);outline-offset:3px}
  .closed-tickets #ecl .pager{flex-direction:column;align-items:stretch;gap:.6rem;margin-top:1rem}
  .closed-tickets #ecl .pager .rowbtns{display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;gap:8px;width:100%}
  .closed-tickets #ecl .pager .rowbtns .btn{min-width:0;min-height:44px;height:auto;padding:.5rem;border:1px solid var(--closed-line);border-radius:12px;background:var(--closed-soft);color:var(--closed-ink);font-size:.8rem;box-shadow:none}
  .closed-tickets #ecl .pager .rowbtns>span{font-size:.75rem;color:var(--closed-muted)}
  .closed-tickets #ecl>p{padding:1.5rem 1rem;border:1px solid var(--closed-line);border-radius:16px;background:var(--closed-bg);text-align:center;color:var(--closed-muted)}
}
