:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-2: #eef2ff;
    --text: #172033;
    --muted: #64748b;
    --border: #e2e8f0;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --shadow: 0 12px 30px rgba(15, 23, 42, .08);
    --radius: 18px;
}
[data-theme="dark"] {
    --bg: #0f172a;
    --surface: #111827;
    --surface-2: #1e293b;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --border: #334155;
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --shadow: 0 12px 30px rgba(0,0,0,.30);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, Segoe UI, Roboto, Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 280px; background: var(--surface); border-right: 1px solid var(--border); padding: 22px; position: sticky; top: 0; height: 100vh; transition: .2s; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.brand strong { display:block; font-size: 17px; }
.brand span { color: var(--muted); font-size: 12px; }
.menu { display: grid; gap: 8px; }
.menu a { padding: 12px 14px; border-radius: 14px; color: var(--muted); font-weight: 650; transition: .2s; }
.menu a:hover, .menu a.ativo { background: var(--surface-2); color: var(--primary); }
.main-content { flex: 1; min-width: 0; }
.topbar { height: 86px; background: var(--surface); border-bottom: 1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap: 16px; padding: 0 28px; position: sticky; top: 0; z-index: 10; }
.topbar h1 { margin:0; font-size: 24px; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.topbar-actions { display:flex; align-items:center; gap: 10px; }
.content-area { padding: 28px; }
.btn, button, input, select { font-family: inherit; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap: 8px; border:0; border-radius: 12px; padding: 11px 16px; cursor:pointer; font-weight: 800; transition:.2s; }
.btn-primario { background: var(--primary); color: #fff; }
.btn-primario:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-secundario { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-perigo { background: var(--danger); color:#fff; }
.btn-sucesso { background: var(--success); color:#fff; }
.btn-icon { background: var(--surface-2); border:1px solid var(--border); color:var(--text); border-radius:12px; padding:10px 12px; cursor:pointer; display:none; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 22px; }
.grid { display:grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.kpi { display:flex; justify-content:space-between; align-items:flex-start; }
.kpi strong { display:block; font-size: 30px; margin-top: 8px; }
.kpi span, .muted { color: var(--muted); }
.kpi .icone { font-size: 28px; background: var(--surface-2); padding: 10px; border-radius: 14px; }
.form-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.form-group { display:grid; gap: 8px; }
label { font-weight: 800; font-size: 14px; }
input, select { width: 100%; background: var(--surface); color: var(--text); border:1px solid var(--border); border-radius: 12px; padding: 12px 13px; outline: none; }
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.14); }

.campo-com-botao { display:flex; gap: 10px; align-items: stretch; }
.campo-com-botao input { flex: 1; }
.btn-copiar-senha { white-space: nowrap; }
.texto-ajuda { color: var(--muted); font-size: 12px; line-height: 1.4; }
.actions { display:flex; flex-wrap:wrap; gap: 10px; align-items:center; margin: 14px 0; }
.form-actions-full { grid-column: 1 / -1; }
.form-grid-computador { align-items: start; }

.form-section { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 4px; }
.form-section h3 { margin: 0 0 4px; font-size: 18px; }
.form-section p { margin: 0; }
.table-wrap { width:100%; overflow:auto; border:1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width:100%; border-collapse: collapse; min-width: 860px; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--border); text-align:left; vertical-align:middle; }
th { background: var(--surface-2); font-size:13px; text-transform: uppercase; letter-spacing:.03em; }
.badge { display:inline-flex; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 900; }
.badge-ativo { color:#065f46; background:#d1fae5; }
.badge-desligado, .badge-inativo { color:#991b1b; background:#fee2e2; }
.badge-geral { color:#1e3a8a; background:#dbeafe; }
.alerta { border-radius: 14px; padding: 13px 15px; margin-bottom: 14px; font-weight: 750; }
.alerta-sucesso { background:#dcfce7; color:#166534; }
.alerta-erro { background:#fee2e2; color:#991b1b; }
.alerta-aviso { background:#fef3c7; color:#92400e; }
.login-page { min-height:100vh; display:grid; place-items:center; padding: 24px; background: linear-gradient(135deg, #dbeafe, #f8fafc); }
.login-card { width:100%; max-width: 460px; background:#fff; border-radius: 24px; padding: 32px; box-shadow: 0 24px 80px rgba(15,23,42,.16); }
.login-card img { width: 110px; display:block; margin: 0 auto 18px; }
.login-card h1 { text-align:center; margin:0 0 6px; }
.login-card p { text-align:center; color:#64748b; margin:0 0 20px; }
.login-card .form-group { margin-bottom: 14px; }
.print-header { display:none; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2,1fr); } .grid-3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 760px) {
    .sidebar { position: fixed; transform: translateX(-102%); }
    .sidebar.open { transform: translateX(0); }
    .btn-icon { display:inline-flex; }
    .topbar { padding: 0 16px; height: auto; min-height: 78px; }
    .content-area { padding: 16px; }
    .grid-4, .grid-3, .grid-2, .form-grid { grid-template-columns: 1fr; }
    .topbar h1 { font-size: 19px; }
}

.app-version { display:block; color: var(--muted); font-size: 11px; font-weight: 800; margin-top: 3px; text-transform: lowercase; }
.licencas-container { display:grid; gap: 12px; }
.licenca-linha { display:grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; gap: 12px; align-items:end; padding: 14px; border:1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
@media (max-width: 760px) { .licenca-linha { grid-template-columns: 1fr; } }

/* Ajustes v12 - responsividade mobile */
textarea {
    width: 100%;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 13px;
    outline: none;
    resize: vertical;
}
textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.14); }
.table-wrap { -webkit-overflow-scrolling: touch; }
.table-wrap::after { content: ''; display: block; height: 1px; }
@media (max-width: 760px) {
    html, body { max-width: 100%; overflow-x: hidden; }
    .app-shell { display: block; }
    .sidebar { width: min(86vw, 300px); overflow-y: auto; box-shadow: 18px 0 45px rgba(15,23,42,.20); }
    .brand { align-items: flex-start; margin-bottom: 18px; }
    .menu a { padding: 13px 14px; }
    .topbar { align-items: flex-start; justify-content: flex-start; flex-wrap: wrap; gap: 10px; padding: 14px 16px; }
    .topbar > div:first-of-type { flex: 1 1 calc(100% - 54px); min-width: 0; }
    .topbar p { font-size: 12px; line-height: 1.35; }
    .topbar-actions { width: 100%; justify-content: flex-start; }
    .topbar-actions .btn { width: 100%; }
    .card { padding: 16px; border-radius: 16px; }
    .card h2 { font-size: 20px; }
    .actions { width: 100%; align-items: stretch; }
    .actions .btn, .actions button { min-height: 44px; }
    .form-grid > .actions { grid-column: 1 / -1; }
    .form-grid > .actions .btn, .form-grid > .actions button { width: 100%; }
    .campo-com-botao { flex-direction: column; }
    .btn-copiar-senha { width: 100%; }
    input, select, textarea { font-size: 16px; }
    .table-wrap { border-radius: 14px; overflow-x: auto; }
    table { min-width: 920px; }
    th, td { padding: 11px 12px; font-size: 13px; }
    .login-card { padding: 24px; border-radius: 20px; }
}
@media (max-width: 420px) {
    .content-area { padding: 12px; }
    .topbar h1 { font-size: 18px; }
    .btn { width: 100%; }
    .grid { gap: 12px; }
}

@media (max-width: 380px) {
    
}


/* Ajustes v18 - menu Configurações e Backup */
.menu-grupo { display: grid; gap: 6px; }
.menu-grupo > a { margin-bottom: 2px; }
.submenu { display: grid; gap: 6px; margin: -2px 0 8px 14px; padding-left: 12px; border-left: 2px solid var(--border); }
.submenu a { font-size: 13px; padding: 10px 12px; border-radius: 12px; }
.menu-grupo-ativo > a { background: var(--surface-2); color: var(--primary); }
.backup-box { display:grid; gap: 12px; }
.backup-alerta { border:1px dashed var(--warning); background: rgba(245,158,11,.10); border-radius: 14px; padding: 14px; color: var(--text); }
@media (max-width: 760px) {
    .submenu { margin-left: 8px; padding-left: 10px; }
    .submenu a { font-size: 13px; }
}

/* Ajustes v19 - menu Sistema, topbar com sair e destaque de status */

.menu-titulo {
    width: 100%;
    border: 0;
    text-align: left;
    font: inherit;
    font-weight: 800;
    cursor: default;
    background: transparent;
    color: var(--muted);
    border-radius: 14px;
    padding: 12px 14px;
}
.menu-grupo-ativo .menu-titulo { background: var(--surface-2); color: var(--primary); }

.topbar-title { min-width: 0; }
.topbar-user {
    font-weight: 900;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 9px 13px;
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.status-funcionario-destaque {
    border: 2px solid var(--warning);
    background: rgba(245,158,11,.10);
    border-radius: 16px;
    padding: 14px;
    grid-column: 1 / -1;
}
.status-funcionario-destaque label {
    color: var(--warning);
    font-size: 15px;
}
.status-funcionario-destaque select {
    font-weight: 900;
    border-color: var(--warning);
}
@media (max-width: 760px) {
    .topbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .topbar-user { grid-column: 1 / -1; width: 100%; max-width: none; text-align: center; }
    .topbar-actions .btn { width: 100%; }
}


/* Ajustes v24/v26 - telas internas sem logotipo e reforço responsivo */
.brand-sem-logo {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    background: rgba(0,0,0,.10);
    border-radius: 16px;
    margin-bottom: 14px;
}
.brand-sem-logo strong { font-size: 18px; }
.brand-sem-logo span { display:block; margin-top: 2px; }
@media (max-width: 760px) {
    .brand-sem-logo { padding-top: 8px; }
    .topbar { position: sticky; top: 0; }
    .topbar-actions { align-items: stretch; }
    .content-area { width: 100%; }
    .card, .table-wrap, .login-card { max-width: 100%; }
    .btn, button { min-height: 44px; }
}
@media (max-width: 520px) {
    .login-page { padding: 14px; }
    .login-card img { width: 92px; }
    .login-card h1 { font-size: 24px; }
    .topbar-actions { grid-template-columns: 1fr; }
}


/* Ajustes v30 - dashboard funcional e responsividade revisada */
.dashboard-charts .card canvas { min-height: 260px; max-height: 320px; width: 100% !important; }
.grafico-fallback { display:grid; gap: 10px; margin-top: 12px; }
.fallback-linha { display:grid; grid-template-columns: minmax(120px, 1fr) minmax(120px, 2fr) auto; gap: 10px; align-items:center; }
.fallback-barra { height: 10px; border-radius: 999px; background: var(--surface-2); overflow:hidden; border:1px solid var(--border); }
.fallback-barra i { display:block; height:100%; border-radius:999px; background: var(--primary); }
.badge-ok { color:#065f46; background:#d1fae5; }
.badge-danger { color:#991b1b; background:#fee2e2; }
.sidebar .brand-sem-logo { background: rgba(0,0,0,.10); }
@media (max-width: 1100px) {
    .dashboard-charts { grid-template-columns: 1fr; }
    .dashboard-listas { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .dashboard-kpis { grid-template-columns: 1fr; }
    .dashboard-charts .card canvas { min-height: 220px; }
    .fallback-linha { grid-template-columns: 1fr; gap: 6px; }
}

/* Ajustes v30 - diagnóstico e dashboard robusto */
.debug-box{
    max-height:260px;
    overflow:auto;
    padding:12px;
    border-radius:12px;
    background:rgba(0,0,0,.08);
    white-space:pre-wrap;
    font-size:13px;
}


.campo-largo{grid-column:1 / -1}
.form-section{padding:14px 16px;border-radius:16px;background:rgba(15,23,42,.04);border:1px solid var(--border);margin-top:4px}
.form-section h3{margin:0 0 4px;font-size:16px}
textarea{width:100%;border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:12px;padding:12px;font-family:inherit;font-size:15px;resize:vertical;min-height:96px}

/* Ajustes v32 - listagem de funcionários */
.page-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; margin-bottom:18px; }
.page-head h2 { margin:0 0 4px; font-size:24px; }
.page-head p { margin:0; }
.page-actions { margin:0; justify-content:flex-end; }
.mini-kpis { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:0 0 18px; }
.mini-kpi { border:1px solid var(--border); background:var(--surface-2); border-radius:16px; padding:14px 16px; }
.mini-kpi span { display:block; color:var(--muted); font-size:13px; font-weight:800; }
.mini-kpi strong { display:block; font-size:24px; margin-top:4px; }
.filtros-funcionarios { grid-template-columns: minmax(260px,2fr) minmax(180px,1fr) minmax(160px,.8fr) auto; align-items:end; }
.filtros-funcionarios .actions { margin:0; align-items:end; }
.funcionarios-lista-card { padding:0; overflow:hidden; }
.table-title-row { display:flex; justify-content:space-between; gap:16px; padding:20px 22px; border-bottom:1px solid var(--border); }
.table-title-row h3 { margin:0 0 4px; font-size:20px; }
.table-title-row p { margin:0; }
.funcionarios-table-wrap { border:0; border-radius:0; }
.tabela-funcionarios { min-width:1120px; }
.tabela-funcionarios th { white-space:nowrap; }
.tabela-funcionarios td { vertical-align:top; }
.funcionario-identidade { display:flex; align-items:center; gap:12px; min-width:220px; }
.funcionario-identidade strong { display:block; line-height:1.2; }
.funcionario-identidade small { display:block; margin-top:4px; color:var(--muted); font-weight:800; }
.avatar-funcionario { width:38px; height:38px; flex:0 0 38px; display:grid; place-items:center; border-radius:14px; background:var(--surface-2); border:1px solid var(--border); color:var(--primary); font-weight:950; }
.valor-com-copia { display:flex; gap:8px; align-items:center; min-width:160px; }
.valor-com-copia code { max-width:140px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; background:var(--surface-2); border:1px solid var(--border); border-radius:10px; padding:7px 9px; color:var(--text); }
.btn-mini-copiar { border:1px solid var(--border); background:var(--surface-2); color:var(--text); border-radius:10px; padding:7px 9px; cursor:pointer; font-size:12px; font-weight:900; }
.btn-mini-copiar:hover { border-color:var(--primary); color:var(--primary); }
.link-tabela { color:var(--primary); font-weight:800; }
.observacao-resumo { display:block; max-width:260px; max-height:44px; overflow:hidden; color:var(--muted); line-height:1.35; }
.col-acoes { white-space:nowrap; }
.acoes-linha { display:flex; gap:8px; align-items:center; }
.btn-tabela { padding:8px 10px; border-radius:10px; font-size:12px; }
.empty-state { margin:22px; padding:28px; text-align:center; border:1px dashed var(--border); background:var(--surface-2); border-radius:18px; }
.empty-state strong { display:block; font-size:18px; margin-bottom:6px; }
.empty-state p { color:var(--muted); margin:0 0 16px; }
@media (max-width: 980px) {
    .page-head { flex-direction:column; }
    .page-actions { width:100%; justify-content:flex-start; }
    .filtros-funcionarios { grid-template-columns:1fr 1fr; }
    .filtros-acoes { grid-column:1 / -1; }
}
@media (max-width: 760px) {
    .mini-kpis { grid-template-columns:1fr; }
    .filtros-funcionarios { grid-template-columns:1fr; }
    .page-actions .btn, .filtros-acoes .btn { width:100%; }
    .tabela-funcionarios { min-width:980px; }
    .table-title-row { padding:16px; }
    .empty-state { margin:16px; padding:22px; }
}

/* Ajustes v32 - funcionários: listagem limpa, cargo e botões discretos */
.filtros-funcionarios { grid-template-columns: minmax(260px,2fr) minmax(180px,1fr) auto; }
.tabela-funcionarios-clean { min-width:1040px; }
.tabela-funcionarios-clean td { vertical-align:middle; }
.tabela-funcionarios-clean th,
.tabela-funcionarios-clean td { padding-top:12px; padding-bottom:12px; }
.valor-discreto { gap:6px; min-width:150px; }
.valor-discreto code { max-width:150px; border-radius:8px; padding:5px 7px; font-size:12px; }
.btn-copy-clean { padding:5px 7px; border-radius:8px; font-size:11px; font-weight:800; opacity:.78; }
.btn-copy-clean:hover { opacity:1; transform:translateY(-1px); }
.acoes-clean { gap:6px; justify-content:flex-end; }
.btn-acao-clean { display:inline-flex; align-items:center; justify-content:center; min-height:30px; padding:6px 9px; border:1px solid var(--border); border-radius:9px; background:transparent; color:var(--muted); font-size:12px; font-weight:850; text-decoration:none; transition:.18s ease; }
.btn-acao-clean:hover { color:var(--primary); border-color:var(--primary); background:rgba(37,99,235,.07); }
.btn-acao-excluir:hover { color:var(--danger); border-color:var(--danger); background:rgba(220,38,38,.07); }
@media (max-width: 760px) {
    .tabela-funcionarios-clean { min-width:980px; }
}


/* Ajustes v33 - ações da listagem de funcionários em estilo ícone */
.tabela-funcionarios-clean .col-acoes { width:72px; text-align:right; }
.acoes-clean { gap:4px; justify-content:flex-end; }
.btn-acao-icone {
    width:26px;
    height:26px;
    min-width:26px;
    min-height:26px;
    padding:0;
    border-radius:8px;
    font-size:14px;
    line-height:1;
    font-weight:900;
    opacity:.72;
}
.btn-acao-icone:hover { opacity:1; transform:translateY(-1px); }
.btn-acao-excluir { font-size:18px; }
.btn-icon-copy {
    width:24px;
    height:24px;
    min-width:24px;
    padding:0;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:7px;
    font-size:13px;
    line-height:1;
    opacity:.7;
}
.btn-icon-copy:hover { opacity:1; }
.btn-icon-copy.copiado { color:var(--success); border-color:var(--success); background:rgba(22,163,74,.08); }
.valor-discreto { min-width:138px; }
.valor-discreto code { max-width:126px; }
@media (max-width:760px){
    .btn-acao-icone{width:30px;height:30px;min-width:30px;min-height:30px}
    .btn-icon-copy{width:28px;height:28px;min-width:28px}
}

/* Ajustes v34 - listagem de computadores no mesmo padrão clean de funcionários */
.filtros-computadores { grid-template-columns: minmax(280px,2fr) minmax(180px,1fr) auto; align-items:end; }
.filtros-computadores .actions { margin:0; align-items:end; }
.computadores-lista-card { padding:0; overflow:hidden; }
.computadores-table-wrap { border:0; border-radius:0; }
.tabela-computadores { min-width:1480px; }
.tabela-computadores th { white-space:nowrap; }
.tabela-computadores-clean td { vertical-align:middle; }
.tabela-computadores-clean th,
.tabela-computadores-clean td { padding-top:12px; padding-bottom:12px; }
.tabela-computadores-clean .col-acoes { width:72px; text-align:right; }
.valor-email-computador { min-width:190px; }
.valor-email-computador .link-tabela { max-width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:inline-block; }
.licencas-lista-clean { display:flex; flex-direction:column; gap:8px; min-width:220px; }
.licenca-item-clean { padding:7px 8px; border:1px solid var(--border); background:var(--surface-2); border-radius:10px; }
.licenca-item-clean > span { display:block; color:var(--text); font-size:12px; font-weight:900; margin-bottom:5px; }
.valor-licenca-serie { min-width:0; }
.valor-licenca-serie code { max-width:145px; background:var(--surface); }
@media (max-width: 980px) {
    .filtros-computadores { grid-template-columns:1fr 1fr; }
    .filtros-computadores .filtros-acoes { grid-column:1 / -1; }
}
@media (max-width:760px) {
    .filtros-computadores { grid-template-columns:1fr; }
    .filtros-computadores .btn { width:100%; }
    .tabela-computadores { min-width:1320px; }
}

/* Ajustes v35 - listagem de periféricos no mesmo padrão clean de funcionários e computadores */
.filtros-perifericos { grid-template-columns: minmax(280px,2fr) minmax(180px,1fr) auto; align-items:end; }
.filtros-perifericos .actions { margin:0; align-items:end; }
.perifericos-lista-card { padding:0; overflow:hidden; }
.perifericos-table-wrap { border:0; border-radius:0; }
.tabela-perifericos { min-width:980px; }
.tabela-perifericos th { white-space:nowrap; }
.tabela-perifericos-clean td { vertical-align:middle; }
.tabela-perifericos-clean th,
.tabela-perifericos-clean td { padding-top:12px; padding-bottom:12px; }
.tabela-perifericos-clean .col-acoes { width:72px; text-align:right; }
@media (max-width: 980px) {
    .filtros-perifericos { grid-template-columns:1fr 1fr; }
    .filtros-perifericos .filtros-acoes { grid-column:1 / -1; }
}
@media (max-width:760px) {
    .filtros-perifericos { grid-template-columns:1fr; }
    .filtros-perifericos .btn { width:100%; }
    .tabela-perifericos { min-width:920px; }
}

/* Ajustes v36 - listagem de computadores sem rolagem horizontal */
.tabela-computadores-compacta {
    width: 100%;
    min-width: 0 !important;
    table-layout: fixed;
    font-size: 12px;
}
.computadores-sem-rolagem {
    overflow-x: visible;
}
.tabela-computadores-compacta th,
.tabela-computadores-compacta td {
    padding: 10px 8px;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.35;
}
.tabela-computadores-compacta th:nth-child(1),
.tabela-computadores-compacta td:nth-child(1) { width: 10%; }
.tabela-computadores-compacta th:nth-child(2),
.tabela-computadores-compacta td:nth-child(2) { width: 8%; }
.tabela-computadores-compacta th:nth-child(3),
.tabela-computadores-compacta td:nth-child(3) { width: 9%; }
.tabela-computadores-compacta th:nth-child(4),
.tabela-computadores-compacta td:nth-child(4) { width: 10%; }
.tabela-computadores-compacta th:nth-child(5),
.tabela-computadores-compacta td:nth-child(5) { width: 10%; }
.tabela-computadores-compacta th:nth-child(6),
.tabela-computadores-compacta td:nth-child(6) { width: 13%; }
.tabela-computadores-compacta th:nth-child(7),
.tabela-computadores-compacta td:nth-child(7) { width: 8%; }
.tabela-computadores-compacta th:nth-child(8),
.tabela-computadores-compacta td:nth-child(8) { width: 9%; }
.tabela-computadores-compacta th:nth-child(9),
.tabela-computadores-compacta td:nth-child(9) { width: 16%; }
.tabela-computadores-compacta th:nth-child(10),
.tabela-computadores-compacta td:nth-child(10) { width: 7%; }
.tabela-computadores-compacta .codigo-clean {
    display: inline;
    padding: 2px 5px;
    font-size: 11px;
    white-space: normal;
    word-break: break-word;
}
.tabela-computadores-compacta .licencas-lista-clean {
    min-width: 0;
    gap: 5px;
}
.tabela-computadores-compacta .licenca-item-clean {
    padding: 5px 6px;
    border-radius: 8px;
}
.tabela-computadores-compacta .licenca-item-clean > span {
    font-size: 11px;
    margin-bottom: 3px;
}
.tabela-computadores-compacta .valor-discreto { min-width: 0; }
.tabela-computadores-compacta .valor-discreto code { max-width: 100%; }
.tabela-computadores-compacta .btn-icon-copy {
    width: 20px;
    height: 20px;
    min-width: 20px;
    font-size: 11px;
}
.tabela-computadores-compacta .col-acoes { text-align: center; }
.tabela-computadores-compacta .acoes-clean { justify-content: center; gap: 5px; }

@media (max-width: 980px) {
    .computadores-sem-rolagem { overflow: visible; border: 0; }
    .tabela-computadores-compacta,
    .tabela-computadores-compacta thead,
    .tabela-computadores-compacta tbody,
    .tabela-computadores-compacta th,
    .tabela-computadores-compacta td,
    .tabela-computadores-compacta tr {
        display: block;
        width: 100% !important;
    }
    .tabela-computadores-compacta thead { display: none; }
    .tabela-computadores-compacta tr {
        border: 1px solid var(--border);
        border-radius: 16px;
        margin: 0 0 12px;
        padding: 8px 10px;
        background: var(--surface);
        box-shadow: var(--shadow);
    }
    .tabela-computadores-compacta td {
        border-bottom: 1px solid var(--border);
        padding: 8px 0;
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        font-size: 13px;
    }
    .tabela-computadores-compacta td::before {
        content: attr(data-label);
        color: var(--muted);
        font-weight: 900;
        font-size: 12px;
    }
    .tabela-computadores-compacta td:last-child { border-bottom: 0; }
    .tabela-computadores-compacta .col-acoes { text-align: left; }
    .tabela-computadores-compacta .acoes-clean { justify-content: flex-start; }
}
@media (max-width: 520px) {
    .tabela-computadores-compacta td { grid-template-columns: 1fr; gap: 4px; }
}

/* Versão 0044 - ações de título e botão PDF */
.page-title-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px;}
.page-title-actions h2{margin:0;}
.btn-pdf{font-weight:700;letter-spacing:.02em;}
@media (max-width: 640px){.page-title-actions{align-items:stretch;flex-direction:column}.page-title-actions .btn{width:100%;}}

/* Versão 0044 - Logs do Sistema */
.metricas-lista {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.metric-mini {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    background: var(--surface);
}
.metric-mini strong {
    display: block;
    font-size: 22px;
    line-height: 1.1;
}
.metric-mini span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.logs-table {
    font-size: 13px;
}
.logs-table th,
.logs-table td {
    vertical-align: top;
    white-space: normal;
    word-break: break-word;
}
.logs-table th:nth-child(1), .logs-table td:nth-child(1) { width: 120px; }
.logs-table th:nth-child(2), .logs-table td:nth-child(2) { width: 150px; }
.logs-table th:nth-child(3), .logs-table td:nth-child(3) { width: 95px; }
.logs-table th:nth-child(4), .logs-table td:nth-child(4) { width: 130px; }
.logs-table th:nth-child(5), .logs-table td:nth-child(5) { width: 150px; }
.logs-table th:nth-child(7), .logs-table td:nth-child(7) { width: 110px; }
@media (max-width: 860px) {
    .metricas-lista { grid-template-columns: 1fr; }
    .logs-table-wrap { overflow-x: visible; border: 0; }
    .logs-table, .logs-table thead, .logs-table tbody, .logs-table th, .logs-table td, .logs-table tr {
        display: block;
        width: 100% !important;
    }
    .logs-table thead { display: none; }
    .logs-table tr {
        border: 1px solid var(--border);
        border-radius: 16px;
        margin-bottom: 12px;
        padding: 10px;
        background: var(--surface);
        box-shadow: var(--shadow);
    }
    .logs-table td {
        border-bottom: 1px solid var(--border);
        display: grid;
        grid-template-columns: 120px minmax(0, 1fr);
        gap: 10px;
        padding: 8px 0;
    }
    .logs-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-weight: 900;
        font-size: 12px;
    }
    .logs-table td:last-child { border-bottom: 0; }
}
@media (max-width: 520px) {
    .logs-table td { grid-template-columns: 1fr; gap: 4px; }
}

/* Versão 0044 - Sobre o Sistema */
.info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:12px}
.info-grid div{border:1px solid var(--border);background:var(--surface-2);border-radius:14px;padding:14px}
.info-grid span{display:block;color:var(--muted);font-size:12px;font-weight:800;margin-bottom:5px}
.info-grid strong{display:block;font-size:14px;color:var(--text)}
.sobre-descricao{margin-top:16px;line-height:1.6}
.tabela-sobre-sistema td{vertical-align:top}
.tabela-sobre-sistema td:last-child{min-width:320px;line-height:1.45}
@media (max-width: 860px){.info-grid{grid-template-columns:1fr}.tabela-sobre-sistema td:last-child{min-width:220px}}


/* Ajustes v44 - botão de tema em ícone */
.btn-tema-icone {
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 999px;
    font-size: 18px;
    line-height: 1;
}
@media (max-width: 760px) {
    .topbar-actions .btn-tema-icone {
        width: 42px;
        min-width: 42px;
        height: 42px;
        justify-self: start;
    }
}
