/* Dashboard and loading refinements, layered after ui-refinement.css. */
.auth-loading { overflow: hidden; }
.auth-loading-card { gap: 10px; animation: kiwari-card-enter .55s ease-out both; }
.auth-loading-mark { width: min(280px, 100%); height: 90px; background: url('/legacy/images/logo.jpg') center / contain no-repeat; animation: kiwari-logo-slide 1.95s cubic-bezier(.22, 1, .36, 1) both; }
.auth-loading-track { width: 200px; height: 4px; overflow: hidden; border-radius: 999px; background: #dce8f4; margin: 8px 0 6px; }
.auth-loading-glide { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6353dc, #2798dc, #16afd7); transform: translateX(-100%); animation: kiwari-track-slide 1.9s .1s cubic-bezier(.28,.68,.26,1) forwards; }
.auth-loading-card strong { font-size: 14px; letter-spacing: .01em; }
@keyframes kiwari-card-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes kiwari-logo-slide { 0% { opacity: 0; transform: translateX(-72px) scale(.97); } 34% { opacity: 1; transform: translateX(6px) scale(1); } 48%, 100% { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes kiwari-track-slide { to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .auth-loading-card, .auth-loading-mark, .auth-loading-glide { animation-duration: .01ms; animation-delay: 0ms; } }

/* Dense dashboard composition: compact shortcuts, metrics beside calendar. */
.dashboard-activity { grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr); align-items: stretch; }
.dashboard-activity .dashboard-shortcuts { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(175px, 220px) minmax(0, 1fr); gap: 18px; align-items: center; padding: 15px 18px; }
.dashboard-activity .dashboard-shortcuts .panel-head { margin: 0; }
.dashboard-activity .dashboard-shortcut-grid { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-content: center; }
.dashboard-activity .dashboard-shortcut { min-height: 64px; padding: 8px 11px; display: grid; grid-template-columns: 32px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 9px; row-gap: 0; justify-content: start; align-content: center; }
.dashboard-activity .dashboard-shortcut-icon { grid-row: 1 / 3; width: 32px; height: 32px; margin: 0; }
.dashboard-activity .dashboard-shortcut strong { align-self: end; }
.dashboard-activity .dashboard-shortcut small { align-self: start; }
.dashboard-activity > .kpi-grid { grid-column: 1; grid-row: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.dashboard-activity > .kpi-grid .kpi { min-width: 0; padding: 14px; }
.dashboard-activity > .kpi-grid .kpi h2 { font-size: 21px; }
.dashboard-activity > .dashboard-calendar { grid-column: 2; grid-row: 2; }
.dashboard-calendar::before { inset: 20% 0; background-size: 520px; opacity: .075; }
@media (max-width: 1100px) {
  .dashboard-activity { grid-template-columns: 1fr; }
  .dashboard-activity > .dashboard-calendar, .dashboard-activity > .kpi-grid { grid-column: 1; grid-row: auto; }
}
@media (max-width: 700px) {
  .dashboard-activity .dashboard-shortcuts { grid-template-columns: 1fr; gap: 12px; }
  .dashboard-activity .dashboard-shortcut-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-activity .dashboard-shortcut { display: flex; min-height: 76px; flex-direction: column; align-items: center; text-align: center; gap: 5px; }
  .dashboard-activity .dashboard-shortcut-icon { flex: 0 0 32px; }
  .dashboard-activity .dashboard-shortcut small { display: none; }
}
@media (max-width: 430px) { .dashboard-activity > .kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; } .dashboard-activity > .kpi-grid .kpi { padding: 10px; } }

/* Final alignment for the header, compact dashboard shortcuts, and table tools. */
.top-actions { gap: 8px; }
.top-actions .topbar-icon { flex: 0 0 36px; }
.top-actions .profile { min-height: 40px; padding: 3px 8px; gap: 8px; }
.top-actions .profile .avatar { width: 34px; height: 34px; flex: 0 0 34px; }
.top-actions .profile > div:not(.avatar) { min-width: 0; }
.top-actions .profile b, .top-actions .profile small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions .profile > svg { flex: 0 0 13px; }

.absence-approval-panel .attendance-table-toolbar,
.overtime-approval-panel .attendance-table-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 10px 16px; gap: 12px; }
.absence-approval-panel .attendance-table-toolbar > .table-refresh,
.overtime-approval-panel .attendance-table-toolbar > .table-refresh { margin-left: auto; width: 34px; height: 34px; flex: 0 0 34px; }

.dashboard-activity .dashboard-shortcuts { grid-template-columns: minmax(150px, 180px) minmax(0, 1fr); gap: 12px; padding: 12px 16px; }
.dashboard-activity .dashboard-shortcut-grid { gap: 8px; }
.dashboard-activity .dashboard-shortcut { min-height: 56px; padding: 7px 10px; border-radius: 9px; }
.dashboard-activity .dashboard-shortcut-icon { width: 30px; height: 30px; }
.dashboard-activity .dashboard-shortcut strong { font-size: 13px; }
.dashboard-activity .dashboard-shortcut small { font-size: 13px; font-weight: 500; }
.dashboard-activity > .kpi-grid .kpi { min-height: 132px; }
@media (max-width: 700px) {
  .dashboard-activity .dashboard-shortcuts { grid-template-columns: 1fr; gap: 10px; }
  .dashboard-activity .dashboard-shortcut { min-height: 70px; }
}
@media (max-width: 460px) {
  .top-actions .profile { width: 44px; padding: 3px 4px; justify-content: center; }
  .top-actions .profile .avatar { width: 32px; height: 32px; flex-basis: 32px; }
}
