/* Unified refresh controls at the right edge of table toolbars. */
.table-tools > :is(.table-refresh, .table-refresh-btn),
.attendance-table-toolbar > :is(.table-refresh, .table-refresh-btn) {
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  align-self: center;
  justify-self: end;
  flex: 0 0 36px;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  margin: 0 0 0 auto;
  padding: 0;
  border: 1px solid #d7e0e9;
  border-radius: 9px;
  background: #fff;
  color: #52647b;
  line-height: 1;
}
.table-tools > :is(.table-refresh, .table-refresh-btn) { order: 99; }
.table-tools > :is(.table-refresh, .table-refresh-btn) svg,
.attendance-table-toolbar > :is(.table-refresh, .table-refresh-btn) svg {
  display: block;
  width: 16px;
  height: 16px;
  margin: 0;
}
.table-tools > :is(.table-refresh, .table-refresh-btn):hover,
.attendance-table-toolbar > :is(.table-refresh, .table-refresh-btn):hover {
  border-color: #a8c8e7;
  background: #f1f7ff;
  color: #1762bb;
}
.attendance-table-panel .absence-approval-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}
.attendance-table-panel .absence-approval-toolbar > :is(.table-refresh, .table-refresh-btn) {
  margin-left: auto;
}

/* The global last-child SVG rule also matches the only icon in each tile. */
.dashboard-activity .dashboard-shortcut {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  align-items: center;
  column-gap: 10px;
  row-gap: 1px;
  min-height: 58px;
  padding: 8px 10px;
  text-align: left;
}
.dashboard-activity .dashboard-shortcut-icon {
  display: grid;
  place-items: center;
  grid-row: 1 / 3;
  width: 32px;
  height: 32px;
  margin: 0;
  border-radius: 9px;
  flex: none;
}
.dashboard-activity .dashboard-shortcut-icon svg {
  display: block;
  width: 17px;
  height: 17px;
  margin: 0;
  stroke-width: 2;
}
.dashboard-activity .dashboard-shortcut strong,
.dashboard-activity .dashboard-shortcut small {
  min-width: 0;
  line-height: 1.2;
}
.dashboard-activity .dashboard-shortcut strong { align-self: end; font-size: 13px; }
.dashboard-activity .dashboard-shortcut small { align-self: start; font-size: 13px; }
@media (max-width: 700px) {
  .dashboard-activity .dashboard-shortcut {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    min-height: 62px;
    text-align: left;
  }
  .dashboard-activity .dashboard-shortcut small { display: none; }
  .dashboard-activity .dashboard-shortcut-icon { grid-row: 1 / 3; }
  .dashboard-activity .dashboard-shortcut-grid { align-items: stretch; }
}
@media (max-width: 520px) {
  .dashboard-activity .dashboard-shortcut-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-activity .dashboard-shortcut-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Leave and Overtime: four controls on the same line. */
.attendance-table-panel .attendance-absence-toolbar {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) auto 36px;
  align-items: center;
  justify-content: stretch;
  column-gap: 10px;
  row-gap: 10px;
  padding: 14px 16px;
}
.attendance-table-panel .attendance-absence-toolbar > .attendance-table-entries { grid-column: 1; grid-row: 1; }
.attendance-table-panel .attendance-absence-toolbar > .attendance-table-search {
  grid-column: 2; grid-row: 1; min-width: 0; width: 100%; max-width: none;
}
.attendance-table-panel .attendance-absence-toolbar > .attendance-search-trigger { grid-column: 3; grid-row: 1; }
.attendance-table-panel .attendance-absence-toolbar > :is(.table-refresh, .table-refresh-btn) {
  grid-column: 4; grid-row: 1; margin: 0; justify-self: end;
  width: 36px; min-width: 36px; height: 36px; min-height: 36px;
  display: inline-grid; place-items: center;
}
@media (max-width: 760px) {
  .attendance-table-panel .attendance-absence-toolbar {
    grid-template-columns: minmax(0, 1fr) auto 36px;
    padding: 12px;
  }
  .attendance-table-panel .attendance-absence-toolbar > .attendance-table-entries {
    grid-column: 1 / -1; grid-row: 1;
  }
  .attendance-table-panel .attendance-absence-toolbar > .attendance-table-search {
    grid-column: 1; grid-row: 2;
  }
  .attendance-table-panel .attendance-absence-toolbar > .attendance-search-trigger {
    grid-column: 2; grid-row: 2;
  }
  .attendance-table-panel .attendance-absence-toolbar > :is(.table-refresh, .table-refresh-btn) {
    grid-column: 3; grid-row: 2;
  }
}

