/* UI clean-up + interaction polish (added after recovery). Bump the file name (clean-3.css) when editing: Firebase caches .css for a year. */

/* Top bar: the Refresh button repeats what opening a page already does (every page loads fresh data). */
.refresh-button { display: none !important; }

/* Developer notes that end users don't need */
.balance-panel-header .muted-text { display: none !important; }   /* Leave: "Defaults: Annual 18 · Sick 10 ..." */
.payroll-toolbar ~ p.muted-text { display: none !important; }      /* Payroll: formula + "mobile app" note */
.report-hint { display: none !important; }                         /* Reports: repeats the filter labels below it */

/* Settings: a role with no permissions showed an empty card */
.role-card .permission-list:empty::after {
  content: "Self-service only (own attendance, leave and payslips)";
  color: var(--muted);
  font-size: .9em;
}

/* Dashboard for staff without the Employees page (Employee role): Recent Activity (audit log) and
   Leave Queue (approvals) are always empty for them, so hide those two panels. */
body:has(.nav-list):not(:has(.nav-list a[href="/employees"])) app-dashboard .split-grid { display: none !important; }

/* ---------------------------------------------------------------- hover / press / focus for every button */
button, .nav-item, .small-button, .ghost-button, .primary-button, .danger-button, .icon-button {
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .08s ease;
}
button:not(:disabled), .nav-item { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }

.primary-button:not(:disabled):hover { background: var(--teal-dark); box-shadow: 0 4px 12px rgba(15, 118, 110, .28); }
.danger-button:not(:disabled):hover { box-shadow: 0 4px 12px rgba(190, 75, 92, .28); }

.ghost-button:not(:disabled):hover,
.small-button:not(:disabled):hover {
  background: rgba(15, 118, 110, .08);
  border-color: var(--teal);
  color: var(--teal-dark);
}
.icon-button:not(:disabled):hover { background: var(--surface-2); color: var(--teal-dark); }

/* Language switch: the active one stays filled; the other gets a soft hover */
.lang-btn:not(.active):not(:disabled):hover { background: rgba(15, 118, 110, .08); border-color: var(--teal); color: var(--teal-dark); }

/* Segmented controls (attendance work mode, report categories) */
.segmented button:not(.active):not(:disabled):hover { background: var(--surface-2); color: var(--teal-dark); }

/* Sidebar (dark background) */
.sidebar .ghost-button:not(:disabled):hover { background: var(--nav-soft); border-color: rgba(255, 255, 255, .35); color: #fff; }
.nav-item:not(.active):hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active { box-shadow: inset 3px 0 0 var(--amber); }

/* Pressed + keyboard focus */
button:not(:disabled):active, .nav-item:active { transform: translateY(1px); }
button:focus-visible, .nav-item:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Table rows: show which row the pointer is on */
tbody tr { transition: background-color .12s ease; }
tbody tr:hover { background: rgba(15, 118, 110, .045); }

/* ---------------------------------------------------------------- fixed sidebar (desktop) */
/* Stays in place while the page scrolls; scrolls itself only if the window is very short.
   Phones keep the existing slide-in menu. */
@media (min-width: 761px) {
  .sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    overflow-y: auto;
  }
}

/* ---------------------------------------------------------------- pager: « First  ‹ Previous   Page x of y   Next ›  Last » */
/* DOM order is Previous, text, Next, First, Last (First/Last were appended to the compiled templates). */
.pagination > button:nth-of-type(3) { order: -2; }   /* First */
.pagination > button:nth-of-type(1) { order: -1; }   /* Previous */
.pagination > span { order: 0; flex: 1; text-align: center; }
.pagination > button:nth-of-type(2) { order: 1; }    /* Next */
.pagination > button:nth-of-type(4) { order: 2; }    /* Last */

/* Logo: two people forming an H (favicon.svg) replaces the plain "HR" badge */
.brand-mark{font-size:0!important;color:transparent!important;background:url(favicon.svg) center/100% 100% no-repeat!important;border-radius:10px}
