/* Compact presentation for the existing registries and RH workspaces.
   Screen only: source fields, permissions, handlers and A4 layouts stay in their modules. */
@media screen {
  #appView :is(.registryPanel,.productsErp,.iamEditor,.iamUserAccess,.lmsRoot){font-size:0.75rem;line-height:1.4;min-width:0}
  #appView :is(.registryPanel,.productsErp,.iamLayout,.lmsRoot) .card{border-radius:4px;padding:9px 11px;box-shadow:none}
  #appView :is(.registryPanel,.productsErp,.lmsRoot) h2{font-size:1rem;margin:4px 0 7px}
  #appView :is(.registryPanel,.productsErp,.lmsRoot) h3{font-size:0.8125rem;margin:5px 0}
  #appView :is(.registryPanel,.productsErp,.lmsRoot) .toolbar{gap:6px;margin:7px 0;align-items:center}
  #appView :is(.registryPanel,.productsErp,.iamLayout,.lmsRoot) :is(th,td){padding:5px 7px;line-height:1.35}
  #appView :is(.registryPanel,.productsErp,.iamLayout,.lmsRoot) th{font-size:0.625rem;font-weight:600}
  #appView :is(.registryPanel,.productsErp,.iamLayout,.lmsRoot) :is(fieldset,.notice,.iamGroup,.iamProfile,.iamSummary){border-radius:4px}

  /* Employees: one aligned filter row and denser records without removing columns. */
  #appView #employees .employeeFilters{display:grid;grid-template-columns:minmax(150px,1fr) minmax(155px,1fr) minmax(160px,1fr) minmax(200px,1.5fr);gap:6px 9px;margin:6px 0 9px;align-items:end}
  #employees .employeeFilters>div{min-width:0}
  #appView #employees .employeeFilters label{font-size:0.6875rem;margin:0 0 3px}
  #appView #employees .employeeFilters :is(input,.multiFilter>summary){font-size:0.75rem;min-height:30px;padding-block:5px}
  #employees .employeeFilters .multiFilter{min-width:0;width:100%}
  #appView #employees #employeeListCount{grid-column:1/-1;font-size:0.6875rem;margin:0;line-height:1.3;color:var(--muted)}
  #appView #employees>.top{margin:7px 0;gap:8px}
  #appView #employees #employeeERPHelp{font-size:0.6875rem;line-height:1.4;margin:4px 0 8px;color:var(--muted)}
  #appView #employees>.card{padding:0;border-radius:4px;overflow-x:auto}
  #employees table.employeeCompactTable{min-width:71rem;font-size:0.6875rem}
  #employees .employeeCompactTable col[data-column-key="code"]{width:4rem}
  #employees .employeeCompactTable col[data-column-key="hire"]{width:5.5rem}
  #employees .employeeCompactTable col[data-column-key="unit"]{width:4rem}
  #employees .employeeCompactTable col[data-column-key="department"]{width:7.5rem}
  #employees .employeeCompactTable col[data-column-key="sub"]{width:5rem}
  #employees .employeeCompactTable col[data-column-key="role"]{width:6rem}
  #employees .employeeCompactTable col[data-column-key="leave"]{width:5.5rem}
  #employees .employeeCompactTable col[data-column-key="status"]{width:9.375rem}
  #employees .employeeCompactTable col[data-column-key="actions"]{width:11rem}
  #appView #employees .employeeCompactTable :is(th,td){padding:3px 5px;vertical-align:middle;line-height:1.25}
  #employees .employeeCompactTable tbody td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #employees .employeeCompactTable th .columnSort{white-space:normal;max-width:100%;line-height:1.25;text-align:inherit}
  #employees .employeeSingleLineName{font-size:0.75rem;line-height:1.25;font-weight:600}
  #employees .employeeCompactTable .cellDetail{display:inline;font-size:0.625rem;line-height:inherit;margin:0 0 0 4px}
  #employees .employeeCompactTable .cellDetail::before{content:'· ';}
  #employees .departmentTableTag{padding:1px 4px;border-radius:3px;font-size:0.625rem;font-weight:500}
  #employees .employeeActionRow{gap:3px}
  #employees .employeeActionRow>.miniBtn{padding:2px 4px;font-size:0.625rem;line-height:1.25;min-height:24px;border-radius:3px}
  #employees .employeeCompactTable .badge{font-size:0.625rem;padding:1px 4px;white-space:nowrap}
  #employeeModal :is(.row,fieldset),#employeeERPIdentity{border-radius:4px}
  #employeeModal .dialog{width:min(1020px,96vw)}

  /* The shared ERP directory keeps its source labels and all existing filters. */
  #appView .registryPanel .registryDirectoryFilters{align-items:end;gap:7px}
  #appView .registryPanel .registryDirectoryFilters>label{min-width:145px;margin:0}
  #appView .registryPanel .registrySearch{flex:1 1 200px;max-width:360px}
  #appView .registryPanel .registryActiveFilters{padding:3px 7px 5px;margin:0;gap:4px 10px;border-radius:4px;min-width:190px}
  #appView .registryPanel .registryActiveFilters legend{font-size:0.625rem}
  #appView .registryPanel .registryActiveFilters .check{font-size:0.6875rem;min-height:24px}
  #appView .registryPanel .registryRolePicker{min-width:175px;flex-basis:190px;max-width:250px;font-size:0.6875rem}
  #appView .registryPanel #regRoleFilter>summary{min-height:30px;padding:5px 26px 5px 8px;border-radius:4px}
  #appView .registryPanel .registryRoleOptions{border-radius:4px;padding:6px 9px;box-shadow:0 9px 24px #0003}
  #appView .registryPanel .registryRoleOptions .check{font-size:0.75rem;min-height:27px;white-space:normal}
  #appView .registryPanel .registryActivityHint{margin:5px 0 8px;font-size:0.6875rem;line-height:1.4}
  #appView .registryPanel .registryMetrics{grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:7px;margin:8px 0}
  #appView .registryMetrics small{font-size:0.6875rem;color:var(--muted)}
  #appView .registryMetrics strong{font-size:1.0625rem;line-height:1.25;margin-top:4px;font-variant-numeric:tabular-nums}
  #appView .registryPanel .registryFields{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:6px 9px}
  #appView .registryPanel .platformTable{max-height:65vh;border:1px solid var(--line);border-radius:4px}

  /* Products and prices share the compact controls and the active theme. */
  #appView .productsErp .productsFilters{max-width:none;gap:7px;margin:8px 0;padding:8px;border-radius:4px}
  #appView .productsErp .productsField :is(select,input:not([type=checkbox])),#appView .productsErp .productsChoices summary{height:30px;min-height:30px;font:400 0.75rem/18px var(--font-ui,inherit);border-radius:4px}
  #appView .productsErp .productsChoices fieldset{padding:7px 9px;gap:4px;border-radius:4px;z-index:40;box-shadow:0 9px 24px #0003;background:var(--panel);color:var(--ink)}
  #appView .productsErp .productsChoices .check{font-size:0.75rem;min-height:27px}
  #appView .productsErp .productsTable{border-radius:4px;max-height:67vh}
  #appView .productsErp .productsTable th{background:var(--secondary);color:var(--muted)}
  #appView .productsErp .productsPriceGroup th{background:var(--secondary);color:var(--ink);font-size:0.75rem;border-top:1px solid var(--line)}
  #appView .productsErp .productsTable :is(th,td){padding:5px 7px;line-height:1.35}
  #appView .productsErp .productsTable td small{font-size:0.625rem;line-height:1.25;color:var(--muted)}
  #appView .productsErp .productsMetrics{gap:7px;max-width:none}
  #appView .productsErp .productsMetrics strong{font-size:1.3125rem;color:var(--primary);font-variant-numeric:tabular-nums}
  #appView .productsErp .productsRecordGrid{gap:7px}
  #appView .productsErp .produtos-erp-campo{font-size:0.6875rem;padding:4px 0;grid-template-columns:minmax(90px,.9fr) minmax(0,1.2fr)}
  #appView .productsErp .productsDefaults{gap:6px;margin:7px 0;font-size:0.6875rem}

  /* Account profiles remain one selectable row, with description alongside. */
  #accountModal .dialog{width:min(950px,96vw)}
  #accountModal :is(h3,.accountProfileSection h3){font-size:0.875rem;margin:8px 0 5px}
  #accountModal .accountERPIdentity{padding:9px 11px;margin:10px 0;border:1px solid var(--line);border-radius:4px;background:var(--secondary)}
  #accountModal .accountERPIdentity h3{font-size:0.625rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:0 0 4px}
  #accountModal .accountERPIdentity strong{font-size:0.875rem;font-weight:600}
  #accountModal .accountERPIdentity p{font-size:0.6875rem;color:var(--muted);margin:3px 0 0}
  #accountModal .accountProfileSection>.note{margin:4px 0 7px;font-size:0.6875rem;line-height:1.4}
  #accountModal .accountProfileSection>label{font-size:0.6875rem;max-width:360px}
  #accountModal .accountProfileLinks{border-block:1px solid var(--line);margin:8px 0}
  #accountModal .accountProfileRow{padding:7px 6px;gap:9px}
  #accountModal .accountProfileRow:last-child{border-bottom:0}
  #accountModal .accountProfileMain{grid-template-columns:minmax(145px,.8fr) minmax(0,1.6fr);gap:10px}
  #accountModal .accountProfileMain>label{font-size:0.75rem;line-height:1.3}
  #accountModal .accountProfileDescription{font-size:0.6875rem;line-height:1.35}
  #accountModal .accountProfileRow .iamScopeDropdown>summary{min-height:28px;padding:4px 7px;border-radius:3px;white-space:nowrap}
  #accountModal .accountProfileRow .iamScopeDropdown>fieldset{border-radius:4px;box-shadow:0 9px 24px #0003}
  #platformView .iamLayout{gap:8px;margin:8px 0;grid-template-columns:195px minmax(0,1fr)}
  #platformView .iamProfile{font-size:0.75rem;border-radius:3px;padding:7px 8px;margin:3px 0}
  #platformView .iamProfile.selected{outline:1px solid var(--primary);background:var(--secondary)}
  #platformView .iamProfile small{font-size:0.625rem;line-height:1.35;color:var(--muted)}
  #platformView .iamSummary{padding:6px 8px;border-radius:4px;margin:7px 0}
  #platformView .iamGroup{border-radius:4px;margin-top:6px}
  #platformView .iamDisclosure{min-height:30px;font-size:0.75rem}
  #platformView .iamModuleSelect input[type=checkbox]{width:16px;height:16px;min-width:16px;flex-basis:16px}
  #platformView .iamSaveBar{padding:7px 0;gap:6px}

  /* Existing RH indicators stay in their original workspaces. */
  #appView :is(.hrWorkflowDashboard,.evaluationMetrics,.lmsMetrics){gap:7px;margin:9px 0}
  #appView :is(.hrWorkflowMetric,.evaluationMetrics .card,.lmsMetrics .card){padding:9px 11px;min-height:77px;border-radius:4px;box-shadow:none}
  #appView :is(.hrWorkflowMetric,.evaluationMetrics,.lmsMetrics) :is(span,small){font-size:0.6875rem;line-height:1.3}
  #appView :is(.hrWorkflowMetric,.evaluationMetrics,.lmsMetrics) strong{font-size:1.5rem;margin:4px 0 2px;line-height:1.15;font-variant-numeric:tabular-nums}
  #appView :is(.hrWorkflowNotice,.evaluationNotice,.lmsWarning,.hrWorkflowSummary,.evaluationSummary){padding:8px 10px;margin:7px 0;border-radius:4px;font-size:0.75rem;line-height:1.45}
  #appView :is(.hrWorkflowToolbar,.evaluationToolbar){margin:8px 0;gap:7px}
  #appView :is(.hrWorkflowStageDashboard,.evaluationInsightGrid,.evaluationQuestionList,.lmsCards){gap:8px;margin-block:9px}
  #appView :is(.hrWorkflowStage,.evaluationAnswer,.evaluationQuestion,.lmsLesson,.lmsTrackItem,.lmsBuilder>fieldset){border-radius:4px;padding:9px 11px;margin:8px 0}
  #appView .hrWorkflowStage h3{font-size:0.875rem;margin:0 0 7px}
  #appView .hrWorkflowStageTiles{gap:5px}
  #appView .hrWorkflowStageTiles button{min-height:37px;gap:7px;padding:6px 8px;border-radius:3px}
  #appView .hrWorkflowStageTiles b{font-size:1.125rem}
  #appView .hrWorkflowRecord{gap:10px;margin:7px 0}
  #appView .hrWorkflowRecord small{font-size:0.6875rem;line-height:1.35;margin:3px 0}
  #appView .hrWorkflowTask{padding:7px 0}
  #appView .evaluationTableWrap{margin:9px 0;border-radius:4px}
  #appView .evaluationTableWrap small{font-size:0.625rem;margin-top:3px;line-height:1.35}
  #appView .evaluationAnswer{font-size:0.75rem;line-height:1.5}
  #appView .evaluationQuestionList small{margin:5px 0}
  #appView .lmsCards{grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr))}
  #appView .lmsCards h2{font-size:1rem}
  #appView .lmsCards p{font-size:0.75rem;line-height:1.4;margin:5px 0}
  #appView .lmsCards progress{height:7px;accent-color:var(--primary)}
  #appView .lmsFilters{gap:7px;margin:8px 0}
  #appView .lmsTable{margin-top:8px}
  #appView .lmsFields{gap:7px 9px}
  #appView .lmsSlideThumb{border-radius:3px;padding:6px}
  #appView .lmsSlideCanvas{border-radius:4px}

  /* Calendar density changes the frame, not leave rules or date semantics. */
  #appView #calendar .calendarFrame{padding:10px;border-radius:4px}
  #appView #calendar .calendarFrameHeader{gap:8px 12px;margin-bottom:8px}
  #appView #calendar .calendarCompactHeading{margin-bottom:8px}
  #appView #calendar .calendarCompactHeading h1{font-size:1.4375rem}
  #appView #calendar .calendarDepartmentChoice612{min-height:30px;padding:5px 7px;border-radius:3px;font-size:0.6875rem}
  #planModal :is(.planTopMetrics>div,#planRemainder,.agendaMonth68){border-radius:4px}
  #planModal .planTopMetrics{gap:6px}
  #planModal .planTopMetrics strong{font-size:1.4375rem}
  #planModal .planCompactFields{gap:6px 8px}
  #planModal .planCompactFields :is(input,select){min-height:32px;padding:5px 7px;font-size:0.75rem}
  #reviewVacationModal .reviewCalendarDay{border-radius:3px}
}

