/* Rev. 3.6.0 — Central de dispositivos, monitoramento de links e Documentação e Contratos.
   Usa só as variáveis do tema (claro/escuro). Campos seguem a altura padrão de compact.css. */

/* ---------------------------------------------------------------- central de dispositivos */
.dc-panel { overflow: visible; container-type: inline-size; }
.dc { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 420px; }
.dc-rail { border-right: 1px solid var(--line); padding: 10px 8px 14px; display: flex; flex-direction: column; gap: 1px; background: var(--hover); border-radius: var(--radius) 0 0 var(--radius); position: relative; }
.dc-panel > .panel-head + .dc .dc-rail { border-radius: 0 0 0 var(--radius); }
.dc-sec { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4); padding: 10px 10px 3px; }
.dc-cat { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 13px; line-height: 1.25; }
.dc-cat svg { flex: none; color: var(--ink-3); }
.dc-cat span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-cat b { font-weight: 600; font-size: 11.5px; color: var(--ink-3); background: var(--panel); border: 1px solid var(--line-2); border-radius: 999px; padding: 0 7px; min-width: 22px; text-align: center; }
.dc-cat:hover { background: var(--panel); color: var(--ink); text-decoration: none; }
.dc-cat.dc-cat-zero { color: var(--ink-4); }
.dc-cat.dc-cat-zero b { opacity: .7; }
.dc-cat.active { background: var(--petrol-100); color: var(--petrol-700); font-weight: 600; }
.dc-cat.active svg { color: var(--petrol); }
.dc-cat.active b { background: var(--petrol); color: #fff; border-color: transparent; }
[data-theme="dark"] .dc-cat.active { color: var(--petrol); }
.dc-main { min-width: 0; display: flex; flex-direction: column; }
.dc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px 6px; flex-wrap: wrap; }
.dc-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dc-title h3 { margin: 0; font-size: 16px; }
.dc-title-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--petrol-50); color: var(--petrol); flex: none; }
.dc-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 6px 16px 10px; }
.dc-tools input[type="search"] { flex: 1 1 220px; min-width: 180px; }
.dc-tools select { width: auto; max-width: 240px; }
.dc-more { position: relative; }
.dc-more > summary { list-style: none; cursor: pointer; }
.dc-more > summary::-webkit-details-marker { display: none; }
.dc-more-body { position: absolute; z-index: 20; top: calc(100% + 4px); right: 0; max-width: calc(100vw - 32px); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 10px; display: grid; gap: 8px; min-width: 240px; }
.dc-table-wrap { flex: 1; }
.dc-table td { vertical-align: top; }
.dc-table tbody tr[data-dc-peek] { cursor: pointer; }
.dc-table tbody tr[data-dc-peek]:focus-visible { outline: 2px solid var(--petrol); outline-offset: -2px; }
.dc-table .cell-title { display: inline-flex; align-items: center; gap: 6px; }
.dc-ico { color: var(--ink-3); display: inline-flex; }
.dc-origin { display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; color: var(--sky); border: 1px solid currentColor; border-radius: 4px; padding: 0 3px; margin-left: 4px; vertical-align: 1px; opacity: .85; }
.dc-cred { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; color: var(--ink-3); margin-left: 6px; }
.dc-empty { padding: 34px 16px; }
.dc-loading .dc-main { opacity: .6; transition: opacity .15s; pointer-events: none; }
.trunc-1 { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trunc-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 340px; }
.dc-origin-banner { margin-bottom: 14px; }

/* área estreita (aba da empresa, telas médias): categorias viram faixa horizontal rolável */
@container (max-width: 860px) {
  .dc { grid-template-columns: 1fr; }
  .dc-rail { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 8px 10px; gap: 6px; scrollbar-width: thin; }
  .dc-sec { display: none; }
  .dc-cat { flex: none; border: 1px solid var(--line); background: var(--panel); padding: 4px 10px; }
  .dc-cat span { overflow: visible; }
  .dc-cat.dc-cat-zero { display: none; }
  .dc-cat.active { border-color: transparent; }
}
/* celular: tabela em cartões */
@container (max-width: 620px) {
  .dc-tools select, .dc-tools input[type="search"] { flex: 1 1 100%; max-width: none; }
  .dc-table thead { display: none; }
  .dc-table, .dc-table tbody, .dc-table tr, .dc-table td { display: block; width: 100%; }
  .dc-table tr { border-bottom: 1px solid var(--line); padding: 8px 12px; position: relative; }
  .dc-table td { border: 0 !important; padding: 2px 0 !important; }
  .dc-table td.dc-c-name { padding-right: 70px !important; font-size: 14px; }
  .dc-table td:not(.dc-c-name):not(.col-actions)::before { content: attr(data-label) ": "; color: var(--ink-4); font-size: 11.5px; }
  .dc-table td:not(.dc-c-name):not(.col-actions) { display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; font-size: 13px; }
  .dc-table td:not(.dc-c-name) .cell-sub { display: inline; margin: 0; }
  .dc-table td.col-actions { position: absolute; top: 6px; right: 8px; width: auto; }
  .trunc-1, .trunc-2 { max-width: 100%; }
}

