/* ════════════════════════════════════════════════
   LABSANIMAL — Sistema de Formulários
   ════════════════════════════════════════════════ */

:root {
    --doc-header: #d9d9d9;
    --doc-sub-h:  #ebebeb;
    --doc-border: #555;
    --blue:       #1a6fc4;
    --blue-light: #dbeafe;
    --green:      #16a34a;
    --green-light:#dcfce7;
    --yellow:     #ca8a04;
    --yellow-light:#fef9c3;
    --orange:     #ea580c;
    --orange-light:#ffedd5;
    --red:        #dc2626;
    --red-light:  #fee2e2;
    --gray:       #6b7280;
    --gray-light: #f3f4f6;
    --font:       'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    font-size: 13px;
    color: #1f2937;
    background: #f9fafb;
    min-height: 100vh;
}

/* ── APP BAR ─────────────────────────────────── */
.app-bar {
    position: sticky; top: 0; z-index: 100;
    background: #1e293b;
    color: #fff;
    height: 52px;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.app-bar-inner {
    max-width: 1400px; margin: 0 auto;
    height: 100%;
    display: flex; align-items: center; gap: 16px; padding: 0 16px;
}
.app-brand { display: flex; align-items: center; gap: 8px; }
.app-logo   { height: 28px; width: auto; }
.app-name   { font-weight: 700; font-size: 15px; letter-spacing: .5px; color: #fff; }
.app-sector-badge {
    font-size: 11px; font-weight: 600; letter-spacing: .8px;
    padding: 3px 10px; border-radius: 20px; background: rgba(255,255,255,.15);
    color: #e2e8f0;
}
.app-user-info {
    margin-left: auto; display: flex; align-items: center; gap: 10px;
}
.app-username { font-size: 13px; color: #cbd5e1; }
.form-actions-bar {
    margin-left: auto; display: flex; gap: 8px;
}

/* ── BUTTONS ─────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 500;
    cursor: pointer; border: none; text-decoration: none; transition: .15s;
    white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary  { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1558a0; }
.btn-outline  { background: transparent; color: #e2e8f0; border: 1px solid rgba(255,255,255,.3); }
.btn-outline:hover { background: rgba(255,255,255,.1); }
.btn-danger   { background: var(--red); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm       { padding: 4px 10px; font-size: 12px; }
.btn-block    { width: 100%; justify-content: center; }

/* Buttons no contexto de fundo branco */
.dashboard-right .btn-outline,
.dashboard-left  .btn-outline,
.fila-panel      .btn-outline,
.history-panel   .btn-outline {
    color: var(--gray); border-color: #d1d5db;
}
.dashboard-right .btn-outline:hover,
.fila-panel      .btn-outline:hover,
.history-panel   .btn-outline:hover { background: var(--gray-light); }

/* ── FLASH MESSAGES ──────────────────────────── */
.flash-container { max-width: 900px; margin: 12px auto 0; padding: 0 16px; }
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 8px; font-size: 13px; }
.flash-success { background: var(--green-light); color: #15803d; border: 1px solid #bbf7d0; }
.flash-danger  { background: var(--red-light);   color: #991b1b; border: 1px solid #fecaca; }
.flash-warning { background: var(--yellow-light); color: #92400e; border: 1px solid #fde68a; }
.flash-info    { background: var(--blue-light);   color: #1e40af; border: 1px solid #bfdbfe; }

/* ── MAIN ────────────────────────────────────── */
.app-main { max-width: 1400px; margin: 0 auto; padding: 20px 16px; }

/* ── LOGIN ───────────────────────────────────── */
body.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-container { width: 100%; max-width: 380px; padding: 0 16px; }
.login-card {
    background: #fff; border-radius: 12px; padding: 36px 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,.1);
}
.login-logo { text-align: center; margin-bottom: 16px; }
.login-logo img { height: 52px; }
.login-title { text-align: center; font-size: 20px; font-weight: 700; color: #1e293b; }
.login-subtitle { text-align: center; font-size: 13px; color: var(--gray); margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: #374151; margin-bottom: 5px; }
.form-control {
    width: 100%; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 6px;
    font-size: 13px; font-family: var(--font);
}
.form-control:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-light); }
.login-card .btn-primary { margin-top: 8px; }

/* ── DASHBOARD LAYOUT ────────────────────────── */
.dashboard-layout {
    display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start;
}
@media (max-width: 900px) {
    .dashboard-layout { grid-template-columns: 1fr; }
}

.dashboard-welcome { background: #fff; border-radius: 10px; padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.dashboard-welcome h2 { font-size: 18px; margin-bottom: 8px; }
.dashboard-welcome p  { font-size: 13px; color: var(--gray); }
.alert { padding: 10px 14px; border-radius: 6px; margin-top: 16px; font-size: 13px; }
.alert-warning { background: var(--yellow-light); color: #92400e; border: 1px solid #fde68a; }

/* ── FILA PENDENTE (Laudos) ──────────────────── */
.fila-panel { background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.fila-panel h3 { font-size: 14px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.fila-badge {
    background: var(--blue); color: #fff; border-radius: 10px;
    padding: 1px 7px; font-size: 11px;
}
.fila-empty { font-size: 13px; color: var(--gray); padding: 12px 0; }
.fila-item {
    border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px; margin-bottom: 8px;
}
.fila-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.fila-nprova { font-weight: 600; font-size: 14px; }
.fila-data { font-size: 12px; color: var(--gray); }
.fila-item-meta { font-size: 12px; color: var(--gray); }

/* ── HISTÓRICO ───────────────────────────────── */
.history-panel { background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.history-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.history-header h3 { font-size: 14px; font-weight: 600; }
.history-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.filter-select, .filter-input {
    padding: 5px 8px; border: 1px solid #d1d5db; border-radius: 5px;
    font-size: 12px; font-family: var(--font); background: #fff;
}
.history-empty { font-size: 13px; color: var(--gray); padding: 12px 0; }
.history-item {
    display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto;
    gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid #f3f4f6;
}
.history-item:last-child { border-bottom: none; }
.history-item.item-correcao { background: #fff7ed; margin: 0 -16px; padding: 10px 16px; }
.history-item-main { display: flex; align-items: center; gap: 10px; }
.history-nprova { font-weight: 600; font-size: 13px; }
.history-item-meta { font-size: 12px; color: var(--gray); display: flex; gap: 10px; flex-wrap: wrap; }
.history-motivo { color: var(--orange); font-weight: 500; }
.history-item-actions { grid-column: 2; grid-row: 1 / 3; display: flex; align-items: center; gap: 6px; }

/* ── STATUS BADGES ───────────────────────────── */
.status-badge {
    font-size: 11px; font-weight: 600; letter-spacing: .4px;
    padding: 2px 8px; border-radius: 12px; white-space: nowrap;
}
.status-rascunho    { background: #f3f4f6; color: #374151; }
.status-aguard      { background: var(--yellow-light); color: var(--yellow); }
.status-em-laudos   { background: var(--blue-light);   color: var(--blue); }
.status-correcao    { background: var(--orange-light);  color: var(--orange); }
.status-concluido   { background: var(--green-light);   color: var(--green); }

/* ── FORM WRAPPER ────────────────────────────── */
.form-wrapper  { max-width: 920px; margin: 0 auto; overflow-x: auto; }
.print-wrapper { max-width: 920px; margin: 0 auto; overflow-x: auto; }

/* ── DOCUMENTO ───────────────────────────────── */
.doc {
    background: #fff;
    border: 2px solid var(--doc-border);
    font-size: 12px;
    page-break-after: always;
    min-width: 580px;   /* impede colapso em mobile — wrapper faz scroll */
}

/* ── DOC HEAD ────────────────────────────────── */
/*
 * Razão de aspecto da logo SANIMAL: 262×61px = 4,30:1
 * Coluna antiga (80px) → logo a 52px de altura = 224px de largura → extravasa
 * Coluna nova (180px) → logo a ~39px de altura = 165px → cabe sem overflow
 */
.dh-top {
    display: grid;
    grid-template-columns: 180px 1fr 180px;
    border-bottom: 1.5px solid var(--doc-border);
}
.dh-logo {
    padding: 6px 8px;
    border-right: 1.5px solid var(--doc-border);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;   /* garante que nenhum overflow vaze para o título */
}
.dh-logo img {
    display: block;
    width: 100%;        /* preenche a largura disponível do container */
    height: auto;       /* mantém proporção natural */
    max-height: 50px;   /* teto de altura para logos pequenas */
    object-fit: contain;
}
.dh-title {
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; letter-spacing: 1px;
    background: var(--doc-header);
    border-right: 1.5px solid var(--doc-border);
    padding: 6px;
}
.dh-nprova {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 6px; gap: 3px;
}

.dh-dates {
    display: flex; justify-content: space-between;
    padding: 5px 8px;
    border-bottom: 1.5px solid var(--doc-border);
    gap: 12px; flex-wrap: wrap;
}
.dh-dates-left {
    display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
}
.dh-dates-right {
    display: flex; align-items: center; gap: 5px; flex-wrap: nowrap;
    white-space: nowrap; flex-shrink: 0;
}

.dh-body {
    display: grid; grid-template-columns: 1fr 1fr;
    border-bottom: 1.5px solid var(--doc-border);
}
.dh-left  { padding: 6px 8px; border-right: 1.5px solid var(--doc-border); }
.dh-right { padding: 6px 8px; }

.dh-sec-header {
    background: var(--doc-header);
    font-weight: 700; font-size: 10px; letter-spacing: .6px;
    padding: 3px 6px; margin: 6px -8px 4px;
    display: flex; align-items: center; justify-content: space-between;
}
.dh-sec-center { justify-content: center; }
.dh-sol-subheader {
    font-weight: 600; font-size: 10px; letter-spacing: .4px;
    padding: 2px 0; margin: 4px 0 2px; color: #374151;
}

.dh-3col-labels {
    display: grid; grid-template-columns: 1fr 1fr 1fr;
    gap: 3px; font-size: 9px; font-weight: 600; color: var(--gray);
    text-align: center; margin-bottom: 2px;
}
.dh-3col-inputs {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3px;
}

.dh-temp { margin-bottom: 4px; }
.dh-temp-label { font-size: 10px; font-weight: 600; display: block; margin-bottom: 3px; }
.dh-temp-fields { display: flex; gap: 6px; }
.dh-temp-col { display: flex; align-items: center; gap: 3px; }

.dh-equip-row { display: flex; align-items: center; gap: 5px; margin-bottom: 3px; flex-wrap: wrap; }
.dh-equip-row-2 { margin-bottom: 0; }
.dh-equip-label { font-size: 10px; font-weight: 600; white-space: nowrap; }
.dh-equip-label-2 { margin-left: 6px; }
.dh-equip-input { flex: 1; min-width: 60px; }

.dh-resp {
    border-top: 1.5px solid var(--doc-border); padding: 5px 8px;
    background: var(--doc-sub-h);
}
.dh-resp-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-bottom: 3px; }
.dh-resp-row:last-child { margin-bottom: 0; }
.dh-resp-input      { flex: 1; min-width: 80px; max-width: 200px; }
.dh-resp-input-full { flex: 1; min-width: 120px; }
.dh-sep, .dh-sep2   { margin-left: 8px; }

/* ── FIELD LABEL / INPUT ─────────────────────── */
.fl { font-size: 10px; font-weight: 600; white-space: nowrap; }
.fi {
    border: none; border-bottom: 1px solid #555;
    background: transparent; font-family: var(--font); font-size: 12px;
    padding: 1px 4px; outline: none; width: 100%;
}
.fi:focus { border-bottom-color: var(--blue); background: var(--blue-light); }
.fi[readonly] { background: transparent; cursor: default; border-bottom-color: transparent; }
.fi-center { text-align: center; }
.fi-sm   { width: 64px; }
.fi-temp { width: 52px; }
.fi-pg   { width: 28px; text-align: center; }

/* Print-only value spans */
.print-val {
    display: inline-block; border-bottom: 1px solid #555;
    padding: 1px 4px; font-size: 12px; min-width: 60px;
}

/* ── RESULTS TABLE ───────────────────────────── */
.rt-toolbar {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 7px 10px;
    background: var(--doc-sub-h);
    border-top: 1.5px solid var(--doc-border);
    border-bottom: 1px solid #ccc;
}
.rt-summary { display: flex; gap: 6px; }
.summary-chip {
    font-size: 11px; font-weight: 600; padding: 2px 9px;
    border-radius: 12px;
}
.chip-n   { background: #f3f4f6; color: #374151; }
.chip-pos { background: var(--red-light);   color: var(--red); }
.chip-re  { background: var(--yellow-light); color: var(--yellow); }
.rt-legend { display: flex; gap: 10px; font-size: 11px; color: var(--gray); }
.lp { font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 3px; }
.lp-n   { background: #f3f4f6; color: #374151; }
.lp-pos { background: var(--red-light);   color: var(--red); }
.lp-re  { background: var(--yellow-light); color: var(--yellow); }
.btn-all-n {
    margin-left: auto; font-size: 11px; padding: 3px 10px;
    border: 1px solid #d1d5db; border-radius: 4px; cursor: pointer;
    background: #fff; font-family: var(--font);
}
.btn-all-n:hover { background: var(--gray-light); }

.rt-wrap { overflow-x: auto; }
.rt {
    width: 100%; border-collapse: collapse;
    border-top: 1.5px solid var(--doc-border);
}
.rt th {
    background: var(--doc-header); font-size: 9.5px; font-weight: 700;
    letter-spacing: .4px; text-align: center;
    padding: 4px 3px; border: 1px solid var(--doc-border);
}
.rt td {
    border: 1px solid #ccc; padding: 2px 3px; vertical-align: middle;
}
.rt-row-first td { border-top: 1px solid var(--doc-border); }

.rt-h-lamina { width: 52px; }
.rt-h-prova  { width: 68px; }
.rt-h-etiq   { width: 100px; }
.rt-h-result { width: 88px; }
.rt-h-reg    { width: 90px; }
.rt-h-obs    { }

.rt-lamina { text-align: center; background: var(--doc-sub-h); }
.lamina-num  { display: block; font-weight: 700; font-size: 14px; text-align: center; }
.lamina-letra { display: block; font-size: 11px; text-align: center; color: var(--gray); }
input.lamina-num, input.lamina-letra {
    display: block; width: 100%; text-align: center;
    border: none; border-bottom: 1px solid #999;
    background: transparent; font-family: var(--font);
    outline: none;
}
input.lamina-num  { font-size: 14px; font-weight: 700; }
input.lamina-letra { font-size: 11px; }

.rt-prova { text-align: center; padding: 4px; }
.prova-svg svg { overflow: visible; }

/* RESULTADO BUTTONS */
.rbtn-group { display: flex; gap: 2px; justify-content: center; }
.rbtn {
    font-size: 10px; font-weight: 700; padding: 2px 6px;
    border-radius: 3px; cursor: pointer; border: 1px solid transparent;
    font-family: var(--font); transition: .12s;
    background: #f3f4f6; color: #6b7280;
}
.rbtn-n.active   { background: #e5e7eb; color: #111827; border-color: #9ca3af; }
.rbtn-pos.active { background: var(--red-light);    color: var(--red);    border-color: #fca5a5; }
.rbtn-re.active  { background: var(--yellow-light); color: var(--yellow); border-color: #fde68a; }
.rbtn:hover { opacity: .8; }

.result-readonly {
    display: inline-block; font-size: 10px; font-weight: 700;
    padding: 2px 7px; border-radius: 3px; text-align: center;
}
.result-n        { background: #e5e7eb; color: #111827; }
.result-positivo { background: var(--red-light); color: var(--red); }
.result-reensaio { background: var(--yellow-light); color: var(--yellow); }
.result-print    { font-size: 10px; font-weight: 700; }

.ro-field { font-size: 12px; }
.ro-val   { display: block; text-align: center; }

.etiq-input { font-size: 11px; }

/* ── VALIDAÇÃO DE CAMPOS OBRIGATÓRIOS ───────── */
.fi-invalid {
    border-bottom-color: var(--red) !important;
    background: #fff5f5 !important;
}
.fi-invalid:focus {
    border-bottom-color: var(--red) !important;
    box-shadow: 0 0 0 2px #fee2e2;
    background: #fff5f5 !important;
}
.validation-banner {
    display: none;
    background: var(--red-light);
    border: 1px solid #fca5a5;
    color: #991b1b;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 500;
}
.validation-banner.visible { display: block; }

/* ── READONLY SECTION (Laudos form) ──────────── */
.ro-section { position: relative; background: #fafafa; }
.ro-overlay-label {
    font-size: 10px; font-weight: 600; color: var(--gray);
    letter-spacing: .5px; background: #f3f4f6;
    padding: 3px 10px; text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

/* ── LAUDOS ACTION BAR ───────────────────────── */
/* Fica FORA de .doc (acima da borda do formulário) */
.laudos-action-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; background: #fff;
    border: 1px solid #e5e7eb; border-radius: 8px;
    margin-bottom: 10px;
    gap: 12px; flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.laudos-status { display: flex; align-items: center; gap: 10px; }
.laudos-nprova { font-weight: 600; font-size: 14px; color: #1e293b; }
.laudos-btns   { display: flex; gap: 8px; flex-wrap: wrap; }

/* Botões dentro da action bar: fundo branco → texto escuro */
.laudos-action-bar .btn-outline {
    color: #374151;
    border-color: #d1d5db;
}
.laudos-action-bar .btn-outline:hover { background: #f3f4f6; }

/* Span para exibir horário (somente leitura) sem truncamento */
.fi-time-ro {
    display: inline-block;
    border-bottom: 1px solid #555;
    padding: 1px 4px;
    font-size: 12px;
    min-width: 42px;
    text-align: center;
}

/* ── MODAL ───────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 500;
}
.modal-overlay[hidden] { display: none; }
.modal-box {
    background: #fff; border-radius: 10px; padding: 28px;
    max-width: 480px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.modal-box h3  { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.modal-box p   { font-size: 13px; color: var(--gray); margin-bottom: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.required      { color: var(--red); }
.form-control  { resize: vertical; }

/* ── DOC FOOTER ──────────────────────────────── */
.doc-footer {
    border-top: 1.5px solid var(--doc-border);
    display: flex; justify-content: space-between;
    padding: 4px 8px; background: var(--doc-sub-h);
    font-size: 10px;
}

/* ── SECTOR BADGE — variante admin ──────────── */
.sector-admin { background: rgba(245,158,11,.25); color: #fef3c7; }

/* ── ADMIN DASHBOARD ─────────────────────────── */
.dash-header   { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px;
                 justify-content: space-between; margin-bottom: 16px; }
.dash-title    { font-size: 18px; font-weight: 700; color: #1e293b; }
.dash-stats    { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stat-chip     { font-size: 12px; background: #f1f5f9; border: 1px solid #e2e8f0;
                 border-radius: 12px; padding: 2px 10px; color: #475569; }
.stat-chip strong { color: #1e293b; }
.table-wrapper { overflow-x: auto; }
.data-table    { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { background: #f8fafc; text-align: left; padding: 8px 10px;
                 border-bottom: 2px solid #e2e8f0; font-weight: 600; color: #475569;
                 white-space: nowrap; }
.data-table td { padding: 7px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f8fafc; }
.td-actions    { display: flex; gap: 6px; }
.empty-state   { color: #9ca3af; text-align: center; padding: 40px 0; }

/* ── ADMIN — GESTÃO DE USUÁRIOS ─────────────── */
.back-link {
    font-size: 12px; color: var(--gray); text-decoration: none; display: inline-block; margin-top: 2px;
}
.back-link:hover { color: var(--blue); }

.btn-new-user { align-self: flex-start; }

.btn-table { color: #374151 !important; border-color: #d1d5db !important; }
.btn-table:hover { background: var(--gray-light) !important; }

.btn-outline-dark {
    display: inline-flex; align-items: center;
    padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 500;
    cursor: pointer; text-decoration: none; transition: .15s;
    background: transparent; color: #374151; border: 1px solid #d1d5db;
}
.btn-outline-dark:hover { background: var(--gray-light); }

.btn-danger-soft  { background: var(--red-light);   color: var(--red);   border: 1px solid #fca5a5; }
.btn-success-soft { background: var(--green-light);  color: var(--green); border: 1px solid #86efac; }
.btn-danger-soft:hover  { background: #fecaca; }
.btn-success-soft:hover { background: #bbf7d0; }

.role-badge {
    font-size: 11px; font-weight: 600; letter-spacing: .4px;
    padding: 2px 8px; border-radius: 12px; white-space: nowrap;
}
.role-user       { background: var(--blue-light);   color: var(--blue); }
.role-admin      { background: var(--yellow-light);  color: var(--yellow); }
.role-superadmin { background: var(--orange-light);  color: var(--orange); }

.row-inativo td { opacity: .55; }
.user-code { font-family: monospace; font-size: 12px; background: #f1f5f9; padding: 1px 5px; border-radius: 3px; }
.force-badge { font-size: 11px; background: var(--yellow-light); color: var(--yellow); padding: 1px 7px; border-radius: 10px; }
.td-center { text-align: center; }
.modal-subtitle { font-size: 13px; color: var(--gray); margin-bottom: 14px; }

/* Admin form card */
.admin-form-wrapper { max-width: 600px; margin: 0 auto; }
.admin-form-card {
    background: #fff; border-radius: 10px; padding: 28px 32px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.admin-form-header { margin-bottom: 24px; }

.form-label { display: block; font-size: 12px; font-weight: 600; color: #374151; margin-bottom: 5px; }
.form-hint  { display: block; font-size: 11px; color: var(--gray); margin-top: 3px; }
.form-group { margin-bottom: 18px; }
.form-control-ro { background: #f9fafb; color: var(--gray); cursor: default; }

.form-row-2 {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 520px) { .form-row-2 { grid-template-columns: 1fr; } }

.form-checks-group { margin-bottom: 24px; display: flex; flex-direction: column; gap: 10px; }
.check-label {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 13px; cursor: pointer;
}
.check-label input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; }

.form-submit-row {
    display: flex; justify-content: flex-end; gap: 10px;
    padding-top: 8px; border-top: 1px solid #f1f5f9;
}

/* ── PRINT ───────────────────────────────────── */
@page {
    size: A4 portrait;
    margin: 1cm 1.5cm;
}

@media print {
    /* Garantir que backgrounds e cores apareçam no PDF */
    *, *::before, *::after {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Ocultar elementos de navegação */
    .app-bar, .app-main > .flash-container, .laudos-action-bar,
    .rt-toolbar, .no-print, .btn, form .btn { display: none !important; }

    /* Reset de layout para impressão */
    body { background: #fff; margin: 0; padding: 0; }
    .app-main { padding: 0; max-width: 100%; }
    .form-wrapper, .print-wrapper { max-width: 100%; padding: 0; margin: 0; overflow: visible; }

    /* Documento */
    .doc { border: 2px solid #000; min-width: 0; page-break-after: always; }
    .doc:last-child { page-break-after: avoid; }

    /* Logo — mantém proporção no PDF */
    .dh-logo img { max-height: 50px; width: 100%; height: auto; }

    /* Campos de texto */
    .fi, .fi-time-ro, .print-val { border-bottom-color: #000; }
    input, select, textarea { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

    /* Tabela de resultados */
    .rt-wrap { overflow: visible; }
    .rt { page-break-inside: auto; }
    .rt tr { page-break-inside: avoid; page-break-after: auto; }

    /* Cabeçalhos de seção (cinza) */
    .dh-sec-header { background: #d9d9d9 !important; }
    .dh-resp        { background: #ebebeb !important; }
    .rt th          { background: #d9d9d9 !important; }
    .doc-footer     { background: #ebebeb !important; }
}