@media screen and (max-width:1100px){
  #appView #employees .employeeFilters{grid-template-columns:repeat(2,minmax(0,1fr))}
  #appView .productsErp .productsFilters{grid-template-columns:repeat(3,minmax(0,1fr))}
  #platformView .iamLayout{grid-template-columns:165px minmax(0,1fr)}
}
@media screen and (max-width:700px){
  #appView #employees .employeeFilters{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  #appView #employees .employeeFilters>div:last-of-type{grid-column:1/-1}
  #appView #employees>.top{align-items:flex-start;flex-wrap:wrap}
  #appView #employees>.top .actions{flex-wrap:wrap;gap:5px}
  #appView .registryPanel .registryDirectoryFilters>label,#appView .registryPanel .registryRolePicker{min-width:0;flex:1 1 100%;max-width:none}
  #appView .registryPanel .registryFields{grid-template-columns:1fr}
  #appView .registryPanel .registryActiveFilters{width:100%;box-sizing:border-box}
  #appView .registryPanel .registryMetrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  #appView .registryPanel .platformTable{max-height:none}
  #appView .productsErp .productsFilters{grid-template-columns:repeat(2,minmax(0,1fr))}
  #appView .productsErp .productsChoices .check,#appView .registryPanel .registryRoleOptions .check{min-height:36px}
  #platformView .iamLayout{display:block}
  #platformView .iamLayout>aside{margin-bottom:8px}
  #accountModal .accountProfileRow{flex-wrap:wrap;gap:5px}
  #accountModal .accountProfileMain{grid-template-columns:minmax(105px,.85fr) minmax(0,1.2fr);gap:8px;flex-basis:100%}
  #accountModal .accountProfileMain>label{font-size:0.75rem;min-height:36px}
  #accountModal .accountProfileRow .iamLinkScopes{margin-left:21px}
  #accountModal .accountProfileRow .iamScopeDropdown>summary{min-height:36px;padding:7px}
  #appView :is(.hrWorkflowStageDashboard,.evaluationInsightGrid,.evaluationQuestionList){grid-template-columns:1fr}
  #appView :is(.hrWorkflowStageTiles button,.iamDisclosure,.iamModuleHeader>.iamModuleSelect){min-height:44px}
  #appView .lmsCards{grid-template-columns:1fr}
}
@media screen and (max-width:600px){
  #employees .employeeActionRow>.miniBtn{min-height:44px}
  #appView #employees .employeeFilters :is(input,.multiFilter>summary){min-height:40px}
  #appView #calendar .calendarDepartmentChoice612{min-height:44px;padding:7px}
  #planModal .planCompactFields :is(input,select){min-height:44px;font-size:0.875rem}
}