/* ---------------------------------------------------------------- ficha resumida (lateral) */
dialog.dc-drawer { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(480px, 100vw); max-width: 100vw; border-radius: 16px 0 0 16px; padding: 0; border: 0; border-left: 1px solid var(--line); }
dialog.dc-drawer[open] { animation: dcSlide .18s ease-out; }
@keyframes dcSlide { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.dc-drawer-body { height: 100%; overflow-y: auto; }
.dc-peek { padding: 0 0 24px; }
.dc-peek-head { display: flex; gap: 12px; align-items: flex-start; padding: 16px 16px 8px; position: sticky; top: 0; background: var(--panel); z-index: 2; border-bottom: 1px solid var(--line-2); }
.dc-peek-head h2 { margin: 0 0 2px; font-size: 17px; line-height: 1.25; word-break: break-word; }
.dc-peek-head .icon-btn { margin-left: auto; flex: none; }
.dc-peek-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--petrol-50); color: var(--petrol); display: grid; place-items: center; flex: none; }
.dc-peek-tags { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 16px 0; }
.dc-peek-actions { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 16px 4px; }
.dc-peek-sec { padding: 12px 16px 4px; border-top: 1px solid var(--line-2); margin-top: 10px; }
.dc-peek-sec h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.dc-kv { grid-template-columns: minmax(110px, 38%) 1fr; }
.dc-kv dd { word-break: break-word; }
.dc-kv + .dc-kv { margin-top: 6px; }
.dc-subtable { margin-top: 12px; }
.dc-subtable h4 { font-size: 12.5px; margin: 0 0 6px; }
.table-compact th, .table-compact td { padding: 5px 8px; font-size: 12.5px; }
.dc-linked { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.dc-linked a { display: inline-flex; gap: 6px; align-items: center; }
.dc-cred-row { padding: 8px 0; }
.dc-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.dc-thumbs a { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--hover); }
.dc-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) {
  dialog.dc-drawer { margin: auto 0 0; width: 100vw; height: 88dvh; max-height: 88dvh; border-radius: 16px 16px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  @keyframes dcSlide { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
}

/* ---------------------------------------------------------------- monitoramento de links */
.lm-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px 2px 7px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.lm-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); display: inline-block; }
.lm-badge.lm-online { background: var(--leaf-100); color: var(--leaf); }
.lm-badge.lm-online i { background: var(--leaf); box-shadow: 0 0 0 3px color-mix(in srgb, var(--leaf) 22%, transparent); }
.lm-badge.lm-offline { background: var(--coral-100); color: var(--coral); }
.lm-badge.lm-offline i { background: var(--coral); animation: lmPulse 1.4s infinite; }
.lm-badge.lm-off { background: transparent; border: 1px dashed var(--line); color: var(--ink-3); font-weight: 500; }
@keyframes lmPulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .lm-badge.lm-offline i { animation: none; } }
.lm-summary { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 0 16px 10px; }
.lm-chip { display: inline-flex; gap: 5px; align-items: baseline; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-size: 12.5px; background: var(--panel); }
.lm-chip b { font-size: 14px; }
.lm-chip:hover { text-decoration: none; border-color: var(--ink-4); }
.lm-chip.lm-online b { color: var(--leaf); }
.lm-chip.lm-offline b { color: var(--coral); }
.lm-chip.lm-unknown b { color: var(--ink-3); }
.lm-box { display: grid; gap: 12px; }
.lm-now { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.lm-now-state { padding-top: 2px; }
.lm-now-info { flex: 1; min-width: 180px; }
.lm-now-info .cell-sub { display: block; }
.lm-uptime { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lm-uptime > div { border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; display: grid; gap: 2px; }
.lm-uptime b { font-size: 18px; }
.lm-uptime span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-uptime b.good { color: var(--leaf); } .lm-uptime b.warn { color: var(--warning-text); } .lm-uptime b.bad { color: var(--coral); }
.lm-history h4, .lm-h { margin: 0 0 6px; font-size: 12.5px; }
.lm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 420px; overflow-y: auto; }
.lm-list li { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; font-size: 13px; }
.lm-list li:nth-child(odd) { background: var(--hover); }
.lm-list li i { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--ink-4); }
.lm-list li.lm-online i { background: var(--leaf); } .lm-list li.lm-offline i { background: var(--coral); }
.lm-list li.lm-offline b { color: var(--coral); }
.lm-src { margin-left: auto; }
.lm-filter { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lm-filter input { width: 140px; }
.btn.is-busy { opacity: .6; cursor: progress; }

/* ---------------------------------------------------------------- formulário: dados da categoria */
.dc-bool { align-self: end; }
.dc-repeat .table-wrap { border: 1px solid var(--line-2); border-radius: 10px; margin-bottom: 8px; }
.dc-repeat td { padding: 4px 6px !important; }
.dc-repeat td input { width: 100%; }
[data-synced] { cursor: not-allowed; }

/* ---------------------------------------------------------------- Documentação e Contratos */
.cdoc-tools { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 4px 16px 10px; align-items: center; }
.cdoc-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cdoc-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: 12.5px; background: var(--panel); }
.cdoc-chip b { font-weight: 600; color: var(--ink-3); }
.cdoc-chip:hover { text-decoration: none; border-color: var(--ink-4); }
.cdoc-chip.active { background: var(--petrol-100); border-color: transparent; color: var(--petrol-700); font-weight: 600; }
[data-theme="dark"] .cdoc-chip.active { color: var(--petrol); }
.cdoc-chip.warn b { color: var(--warning-text); } .cdoc-chip.bad b { color: var(--coral); }
.cdoc-search { display: flex; gap: 6px; }
.cdoc-search input { width: 280px; max-width: 60vw; }
.cdoc-table td { vertical-align: top; }
.cdoc-off td { opacity: .65; }
.cdoc-due { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--b); font-weight: 600; }
.cdoc-due::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--b); }
.cdoc-files { display: flex; flex-wrap: wrap; gap: 4px; max-width: 300px; }
.cdoc-file { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 7px; padding: 1px 7px; font-size: 12px; background: var(--panel); color: var(--ink-2); cursor: pointer; max-width: 100%; }
.cdoc-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cdoc-file:hover { border-color: var(--petrol); color: var(--petrol); }
.cdoc-current { border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; margin: 6px 0 10px; }
.cdoc-current ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cdoc-current li { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.cdoc-current li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
dialog.cdoc-viewer { width: min(1100px, 96vw); max-width: 96vw; height: 90dvh; max-height: 90dvh; padding: 0; display: none; flex-direction: column; }
dialog.cdoc-viewer[open] { display: flex; }
dialog.cdoc-viewer > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
dialog.cdoc-viewer > header h2 { font-size: 15px; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.cdoc-viewer-body { flex: 1; min-height: 0; background: var(--hover); display: grid; place-items: center; }
.cdoc-viewer-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.cdoc-viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 640px) {
  .cdoc-search, .cdoc-search input { width: 100%; max-width: none; }
  .cdoc-table thead { display: none; }
  .cdoc-table, .cdoc-table tbody, .cdoc-table tr, .cdoc-table td { display: block; width: 100%; }
  .cdoc-table tr { border-bottom: 1px solid var(--line); padding: 8px 12px; position: relative; }
  .cdoc-table td { border: 0 !important; padding: 2px 0 !important; }
  .cdoc-table td:first-child { padding-right: 96px !important; }
  .cdoc-table td.col-actions { position: absolute; top: 6px; right: 8px; width: auto; }
  .cdoc-table td.hide-sm { display: none; }
  .cdoc-files { max-width: 100%; }
}

/* ---------------------------------------------------------------- integração IMVICTUS: recursos importados */
.imv-res { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px 8px; margin: 12px 0 4px; }
.imv-res legend { font-size: 12.5px; font-weight: 600; padding: 0 4px; }
.imv-res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 2px 12px; }

