/* Default workspace scale; browser zoom and pinch zoom remain available. */
@media screen {
  body { zoom: .8; }
  body, #screen-app, #screen-login { min-height: 125dvh; }
  .app-body { min-height: calc(125dvh - 60px); }
  .sidebar { height: calc(125dvh - 68px); }
}
@media screen and (max-width: 860px) {
  .sidebar { height: calc(125dvh - 56px); }
}
@media screen and (max-width: 767px) {
  .main-content { padding: 10px 10px 20px; }
  #page-punch > .attendance-module-header {
    min-height: 0;
    padding: 12px;
    margin-bottom: 10px;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
  }
  #page-punch .attendance-module-heading { flex: 1 1 auto; gap: 10px; }
  #page-punch .attendance-module-heading h2 { font-size: 17px; }
  #page-punch .attendance-module-heading p { font-size: 11px; line-height: 1.3; }
  #page-punch .attendance-module-icon { width: 36px; height: 36px; flex-basis: 36px; }
  #page-punch .attendance-module-header-actions:empty { display: none; }
  #page-punch .attendance-module-notifications { width: 38px; height: 38px; flex-basis: 38px; }
  #page-punch .dashboard-kudus-feature { min-height: 64px; padding: 10px 12px; margin-bottom: 10px; }
  #page-punch .dashboard-kudus-feature-title { font-size: 14px; }
  #page-punch .dashboard-kudus-feature-message { margin-top: 4px; font-size: 12px; }
  #page-punch .dashboard-command-row { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 10px; }
  #page-punch .dashboard-clock-panel { min-height: 76px; padding: 12px 16px; }
  #page-punch .dashboard-clock-panel .clock { font-size: 28px; line-height: 1.15; }
  #page-punch .dashboard-clock-panel .clock-date { margin-top: 4px; font-size: 12px; }
  #page-punch .dashboard-command-row .punch-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
  #page-punch .punch-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 96px;
    padding: 24px 4px 8px;
    border-width: 1px;
    border-top-width: 3px;
    border-radius: 9px;
    text-align: center;
    box-shadow: none;
  }
  #page-punch .punch-icon { width: 30px; height: 30px; margin: 0; border-radius: 8px; box-shadow: none; }
  #page-punch .punch-icon svg { width: 19px; height: 19px; }
  #page-punch .punch-label { font-size: 12px; line-height: 1.2; white-space: nowrap; }
  #page-punch .punch-time { font-size: 10px; line-height: 1.2; overflow-wrap: anywhere; }
  #page-punch .punch-time:empty { display: none; }
  #page-punch .punch-btn::after { top: 6px; right: 50%; transform: translateX(50%); padding: 2px 4px; font-size: 8px; white-space: nowrap; }
  #page-punch .punch-btn:hover:not(:disabled) { transform: none; }
  #page-punch .status-bar { margin-bottom: 10px; padding: 9px 10px; }
  #page-punch .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
  #page-punch .stat-grid > .stat-card:last-child { grid-column: 1 / -1; }
  #page-punch .stat-card { min-width: 0; }
  #page-punch .stat-sub { overflow-wrap: anywhere; }
  #page-punch .stat-card { padding: 12px; }
}

@media screen {
  #screen-login { padding: 28px 20px; }
  #screen-login .login-card { flex: 0 0 auto; max-width: 440px; border-radius: 16px; }
  #screen-login #login-err {
    margin: 0 28px 22px;
    padding: 10px 12px !important;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff1f2;
    color: #b91c1c !important;
    font-size: 12px;
    line-height: 1.5;
    text-align: left !important;
  }
}