/* Shared registration controls stay small; configuration expands on demand. */
@media screen{
 #appView .compactSync{padding:4px 6px;margin:4px 0 8px;border:1px solid var(--line);border-radius:4px;background:var(--panel)}
 #appView .compactSyncLine{display:flex;align-items:center;gap:4px 12px;flex-wrap:wrap;font-size:.625rem;line-height:1.3}
 #appView .compactSyncLine strong{font-weight:500;white-space:nowrap}
 #appView .compactSync .miniBtn,#appView .registrationSyncCenter .miniBtn{font-size:.625rem;line-height:1.25;min-height:24px;padding:3px 5px;border-radius:3px}
 #appView .compactSync details,#appView .compactSettings{margin:3px 0;padding:0;border:0;background:transparent;font-size:.6875rem}
 #appView .compactSync summary,#appView .compactSettings summary{padding:2px 0;font-size:.625rem;min-height:0}
 #appView .compactSync .notice{font-size:.6875rem;margin:3px 0;padding:4px 6px}
 #appView .compactSync .note,#appView .compactSettings p{font-size:.6875rem;margin:4px 0;line-height:1.4}
 #appView .registrationSyncCenter>section{border:1px solid var(--line);border-radius:4px;padding:8px 10px;margin:0 0 9px}
 #appView .registrationSyncCenter h2{font-size:.875rem;margin:0 0 4px}
 #appView .registrationSyncCenter a{font-size:.6875rem}
 #appView .registrationSyncCenter .registryPanel,#appView .registrationSyncCenter .productsErp{margin-top:5px}
 #appView .registryPanel #regMessage:empty{display:none}
 #appView .syncState{font-weight:600}
}
@media screen and (pointer:coarse){#appView .compactSync .miniBtn,#appView .registrationSyncCenter .miniBtn{min-height:36px}}

/* Account rows: small text and one compact strip of named icon actions. */
@media screen{
 #appView #accountsPanel :is(th,td){font-size:.75rem;line-height:1.25;padding:4px 6px;vertical-align:middle}
 #accountsPanel td small{display:block;font-size:.6875rem;line-height:1.2;margin:2px 0 0;color:var(--muted)}
 #accountsPanel .accountActionRow{display:flex;align-items:center;gap:4px;white-space:nowrap}
 #accountsPanel td:has(.accountActionRow){white-space:nowrap}
 #accountsPanel .accountActionRow .miniBtn{border-radius:3px}
 #appView #accountsPanel .note{font-size:.6875rem;line-height:1.3;margin:5px 0}
 #appView #accountsPanel>.top{margin:3px 0 7px}
 #appView #accountsPanel h2{font-size:1rem;margin:0}
 #appView #accountsPanel #accountSearch{font-size:.75rem;min-height:28px;padding:4px 7px}
}
@media screen and (min-width:901px){#accountsPanel td:has(.accountActionRow){width:1%}}