/* ---------------------------------------------------------------- Rev. 3.6.1: escolha da empresa na central */
.dc.dc-pick { display: block; min-height: 0; }
.dc-picker { max-width: 520px; margin: 0 auto; padding: 48px 20px 56px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.dc-picker h3 { margin: 4px 0 0; font-size: 18px; }
.dc-picker p { margin: 0; }
.dc-picker-form { display: flex; gap: 8px; width: 100%; margin-top: 8px; }
.dc-picker-form > select, .dc-picker-form > .sd-search-select { flex: 1; min-width: 0; text-align: left; }
.dc-tools .dc-company, .dc-tools .sd-search-select:has(.dc-company) { min-width: 240px; }

/* ---------------------------------------------------------------- Rev. 3.6.1: fotografias dos equipamentos */
.dc-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 10px; }
.dc-photo { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); }
.dc-photo-img { display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; background: var(--hover); cursor: zoom-in; }
.dc-photo-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dc-photo figcaption { display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 8px; font-size: 12px; }
.dc-photo figcaption span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-photo-up { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border: 1px dashed var(--line); border-radius: 10px; padding: 10px; }
.dc-photo-up input[type=file] { flex: 1; min-width: 200px; }
.gprs-box { display: grid; gap: 10px; }
.gprs-usage { display: grid; gap: 4px; }
.gprs-bar { height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.gprs-bar i { display: block; height: 100%; background: var(--leaf); }
.gprs-bar i.warn { background: var(--signal); } .gprs-bar i.bad { background: var(--coral); }
.cnpj-btn { margin-top: 6px; }

/* ---------------------------------------------------------------- Rev. 3.6.2 */
/* cor de identificação por seção (menu de categorias e lista Todos) */
.dc-tone-sky { --tone: var(--sky); --tone-bg: var(--sky-100); }
.dc-tone-petrol { --tone: var(--petrol); --tone-bg: var(--petrol-50); }
.dc-tone-leaf { --tone: var(--leaf); --tone-bg: var(--leaf-100); }
.dc-tone-coral { --tone: var(--coral); --tone-bg: var(--coral-100); }
.dc-tone-signal { --tone: var(--signal); --tone-bg: var(--signal-100); }
.dc-tone-violet { --tone: #7a5ccc; --tone-bg: rgba(122, 92, 204, .12); }
.dc-tone-ink { --tone: var(--ink-3); --tone-bg: var(--hover); }
[data-theme="dark"] .dc-tone-violet { --tone: #a48ff0; --tone-bg: rgba(164, 143, 240, .14); }
.dc-cat[class*="dc-tone-"] svg { color: var(--tone); }
.dc-cat.active[class*="dc-tone-"] svg { color: var(--petrol); }
/* lista Todos agrupada por categoria */
.dc-table tr.dc-group > th { padding: 0; background: transparent; border-bottom: 0; text-transform: none; letter-spacing: 0; }
.dc-table tr.dc-group:not(:first-child) > th { padding-top: 14px; }
.dc-table tr.dc-group a { display: flex; align-items: center; gap: 10px; padding: 8px 14px; margin: 0 8px; border-radius: 10px; background: var(--tone-bg); color: var(--ink); text-decoration: none; font-size: 13px; }
.dc-table tr.dc-group a:hover { text-decoration: none; filter: brightness(.98); }
.dc-group-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--panel); color: var(--tone); flex: none; box-shadow: 0 0 0 1px var(--line-2); }
.dc-group-name { font-weight: 600; }
.dc-group-sec { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.dc-table tr.dc-group b { font-size: 11.5px; font-weight: 600; background: var(--panel); border: 1px solid var(--line-2); border-radius: 999px; padding: 0 8px; color: var(--ink-2); }
.dc-group-go { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-3); }
.dc-table tr.dc-in-group > td:first-child { box-shadow: inset 3px 0 0 var(--tone); }
.dc-table tr.dc-in-group .dc-ico { color: var(--tone); }
.dc-table tr.dc-in-group > td { padding-top: 9px; padding-bottom: 9px; }
/* coluna Fotos */
.dc-photo-n { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--petrol); text-decoration: none; white-space: nowrap; }
.dc-photo-n.none { color: var(--ink-4); font-weight: 400; }
.dc-photo-n svg { opacity: .85; }
/* Chips GPRS: barra de consumo na lista */
.dc-gbar { display: flex; align-items: center; gap: 6px; min-width: 104px; }
.dc-gbar .gprs-bar { flex: 1; min-width: 56px; }
.dc-err { color: var(--coral); }
@container (max-width: 620px) {
  .dc-table tr.dc-group { padding: 10px 0 2px; border-bottom: 0; }
  .dc-table tr.dc-group > th { display: block; padding: 0 !important; }
  .dc-table tr.dc-group a { margin: 0 8px; }
  .dc-group-sec { display: none; }
  .dc-table tr.dc-in-group { box-shadow: inset 3px 0 0 var(--tone); }
  .dc-table tr.dc-in-group > td:first-child { box-shadow: none; }
  .dc-gbar { min-width: 140px; }
}
/* Operação › Chip GPRS */
.lm-chip.ck-high b { color: var(--signal); }
.lm-chip.ck-error b { color: var(--coral); }
.ck-table .dc-gbar { min-width: 120px; }
.lm-badge.lm-unknown { white-space: nowrap; }
/* listas largas (Chips GPRS): primeira coluna fixa ao rolar para o lado; grupos de Todos mais compactos */
@container (min-width: 621px) {
  .dc-table th.dc-c-name, .dc-table td.dc-c-name { position: sticky; left: 0; z-index: 1; background: var(--panel); min-width: 150px; }
  .dc-table th, .dc-table td { padding-left: 10px; padding-right: 10px; }
  .dc-table th:first-child, .dc-table td:first-child { padding-left: 14px; }
  .dc-table thead th.dc-c-name { z-index: 2; background: var(--hover); }
  .dc-table td.dc-c-name .cell-title { white-space: nowrap; }
}
.dc-table tr.dc-group:not(:first-child) > th { padding-top: 10px; }
.dc-table tr.dc-group a { padding: 6px 12px; }
.dc-table th.dc-c-g_carrier, .dc-table th.dc-c-g_bar, .dc-table th.dc-c-g_event, .dc-table th.dc-c-g_line { white-space: normal; }
.dc-c-g_bar .cell-sub { white-space: normal; }
/* Operação › Links e Chip GPRS em cartões no celular (mesmas regras da central) */
[data-links-page] { container-type: inline-size; }
@container (max-width: 620px) {
  .dc-table td.is-empty { display: none !important; }
  .lk-table td.hide-sm { display: flex !important; }
}

