/* Screen-only, module-scoped workflow layouts. */
@media screen {
  .app-shell main .document-form { max-width: 100%; }
  .app-shell main .document-form > label { display: block; margin: 22px 0 8px; }
  .app-shell main .document-form > label:first-of-type { margin-top: 0; }
  .app-shell main .document-form .form-actions { margin-top: 24px; padding-top: 20px; border-top: 1px solid #dce6e9; }
  .app-shell main .field-help { color: #536e7b; font-size: 13px; line-height: 1.65; margin: 10px 0 16px; overflow-wrap: anywhere; }
  .app-shell main .document-insert { margin: 12px 0; }
  .app-shell main .document-search { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
  .app-shell main .document-search > div:first-child { flex: 1 1 320px; }
  .app-shell main .document-catalog { margin-bottom: 28px; border: 1px solid #d8e4e6; background: #fff; border-radius: 12px; padding: 20px; }
  .app-shell main .document-catalog > summary { color: #264e59; font-size: 17px; font-weight: 600; cursor: pointer; padding: 4px 0; }
  .app-shell main .document-catalog > summary span { display: inline-block; margin-left: 12px; color: #536e7b; font-size: 13px; font-weight: 400; }
  .app-shell main .document-catalog .new-portaria-menu { padding: 0; border: 0; background: transparent; box-shadow: none; margin: 18px 0 0; }
  .app-shell main .document-catalog .button-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
  .app-shell main .document-catalog .btn-menu { display: flex; gap: 12px; align-items: center; justify-content: flex-start; padding: 18px; min-height: 76px; height: auto; background: #f6f9f8; color: #285a49; border: 1px solid #d7e5df; border-radius: 9px; text-align: left; font-size: 14px; box-shadow: none; }
  .app-shell main .document-catalog .btn-menu:hover { background: #eaf3ee; border-color: #8ab39f; }
  .app-shell main .document-catalog .btn-menu svg { flex-shrink: 0; }
  .app-shell main .document-type-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
  .app-shell main .document-type-grid .card { height: 100%; margin: 0; }
  .app-shell main .document-type-grid .card-body { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; text-align: left; }
  .app-shell main .document-type-grid .card-title { margin: 0; }
  .app-shell main .document-type-grid .btn { margin-top: auto; }
  .app-shell main .pension-person-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
  .app-shell main .pension-person-grid > .col-md-12 { grid-column: 1 / -1; position: relative; }
  .app-shell main .pension-form #search_results { position: static !important; width: 100% !important; margin-top: 8px; }
  .app-shell main .pension-form .table-responsive { max-width: 100%; }
  .app-shell main .pension-form #tableBeneficiarios { min-width: 1320px; table-layout: auto; }
  .app-shell main .pension-form #tableBeneficiarios input { min-width: 125px; }
  .app-shell main .pension-form #tableBeneficiarios input[name="beneficiario_nome[]"] { min-width: 220px; }
  .app-shell main .pension-workspace .card-header { flex-wrap: wrap; gap: 12px; }
  .app-shell main .pension-workspace .input-group { flex-wrap: wrap; gap: 10px; }
  .app-shell main .pension-workspace .input-group > label { flex-basis: 100%; }
  .app-shell main .pension-workspace .input-group input { min-width: 200px; flex: 1 1 240px; }
  .app-shell main .pension-workspace .record-actions { justify-content: flex-start; }
  @media (max-width: 900px) {
    .app-shell main .document-catalog .button-grid, .app-shell main .document-type-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  }
  @media (max-width: 600px) {
    .app-shell main .document-catalog .button-grid, .app-shell main .document-type-grid, .app-shell main .pension-person-grid { grid-template-columns: 1fr; }
    .app-shell main .document-catalog > summary span { display: block; margin: 8px 0 0; }
    .app-shell main .pension-form .card-header { flex-wrap: wrap; gap: 12px; }
  }
  .app-shell main .breadcrumb-card-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; list-style: none; padding: 0; margin: 0 0 22px; }
  .app-shell main .breadcrumb-card-nav .breadcrumb-card-item { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 0; background: transparent; border: 0; box-shadow: none; }
  .app-shell main .breadcrumb-card-nav .breadcrumb-card-item a { display: inline; color: #58727e; background: transparent; border: 0; border-radius: 0; padding: 0; font-size: 12px; font-weight: 400; box-shadow: none; overflow-wrap: anywhere; }
  .app-shell main .breadcrumb-card-nav .breadcrumb-card-item:not(:last-child)::after { content: '›'; color: #8b9ea6; }
  .app-shell main .breadcrumb-card-nav .breadcrumb-card-item.active a { color: #2b6550; font-weight: 600; }
  .workflow-guide { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; list-style: none; padding: 0; margin: 0 0 24px; }
  .workflow-guide li { padding: 16px; border: 1px solid #d5e3dd; border-radius: 9px; background: #eef5f1; min-width: 0; }
  .workflow-guide strong { display: block; color: #285b48; font-size: 13px; }
  .workflow-guide span { display: block; color: #536e62; font-size: 12px; margin-top: 6px; line-height: 1.6; }
  .flow-person-summary { padding: 22px 24px; border: 1px solid #dce5e9; border-radius: 10px; background: #fff; margin-bottom: 24px; }
  .app-shell main .flow-person-summary p { margin: 0 0 10px; color: #455e6a; }
  .app-shell main .flow-person-summary p:last-of-type { margin-bottom: 0; }
  .app-shell main .flow-choice { flex-direction: row; justify-content: flex-start; gap: 14px; text-align: left; padding: 20px; min-height: 90px; background: #fff; border: 1px solid #ceddd6; color: #285745; box-shadow: none; }
  .app-shell main .flow-choice:hover { transform: none; background: #edf5f0; border-color: #75a38b; }
  .app-shell main .flow-choice i { font-size: 22px; margin: 0; }
  .app-shell main .flow-batch { display: inline-block; vertical-align: top; max-width: 440px; border: 1px solid #d5e0e4; border-radius: 8px; padding: 10px 14px; background: #fff; }
  .flow-batch summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #3e5e6b; }
  .flow-batch p { font-size: 13px; color: #536c77; }
  .app-shell #management-content .periodos-cards-container { display: grid; grid-template-columns: 1fr; gap: 22px; }
  .app-shell #management-content .card-ferias-periodo { border: 1px solid #d7e2e5; border-radius: 10px; padding: 0; margin: 0; background: #fff; overflow: hidden; box-shadow: none; }
  .app-shell #management-content .periodo-header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 18px 22px; background: #f5f8f7; border-bottom: 1px solid #dce6e1; }
  .app-shell #management-content .periodo-header > i { font-size: 20px; }
  .app-shell #management-content .periodo-title { flex: 1 1 300px; font-size: 16px; margin: 0; color: #2b4d58; }
  .app-shell #management-content .periodo-body { padding: 20px 22px; }
  .app-shell #management-content .periodo-info-compact { display: flex; flex-wrap: wrap; gap: 14px 36px; margin-bottom: 16px; color: #45606b; font-size: 13px; }
  .periodo-status-help { font-size: 13px; line-height: 1.65; color: #71521c; background: #fff8e9; padding: 12px 14px; border-radius: 7px; }
  .app-shell #management-content .agendamento-item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid #e3ebee; }
  .app-shell #management-content .periodo-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 18px; }
  .app-shell #management-content .workflow-section-compact { padding: 18px 22px; border-top: 1px solid #e1e9ec; background: #f7faf9; }
  .app-shell #management-content .badge.bg-warning { color: #79551c; background: #fff0cc; }
  .app-shell #management-content .badge.bg-danger { color: #9b3530; background: #fce8e5; }
  .app-shell #management-content .badge.bg-info { color: #285f71; background: #eaf3f7; }
  .app-shell #management-content .badge.bg-secondary { color: #526a75; background: #edf1f4; }
  .app-shell main .flow-event-form { padding: 24px; border: 1px solid #d8e3e7; background: #fff; }
  .app-shell main .flow-event-form fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
  .app-shell main .flow-event-form legend { color: #294f5c; font-size: 16px; font-weight: 600; margin-bottom: 20px; }
  .app-shell main .pericia-form .form-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
  .app-shell main .pericia-form .inline-field { display: block; min-width: 0; }
  .app-shell main .pericia-form .inline-field label { display: block; margin-bottom: 7px; white-space: normal; }
  .app-shell main .add-servidor-section, .app-shell main .servidores-list { padding: 24px; background: #fff; border: 1px solid #d8e3e7; border-radius: 10px; scroll-margin-top: 24px; }
  .app-shell main .servidores-list h3, .app-shell main .add-servidor-section h3 { font-size: 18px; margin: 0 0 16px; }
  .app-shell main #add-servidor-form { padding: 16px 0; border: 0; margin: 0; box-shadow: none; }
  .app-shell main #add-servidor-form > div { flex-wrap: wrap; min-width: 0; width: 100%; box-sizing: border-box; }
  .app-shell main #add-servidor-form #pericia_matricula { flex: 0 1 150px; }
  .app-shell main #add-servidor-form #pericia_nome { flex: 1 1 220px; min-width: 0; }
  .app-shell main .pericia-records { min-width: 1120px; table-layout: auto; }
  .app-shell main .pericia-records .server-main-row { background: #f0f6f3 !important; }
  .app-shell main .pericia-records th { white-space: nowrap; }
  .app-shell main .pericia-records .result-inputs { flex-wrap: wrap; padding: 14px 10px; }
  .app-shell main .pericia-records .result-actions-small { flex-wrap: wrap; }
  .app-shell main .pericia-records .action-btn-custom { min-width: 0; height: auto; padding: 8px 10px; }
  .app-shell main .pericia-records .form-resultado { min-width: 330px; }
  .app-shell main .pericia-records .form-telefone input { padding: 10px; min-width: 155px; }
  .app-shell main .pericia-records .result-doc-form { padding: 18px !important; background: #f7faf9; border: 1px solid #dce6e9; border-radius: 8px; margin: 10px; }
  .app-shell main .pad-workspace .pad-view-grid { grid-template-columns: minmax(0,1fr) minmax(300px,370px); gap: 24px; }
  .app-shell main .pad-workspace .timeline-column, .app-shell main .pad-workspace .control-panel { min-width: 0; }
  .app-shell main .pad-workspace .timeline-title { font-size: 16px; }
  .app-shell main .pad-workspace .timeline-meta { font-size: 12px; color: #536f7b; line-height: 1.7; }
  .app-shell main .pad-workspace .timeline-content { padding: 22px; border-radius: 9px; background: #fff; }
  .app-shell main .pad-workspace .timeline-body { font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
  .app-shell main .pad-workspace .control-panel form { padding: 14px; gap: 12px; background: #f6f9f8; }
  .app-shell main .pad-workspace .control-panel .card { position: static; }
  .app-shell main .pad-workspace .btn-block { display: flex; width: 100%; margin-bottom: 10px; }
  .app-shell main .pad-workspace .visibility-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; border-top: 1px solid #dce6e9; padding-top: 14px; }
  .app-shell main .pad-workspace .form-check { display: inline-flex; align-items: center; gap: 6px; }
  .app-shell main .pad-workspace .form-check label { margin: 0; }
  .app-shell main .user-settings-form fieldset { min-width: 0; padding: 22px; border: 1px solid #d5e1e5; border-radius: 9px; margin: 16px 0; }
  .app-shell main .user-settings-form legend { font-size: 16px; font-weight: 600; color: #2d5e4c; padding: 0 8px; }
  .app-shell main .user-settings-form .module-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .app-shell main .user-settings-form .module-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid #dce6e9; border-radius: 7px; margin-bottom: 10px; background: #fff; }
  .app-shell main .user-settings-form .module-item input { flex-shrink: 0; margin-top: 4px; }
  .app-shell main .user-settings-form .module-item p { font-size: 12px; color: #58727e; margin: 6px 0 0; font-weight: 400; }
  @media (max-width: 1150px) { .app-shell main .pad-workspace .pad-view-grid { grid-template-columns: 1fr; } .workflow-guide { grid-template-columns: repeat(2,minmax(0,1fr)); } }
  @media (max-width: 700px) {
    .app-shell main .pericia-form .form-grid, .app-shell main .user-settings-form .module-list { grid-template-columns: 1fr; }
    .app-shell main .flow-event-form, .app-shell main .servidores-list, .app-shell main .add-servidor-section { padding: 18px; }
    .app-shell main #add-servidor-form #pericia_nome { flex-basis: 100%; }
    .workflow-guide { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .workflow-guide li { padding: 12px; }
  }
  @media (max-width: 350px) { .workflow-guide { grid-template-columns: 1fr; } }
}
