#certificate-workspace .cert-types{display:flex;gap:8px;border-bottom:1px solid #d9e3ec;margin-bottom:12px}
#certificate-workspace{width:100%;min-width:0;max-width:100%}
#certificate-workspace .page-title{flex-wrap:wrap;gap:12px}
#certificate-workspace .page-title .toolbar{max-width:100%;min-width:0}
#certificate-workspace .page-title button{max-width:100%;white-space:normal}
#certificate-workspace .filters{flex-wrap:wrap;max-width:100%}
#certificate-workspace .search{min-width:0;max-width:100%}
#certificate-workspace .search input{min-width:0;width:100%}
.certificate-qa-banner{position:fixed;bottom:4px;left:50%;transform:translateX(-50%);z-index:8;padding:3px 10px;background:#f6efd9;color:#776038;font-size:11px;max-width:calc(100% - 20px);border-radius:4px;text-align:center;pointer-events:none}
#certificate-workspace .cert-types button{background:transparent;border:0;border-radius:0;padding:9px 4px;color:#285b87}
#certificate-workspace .cert-types button.active{border-bottom:3px solid #285b87;font-weight:600}
#certificate-workspace .cert-filters{flex-wrap:wrap}
.cert-example-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:12px}.cert-example-note{color:#285b87;font-size:12px;line-height:1.4}.cert-deadline.neutral{color:#4b6072}
#certificate-workspace .cert-metrics{grid-template-columns:repeat(5,minmax(0,1fr))}
#certificate-workspace .cert-metrics .metric{min-width:0;text-align:left}
#certificate-workspace .work-zone{position:static;padding-bottom:0;overflow:visible}
#certificate-workspace .table-top{flex-wrap:wrap;gap:6px}
#certificate-workspace #cert-days-filter{display:inline-flex;align-items:center;gap:4px;font-size:11px;text-align:left;white-space:nowrap}
#certificate-workspace #cert-days-filter svg{width:13px;height:13px;flex:none}
#certificate-workspace .cert-grid .cert-password-cell{overflow:visible}
.cert-row-secret{position:fixed;z-index:12;background:#285b87;color:white;border:1px solid #244f74;border-radius:5px;padding:8px 12px;box-shadow:0 4px 14px #17365226;max-width:calc(100vw - 16px);white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}
.cert-column-menu{position:fixed;z-index:14;width:225px;max-width:calc(100vw - 16px);background:white;border:1px solid #cddbe8;border-radius:7px;padding:5px;box-shadow:0 5px 20px #17365226;display:flex;flex-direction:column}
.cert-column-menu button{border:0;text-align:left;border-radius:4px;white-space:normal;font-size:12px}
.cert-column-menu button[aria-pressed=true]{background:#eaf0f6;color:#285b87;font-weight:600}
.cert-contact-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.cert-contact-heading h3{min-width:0}.cert-contact-fields{margin-bottom:10px}.cert-contact-heading button{flex:none}.cert-batch-select{display:flex;align-items:center;gap:5px}.cert-batch-table td:first-child{width:85px}
#certificate-workspace .cert-legend{display:flex;gap:18px;flex-wrap:wrap;margin:6px 0 12px;font-size:12px;color:#44586a}
#certificate-workspace .cert-table-scroll{overflow:auto;max-height:max(180px,calc(100vh - 370px))}
#certificate-workspace .cert-grid{width:100%;min-width:780px;table-layout:fixed}
#certificate-workspace .cert-grid tr{height:41.67px}
#certificate-workspace .cert-grid td{padding:4px 9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#certificate-workspace .cert-grid tbody tr:nth-child(odd){background:#fff}
#certificate-workspace .cert-grid tbody tr:nth-child(even){background:#f1f5f9}
#certificate-workspace .cert-grid thead th{background:#edf2f7;position:sticky;top:0;z-index:2}
#certificate-workspace .company-btn{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#certificate-workspace .cert-password-actions{display:flex;gap:1px;align-items:center}
#certificate-workspace .cert-password-actions .icon{width:28px;height:28px;padding:4px;min-height:28px;color:#285b87}
.cert-renewing{display:inline-flex;font-size:11px;padding:3px 7px;border-radius:5px;background:#efe2c5!important;color:#735522!important;line-height:16px}
.cert-deadline.expired{color:#a23835}.cert-deadline.urgent{color:#8c5519}.cert-deadline.soon{color:#725a24}.cert-deadline.valid{color:#285b87}
.cert-count{margin:12px 0}
#modal.certificate-detail .modal-head,#modal.certificate-import .modal-head{background:#285b87;color:white}
#modal.certificate-detail .modal-head h2,#modal.certificate-detail .modal-head button,#modal.certificate-import .modal-head h2,#modal.certificate-import .modal-head button{color:white}
.cert-details h3{margin:14px 0 10px}.cert-facts{display:grid;grid-template-columns:125px minmax(0,1fr);gap:9px 12px;margin:14px 0 20px;font-size:13px;color:#285b87}
.cert-facts dt,.cert-facts dd{margin:0;overflow-wrap:anywhere}.cert-secret-detail{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.cert-secret-detail [data-cert-secret]{max-width:100%;overflow-wrap:anywhere}
.cert-note{margin-top:18px;background:#eaf0f6;border-radius:6px;overflow:hidden}
.cert-note h3{margin:0;padding:9px 12px;background:#285b87;color:white;font-size:13px}
.cert-note .plain-observation{padding:10px}.cert-note textarea{background:transparent;border:0;min-height:95px;width:100%;color:#285b87;resize:vertical}
.cert-note details{padding:10px}.cert-history{padding:14px 0;border-top:1px solid #d9e3ec;margin-top:16px}.cert-history summary{color:#285b87}
.cert-history-row{padding:12px 0;border-bottom:1px solid #d9e3ec}.cert-history-row p{margin:4px 0}
.cert-value{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.cert-value input{width:135px}.cert-value small{display:block;width:100%;color:#735522}
.cert-text{white-space:pre-wrap;overflow-wrap:anywhere}.cert-details .event small{display:block;margin:5px 0}
.cert-batch-steps{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:16px;color:#44586a}.cert-batch-steps .active{color:#285b87;font-weight:600;border-bottom:2px solid #285b87}
.cert-batch-tools{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin-bottom:14px}.cert-batch-tools .form-field{flex:1;min-width:190px}
.cert-batch-scroll{overflow:auto}.cert-batch-table{width:100%;min-width:1000px;table-layout:fixed}.cert-batch-table th,.cert-batch-table td{padding:6px 7px;vertical-align:middle}.cert-batch-table tbody tr{height:56px}.cert-file-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}.cert-batch-table td:nth-child(2) p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cert-batch-password{display:flex;gap:4px;align-items:center}.cert-batch-password input{width:130px;min-width:0;height:30px;padding:5px 7px}.cert-batch-password .icon,.cert-batch-actions .icon{width:28px;min-height:28px;height:28px;padding:4px;flex:none}.cert-batch-table p{margin:3px 0 0;line-height:1.3}.cert-batch-table tbody tr:nth-child(even){background:#f1f5f9}.cert-batch-table tbody tr:nth-child(odd){background:#fff}.cert-batch-actions{display:flex;align-items:center;gap:4px;white-space:nowrap}.cert-batch-actions .small{padding:5px 7px;min-height:28px;white-space:nowrap}.cert-import-error{color:#a23835;font-weight:500;overflow-wrap:anywhere;font-size:11px}
.cert-state-chip{display:inline-flex;align-items:center;font-size:11px;line-height:16px;padding:3px 7px;border-radius:5px;max-width:100%;font-weight:600;white-space:normal;overflow-wrap:anywhere}
.cert-state-info{background:#dcebf6;color:#285b87}.cert-state-warning{background:#efe2c5;color:#735522}.cert-state-urgent{background:#f8e1ca;color:#8c5519}.cert-state-danger{background:#f8e3e1;color:#a23835}.cert-state-neutral{background:#e4e9ee;color:#4b6072}.cert-state-success{background:#dcebf6;color:#285b87}
#modal.certificate-status-catalog .modal-head{background:#285b87;color:white}#modal.certificate-status-catalog .modal-head h2,#modal.certificate-status-catalog .modal-head button{color:white}.cert-status-section{margin-top:18px}.cert-status-section h3,.cert-status-reasons h3{margin-bottom:10px}.cert-status-samples{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.cert-status-sample{background:#fff;border:1px solid #d3dfe9;border-radius:6px;padding:10px;min-width:0}.cert-status-sample p{font-size:11px;line-height:1.4;color:#44586a;margin-top:7px}.cert-status-reasons{margin-top:18px}.cert-status-reasons p{line-height:1.5}
.cert-batch-footer{margin-top:16px;flex-wrap:wrap}.certificate-import #cert-batch-error{color:#a23835;margin-top:10px}
@media(max-width:600px){
 .cert-status-samples{grid-template-columns:1fr}
 #certificate-workspace .cert-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}#certificate-workspace .metric{border-bottom:1px solid var(--line)}.cert-contact-fields{grid-template-columns:1fr}
 .layout:has(#certificate-workspace) .topbar{flex-wrap:wrap;height:auto;min-height:40px;gap:6px;padding-top:7px;padding-bottom:7px}
 .layout:has(#certificate-workspace) .breadcrumbs{min-width:0;max-width:100%;flex-wrap:wrap}
 .layout:has(#certificate-workspace) .top-right{max-width:100%;flex-wrap:wrap}
 #certificate-workspace .toolbar,#certificate-workspace .cert-types{flex-wrap:wrap}
 .cert-facts{grid-template-columns:110px minmax(0,1fr);gap:8px}.cert-batch-tools{display:block}.cert-batch-tools .form-field{margin:10px 0}.cert-details .toolbar{flex-wrap:wrap}.cert-value input{width:110px}
}

/* Contatos reutilizados em Clientes e Certificado Digital. */
.contact-cards{display:grid;gap:14px}.contact-card{min-width:0;border:1px solid #cddbe8;border-radius:6px;padding:12px;margin:0;background:#fff}.contact-card legend{color:#285b87;font-weight:600;padding:0 6px;font-size:13px}.contact-rfb{border:2px solid #285b87;background:#f1f6fb}.contact-card .cert-facts{margin:4px 0}.contact-card .form-grid{gap:12px}.contact-card .form-field{min-width:0}.contact-emails{display:grid;gap:10px;margin-top:12px}.contact-email-row{display:flex;gap:6px;align-items:center}.contact-email-row input{min-width:0;flex:1}.contact-email-row button{flex:none}.contact-card-tools{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}.contact-rfb-choice{margin-top:14px}.contact-add{margin-top:14px}.cert-contact-save-actions{gap:12px;margin-top:18px}#cert-contacts{padding-bottom:20px}.cert-lifecycle-actions{border-top:1px solid #cddbe8;padding-top:20px;margin-top:4px;gap:12px;flex-wrap:wrap}.cert-batch-footer #cert-read-all{margin-left:auto;background:#285b87;border-color:#285b87;color:#fff;order:2}.cert-batch-footer #cert-commit{order:3}.cert-batch-footer [role=status]{order:1}.cert-batch-actions{justify-content:center}
@media(max-width:600px){.contact-card .form-grid{grid-template-columns:1fr}.cert-lifecycle-actions button{flex:1 1 100%}.cert-contact-save-actions{flex-wrap:wrap}}

/* Status calculados e edição automática do cadastro compartilhado. */
.cert-state-urgent{background:#f3be8c;color:#663400}.cert-deadline.urgent{color:#9d4600;font-weight:600}.cert-status-tags{display:flex;gap:4px;align-items:center;overflow-x:auto;scrollbar-width:none}.cert-status-tags .cert-state-chip,.cert-status-tags .cert-renewing{flex:none;white-space:nowrap}.contact-card[tabindex]:focus-visible{outline:2px solid #285b87;outline-offset:2px}.contact-edit-hint{margin-top:10px}.contact-save-status{margin:10px 0}.cert-value .plain-observation{min-width:0}.cert-value .plain-observation input{width:140px}.cert-value .plain-observation-hint{margin:4px 0}.cert-value span[tabindex]{cursor:text}
#certificate-workspace .metric[data-cert-filter="seven"] strong{color:#9d4600}#certificate-workspace .metric[data-cert-filter="thirty"] strong{color:#725a24}