/* The supplied top-left piece and the other pieces cut from the existing transparent logo. */
.auth-loading-mark {
  position: relative; width: min(340px, 86vw); height: auto;
  aspect-ratio: 1932 / 465; margin-bottom: 4px;
  background: none; animation: none;
}
.auth-loading-mark .alm {
  position: absolute; inset: 0;
  background: url('/legacy/images/logo.png') center / 100% 100% no-repeat;
  will-change: transform, opacity, filter;
}
.auth-loading-mark .alm.icon-tl {
  inset: 8.898% auto auto 1.922%; width: 6.182%; height: 41.314%;
  background: url('/legacy/images/loader/icon-tl.png') center / 100% 100% no-repeat;
}
.auth-loading-mark .alm.icon-tr { clip-path: inset(7.839% 78.130% 49.576% 7.896%); }
.auth-loading-mark .alm.icon-bl { clip-path: inset(49.788% 91.896% 8.898% 1.922%); }
.auth-loading-mark .alm.icon-br { clip-path: inset(49.576% 78.130% 7.839% 7.896%); }
.auth-loading-mark .alm.l-k { clip-path: inset(31.144% 62.286% 12.288% 23.896%); }
.auth-loading-mark .alm.l-i1 { clip-path: inset(11.441% 55.065% 12.500% 38.909%); }
.auth-loading-mark .alm.l-w { clip-path: inset(31.568% 35.116% 12.288% 46.494%); }
.auth-loading-mark .alm.l-a { clip-path: inset(30.297% 20.832% 11.440% 64.519%); }
.auth-loading-mark .alm.l-r { clip-path: inset(31.144% 9.039% 12.500% 80.935%); }
.auth-loading-mark .alm.l-i2 { clip-path: inset(11.441% 1.922% 12.500% 92.052%); }
.auth-loading-mark .alm.icon-tl, .auth-loading-mark .alm.icon-tr,
.auth-loading-mark .alm.icon-bl, .auth-loading-mark .alm.icon-br {
  animation:
    kw-piece-in .85s cubic-bezier(.2,.9,.25,1.12) var(--d) both,
    kw-piece-shine .65s ease-in-out calc(1.05s + var(--d)) both;
}
.auth-loading-mark .alm.icon-tl { --dx:-46px; --dy:-30px; --rot:-18deg; --d:0s; }
.auth-loading-mark .alm.icon-tr { --dx:46px; --dy:-34px; --rot:14deg; --d:.07s; }
.auth-loading-mark .alm.icon-bl { --dx:-46px; --dy:34px; --rot:16deg; --d:.14s; }
.auth-loading-mark .alm.icon-br { --dx:46px; --dy:30px; --rot:-12deg; --d:.21s; }
.auth-loading-mark .alm.l-k, .auth-loading-mark .alm.l-i1,
.auth-loading-mark .alm.l-w, .auth-loading-mark .alm.l-a,
.auth-loading-mark .alm.l-r, .auth-loading-mark .alm.l-i2 {
  animation: kw-letter-in .6s cubic-bezier(.16,1,.3,1) var(--d) both;
}
.auth-loading-mark .alm.l-k { --d:.70s; }
.auth-loading-mark .alm.l-i1 { --d:.77s; }
.auth-loading-mark .alm.l-w { --d:.84s; }
.auth-loading-mark .alm.l-a { --d:.91s; }
.auth-loading-mark .alm.l-r { --d:.98s; }
.auth-loading-mark .alm.l-i2 { --d:1.05s; }
@keyframes kw-piece-in {
  0% { opacity:0; transform:translate(var(--dx),var(--dy)) rotate(var(--rot)) scale(.55); }
  55% { opacity:1; }
  100% { opacity:1; transform:translate(0,0) rotate(0) scale(1); }
}
@keyframes kw-piece-shine {
  0%,100% { filter:brightness(1) saturate(1); }
  45% { filter:brightness(1.3) saturate(1.25) drop-shadow(0 0 10px rgba(22,175,215,.55)); }
}
@keyframes kw-letter-in {
  0% { opacity:0; transform:translateY(42%) scale(.94); filter:brightness(0) blur(7px); }
  100% { opacity:1; transform:translateY(0) scale(1); filter:brightness(0) blur(0); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-loading-mark .alm { animation-duration:.01ms !important; animation-delay:0ms !important; }
}
