/* ASO Controle · visual do design system Zelo (DESIGN-SYSTEM.md, 06/11/2026). */
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Manrope:wght@400;500;600&display=swap");
:root{
  --primary:#1B8578;--primary-hover:#166E63;--primary-soft:#E6F3F1;--ink:#102A33;--accent:#00B8A4;
  --gray-50:#F6F8F9;--gray-100:#ECF1F2;--gray-200:#DCE4E7;--gray-400:#8FA1A7;--gray-600:#566B73;
  --alert-soft:#FDF0E8;--alert:#F2956B;--alert-ink:#3A1A0E;--alert-strong:#A84B24;
  --success:#16A34A;--success-bg:#DCFCE7;--success-fg:#14532D;
  --warning:#D97706;--warning-bg:#FEF3C7;--warning-fg:#78350F;
  --danger:#DC2626;--danger-bg:#FEE2E2;--danger-fg:#7F1D1D;
  --info:#2563EB;--info-bg:#DBEAFE;--info-fg:#1E3A8A;
  --shadow-sm:0 1px 2px rgb(16 42 51/.05);--shadow-md:0 4px 12px rgb(16 42 51/.08);--shadow-lg:0 12px 32px rgb(16 42 51/.12);
  --font-sans:Manrope,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;--font-mono:"JetBrains Mono",ui-monospace,Menlo,monospace;
  --logo-symbol:url(./brand/zelo-simbolo.png);--logo-word:url(./brand/zelo-palavra.png);
}
*{box-sizing:border-box}
html{background:var(--gray-50);color:var(--ink);font-family:var(--font-sans);font-size:14px;line-height:20px}
body{margin:0;background:var(--gray-50)}
button,input,select{font:inherit;color:inherit}
button{cursor:pointer}
h1,h2,h3{margin:0;font-weight:600}
h1{font-size:24px;line-height:32px}h2{font-size:20px;line-height:28px}h3{font-size:16px;line-height:24px}
p{margin:0;color:var(--gray-600)}
strong,b{font-weight:600}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.icon{width:16px;height:16px;flex:none}

