body { line-height: 1.45; }
[hidden] { display: none !important; }
tr[hidden] td::before, details:not([open]) td::before { content: none !important; }
.grid > *, .form-row > *, .metric, .tile-card { min-width: 0; }
.card, .tile-card, .list-item, td, .metric { overflow-wrap: anywhere; }
details > summary { cursor: pointer; padding: 12px 0; font-weight: 700; min-height: 44px; }
details[open] > summary { margin-bottom: 8px; }
details > summary::marker { color: #0a4ea3; }
.schedule-editor fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; }
.schedule-editor legend { font-weight: 700; }
.schedule-editor .form-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
.history-pager { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 14px; }
.history-pager a { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 12px; }
.small, .kpi-sub, .metric .label, .tile-card .meta, .employee-card-grid small { font-size: 13px; line-height: 1.4; }
.employee-card-grid small { color: #fff; }
.employee-admin-card.inactive { opacity: 1; }
.history-section > summary { font-size: 18px; }
.history-search { width: 100%; min-height: 44px; font: inherit; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--control-line); border-radius: 8px; }
.history-pager button:disabled { opacity: .55; cursor: default; }
.page-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 12px 0; }
.page-toolbar .field { margin: 0; }
.connection-status { position: sticky; top: 0; z-index: 60; }
@media (max-width: 900px) {
  .hero .section-head .actions:has(> :last-child:nth-child(2)) { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero .section-head .actions:has(> :last-child:nth-child(2)) .btn { overflow-wrap: normal; }
  .top .brand .small { font-size: 12px; opacity: 1; }
  .mobile-app-nav a, .mobile-app-nav button { font-size: 12px; min-width: 0; }
  .mobile-app-nav span { overflow-wrap: normal; }
  .employee-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 360px) {
  .mobile-app-nav { column-gap: 0; padding-left: 2px; padding-right: 2px; }
  .mobile-app-nav a, .mobile-app-nav button { padding-left: 0; padding-right: 0; font-weight: 600; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 12px; }
  h2 { font-size: 24px; }
  .metric .label { font-size: 12px; }
  .hero .section-head .actions .btn, .dashboard-shortcuts .btn { font-size: 13px; }
  .tile-card strong { font-size: 15px; }
  .dashboard-shortcuts p { font-size: 14px; line-height: 1.4; }
  .mobile-card-table .tbl tbody, table.mobile-card-table tbody { grid-template-columns: minmax(0,1fr); }
  .mobile-card-table .tbl tr, table.mobile-card-table tr { padding: 12px; border-radius: 8px; }
  .mobile-card-table .tbl td, table.mobile-card-table td { display: grid; grid-template-columns: minmax(88px,32%) minmax(0,1fr); gap: 8px; padding: 4px 0; font-size: 15px; }
  .mobile-card-table .tbl td::before, table.mobile-card-table td::before { font-size: 12px; text-transform: none; margin: 0; }
  .mobile-card-table .tbl td:has(form), table.mobile-card-table td:has(form) { display: block; padding-top: 10px; }
  .mobile-card-table .tbl td[colspan], table.mobile-card-table td[colspan] { display: block; }
  .mobile-card-table td form, .inline-process-form { width: 100%; }
  .pv-members-card .tile-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .payment-tiles { grid-template-columns: minmax(0,1fr); }
  .payment-tiles .mobile-inline-form { grid-template-columns: minmax(0,1fr) auto; }
  .list-item { align-items: flex-start; }
  .list-item > div { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
