/* Readability layer: load after the existing screen styles. Corporate font
   families, uppercase headings, colors and component identity stay inherited. */
html,
body {
  font-size: 16px;
  line-height: 1.5;
}

table {
  font-size: 15px;
  line-height: 1.5;
}

/* Shared secondary text and the existing compact module-specific captions. */
small,
.small,
.brand-sub,
.nav-section-title,
.side-foot,
.page-sub,
.health span,
.health em,
.kpi span,
.kpi small,
.panel p.subtle,
.code,
.pc-metrics span,
.pill,
.profile span,
.form-section-hint,
.required-key,
th,
.note,
.empty,
.payroll-exception-card .exception-metrics span,
.payroll-exception-workflow p,
.payroll-closure-kpis span,
.payroll-closure-check span,
.payroll-closure-workflow p,
.chain span,
.source-card span,
.closure-docs span,
.nav-badge,
.report-card span,
.report-chat-msg,
.chart-label,
.report-list,
.report-source,
.report-history-item span,
.ai-scope-grid > div,
.ai-doc-lane span,
.ai-doc-queue-item span,
.ai-analysis-meta span,
.ai-profile-chip,
.ai-queue-shortcut p,
.processing-stats span,
.profile-coverage span,
.ai-system-profile span,
.personnel-flow span,
.mapping-preview span,
.code-legend span,
.template-active span,
.template-version span,
.payroll-diff-list span,
.payroll-package-item span,
.employment-history-grid span,
.employment-period span,
.personnel-group-head p,
.personnel-bulk-stats span,
.exit-guide span,
.attendance-lock-card p,
.workforce-budget-card span,
.workforce-budget-actions p,
.workforce-comparison-kpis span,
.cheque-flow span,
.auth-card p,
.auth-user-meta span,
.ai-demo-head p,
.ai-demo-check span,
.ai-demo-scenario span,
.permission-item-copy small,
.security-boundary-item span,
.ai-field-review-summary span,
.ai-field-original,
.employee-document-requirement span,
.employee-document-upload small,
.employee-document-upload-head span,
.employee-document-item span,
.onboarding-queue-kpis span,
.attendance-review-kpis span,
.attendance-day-origin,
.attendance-review-legend,
.headcount-request-kpis span,
.headcount-capacity-kpis span,
.headcount-request-actions form p,
.headcount-fulfillment-item span,
.employee-qualification-card span,
.personnel-doc-compliance-kpis span,
.employee-photo-empty,
.employee-photo-preview figcaption,
.employee-photo-message {
  font-size: 13px;
  line-height: 1.5;
}

label,
.form-section legend,
.ai-scope-grid b,
.personnel-flow b,
.cheque-flow b,
.auth-user-meta b,
.ai-demo-check b,
.permission-item-copy b,
.employee-bulk-delete-toolbar .employee-bulk-check,
.meal-day-editor label {
  font-size: 14px;
  line-height: 1.45;
}

input,
select,
textarea,
button,
.primary,
.ghost,
.text-btn,
.file-compact,
.compact-select,
.compact-input {
  font-size: 15px;
  line-height: 1.45;
}

.nav-control,
.auth-logout,
.module-doc-actions button,
.duplicate-actions button,
.report-prompts button,
.employee-actions button,
.personnel-jump-nav button,
.security-user-actions button,
.employee-document-actions button,
.employee-document-actions a,
.employee-qualification-card button,
.compliance-action button,
.attendance-day-cell select,
.meal-day-editor input {
  font-size: 14px;
  line-height: 1.45;
}

.page-title {
  font-size: 18px;
}

.report-card b,
.pc-metrics b {
  font-size: 15px;
  line-height: 1.45;
}

.employee-photo-panel .panel-head h3 {
  font-size: 16px;
}

/* Content and controls can grow vertically; long Turkish labels can wrap. */
.primary,
.ghost,
.text-btn,
.nav-control,
.auth-logout,
.personnel-jump-nav button,
.report-prompts button {
  min-height: 38px;
  height: auto;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.button-row,
.form-actions,
.employee-actions,
.employee-document-actions,
.module-doc-actions,
.security-user-actions,
.duplicate-actions,
.onboarding-action,
.review-row-actions,
.archive-actions-head {
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.button-row > *,
.form-actions > *,
.employee-actions > *,
.employee-document-actions > *,
.module-doc-actions > *,
.security-user-actions > *,
.onboarding-action > * {
  min-width: 0;
  max-width: 100%;
}

.personnel-archive-panel th:last-child,
.personnel-archive-panel td:last-child {
  width: 250px;
  min-width: 250px;
  max-width: 250px;
  white-space: normal;
}

.personnel-archive-panel .employee-actions {
  width: 100%;
  min-width: 0;
  align-items: stretch;
}

.employee-actions button {
  flex: 0 1 auto;
  padding: 8px 10px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.personnel-archive-panel td,
.personnel-doc-compliance-table td {
  vertical-align: top;
}

.personnel-archive-panel td .small,
.attendance-matrix .review-person,
.attendance-matrix .review-state {
  white-space: normal;
}

.personnel-archive-panel td .small {
  max-width: 28rem;
}

.pill {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.meal-day-editor {
  min-width: 130px;
  gap: 5px;
}

.meal-day-editor input {
  width: 45px;
  min-width: 45px;
}

.attendance-day-cell {
  width: 62px;
  min-width: 62px;
}

.attendance-day-cell select {
  min-width: 54px;
}

.chart-group {
  min-width: 78px;
  padding-bottom: 42px;
}

.chart-label {
  width: 76px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.report-chat-compose button,
.security-delete-form button {
  height: auto;
  min-height: 42px;
}

/* The header used to be fixed at 76px, clipping enlarged labels on laptops. */
.topbar {
  height: auto;
  min-height: 76px;
  padding: 12px 28px;
  flex-wrap: wrap;
  row-gap: 10px;
}

.topbar-title {
  flex: 1 1 220px;
  min-width: 0;
  max-width: 100%;
}

.topbar .actions,
.auth-user {
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
}

.topbar .actions {
  flex-shrink: 1;
  justify-content: flex-end;
}

.auth-user-meta {
  min-width: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.auth-card {
  max-height: calc(100dvh - 44px);
  overflow-y: auto;
}

@media (max-width: 1400px) {
  .employee-document-upload,
  .personnel-doc-compliance-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .personnel-bulk-controls,
  .onboarding-queue-tools,
  .employment-history-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .employee-qualification-card {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 780px) {
  .topbar {
    padding: 12px;
  }

  .topbar-title {
    flex-basis: 150px;
  }

  .topbar .actions {
    flex-basis: 100%;
    margin-left: 0;
  }

  .page-title {
    font-size: 17px;
  }

  .personnel-bulk-controls,
  .employee-document-upload,
  .personnel-doc-compliance-tools,
  .onboarding-queue-tools,
  .employment-history-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Keep horizontal table scrolling, without covering most of a phone screen
     with a sticky action column. No data columns are removed or hidden. */
  .personnel-archive-panel th:last-child,
  .personnel-archive-panel td:last-child {
    position: static;
    right: auto;
    box-shadow: none;
  }

  .employee-bulk-delete-toolbar .small,
  .attendance-review-toolbar .small {
    flex-basis: 100%;
    margin-left: 0;
  }
}