/* Estrutura */
.app-shell{min-height:100vh;display:grid;grid-template-columns:240px minmax(0,1fr)}
.sidebar{background:var(--ink);color:#A9BCC2;padding:24px 12px;display:flex;flex-direction:column;gap:24px;position:sticky;top:0;height:100vh;z-index:30}
.sidebar-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.logo{display:flex;align-items:center;gap:12px;padding:4px 12px}
.brandmark{flex:none;width:40px;height:40px;background:#fff;-webkit-mask:var(--logo-symbol) center/contain no-repeat;mask:var(--logo-symbol) center/contain no-repeat}
.wordmark{display:block;width:60px;height:22px;margin-bottom:4px;background:#fff;-webkit-mask:var(--logo-word) left center/contain no-repeat;mask:var(--logo-word) left center/contain no-repeat}
.logo small{color:#A9BCC2;font-size:12px;line-height:16px;white-space:nowrap}
.menu-toggle{display:none;width:44px;height:44px;border:1px solid #1E4250;border-radius:8px;background:transparent;color:#fff;align-items:center;justify-content:center}
.menu-toggle .icon{width:20px;height:20px}
.menu{display:grid;gap:4px}
.navbtn{background:transparent;border:0;text-align:left;border-radius:8px;min-height:40px;padding:0 12px;color:#A9BCC2;display:flex;gap:12px;align-items:center}
.navbtn .icon{width:20px;height:20px}
.navbtn:hover{background:#1E4250;color:#fff}
.navbtn.active{background:#1E4250;color:#fff;font-weight:500}
.navbtn.active .icon{color:var(--accent)}
.navbtn:disabled{opacity:.5;cursor:not-allowed;background:transparent}
.nav-count{margin-left:auto;min-width:20px;height:20px;padding:0 6px;border-radius:9999px;background:var(--alert);color:var(--alert-ink);font-size:12px;line-height:20px;font-weight:500;text-align:center;font-variant-numeric:tabular-nums}
.sidebottom{margin-top:auto;padding:12px;display:grid;gap:4px;font-size:12px;line-height:16px}
.sidebottom strong{color:#fff;font-weight:500}
.main{padding:24px;min-width:0;max-width:1328px;width:100%;margin:0 auto;display:flex;flex-direction:column;gap:24px}
.topline{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap}
.topline h1{margin:4px 0}
.eyebrow{color:var(--gray-600);font-size:13px;line-height:18px}
.toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}

/* Botões */
.button{height:40px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid transparent;border-radius:8px;padding:0 16px;font-weight:500;white-space:nowrap;text-decoration:none;transition:background .15s,border-color .15s}
.button:disabled{background:var(--gray-100)!important;color:var(--gray-400)!important;border-color:var(--gray-200)!important;cursor:not-allowed}
.button-sm{height:32px;padding:0 12px}
.button-primary{background:var(--primary);color:#fff}
.button-primary:hover{background:var(--primary-hover)}
.button-secondary{background:#fff;border-color:var(--gray-200);color:var(--ink)}
.button-secondary:hover{background:var(--gray-100)}
.button-tonal{background:var(--primary-soft);color:var(--primary-hover)}
.button-tonal:hover{background:#D3EBE7}
.button-ghost{background:transparent;color:var(--gray-600)}
.button-ghost:hover{background:var(--gray-100);color:var(--ink)}
.button-ghost.danger-link{color:#B91C1C}
.button-ghost.danger-link:hover{background:var(--danger-bg)}
.button-danger{background:var(--danger);color:#fff}
.button-danger:hover{background:#B91C1C}
.button-alert{background:var(--alert-strong);color:#fff}
.button-alert:hover{background:#8F3F1E}

/* Banners */
.banner{display:flex;align-items:center;gap:12px;padding:12px 16px;border:1px solid;border-radius:12px}
.banner>.icon{width:20px;height:20px}
.banner>span{flex:1}
.banner-alert{background:var(--alert-soft);border-color:var(--alert);color:var(--alert-strong)}
.banner-error{background:var(--danger-bg);border-color:var(--danger);color:var(--danger-fg)}
.banner-info{background:var(--info-bg);border-color:var(--info);color:var(--info-fg)}

/* Cards e indicadores */
.card{background:#fff;border:1px solid var(--gray-200);border-radius:12px;box-shadow:var(--shadow-sm)}
.stats-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}
.stat-card{appearance:none;text-align:left;background:#fff;border:1px solid var(--gray-200);border-radius:12px;box-shadow:var(--shadow-sm);padding:20px;display:flex;flex-direction:column;gap:4px;transition:box-shadow .15s,border-color .15s}
.stat-card:hover{box-shadow:var(--shadow-md)}
.stat-card[aria-pressed=true]{border-color:var(--primary);box-shadow:0 0 0 1px var(--primary),var(--shadow-sm);background:var(--primary-soft)}
.stat-label{color:var(--gray-600);font-size:13px;line-height:18px}
.stat-card strong{font-size:32px;line-height:40px;font-weight:600;font-variant-numeric:tabular-nums}
.stat-card small{display:flex;align-items:center;gap:6px;font-size:12px;line-height:16px;font-weight:500;color:var(--gray-600)}
.status-dot{width:6px;height:6px;border-radius:50%;background:currentColor;flex:none}
.stat-neutral small .status-dot{color:var(--gray-400)}
.stat-danger small{color:#B91C1C}
.stat-warning small{color:var(--warning-fg)}
.stat-info small{color:var(--info-fg)}
.stat-success small{color:var(--success-fg)}

/* Tabela da equipe */
.records-section{overflow:hidden;scroll-margin-top:24px}
.records-header{display:flex;flex-direction:column;gap:16px;padding:20px 20px 16px}
.records-title{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.record-count{background:var(--gray-100);color:var(--gray-600);border-radius:9999px;padding:2px 10px;font-size:12px;line-height:16px;font-weight:500;font-variant-numeric:tabular-nums}
.record-tools{display:grid;grid-template-columns:minmax(260px,1.6fr) minmax(180px,1fr) minmax(160px,.8fr);gap:12px;align-items:end}
label{display:flex;flex-direction:column;gap:4px}
label>span{color:var(--ink);font-weight:500}
.req{color:var(--danger);margin-left:2px}
input,select{width:100%;height:40px;padding:0 12px;border:1px solid var(--gray-200);border-radius:8px;background:#fff;color:var(--ink);box-shadow:var(--shadow-sm);transition:border-color .15s}
input::placeholder{color:var(--gray-400)}
input:focus,select:focus{outline:2px solid var(--accent);outline-offset:2px;border-color:var(--primary)}
input:disabled,select:disabled{background:var(--gray-100);color:var(--gray-400)}
input[type=date]{font-variant-numeric:tabular-nums}
.search-box{position:relative;align-self:end}
.search-box .icon{position:absolute;left:12px;top:12px;color:var(--gray-400)}
.search-box input{padding-left:36px}
.compact-select>span{color:var(--gray-600);font-size:13px;line-height:18px;font-weight:400}
.filter-tabs{display:flex;gap:24px;padding:0 20px;border-bottom:1px solid var(--gray-200);overflow-x:auto}
.filter-tabs button{min-height:44px;padding:0;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--gray-600);font-weight:500;white-space:nowrap}
.filter-tabs button:hover{color:var(--ink)}
.filter-tabs button.active{color:var(--ink);border-bottom-color:var(--primary)}
.priority-guide{display:flex;align-items:flex-start;gap:8px;margin:16px 20px;color:var(--gray-600);font-size:13px;line-height:18px}
.priority-guide .icon{margin-top:1px;color:var(--gray-400)}
.priority-guide strong,.priority-guide b{color:var(--ink);font-weight:500}
.table-wrap{overflow-x:auto}
table{width:100%;min-width:980px;border-collapse:collapse}
th{position:sticky;top:0;background:var(--gray-100);color:var(--gray-600);font-size:12px;line-height:16px;font-weight:500;text-align:left;padding:12px;white-space:nowrap;border-bottom:1px solid var(--gray-200)}
th:first-child,td:first-child{padding-left:20px}
th:last-child,td:last-child{padding-right:20px}
th small{font-weight:400}
td{padding:12px;border-bottom:1px solid var(--gray-200);vertical-align:middle}
tbody tr:hover{background:var(--gray-50)}
tbody tr:last-child td{border-bottom:0}
.person-cell{display:flex;align-items:center;gap:12px;min-width:200px}
.person-cell>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.person-cell strong{font-weight:500}
.person-cell span{color:var(--gray-600);font-size:13px;line-height:18px}
.person-cell .cpf-value{font-family:var(--font-mono);font-size:12px;line-height:16px;color:var(--ink)}
.avatar{width:32px;height:32px;flex:0 0 32px;border-radius:50%;display:grid;place-items:center;background:var(--primary-soft);color:var(--primary-hover);font-size:12px;line-height:16px;font-weight:500}
.post-label{color:var(--primary-hover)!important;font-weight:500}
.post-label.post-missing{color:var(--gray-400)!important;font-weight:400}
.document-cell{display:flex;flex-direction:column;gap:2px;min-width:140px}
.document-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:2px}
.document-top strong{font-weight:500}
.document-cell>span{color:var(--gray-600);font-size:13px;line-height:18px;font-variant-numeric:tabular-nums}
.status,.priority-badge{display:inline-flex;align-items:center;gap:6px;width:max-content;padding:2px 10px;border-radius:9999px;font-size:12px;line-height:16px;font-weight:500;white-space:nowrap}
.status-expired,.priority-critical{background:var(--danger-bg);color:var(--danger-fg)}
.status-expired .status-dot,.priority-critical .status-dot{color:var(--danger)}
.status-warning,.priority-attention{background:var(--warning-bg);color:var(--warning-fg)}
.status-warning .status-dot,.priority-attention .status-dot{color:var(--warning)}
.status-regular,.priority-regular{background:var(--success-bg);color:var(--success-fg)}
.status-regular .status-dot,.priority-regular .status-dot{color:var(--success)}
.status-pending{background:var(--gray-100);color:var(--gray-600)}
.status-pending .status-dot{color:var(--gray-400)}
.priority-cell{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:160px}
.priority-reasons{display:flex;flex-direction:column;gap:2px}
.priority-reasons,.priority-reason{color:var(--gray-600);font-size:13px;line-height:18px}
.priority-reasons strong{color:var(--ink);font-weight:500}
.row-actions{display:flex;flex-direction:column;gap:4px;align-items:stretch}.row-actions .button{justify-content:flex-start}
.empty-state{min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:48px 16px;text-align:center;color:var(--gray-600)}
.empty-state .icon{width:40px;height:40px;color:var(--gray-400);margin-bottom:8px}
.empty-state strong{color:var(--ink);font-size:16px;line-height:24px}
.skeleton-row td{padding:16px 20px}
.skeleton{display:block;height:40px;border-radius:8px;background:linear-gradient(90deg,var(--gray-100) 25%,#F6F8F9 50%,var(--gray-100) 75%);background-size:200% 100%;animation:shimmer 1.4s infinite}
@keyframes shimmer{to{background-position:-200% 0}}

/* Cadastro e importação */
.lower-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr);gap:24px;align-items:start}
.quick-card{padding:20px;display:flex;flex-direction:column;gap:16px;scroll-margin-top:24px}
.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.rule-pill,.date-format-pill{display:inline-flex;width:max-content;background:var(--primary-soft);color:var(--primary-hover);border-radius:9999px;padding:2px 10px;font-size:12px;line-height:16px;font-weight:500}
.date-format-pill{margin-top:8px}
.quick-grid{display:grid;grid-template-columns:1fr 1fr 1.2fr;gap:12px}
.expiry-preview{display:flex;align-items:center;justify-content:space-between;gap:16px;background:var(--gray-50);border:1px solid var(--gray-200);border-radius:8px;padding:12px 16px}
.expiry-preview div{display:flex;flex-direction:column;gap:2px}
.expiry-preview span{color:var(--gray-600);font-size:13px;line-height:18px}
.expiry-preview strong{font-size:16px;line-height:24px;font-variant-numeric:tabular-nums}
.expiry-preview p{font-size:13px;line-height:18px;text-align:right}
.form-actions{display:flex;justify-content:flex-end}
.upload-strip{padding:20px;display:flex;flex-direction:column;align-items:flex-start;gap:8px;border-style:dashed;border-color:var(--gray-400);transition:background .15s,border-color .15s}
.upload-strip.is-active{background:var(--primary-soft);border-color:var(--primary)}
.upload-strip h2{font-size:16px;line-height:24px}
.upload-strip .button{margin-top:8px}
.upload-icon{width:40px;height:40px;border-radius:8px;display:grid;place-items:center;background:var(--primary-soft);color:var(--primary-hover)}
.upload-icon .icon{width:20px;height:20px}
footer{display:flex;justify-content:space-between;gap:24px;padding:16px 0 8px;border-top:1px solid var(--gray-200);color:var(--gray-600);font-size:12px;line-height:16px}
footer span{color:var(--ink);font-weight:500}
footer p{text-align:right;font-size:12px;line-height:16px}

/* Modal */
.modal-backdrop{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:24px;background:rgb(16 42 51/.5)}
.modal{width:min(640px,100%);max-height:calc(100dvh - 48px);overflow:auto;background:#fff;border-radius:16px;padding:24px;box-shadow:var(--shadow-lg)}
.modal-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding-bottom:16px;border-bottom:1px solid var(--gray-200)}
.modal-header h2{margin-top:2px}
.modal-header p{margin-top:4px;font-size:13px;line-height:18px}
.modal>p{margin-top:16px;color:var(--ink)}
.close-button{width:40px;height:40px;flex:none;display:grid;place-items:center;border:0;border-radius:8px;background:transparent;color:var(--gray-600)}
.close-button:hover{background:var(--gray-100)}
.close-button .icon{width:20px;height:20px}
.edit-help{margin-top:16px;font-size:13px;line-height:18px}
.mapping-grid,.edit-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:20px 0}
.mapping-grid label:first-child,.edit-grid .wide{grid-column:1/-1}
.mapping-grid label>span{display:flex;align-items:baseline;gap:4px;flex-wrap:wrap}
.mapping-grid label>span b{color:var(--danger)}
.mapping-grid label small{margin-left:auto;color:var(--gray-600);font-size:12px;line-height:16px;font-weight:400}
.date-input-row{display:grid;grid-template-columns:1fr auto;gap:8px}
.import-note,.calculation-note{background:var(--gray-50);border:1px solid var(--gray-200);border-radius:8px;padding:12px 16px}
.import-note p{margin-top:4px;font-size:13px;line-height:18px}
.calculation-note{display:flex;justify-content:space-between;gap:12px;font-weight:500;font-variant-numeric:tabular-nums}
.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:24px}

/* Toast */
.toast{position:fixed;right:24px;bottom:24px;z-index:80;max-width:min(480px,calc(100vw - 32px));padding:12px 16px;border-radius:12px;background:var(--ink);color:#fff;font-weight:500;box-shadow:var(--shadow-lg);animation:toast-in .2s ease-out}
@keyframes toast-in{from{opacity:0;transform:translateY(8px)}}

/* Responsivo */
@media (max-width:1280px){.stats-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:1024px){
  .app-shell{grid-template-columns:1fr}
  .sidebar{position:sticky;top:0;height:auto;padding:12px 16px;gap:12px}
  .menu-toggle{display:inline-flex}
  .menu,.sidebottom{display:none}
  .sidebar.is-open .menu{display:grid}
  .sidebar.is-open .sidebottom{display:grid;margin-top:0;padding-top:0}
  .logo{padding:0}
  .lower-grid{grid-template-columns:1fr}
  .record-tools{grid-template-columns:1fr 1fr}
  .search-box{grid-column:1/-1}
}
@media (max-width:768px){
  .main{padding:16px;gap:16px}
  .topline{align-items:stretch}
  .toolbar{display:grid;grid-template-columns:1fr 1fr;width:100%}
  .toolbar .button-primary{grid-column:1/-1;order:-1}
  .toolbar .button,.navbtn,.filter-tabs button{min-height:44px}
  .banner{flex-wrap:wrap}
  .stats-grid{grid-template-columns:1fr 1fr;gap:12px}
  .stat-card{padding:16px}
  .stat-card:first-child{grid-column:1/-1}
  .records-header{padding:16px}
  .record-tools{grid-template-columns:1fr}
  input,select{font-size:16px;height:44px}
  .filter-tabs{padding:0 16px;gap:20px}
  .priority-guide{margin:12px 16px}
  .table-wrap{overflow:visible;padding:0 12px 12px}
  .table-wrap table,.table-wrap tbody{display:block;width:100%;min-width:0}
  .table-wrap thead{display:none}
  .table-wrap tbody tr{display:block;margin:12px 0;padding:16px;border:1px solid var(--gray-200);border-radius:12px;background:#fff}
  .table-wrap tbody tr.skeleton-row{padding:0;border:0}
  .table-wrap tbody td{display:block;padding:12px 0;border:0}
  .table-wrap tbody td:first-child{padding-top:0;border-bottom:1px solid var(--gray-200)}
  .person-cell,.document-cell,.priority-cell{min-width:0}
  .person-cell{align-items:flex-start}
  .person-cell strong,.person-cell span{overflow-wrap:anywhere}
  .row-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding-top:12px;border-top:1px solid var(--gray-200)}
  .row-actions .button{height:48px;border:1px solid var(--gray-200)}
  .row-actions .button.danger-link{border-color:#FCA5A5}
  .quick-card,.upload-strip{padding:16px}
  .quick-grid,.mapping-grid,.edit-grid{grid-template-columns:1fr}
  .mapping-grid label:first-child,.edit-grid .wide{grid-column:auto}
  .expiry-preview{flex-direction:column;align-items:flex-start;gap:4px}
  .expiry-preview p{text-align:left}
  .form-actions .button,.upload-strip .button{width:100%;height:48px}
  .modal-backdrop{padding:8px;align-items:end}
  .modal{max-height:calc(100dvh - 16px);padding:20px}
  .modal-actions{display:grid;grid-template-columns:1fr 1fr}
  .modal-actions .button{height:48px}
  .calculation-note{flex-direction:column}
  footer{flex-direction:column;gap:4px}
  footer p{text-align:left}
  .toast{top:16px;bottom:auto;right:16px;left:16px;max-width:none}
}

/* Login, relatos, histórico e acessos (06/11/2026) — mesmos tokens do design system Zelo. */
.sidebar{overflow-y:auto}
.nav-divider{display:block;height:1px;background:#1E4250;margin:8px 12px}
.sidebottom{gap:12px}
.reportbtn{display:flex;align-items:center;gap:8px;width:100%;height:40px;padding:0 12px;border:1px solid #1E4250;border-radius:8px;background:transparent;color:#fff;font-weight:500}
.reportbtn:hover{background:#1E4250}
.user-box{display:grid;gap:2px;padding:0 4px}
.user-box strong{color:#fff;font-weight:500;font-size:14px;line-height:20px}
.user-actions{display:flex;flex-wrap:wrap;gap:4px}
.user-actions button{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:0 8px;border:0;border-radius:8px;background:transparent;color:#A9BCC2;font-size:12px}
.user-actions button:hover{background:#1E4250;color:#fff}
.mono{font-family:var(--font-mono);font-size:12px;line-height:16px}
.tabular{font-variant-numeric:tabular-nums}
.muted{color:var(--gray-600)}
.small{font-size:12px;line-height:16px}
textarea{width:100%;min-height:120px;padding:12px;border:1px solid var(--gray-200);border-radius:8px;background:#fff;color:var(--ink);font:inherit;line-height:24px;resize:vertical;box-shadow:var(--shadow-sm)}
textarea:focus{outline:2px solid var(--accent);outline-offset:2px;border-color:var(--primary)}
.field{display:flex;flex-direction:column;gap:4px}
.field>span{font-weight:500;color:var(--ink)}
.field-help{color:var(--gray-600);font-size:13px;line-height:18px}
.stack{display:flex;flex-direction:column;gap:16px;padding-top:20px}
.modal-sm{width:min(480px,100%)}
.modal-left{margin-right:auto}
.select-sm{height:32px;padding:0 8px;min-width:150px}

/* Entrar */
.auth-page{min-height:100vh;display:grid;place-items:center;padding:24px 16px;background:var(--ink)}
.auth-card{width:min(440px,100%);background:#fff;border-radius:16px;padding:24px;box-shadow:var(--shadow-lg);display:flex;flex-direction:column;gap:16px}
.auth-head{display:flex;align-items:center;gap:16px;margin-bottom:8px}
.auth-head h1{font-size:20px;line-height:28px}
.auth-head p{font-size:13px;line-height:18px}
.brandmark-primary{background:var(--primary);width:48px;height:48px}
.auth-loading{background:#fff;width:56px;height:56px;animation:pulse 1.2s ease-in-out infinite}
@keyframes pulse{50%{opacity:.4}}
.auth-submit{width:100%;height:44px}
.auth-help{font-size:13px;line-height:18px;text-align:center}

/* Páginas internas */
.page-section{display:flex;flex-direction:column;gap:24px}
.page-help{max-width:880px}
.filter-tabs-flat{padding:0;background:transparent}
.badges{display:flex;flex-wrap:wrap;gap:8px}
.badge{display:inline-flex;align-items:center;gap:6px;padding:2px 10px;border-radius:9999px;font-size:12px;line-height:16px;font-weight:500;white-space:nowrap}
.badge-neutral{background:var(--gray-100);color:var(--gray-600)}
.badge-alert{background:var(--alert-soft);color:var(--alert-strong)}
.badge-alert .status-dot{color:var(--alert)}
.badge-info{background:var(--info-bg);color:var(--info-fg)}
.badge-success{background:var(--success-bg);color:var(--success-fg)}

/* Relatos */
.report-list{display:grid;gap:16px}
.report-card{padding:20px;display:flex;flex-direction:column;gap:8px}
.report-top{display:flex;justify-content:space-between;align-items:center;gap:12px}
.report-meta{font-size:13px;line-height:18px;font-variant-numeric:tabular-nums}
.report-text{color:var(--ink);line-height:24px;white-space:pre-line}
.attachments{display:flex;flex-wrap:wrap;gap:12px;margin-top:4px}
.attachment{width:140px;display:flex;flex-direction:column;gap:4px;padding:8px;border:1px solid var(--gray-200);border-radius:8px;color:var(--ink);text-decoration:none;font-size:12px;line-height:16px}
.attachment:hover{box-shadow:var(--shadow-md)}
.attachment img,.attachment video{width:100%;height:88px;object-fit:cover;border-radius:6px;background:var(--gray-100)}
.attachment>.icon{width:24px;height:24px;color:var(--gray-400);margin:32px auto}
.attachment span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.attachment small{color:var(--gray-600)}
.report-context summary{cursor:pointer;color:var(--gray-600);font-size:13px;line-height:18px;font-weight:500}
.report-context dl{display:grid;grid-template-columns:auto 1fr;gap:4px 12px;margin:8px 0 0;font-size:13px;line-height:18px}
.report-context dt{color:var(--gray-600)}
.report-context dd{margin:0;overflow-wrap:anywhere}
.report-answer{border-top:1px solid var(--gray-200);padding-top:16px;margin-top:8px;display:flex;flex-direction:column;gap:12px}
.report-answer-grid{display:grid;grid-template-columns:220px 1fr;gap:16px;align-items:start}
.report-answer textarea{min-height:80px}
.report-answer .form-actions{align-items:center;gap:12px}
.report-answer .form-actions small{margin-right:auto}
.report-reply{background:var(--primary-soft);border-radius:8px;padding:12px 16px;margin-top:4px}
.report-reply strong{color:var(--primary-hover);font-weight:500}
.report-reply p{color:var(--ink);white-space:pre-line;margin-top:4px}
.file-drop{position:relative;display:flex;flex-direction:row;align-items:center;gap:8px;height:40px;padding:0 16px;width:max-content;border:1px dashed var(--gray-400);border-radius:8px;color:var(--primary-hover);font-weight:500;cursor:pointer}
.file-drop:hover{background:var(--primary-soft);border-color:var(--primary)}
.file-drop input{position:absolute;inset:0;opacity:0;cursor:pointer}
.file-drop:focus-within{outline:2px solid var(--accent);outline-offset:2px}
.file-list{list-style:none;margin:4px 0 0;padding:0;display:grid;gap:4px}
.file-list li{display:flex;align-items:center;gap:8px;padding:4px 4px 4px 12px;border:1px solid var(--gray-200);border-radius:8px}
.file-list li span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.file-list li small{color:var(--gray-600);font-variant-numeric:tabular-nums}
.context-note{font-size:13px;line-height:18px}

/* Histórico */
.history-list{padding:0 20px 20px}
.history-day+.history-day{margin-top:16px}
.history-day-title{position:sticky;top:0;background:#fff;padding:8px 0;font-size:13px;line-height:18px;font-weight:600;color:var(--gray-600);z-index:1}
.history-day ol{list-style:none;margin:0;padding:0}
.history-day li{display:grid;grid-template-columns:44px 8px 1fr;gap:12px;align-items:start;padding:8px 0;border-bottom:1px solid var(--gray-100)}
.history-day li:last-child{border-bottom:0}
.history-day time{font-size:12px;line-height:20px;font-weight:500;color:var(--gray-600);font-variant-numeric:tabular-nums}
.history-dot{width:8px;height:8px;border-radius:50%;background:var(--accent);margin-top:6px}
.history-day li p{color:var(--ink);overflow-wrap:anywhere}
.history-day li small{color:var(--gray-600);font-size:12px;line-height:16px}

/* Acessos */
.access-table{min-width:720px}
.row-actions-inline{flex-direction:row;flex-wrap:wrap;justify-content:flex-end}
.access-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-items:start}

@media (max-width:1024px){
  .access-grid{grid-template-columns:1fr 1fr}
  .report-answer-grid{grid-template-columns:1fr}
}
@media (max-width:768px){
  .access-grid{grid-template-columns:1fr}
  .history-list{padding:0 16px 16px}
  .report-card{padding:16px}
  .attachment{width:calc(50% - 6px)}
  .file-drop{width:100%;justify-content:center;height:48px}
  .modal-left{grid-column:1/-1;margin:0}
  .access-table .row-actions{grid-template-columns:1fr}
  .user-actions button{min-height:44px}
}
.records-header>.search-box{align-self:stretch}
@media (max-width:768px){.toolbar>.button-secondary:first-child:nth-last-child(2){grid-column:1/-1}}