/* ---------------------------------------------------------------- Rev. 3.6.3 */
/* menu de categorias: grupos separados, títulos claros, ícones e contadores alinhados */
.dc-rail { gap: 0; padding: 10px 10px 12px; }
.dc-rail .dc-cat { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; column-gap: 8px; text-align: left; padding: 3px 8px; min-height: 30px; margin: 0; }
.dc-cat-ico { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--tone-bg, var(--panel)); color: var(--tone, var(--ink-3)); }
.dc-cat-ico svg { color: inherit !important; }
.dc-cat-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-rail .dc-cat b { justify-self: end; }
.dc-cat-all { font-weight: 600; margin-bottom: 6px !important; }
.dc-cat-all .dc-cat-ico { background: var(--petrol-50); color: var(--petrol); }
.dc-group-nav { border-top: 1px solid var(--line); padding: 8px 0 6px; display: flex; flex-direction: column; gap: 1px; }
.dc-rail .dc-sec { display: flex; align-items: center; gap: 7px; padding: 2px 8px 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.dc-rail .dc-sec i { width: 7px; height: 7px; border-radius: 50%; background: var(--tone, var(--ink-4)); flex: none; }
.dc-rail .dc-cat.dc-cat-zero { color: var(--ink-4); }
.dc-rail .dc-cat.dc-cat-zero .dc-cat-ico { opacity: .55; }
.dc-rail .dc-cat.active { background: var(--petrol-100); color: var(--petrol-700); }
.dc-rail .dc-cat.active .dc-cat-ico { background: var(--panel); color: var(--petrol); }
[data-theme="dark"] .dc-rail .dc-cat.active { background: color-mix(in srgb, var(--petrol) 22%, transparent); color: var(--ink); }
.dc-rail-cfg { margin-top: 8px; display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px; border: 1px dashed var(--line); border-radius: 8px; background: transparent; color: var(--ink-3); font: inherit; font-size: 12.5px; cursor: pointer; text-align: left; }
.dc-rail-cfg:hover { color: var(--ink); border-color: var(--ink-4); background: var(--panel); }
.dc-rail-cfg span { display: flex; flex-direction: column; line-height: 1.25; }
.dc-rail-cfg small { color: var(--ink-4); font-size: 11px; }
/* faixa horizontal (aba da empresa, telas médias e celular) */
@container (max-width: 860px) {
  .dc-group-nav { display: contents; }
  .dc-rail .dc-cat { display: flex; padding: 4px 10px 4px 5px; min-height: 0; }
  .dc-rail .dc-cat-ico { width: 20px; height: 20px; }
  .dc-cat-all { margin-bottom: 0 !important; }
  .dc-rail-cfg { margin-top: 0; width: auto; flex: none; padding: 4px 10px; white-space: nowrap; }
  .dc-rail-cfg small { display: none; }
}
/* janela: categorias da empresa */
dialog.dc-cats-dlg { width: min(760px, 96vw); }
.dc-cats-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.dc-cats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.dc-cats-grid fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px 6px; margin: 0; min-width: 0; }
.dc-cats-grid legend { display: flex; align-items: center; gap: 6px; padding: 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.dc-cats-grid legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--tone); }
.dc-cats-item { display: grid !important; grid-template-columns: auto 22px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 4px 0; margin: 0 !important; font-size: 13px; }
.dc-cats-item .dc-cat-ico { width: 22px; height: 22px; }
.dc-cats-item small { color: var(--ink-4); font-size: 11.5px; }
/* coluna AnyDesk (Servidores) */
.dc-anydesk { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--petrol); text-decoration: none; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
.dc-anydesk:hover { border-color: var(--petrol); text-decoration: none; background: var(--petrol-50); }
/* Portal do Cliente — Equipamentos: categorias, busca, filtros e cartões no celular */
.pd-cats { display: flex; gap: 6px; overflow-x: auto; padding: 12px 16px 4px; scrollbar-width: thin; }
.pd-cat { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; color: var(--ink-2); text-decoration: none; background: var(--panel); white-space: nowrap; }
.pd-cat b { font-size: 11px; font-weight: 600; color: var(--ink-3); }
.pd-cat:hover { text-decoration: none; border-color: var(--ink-4); }
.pd-cat.active { background: var(--petrol-100); border-color: transparent; color: var(--petrol-700); font-weight: 600; }
[data-theme="dark"] .pd-cat.active { background: color-mix(in srgb, var(--petrol) 24%, transparent); color: var(--ink); }
.pd-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 16px; }
.pd-tools input[type="search"] { flex: 1 1 240px; min-width: 180px; }
.pd-tools select { width: auto; max-width: 220px; }
.pd-name { display: flex; gap: 10px; align-items: flex-start; }
.pd-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--petrol-50); color: var(--petrol); flex: none; }
@media (max-width: 640px) {
  .pd-tools select, .pd-tools input[type="search"] { flex: 1 1 100%; max-width: none; }
  .pd-table thead { display: none; }
  .pd-table, .pd-table tbody, .pd-table tr, .pd-table td { display: block; width: 100%; }
  .pd-table tr { border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .pd-table td { border: 0 !important; padding: 2px 0 !important; text-align: left !important; }
  .pd-table td:not(.pd-name) { display: flex; gap: 6px; font-size: 13px; padding-left: 38px !important; }
  .pd-table td:not(.pd-name)::before { content: attr(data-label) ": "; color: var(--ink-4); font-size: 11.5px; }
}
@media (max-width: 640px) {
  .pd-table td.pd-name { display: flex; }
  .pd-table td.is-empty { display: none !important; }
}

/* ---------------------------------------------------------------- Rev. 3.6.4 (auditoria) */
/* abas do formulário do dispositivo cabem em 1440 px (a aba Fotografias da 3.6.1 empurrava “Histórico” para fora) */
.form-tabs-panel > .tabs.form-tabs button { padding-left: 10px; padding-right: 10px; }
/* menu de categorias em faixa (aba Dispositivos da empresa e telas médias): sem títulos de seção e nomes inteiros */
@container (max-width: 860px) {
  .dc-rail .dc-sec { display: none; }
  .dc-rail .dc-cat-name { overflow: visible; text-overflow: clip; flex: none; }
  .dc-rail .dc-cat { flex: none; width: auto; }
}
/* indicadores com colunas fixas no próprio HTML (empresa, atendimento remoto, perfil) passam a 2 colunas no celular */
@media (max-width: 760px) { .kpis[style*="grid-template-columns"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
