.admin-app,
.admin-subpage {
  --bg: #f4f6f9;
  --panel: #fff;
  --text: #172335;
  --muted: #5d6979;
  --line: #dce3ea;
  --accent: #08649b;
  --accent-dark: #084b81;
  --danger: #b4232e;
  --warning: #946200;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.admin-app button,
.admin-subpage button,
.admin-app input,
.admin-subpage input,
.admin-app select,
.admin-subpage select,
.admin-app textarea,
.admin-subpage textarea {
  font: inherit;
}

.admin-app :focus-visible,
.admin-subpage :focus-visible {
  outline: 3px solid #81b9e7;
  outline-offset: 2px;
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: 254px;
  padding: 20px 12px 14px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 2px 9px;
  color: var(--text);
  font-size: 20px;
  font-weight: 750;
  text-decoration: none;
}

.admin-brand-mark {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 7px;
  object-fit: contain;
}

.admin-brand-role {
  margin-left: auto;
  padding: 3px 6px;
  border-radius: 4px;
  background: #e6f1fb;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-nav-label {
  margin: 36px 12px 9px;
  color: #758191;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-app .admin-tabs {
  display: grid;
  gap: 2px;
  margin: 0;
  overflow: visible;
}

.admin-app .tab-button,
.admin-nav-link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 39px;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #405064;
  font-size: 14px;
  font-weight: 550;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.admin-app .tab-button:hover:not(.active),
.admin-nav-link:hover {
  background: #f0f4f8;
  color: var(--text);
}

.admin-app .tab-button.active,
.admin-nav-link.active {
  background: #e6f1fb;
  color: var(--accent);
  font-weight: 700;
}

.admin-sidebar-footer {
  display: grid;
  gap: 2px;
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.admin-sidebar-footer span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.admin-app .admin-shell {
  width: auto;
  max-width: none;
  min-width: 0;
  margin: 0 0 0 254px;
  padding: 0 30px 44px;
}

.admin-app .admin-header,
.admin-subpage .admin-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 110px;
  margin: 0 0 26px;
  padding: 22px 0 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-app .admin-header h1,
.admin-subpage .admin-header h1 {
  margin: 0 0 4px;
  font-size: 28px;
  line-height: 1.2;
}

.admin-eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.admin-header-subtitle,
.admin-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-app .admin-header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-live-indicator {
  color: #336b57;
  font-size: 13px;
  white-space: nowrap;
}

.admin-live-indicator::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #2b9a6c;
  content: "";
}

.admin-logout {
  padding: 9px 0;
  border: 0;
  background: none;
  color: #a63542;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.admin-logout:hover { text-decoration: underline; }

.admin-section-heading {
  margin: 0 0 14px;
}

.admin-section-heading h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.admin-app .primary-button,
.admin-app .secondary-button {
  width: auto;
  min-height: 38px;
  margin-top: 0;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 700;
  transform: none;
}

.admin-app .secondary-button,
.admin-subpage .secondary-link,
.admin-subpage .secondary-button {
  border: 1px solid var(--line);
  background: #fff;
}

.admin-app .secondary-button:hover,
.admin-subpage .secondary-link:hover,
.admin-subpage .secondary-button:hover {
  background: #edf3f8;
}

.admin-app .dashboard-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.admin-app .stat-card {
  min-width: 0;
  min-height: 112px;
  padding: 17px;
  border-color: var(--line);
  box-shadow: none;
}

.admin-app .stat-number {
  font-size: 30px;
  line-height: 1.1;
}

.admin-app .stat-label {
  margin: 10px 0 0;
  font-size: 13px;
}

.admin-app .stat-card-attention .stat-number {
  color: var(--danger);
}

.admin-app .section-grid {
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.75fr);
  align-items: start;
}

.admin-app .section-grid > * {
  min-width: 0;
}

.admin-app .admin-card,
.admin-app .table-wrap,
.admin-app .admin-form,
.admin-app .announcement-card,
.admin-subpage .admin-card,
.admin-subpage .table-wrap {
  border-color: var(--line);
  box-shadow: none;
}

.admin-app .admin-card,
.admin-subpage .admin-card {
  padding: 18px;
}

.admin-app th,
.admin-subpage th {
  padding: 12px 13px;
  background: #f0f3f8;
  color: #526072;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.admin-app td,
.admin-subpage td {
  padding: 12px 13px;
  font-size: 13px;
}

.admin-app tbody tr:hover,
.admin-subpage tbody tr:hover {
  background: #f8fbfd;
}

.admin-app .table-wrap,
.admin-subpage .table-wrap {
  scrollbar-color: #aab7c5 transparent;
  scrollbar-width: thin;
}

.admin-app .compact-table table {
  min-width: 480px;
}

.admin-app .admin-card .table-wrap {
  max-width: 100%;
}

.admin-app .employee-view-tabs {
  display: flex;
  gap: 5px;
  margin: 0 0 22px;
  border-bottom: 1px solid var(--line);
}

.admin-app .employee-view-tabs .secondary-button {
  min-height: 42px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
}

.admin-app .employee-view-tabs .secondary-button[aria-selected="true"] {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.admin-app .section-heading {
  align-items: center;
  margin-bottom: 14px;
}

.admin-app .section-heading h2 {
  margin: 0;
  font-size: 20px;
}

.admin-count {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 7px;
  border-radius: 4px;
  background: #e6f1fb;
  color: var(--accent);
  font-size: 12px;
  vertical-align: middle;
}

.employee-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.employee-filters label {
  font-size: 12px;
  font-weight: 700;
}

.employee-filters input {
  width: min(390px, 100%);
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.admin-app .employee-table {
  min-width: 850px;
  table-layout: fixed;
}

.admin-app .employee-table th:first-child,
.admin-app .employee-table td:first-child {
  width: 26%;
}

.admin-app .employee-table th:nth-child(2),
.admin-app .employee-table td:nth-child(2) {
  width: 19%;
}

.admin-app .employee-table th:nth-child(3),
.admin-app .employee-table td:nth-child(3) {
  width: 21%;
}

.admin-app .employee-table td {
  overflow-wrap: anywhere;
  vertical-align: middle;
  font-size: 14px;
}

.admin-app .employee-table tbody tr { height: 66px; }

.employee-role { font-weight: 600; }
.employee-secondary { margin-top: 3px; color: var(--muted); font-size: 12px; }

.admin-app .employee-person {
  min-width: 0;
}

.admin-app .employee-name {
  color: var(--text);
  text-decoration: none;
}

.admin-app .employee-name:hover {
  color: var(--accent);
  text-decoration: underline;
}

.admin-app .avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #d8eaf8;
  color: #154e78;
  font-size: 14px;
  overflow: hidden;
}

.admin-app .avatar img { width: 100%; height: 100%; object-fit: cover; }

.admin-app .status-pill {
  border-radius: 5px;
  white-space: nowrap;
}

.admin-app .status-pill.active {
  background: #e4f5eb;
  color: #166038;
}

.admin-app .status-pill.pending {
  background: #fff2d7;
  color: #805600;
}

.table-empty {
  margin: 0;
  padding: 30px 14px;
  color: var(--muted);
  text-align: center;
}

.admin-app .admin-toolbar,
.admin-app .admin-form {
  max-width: 100%;
}

.admin-app .message.error,
.admin-subpage .message.error {
  color: var(--danger);
}

.admin-toast {
  position: fixed;
  z-index: 100;
  top: 22px;
  right: 22px;
  width: min(360px, calc(100vw - 32px));
  padding: 13px 16px 13px 44px;
  border: 1px solid #b5e2ce;
  border-radius: 7px;
  background: #f4fff9;
  box-shadow: 0 8px 28px rgba(21, 53, 77, .14);
  color: #195a3f;
  font-size: 14px;
  font-weight: 600;
}

.admin-toast::before {
  position: absolute;
  left: 15px;
  top: 12px;
  content: "✓";
  font-weight: 800;
}

.admin-toast.error { border-color: #efc3c8; background: #fff7f7; color: #9d2431; }
.admin-toast.error::before { content: "!"; }
.admin-toast[hidden] { display: none; }

.admin-login-page {
  --accent: #08649b;
  min-height: 100vh;
  margin: 0;
  background: #f4f6f9;
  color: #172335;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.admin-login-page * { box-sizing: border-box; }
.admin-login-layout { width: min(420px, calc(100% - 32px)); margin: 0 auto; padding-top: min(15vh, 125px); }
.admin-login-brand { display: flex; align-items: center; gap: 10px; margin: 0 0 32px; font-size: 24px; font-weight: 750; }
.admin-login-brand img { border-radius: 8px; }
.admin-login-form { display: grid; gap: 11px; padding: 30px; border: 1px solid #dce3ea; border-radius: 8px; background: #fff; box-shadow: 0 12px 40px rgba(22, 43, 62, .06); }
.admin-login-form h1 { margin: 0; font-size: 26px; }
.admin-login-subtitle { margin: 0 0 14px; color: #5d6979; font-size: 14px; }
.admin-login-form label { margin-top: 6px; font-size: 13px; font-weight: 650; }
.admin-login-form input { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #cfd9e3; border-radius: 5px; background: #fff; font: inherit; }
.admin-login-form input:focus { outline: 2px solid #87bfe0; outline-offset: 1px; }
.admin-login-form button { min-height: 44px; margin-top: 12px; border: 0; border-radius: 5px; background: #08649b; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.admin-login-form button:hover { background: #084b81; }
.admin-login-form button:disabled { opacity: .65; cursor: wait; }
.admin-login-error { margin: 3px 0 0; color: #b4232e; font-size: 13px; }
.admin-login-error[hidden] { display: none; }

.admin-subpage .admin-shell {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: 40px;
}

.admin-subpage .brand {
  margin: 0 0 4px;
  color: var(--accent);
}

.admin-subpage .employee-page-card {
  align-content: start;
}

.admin-subpage .primary-button,
.admin-subpage .danger-button {
  min-height: 42px;
  margin-top: 0;
}

.admin-audit table {
  min-width: 760px;
}

.admin-audit .audit-status {
  min-height: 20px;
  color: var(--danger);
}

@media (max-width: 1180px) {
  .admin-app .dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-app .section-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 850px) {
  .admin-subpage .employee-page-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-subpage .employee-profile-card {
    grid-row: auto;
  }

  .admin-sidebar {
    position: static;
    width: auto;
    padding: 8px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-brand {
    min-height: 42px;
  }

  .admin-nav-label,
  .admin-sidebar-footer {
    display: none;
  }

  .admin-app .admin-tabs {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .admin-app .tab-button,
  .admin-nav-link {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .admin-app .admin-shell {
    margin: 0;
    padding: 0 18px 36px;
  }
}

@media (max-width: 620px) {
  .admin-app .admin-header-actions { justify-content: flex-start; }

  .admin-app .admin-header,
  .admin-subpage .admin-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    margin-bottom: 20px;
    padding: 20px 0 16px;
  }

  .admin-app .admin-header h1,
  .admin-subpage .admin-header h1 {
    font-size: 22px;
  }

  .admin-app .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-app .stat-card {
    min-height: 100px;
    padding: 14px;
  }

  .admin-app .stat-number {
    font-size: 26px;
  }

  .admin-app .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-app .employee-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-app .employee-filters input {
    width: 100%;
  }

  .admin-subpage .admin-shell {
    width: calc(100% - 28px);
  }
}

/* Checked desktop: use the same type, icons, and blue as the mobile app. */
@font-face { font-family: "Checked Inter"; src: url("/static/checked-inter-regular.font") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Checked Inter"; src: url("/static/checked-inter-semibold.font") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Checked Inter"; src: url("/static/checked-inter-bold.font") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Checked Symbols"; src: url("/static/checked-material.font") format("truetype"); font-weight: 400; font-display: block; }

.admin-app,
.admin-subpage {
  --bg: #f8f9ff;
  --text: #0b1c30;
  --muted: #596578;
  --line: #dbe1ef;
  --accent: #0051d5;
  --accent-dark: #003ea8;
  font-family: "Checked Inter", Inter, sans-serif;
}

.admin-icon {
  display: inline-block;
  flex: none;
  font: 400 20px/1 "Checked Symbols";
  font-feature-settings: "liga";
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  white-space: nowrap;
}

.admin-brand-mark { width: 30px; height: 30px; flex-basis: 30px; border-radius: 0; }
.admin-brand-role { background: #e5eeff; }
.admin-app .tab-button,
.admin-nav-link { gap: 11px; }
.admin-app .tab-button .admin-icon,
.admin-nav-link .admin-icon { color: #687f9e; }
.admin-app .tab-button.active,
.admin-nav-link.active { background: #e5eeff; }
.admin-app .tab-button.active .admin-icon { color: var(--accent); }
.admin-app .tab-button:hover:not(.active) { background: #eff4ff; }
.admin-app .admin-tab-panel.active { animation: admin-panel-enter .2s ease-out both; }
@keyframes admin-panel-enter { from { opacity: .7; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.admin-app .admin-header,
.admin-subpage .admin-header { min-height: 92px; margin-bottom: 22px; }
.admin-app .admin-header h1,
.admin-subpage .admin-header h1 { font-size: 27px; letter-spacing: -.02em; }
.admin-eyebrow { color: #7188a7; }
.admin-live-indicator { color: #647c9a; }
.admin-live-indicator::before { background: #078c65; }
.admin-app #refreshButton { display: inline-flex; align-items: center; gap: 7px; }
.admin-app #refreshButton.is-loading .admin-icon { animation: admin-refresh-spin .9s linear infinite; }
@keyframes admin-refresh-spin { to { transform: rotate(360deg); } }

.admin-app .dashboard-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: #fff;
}
.admin-app .stat-card {
  position: relative;
  min-height: 100px;
  padding: 17px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .16s ease;
}
.admin-app .stat-card:last-child { border-right: 0; }
.admin-app .stat-card:hover { background: #eff4ff; }
.admin-app .stat-card:active { background: #e5eeff; }
.admin-app .stat-card .stat-icon { position: absolute; top: 17px; right: 17px; color: var(--accent); }
.admin-app .stat-number { font-size: 27px; line-height: 1.15; }
.admin-app .stat-label { margin-top: 7px; color: #687e99; font-size: 12px; }
.admin-app .stat-card-attention .stat-number { color: var(--text); }
.dashboard-status-bar {
  display: flex;
  height: 7px;
  margin-bottom: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #e5eeff;
}
.dashboard-status-segment { height: 100%; transition: width .35s ease; }
.dashboard-status-segment.working { background: #0051d5; }
.dashboard-status-segment.finished { background: #96a8c2; }
.dashboard-status-segment.not-started { background: #e5eeff; }
.dashboard-status-legend { display: flex; flex-wrap: wrap; gap: 8px 17px; margin: 0 0 19px; color: #647a98; font-size: 11px; }
.dashboard-status-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dashboard-status-legend span::before { width: 8px; height: 8px; border-radius: 50%; background: #e5eeff; content: ""; }
.dashboard-status-legend .working::before { background: #0051d5; }
.dashboard-status-legend .finished::before { background: #96a8c2; }
.admin-app .section-grid { grid-template-columns: minmax(0, 1.6fr) minmax(270px, .8fr); gap: 16px; }
.admin-app .admin-card { border-radius: 8px; }
.admin-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.admin-card-heading h2 { margin: 0 !important; }
.admin-text-action { border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.admin-text-action:hover { text-decoration: underline; }
.dashboard-employee-link { color: var(--text); font-weight: 700; text-decoration: none; }
.dashboard-employee-link:hover { color: var(--accent); text-decoration: underline; }
.dashboard-status-pill { display: inline-block; padding: 5px 8px; border-radius: 5px; background: #eef2f7; color: #637894; font-size: 11px; font-weight: 600; white-space: nowrap; }
.dashboard-status-pill.working { background: #e4f5eb; color: #087a50; }
.dashboard-status-pill.finished { background: #e8eef8; color: #4c6589; }
.admin-app .compact-table table { min-width: 620px; }
.admin-app .compact-table td { white-space: nowrap; }
.employee-row-link { cursor: pointer; transition: background-color .16s ease; }
.employee-row-link:hover { background: #eff4ff !important; }
.employee-row-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.admin-detail-brand { display: flex; align-items: center; gap: 8px; color: var(--text) !important; font-size: 19px; }
.admin-detail-brand img { width: 27px; height: 27px; object-fit: contain; }
.admin-detail-brand span { margin-left: 5px; color: var(--muted); font-size: 13px; font-weight: 600; }
.employee-back-link { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.employee-back-link .admin-icon { font-size: 18px; }
.admin-subpage .employee-header-save { min-height: 40px; margin: 0; padding: 8px 16px; }
.admin-subpage .employee-page-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.admin-subpage .employee-page-card { border-radius: 8px; transition: border-color .16s ease; }
.admin-subpage .employee-page-card:focus-within { border-color: #8bb6fc; }
.admin-subpage .employee-profile-card,
.admin-subpage .employee-activity-card,
.admin-subpage .employee-fines-card { grid-column: 1 / -1; grid-row: auto; }
.admin-subpage .employee-profile-card { gap: 18px; padding: 20px; }
.employee-profile-summary { display: flex; align-items: center; gap: 16px; min-width: 0; }
.admin-subpage .employee-profile-card .employee-photo-placeholder {
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  aspect-ratio: 1;
  margin: 0;
  border-radius: 16px;
  background: #edf3ff;
  color: #42618a;
  font-size: 12px;
}
.admin-subpage .employee-profile-card .employee-detail-header { flex: 1; align-items: center; min-width: 0; margin: 0; }
.admin-subpage .employee-profile-card .employee-detail-header h2 { margin-top: 4px; font-size: 21px; }
.admin-subpage .employee-profile-card > .detail-form { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; }
.admin-subpage .employee-profile-card .employee-readonly-value { min-height: 40px; margin: 7px 0 0; padding: 10px 0; }
.admin-subpage .employee-profile-card input[type="file"] { min-width: 0; width: 100%; }
.admin-subpage .employee-profile-card input[type="file"]::file-selector-button {
  margin-right: 9px;
  padding: 7px 10px;
  border: 1px solid #c8d8f3;
  border-radius: 5px;
  background: #eef4ff;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.admin-subpage .employee-activity-card { margin: 0; border-radius: 8px; }
.employee-activity-card .muted { margin: 0; font-size: 13px; }
.employee-recent-events { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; min-height: 72px; margin-top: 15px; }
.admin-subpage .employee-recent-events { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 12px; }
.admin-subpage .employee-recent-event { align-items: center; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); padding: 10px 2px; }
.admin-subpage .employee-recent-event:last-child { border-bottom: 0; }
.admin-subpage .employee-recent-event > div { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.admin-subpage .employee-recent-event time { margin: 0 0 0 auto; white-space: nowrap; }
.admin-subpage .employee-recent-event small { color: var(--muted); }
.employee-recent-event { display: flex; gap: 10px; min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 7px; }
.employee-recent-event > .admin-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; background: #e5eeff; color: var(--accent); font-size: 19px; }
.employee-recent-event.departure > .admin-icon { background: #eef2f7; color: #526987; }
.employee-recent-event strong { display: block; font-size: 12px; }
.employee-recent-event time,
.employee-recent-event small { display: block; margin-top: 3px; color: #677d99; font-size: 11px; }
.admin-subpage .employee-fines-card #employeeFineForm { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.admin-subpage .employee-fines-card #employeeFineForm .form-button { grid-column: 1 / -1; width: fit-content; }
.admin-subpage .employee-page-card > h2 { padding-bottom: 9px; border-bottom: 1px solid var(--line); font-size: 16px; }
.admin-subpage .employee-page-card .muted { line-height: 1.45; }

/* Employee forms */
.admin-app .checkbox-label,
.admin-subpage .checkbox-label { align-items: center; gap: 9px; min-height: 34px; font-size: 13px; cursor: pointer; }
.admin-app .checkbox-label input[type="checkbox"],
.admin-subpage .checkbox-label input[type="checkbox"] {
  appearance: none; flex: 0 0 18px; width: 18px; height: 18px; min-height: 18px; max-height: 18px; margin: 0; padding: 0;
  border: 1.5px solid #9bb2d3; border-radius: 5px; background: #fff; cursor: pointer;
}
.admin-app .checkbox-label input[type="checkbox"]:checked,
.admin-subpage .checkbox-label input[type="checkbox"]:checked { border-color: var(--accent); background: var(--accent); }
.admin-app .checkbox-label input[type="checkbox"]:checked::after,
.admin-subpage .checkbox-label input[type="checkbox"]:checked::after {
  display: block; width: 8px; height: 4px; margin: 4px 0 0 3px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg); content: "";
}
.admin-app .checkbox-label input[type="checkbox"]:focus-visible,
.admin-subpage .checkbox-label input[type="checkbox"]:focus-visible { outline: 3px solid #81b9e7; outline-offset: 2px; }
.admin-app .admin-switch,
.admin-subpage .admin-switch {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  min-height: 54px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 9px; background: #f8faff; cursor: pointer;
}
.admin-app .admin-switch span,
.admin-subpage .admin-switch span { display: grid; gap: 3px; min-width: 0; }
.admin-app .admin-switch strong,
.admin-subpage .admin-switch strong { color: var(--text); font-size: 13px; font-weight: 650; }
.admin-app .admin-switch small,
.admin-subpage .admin-switch small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.admin-app .admin-switch input[type="checkbox"],
.admin-subpage .admin-switch input[type="checkbox"] {
  appearance: none; position: relative; flex: 0 0 44px; width: 44px; height: 26px;
  min-height: 26px; padding: 0;
  margin: 0; border: 0; border-radius: 999px; background: #aab4c4; cursor: pointer;
  transition: background-color .18s ease;
}
.admin-app .admin-switch input[type="checkbox"]::after,
.admin-subpage .admin-switch input[type="checkbox"]::after {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #11253b44;
  content: ""; transition: transform .18s ease;
}
.admin-app .admin-switch input[type="checkbox"]:checked,
.admin-subpage .admin-switch input[type="checkbox"]:checked { background: #0758da; }
.admin-app .admin-switch input[type="checkbox"]:checked::after,
.admin-subpage .admin-switch input[type="checkbox"]:checked::after { transform: translateX(18px); }
.admin-app .admin-switch input[type="checkbox"]:focus-visible,
.admin-subpage .admin-switch input[type="checkbox"]:focus-visible { outline: 3px solid #81b9e7; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .admin-switch input[type="checkbox"], .admin-switch input[type="checkbox"]::after { transition: none !important; }
}
.admin-subpage .employee-page-card select,
.admin-subpage .employee-new-card select { background-color: #fff; border-color: #cbd8ec; }
.checked-select-native { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden; opacity: 0; pointer-events: none; }
.checked-select { position: relative; width: 100%; margin-top: 7px; }
.checked-select-trigger { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 40px; padding: 9px 13px; border: 1px solid #cbd8ec; border-radius: 7px; background: #fff; color: var(--text); text-align: left; font: inherit; font-weight: 600; cursor: pointer; }
.checked-select-trigger::after { width: 7px; height: 7px; margin-left: 12px; border-right: 2px solid #466280; border-bottom: 2px solid #466280; transform: rotate(45deg) translateY(-2px); content: ""; }
.checked-select-trigger[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px #dceaff; }
.checked-select-menu { position: absolute; z-index: 15; top: calc(100% + 5px); left: 0; right: 0; padding: 5px; border: 1px solid #cbd8ec; border-radius: 8px; background: #fff; box-shadow: 0 12px 30px rgba(15, 44, 82, .14); }
.checked-select-menu[hidden] { display: none; }
.checked-select-option { display: block; width: 100%; padding: 10px 11px; border: 0; border-radius: 5px; background: transparent; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.checked-select-option:hover,
.checked-select-option:focus-visible { background: #eaf2ff; outline: none; }
.checked-select-option[aria-selected="true"] { color: var(--accent); background: #eaf2ff; font-weight: 700; }
.admin-subpage .employee-new-card { max-width: 650px; padding: 24px; }
.employee-new-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 20px; }
.employee-new-heading > .admin-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: #e5eeff; color: var(--accent); }
.employee-new-heading h2 { margin: 0 0 5px; font-size: 19px; }
.employee-new-heading p { margin: 0; }
.admin-subpage .employee-new-card .detail-form { max-width: 520px; gap: 15px; }
.admin-subpage .employee-new-card .form-button { width: fit-content; padding: 10px 18px; }

/* Daily attendance: cards mirror the manager's mobile control view. */
.admin-app .admin-logout { display: inline-flex; align-items: center; gap: 9px; }
.admin-app .admin-logout .admin-icon { color: #a63542; font-size: 19px; }
.employee-shift-entry { padding: 12px 0; border-bottom: 1px solid var(--line); }
.employee-shift-entry:last-child { border-bottom: 0; }
.employee-shift-heading { display: flex; align-items: baseline; gap: 10px; margin-bottom: 9px; }
.employee-shift-heading strong { font-size: 13px; }
.employee-shift-heading small { color: var(--muted); font-size: 12px; }
.employee-shift-marks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.employee-shift-mark { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 9px 11px; border: 1px solid #dce7f7; border-radius: 6px; background: #f5f8fe; color: #375471; font-size: 12px; }
.employee-shift-mark .admin-icon { color: var(--accent); font-size: 18px; }
.employee-shift-mark time { margin-left: auto; color: var(--text); font-weight: 700; }
.employee-shift-mark.departure { border-color: #e0e6ef; background: #f7f9fc; }
.employee-shift-mark.departure .admin-icon { color: #607997; }
.admin-app .admin-section-heading { margin: 0 0 13px; }
.admin-app .admin-section-heading h2 { margin: 0 0 4px; font-size: 18px; }
.admin-app .admin-section-heading p { max-width: 680px; }
.admin-app .payroll-result-table { margin-bottom: 18px; }
.payroll-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 15px; }
.payroll-person-card { display: grid; gap: 5px; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); text-decoration: none; }
.payroll-person-card:hover { border-color: #8bb6fc; background: #f9fbff; }
.payroll-person-card strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.payroll-person-card small { color: var(--muted); font-size: 11px; }
.payroll-person-card .payroll-amount-label { margin-top: 8px; color: #526987; font-weight: 700; }
.payroll-person-card b { margin-top: 4px; color: var(--accent); font-size: 21px; }
.payroll-person-card > span { color: var(--muted); font-size: 11px; }
.admin-app #payrollTab .payroll-table-details { margin: 0 0 18px; }
.admin-app #payrollTab .payroll-result-table { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.admin-disclosure { margin: 18px 0 25px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.admin-disclosure > summary { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; color: var(--accent); font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; }
.admin-disclosure > summary::-webkit-details-marker { display: none; }
.admin-disclosure[open] > summary .admin-icon { transform: rotate(180deg); }
.admin-disclosure .section-grid { padding: 0 16px 16px; }
.admin-app #scheduleTab .schedule-days-list { flex-wrap: wrap; min-width: 0; }
.admin-app #scheduleTab .schedule-days-list label { min-width: 49px; }
.admin-app #scheduleTab .schedule-wrap { max-width: 100%; }
.admin-app #scheduleTab .schedule-wrap table { min-width: 980px; }
.schedule-hint { margin: -6px 0 14px; color: var(--muted); font-size: 13px; }
.admin-app #scheduleTab .schedule-wrap th:first-child,
.admin-app #scheduleTab .schedule-wrap td:first-child { position: sticky; left: 0; z-index: 1; min-width: 180px; background: #fff; }
.admin-app #scheduleTab .schedule-wrap th:first-child { z-index: 2; background: #eef3fa; }
.schedule-cell { min-width: 150px; vertical-align: top; }
.schedule-planned { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.schedule-interval { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.schedule-interval + .schedule-interval { margin-top: 4px; }
.schedule-day-details { margin-top: 7px; padding: 0; border: 0; background: none; color: var(--accent); cursor: pointer; font: inherit; font-size: 11px; }
.schedule-day-details:hover { text-decoration: underline; }
.schedule-no-marks { font-size: 12px; color: var(--muted); }
.schedule-cell.day_off { background: #f5f7fa; }
.schedule-location-gap { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.25; }
.office-weekly-editor { display: grid; gap: 8px; }
.office-weekday-row { display: grid; grid-template-columns: 68px repeat(2, minmax(125px, 1fr)); align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; }
.office-weekday-row:not(:has(.office-day-enabled:checked)) .office-time-spinner { opacity: .45; }
.office-day-label { display: flex; align-items: center; gap: 7px; font-weight: 700; cursor: pointer; }
.office-day-enabled { appearance: none; width: 20px; height: 20px; margin: 0; border: 2px solid #9eb3d0; border-radius: 50%; background: white; cursor: pointer; }
.office-day-enabled:checked { border: 6px solid var(--accent); }
.office-day-enabled:focus-visible { outline: 3px solid #80b9ff; outline-offset: 2px; }
.office-time-spinner { display: grid; grid-template-columns: 1fr 30px; align-items: stretch; gap: 0; max-width: 190px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.office-time-spinner input { width: 100%; min-width: 0; padding: 8px; border: 0; text-align: center; font: inherit; font-weight: 700; background: #fff; color: var(--text); }
.office-time-spinner-buttons { display: grid; border-left: 1px solid var(--line); }
.office-time-spinner-buttons button { min-height: 18px; border: 0; background: #f4f7fb; color: var(--text); cursor: pointer; }
.office-time-spinner-buttons button + button { border-top: 1px solid var(--line); }
.office-time-spinner-buttons button:hover { background: #e4edff; }
.office-time-caption { display: block; margin: 0 0 4px; color: var(--muted); font-size: 11px; }
.office-employee-list { display: grid; gap: 7px; margin-top: 14px; }
.office-employee-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; }
.office-employee-row strong { display: block; }
.office-employee-row small { display: block; margin-top: 4px; color: var(--muted); }
.office-employee-actions { display: flex; gap: 6px; align-items: center; }
.office-employee-actions button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #b22332; cursor: pointer; font: inherit; font-size: 12px; }
.office-employee-actions button:hover { border-color: #b22332; }
.admin-subpage .employee-schedule-day .schedule-day-toggle { display: inline-flex; align-items: center; gap: 7px; }
.admin-subpage .employee-schedule-day .employee-weekday-enabled { appearance: none; width: 19px; height: 19px; margin: 0; border: 2px solid #9eb3d0; border-radius: 50%; background: #fff; cursor: pointer; }
.admin-subpage .employee-schedule-day .employee-weekday-enabled:checked { border: 6px solid var(--accent); }
.admin-subpage .employee-schedule-day .employee-weekday-enabled:focus-visible { outline: 3px solid #80b9ff; outline-offset: 2px; }
@media (max-width: 620px) { .office-weekday-row { grid-template-columns: 52px 1fr 1fr; gap: 6px; padding: 8px; } .office-employee-row { grid-template-columns: 1fr; } }
.attendance-control-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 9px 9px 0 0; background: #fff; }
.attendance-control-heading > div { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.attendance-control-heading .admin-icon { color: var(--accent); }
.attendance-control-heading .admin-count { margin: 0; }
.attendance-mode-tabs { display: flex; gap: 4px; padding: 8px 16px; border: 1px solid var(--line); border-top: 0; background: #f1f4f9; }
.attendance-mode-tabs button { flex: 1; min-height: 37px; border: 0; border-radius: 6px; background: transparent; color: #526986; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.attendance-mode-tabs button[aria-selected="true"] { background: var(--accent); color: #fff; }
.attendance-mode-tabs button:focus-visible { outline: 2px solid #8ab6fb; outline-offset: 2px; }
.admin-app #attendanceTab [hidden] { display: none !important; }
.admin-app #attendanceTab > .admin-toolbar { display: flex; align-items: end; gap: 10px; margin: 0; padding: 13px 18px; border: 1px solid var(--line); border-top: 0; border-radius: 0; background: #f7f9fd; }
.admin-app #attendanceTab > .admin-toolbar label { flex: 0 1 190px; margin: 0; }
.admin-app #attendanceTab > .admin-toolbar label:last-child { margin-left: auto; }
.admin-app .attendance-day-button { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; min-height: 40px; padding: 0; }
.attendance-status-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 13px 18px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 9px 9px; background: #fff; }
.attendance-chip { padding: 7px 10px; border-radius: 6px; background: #eef3fb; color: #49627f; font-size: 12px; }
.attendance-chip.working { background: #e6f3ec; color: #087a50; }
.attendance-chip.late { background: #fff0ec; color: #a34b3b; }
.attendance-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 16px 0; }
.attendance-person-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--text); text-decoration: none; transition: border-color .16s ease, transform .16s ease; }
.attendance-person-gap { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 5px; width: fit-content; color: var(--muted); font-size: 11px; }
.attendance-person-gap .admin-icon { font-size: 15px; }
a.attendance-person-card:hover { border-color: #7caaf0; transform: translateY(-2px); }
.attendance-person-visual { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: #e9eef8; color: #627b9a; font-size: 32px; }
.attendance-person-visual img { width: 100%; height: 100%; object-fit: cover; }

.office-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.office-list-heading h2 { margin: 0 0 4px; font-size: 20px; }
.office-list-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.office-list-heading .primary-button { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.office-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.office-card { min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.office-card-heading { display: flex; align-items: center; gap: 12px; }
.office-card-symbol { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border-radius: 9px; background: #e7f0ff; color: #0860d9; }
.office-card-heading h3 { margin: 0 0 4px; font-size: 15px; }
.office-card-heading small { font-size: 12px; }
.office-status-on { color: #07845b; }
.office-status-off { color: #9d4650; }
.office-card-zones { display: grid; gap: 10px; margin: 18px 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.office-card-zones > span { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.office-card-zones b { margin-left: auto; color: var(--text); font-size: 14px; }
.office-card-actions { display: flex; align-items: center; gap: 14px; }
.office-card-actions button, .office-card-actions a { border: 0; background: none; color: #075bd1; font: inherit; font-size: 13px; font-weight: 650; text-decoration: none; cursor: pointer; }
.office-card-actions button { padding: 0; }
.office-empty { grid-column: 1 / -1; padding: 30px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); background: #fff; text-align: center; }
.office-dialog { width: min(1000px, calc(100vw - 28px)); max-height: min(90vh, 900px); padding: 0; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--text); box-shadow: 0 24px 70px #10244145; }
.office-dialog::backdrop { background: #101d33a8; }
.office-dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.office-dialog-heading h2 { margin: 0 0 4px; font-size: 20px; }
.office-dialog-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.office-dialog-close { display: grid; place-items: center; width: 33px; height: 33px; padding: 0; border: 0; border-radius: 6px; background: #f0f3f8; color: var(--text); cursor: pointer; }
.office-dialog-form { display: block; }
.office-dialog-grid { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 22px; padding: 20px 24px 8px; }
.office-dialog-fields { display: grid; align-content: start; gap: 20px; }
.office-dialog-fields label { display: grid; gap: 7px; font-size: 13px; font-weight: 650; }
.office-dialog-fields input[type="text"], .office-dialog-fields input[type="number"] { width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); }
.office-radius-field { display: grid; gap: 8px; }
.office-radius-field > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.office-radius-field output { color: #075bd1; font-size: 18px; font-weight: 750; }
.office-radius-field input[type="range"] { width: 100%; accent-color: #075bd1; cursor: pointer; }
.office-radius-field small { color: var(--muted); font-size: 11px; }
.office-advanced { border-top: 1px solid var(--line); padding-top: 15px; }
.office-advanced summary { color: #075bd1; font-size: 13px; font-weight: 650; cursor: pointer; }
.office-advanced > label { margin-top: 14px; }
.office-coordinate-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px; }
.office-advanced .office-active-label { display: flex; align-items: center; gap: 8px; }
.office-map-column { min-width: 0; }
.office-dialog .office-map { height: 390px; min-height: 390px; margin: 0; border-radius: 8px; }
.office-map-column p { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.office-map-key { display: inline-block; flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; }
.office-map-key.checkin { background: #1769e8; }
.office-map-key.checkout { background: #f26a4b; }
.office-map-column .office-map-key.checkout { margin-left: 9px; }
.office-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 15px 24px 20px; border-top: 1px solid var(--line); }
@media (max-width: 720px) { .office-dialog-grid { grid-template-columns: 1fr; } .office-dialog .office-map { height: 300px; min-height: 300px; } .office-list-heading { align-items: stretch; flex-direction: column; } }
.attendance-photo-caption { position: absolute; top: 8px; left: 8px; padding: 4px 6px; border-radius: 4px; background: #fff; color: #32506e; font-size: 10px; }
.attendance-person-info { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 7px; padding: 11px; }
.attendance-person-info strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.attendance-person-info > small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.attendance-person-marks { display: flex; gap: 7px; grid-column: 1 / -1; }
.attendance-person-marks > span { display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border-radius: 5px; background: #eef4ff; color: #235aaf; font-size: 12px; font-weight: 700; }
.attendance-person-marks > span.departure { background: #f0f2f6; color: #637895; }
.attendance-person-marks .admin-icon { font-size: 17px; }
.attendance-empty { grid-column: 1 / -1; margin: 0; padding: 32px; border: 1px dashed #b8c9df; border-radius: 8px; background: #fff; color: var(--muted); text-align: center; }
.attendance-range-table-wrap { grid-column: 1 / -1; min-width: 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.attendance-range-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; color: var(--text); font-size: 12px; }
.attendance-range-table th, .attendance-range-table td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.attendance-range-table tr > :last-child { border-right: 0; }
.attendance-range-table tbody tr:last-child > * { border-bottom: 0; }
.attendance-range-table thead th { min-width: 90px; height: 48px; padding: 7px; background: #eef3fb; color: #526986; font-weight: 700; text-align: center; }
.attendance-range-table thead th:first-child { text-align: left; }
.attendance-range-table thead .attendance-range-today { box-shadow: inset 0 -2px 0 var(--accent); }
.attendance-range-table tbody th { padding: 8px; background: #fff; text-align: left; font-weight: 400; }
.attendance-range-table tbody tr:nth-child(even) th, .attendance-range-table tbody tr:nth-child(even) td { background: #f8faff; }
.attendance-range-table th:first-child { position: sticky; left: 0; z-index: 1; width: 200px; min-width: 200px; max-width: 200px; }
.attendance-range-table thead th:first-child { z-index: 2; }
.attendance-range-person { display: flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; }
.attendance-range-person:hover strong { color: var(--accent); }
.attendance-range-person > span:last-child { min-width: 0; }
.attendance-range-person strong, .attendance-range-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attendance-range-person strong { font-size: 12px; }
.attendance-range-person small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.attendance-range-avatar { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; overflow: hidden; border-radius: 50%; background: #e4ecf8; color: #526986; font-size: 11px; font-weight: 700; }
.attendance-range-avatar img { width: 100%; height: 100%; object-fit: cover; }
.attendance-range-table td { min-width: 90px; padding: 4px; color: var(--muted); text-align: center; }
.attendance-range-mark { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 58px; border-radius: 5px; color: var(--text); text-decoration: none; }
.attendance-range-mark:hover { background: #eaf2ff; }
.attendance-range-mark.foreign { background: #fff2df; }
.attendance-range-gap { display: block; color: var(--muted); font-size: 11px; line-height: 1.25; }
.location-coverage-note { padding: 9px 11px; border-radius: 6px; background: var(--bg); color: var(--muted); font-size: 12px; }
.location-gap-note { padding: 9px 11px; border-radius: 6px; background: #fff0bd; color: #714800; font-size: 12px; }
.attendance-range-mark span:first-child { font-weight: 700; }
.attendance-range-mark span.late, .attendance-range-mark span.early { color: #bf443d; }
.attendance-range-summary { grid-column: 1 / -1; padding: 3px 0; }
.attendance-range-summary h3 { margin: 0 0 10px; font-size: 15px; }
.attendance-range-summary-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-subpage #employeeArchivePanel { margin: 18px 0; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.admin-subpage #employeeArchivePanel[hidden], .admin-subpage #employeeRehirePasswordWrap[hidden] { display: none; }
.admin-subpage #employeeArchivePanel h2 { margin: 0 0 7px; font-size: 18px; }
.admin-subpage #employeeArchiveHint { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.admin-subpage .employee-archive-office { display: flex; align-items: end; flex-wrap: wrap; gap: 9px; margin: 0 0 14px; }
.admin-subpage .employee-archive-office label { display: grid; gap: 7px; min-width: 220px; color: #526986; font-size: 13px; font-weight: 600; }
.admin-subpage .employee-archive-office select { min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--text); font: inherit; }
.admin-subpage .employee-archive-office button { min-height: 40px; }
.admin-subpage #employeeRehirePasswordWrap { display: grid; gap: 7px; max-width: 350px; margin: 0 0 14px; color: #526986; font-size: 13px; font-weight: 600; }
.admin-subpage #employeeRehirePassword { min-height: 40px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; font: inherit; }
.admin-subpage #employeeArchivePanel > h3 { margin: 22px 0 10px; font-size: 15px; }
.admin-subpage .employee-header-save[hidden] { display: none; }
.admin-subpage .employee-page-grid[inert] { opacity: .75; }
.attendance-table-details { margin: 0 0 24px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.attendance-table-details > summary { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; color: var(--accent); font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; }
.attendance-table-details > summary::-webkit-details-marker { display: none; }
.attendance-table-details[open] > summary .admin-icon { transform: rotate(180deg); }
.attendance-table-details .table-wrap { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.attendance-day-dialog { width: min(620px, calc(100vw - 24px)); max-height: min(85vh, 850px); padding: 0; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: #fff; box-shadow: 0 22px 70px #17243b55; }
.attendance-day-dialog::backdrop { background: #081a38a8; }
.attendance-day-heading { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px; border-bottom: 1px solid var(--line); background: #fff; }
.attendance-day-heading h2 { margin: 0; font-size: 18px; }
.attendance-day-content { padding: 16px 18px 20px; }
.attendance-day-shift { margin-bottom: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8faff; }
.attendance-day-shift h3 { margin: 0 0 10px; font-size: 14px; }
.attendance-day-event { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.attendance-day-event small { color: var(--muted); }
.attendance-day-event img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }
.attendance-day-event a:focus-visible, .attendance-day-dialog button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.reference-photo-delete { justify-self: start; color: #b62332; }
.employee-shift-entry button { margin-top: 8px; }
.employee-activity-date { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; margin: 12px 0 14px; }
.employee-activity-date label { display: grid; gap: 5px; font-size: 12px; font-weight: 600; }
.employee-activity-date input { width: 170px; }
.schedule-office-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 0 0 24px; }
.schedule-office-link { display: grid; gap: 5px; padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--text); text-decoration: none; }
.schedule-office-link span { color: var(--muted); font-size: 12px; }
.schedule-office-link:hover, .schedule-office-link:focus-visible { border-color: var(--accent); }
.admin-app #workDaysList .checkbox-label, .admin-subpage #officeDefaultDays .checkbox-label {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; width: 38px; height: 38px; padding: 0; border: 1px solid #c9d7e9;
  border-radius: 50%; background: #fff; color: #435b79; cursor: pointer;
}
.admin-app #workDaysList .checkbox-label input, .admin-subpage #officeDefaultDays .checkbox-label input { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; }
.admin-app #workDaysList .checkbox-label input::after, .admin-subpage #officeDefaultDays .checkbox-label input::after { display: none; }
.admin-app #workDaysList .checkbox-label:has(input:checked), .admin-subpage #officeDefaultDays .checkbox-label:has(input:checked) { border-color: #0758da; background: #0758da; color: #fff; }
.admin-app #workDaysList .checkbox-label:focus-within, .admin-subpage #officeDefaultDays .checkbox-label:focus-within { outline: 3px solid #81b9e7; outline-offset: 2px; }
.fine-period { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.fine-period label { display: grid; gap: 5px; font-size: 12px; font-weight: 600; }
.fine-period input { width: 180px; }
.employee-fines-card .admin-disclosure { margin: 8px 0 18px; }
.employee-fines-card .fine-add-form { padding: 0 16px 16px; }
.employee-fine-list { display: grid; gap: 8px; }
.employee-fine-date { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.employee-fine-item { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.employee-fine-item p { margin: 0; }
.employee-fine-item .muted { grid-column: 1 / 3; font-size: 12px; }
.employee-fine-item button { grid-column: 3; grid-row: 1 / 3; }
.employee-fine-item.cancelled { opacity: .62; }
@media (max-width: 620px) { .employee-fine-item { grid-template-columns: 1fr; } .employee-fine-item .muted, .employee-fine-item button { grid-column: 1; grid-row: auto; } }
.announcement-editor-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.announcement-editor-toolbar button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); cursor: pointer; font: inherit; font-size: 12px; }
.announcement-editor-toolbar button:hover, .announcement-editor-toolbar button:focus-visible { border-color: var(--accent); color: var(--accent); }
.admin-app #announcementBody { min-height: 180px; resize: vertical; line-height: 1.55; }
.announcement-editor-modes { display: inline-flex; gap: 3px; margin-top: 9px; padding: 3px; border-radius: 7px; background: #edf2fa; }
.announcement-editor-modes button { padding: 7px 13px; border: 0; border-radius: 5px; background: transparent; color: #526987; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; }
.announcement-editor-modes button[aria-selected="true"] { background: #fff; color: var(--accent); box-shadow: 0 1px 4px #152b4617; }
.announcement-visual-body { min-height: 260px; max-height: 520px; overflow: auto; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); font-weight: 400; line-height: 1.55; outline: none; }
.announcement-visual-body:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #2377ec24; }
.announcement-visual-body:empty::before { content: attr(data-placeholder); color: var(--muted); }
.announcement-visual-body img { display: block; max-width: 100%; max-height: 340px; height: auto; object-fit: contain; margin: 12px 0; border-radius: 6px; }
.announcement-visual-body p { margin: 0 0 12px; }
.announcement-visual-body h1, .announcement-visual-body h2, .announcement-visual-body h3 { margin: 8px 0 12px; }
.announcement-visual-body ul, .announcement-visual-body ol { padding-left: 24px; }
.announcement-visual-body[hidden], .admin-app #announcementBody[hidden] { display: none; }
.announcement-preview { display: grid; gap: 8px; }
.announcement-preview > strong { font-size: 12px; }
.announcement-body { line-height: 1.55; overflow-wrap: anywhere; }
.announcement-card { display: grid; gap: 8px; }
.announcement-card h3, .announcement-card p { margin: 0; }
.announcement-status { justify-self: start; padding: 4px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.announcement-status.active { background: #e4f6ed; color: #087950; }
.announcement-status.hidden { background: #e9eef5; color: #536783; }
.admin-app #announcementsTab .announcement-preview .announcement-card { margin: 0; }
.admin-app #announcementsTab form.announcement-form { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.admin-app #announcementsTab .announcement-form > * { grid-column: 1; }
.admin-app .employee-filters > .checked-select { width: min(230px, 100%); margin-top: 0; }
.schedule-employee-link { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-weight: 600; white-space: nowrap; }
.schedule-employee-link:hover { color: var(--accent); text-decoration: underline; }
.schedule-employee-link .avatar { width: 30px; height: 30px; flex: 0 0 30px; font-size: 12px; }
.employee-period-native { position: absolute; width: 1px !important; height: 1px !important; min-height: 0 !important; opacity: 0; pointer-events: none; }
.employee-period-picker { display: inline-flex; align-items: stretch; gap: 5px; margin-top: 6px; }
.employee-period-picker button { min-height: 38px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--text); cursor: pointer; font: inherit; }
.employee-period-picker button:hover, .employee-period-picker button:focus-visible { border-color: var(--accent); color: var(--accent); }
.employee-period-arrow { width: 38px; font-size: 22px !important; line-height: 1; }
.employee-period-current { min-width: 172px; padding: 0 11px; font-weight: 600 !important; text-transform: capitalize; }
@media (max-width: 1180px) { .attendance-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1180px) { .payroll-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1180px) {
  .admin-app .admin-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-app #attendanceTab > .admin-toolbar { flex-wrap: wrap; }
  .admin-app #attendanceTab > .admin-toolbar label { min-width: 150px; }
  .admin-app #attendanceTab > .admin-toolbar label:last-child { flex-grow: 1; }
  .admin-app #scheduleTab .schedule-settings-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-app #scheduleTab .schedule-days-list { grid-column: 1 / -1; }
  .admin-app #payrollTab .admin-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-app #announcementsTab .announcement-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .attendance-card-grid { grid-template-columns: minmax(0, 1fr); }
  .payroll-card-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-app #attendanceTab > .admin-toolbar { flex-wrap: wrap; }
  .admin-app #attendanceTab > .admin-toolbar label:last-child { flex-basis: 100%; margin-left: 0; }
  .admin-subpage .employee-recent-event > div { flex-wrap: wrap; }
  .admin-subpage .employee-recent-event time { margin-left: 0; }
  .admin-subpage .employee-new-card { padding: 17px; }
  .employee-shift-marks { grid-template-columns: minmax(0, 1fr); }
  .admin-app .admin-form,
  .admin-app #scheduleTab .schedule-settings-form,
  .admin-app #payrollTab .admin-toolbar,
  .admin-app #announcementsTab .announcement-form { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1180px) {
  .admin-app .dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-app .stat-card:nth-child(3) { border-right: 0; }
  .admin-app .stat-card:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .admin-app .section-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-app .employee-table { min-width: 660px; }
  .admin-app .employee-table th,
  .admin-app .employee-table td { padding-left: 9px; padding-right: 9px; }
  .admin-app .employee-table td { font-size: 12px; }
  .admin-app .employee-table th:nth-child(5),
  .admin-app .employee-table td:nth-child(5) { width: 16%; }
  .admin-app .employee-table .status-pill { max-width: 100%; padding: 5px 6px; font-size: 10px; line-height: 1.2; white-space: normal; }
}
@media (max-width: 850px) {
  .admin-subpage .employee-page-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-subpage .employee-profile-card > .detail-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .employee-recent-events { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .admin-app .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-app .stat-card:nth-child(3) { border-right: 1px solid var(--line); }
  .admin-app .stat-card:nth-child(2n) { border-right: 0; }
  .admin-app .stat-card:nth-child(4) { border-bottom: 1px solid var(--line); }
  .admin-subpage .admin-header { min-height: 0; }
  .admin-subpage .admin-header-actions { width: 100%; flex-wrap: nowrap; justify-content: space-between; gap: 8px; }
  .admin-subpage .employee-back-link { width: auto; min-width: 0; padding: 8px 10px; font-size: 12px; }
  .admin-subpage .employee-header-save { display: none; }
  .admin-subpage #adminLogoutButton { width: auto; min-width: 0; padding: 8px 10px; font-size: 12px; }
  .admin-subpage .employee-profile-card { padding: 16px; }
  .admin-subpage .employee-profile-card .employee-photo-placeholder { flex-basis: 60px; width: 60px; height: 60px; border-radius: 13px; }
  .admin-subpage .employee-profile-card .employee-detail-header { align-items: flex-start; flex-direction: column; gap: 8px; }
  .admin-subpage .employee-profile-card .employee-detail-header h2 { font-size: 18px; }
  .admin-subpage .employee-profile-card > .detail-form,
  .admin-subpage .employee-fines-card #employeeFineForm { grid-template-columns: minmax(0, 1fr); }
  .employee-recent-events { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .admin-app .admin-tab-panel.active { animation: none; }
  .admin-app .stat-card,
  .employee-row-link,
  .dashboard-status-segment,
  .admin-subpage .employee-page-card { transition: none; }
  .admin-app #refreshButton.is-loading .admin-icon { animation: none; }
}

.company-brand { min-width: 0; padding: 4px 8px; }
.company-brand-copy { display: grid; gap: 3px; min-width: 0; line-height: 1.2; }
.company-brand-copy strong { overflow-wrap: anywhere; font-size: 17px; font-weight: 750; }
.company-brand-copy small { color: #617894; font-size: 11px; font-weight: 600; }
.admin-subpage .company-brand { width: fit-content; margin-bottom: 8px; padding: 0; }
.batch-bar {
  position: sticky; top: 8px; z-index: 3; display: flex; flex-wrap: wrap; align-items: center;
  gap: 10px; padding: 10px 12px; margin: 12px 0; background: #eaf1ff; border: 1px solid #cdddf8;
  color: #152f59; border-radius: 10px;
}
.batch-bar strong { margin-right: auto; font-size: 14px; }
.admin-app .employee-table .batch-check, .admin-app .schedule-wrap .batch-check {
  width: 42px; min-width: 42px; padding: 6px; text-align: center;
}
.batch-check input, .batch-days input { width: 17px; height: 17px; accent-color: #0756dd; vertical-align: middle; }
.admin-batch-dialog {
  width: min(530px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 20px;
  border: 1px solid #d5e2f4; border-radius: 16px; background: #fff; color: #162945;
  box-shadow: 0 24px 70px #172a4e40;
}
.admin-batch-dialog::backdrop { background: #14264380; }
.admin-batch-dialog form, #batchScheduleFields { display: grid; gap: 12px; }
.admin-batch-dialog label, .audit-filters label { display: grid; gap: 5px; }
.batch-dialog-header, .batch-dialog-footer { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.batch-dialog-header h2, .admin-batch-dialog p { margin: 0; }
.batch-dialog-footer { justify-content: flex-end; }
.admin-batch-dialog fieldset { margin: 0; border: 1px solid #d5e2f4; border-radius: 9px; padding: 9px; }
.batch-days, .batch-time { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.batch-time { margin-top: 8px; }
.batch-days label { display: flex; align-items: center; }
.batch-preview { padding: 12px; background: #eef4ff; border-radius: 8px; }
.batch-preview ul { margin: 8px 0 0; padding-left: 20px; max-height: 150px; overflow: auto; font-size: 13px; }
#batchError { color: #b42318; }
.admin-toast a { color: inherit; text-decoration: underline; }
.attendance-day-controls { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; }
.attendance-view-controls { display: flex; gap: 6px; }
.attendance-chip { border: 1px solid transparent; cursor: pointer; }
.attendance-chip[aria-pressed="true"], .attendance-view-controls [aria-pressed="true"] {
  border-color: #91b5f4; background: #e5efff; color: #064bb9;
}
.attendance-export { display: flex; justify-content: flex-end; margin: 8px 0; }
.admin-app .attendance-table-details { margin-top: 8px; }
.admin-app .attendance-table-details .table-wrap { margin: 0; }
.audit-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; }
.audit-filters label { min-width: 0; color: #526986; font-size: 13px; font-weight: 600; }
.audit-filters label:first-child { flex: 1 1 230px; }
.audit-filters .checked-select { margin-top: 0; }
.audit-filters input[type="date"] { box-sizing: border-box; min-height: 40px; max-width: 100%; padding: 8px 11px; border: 1px solid #cbd8ec; border-radius: 7px; background: #fff; color: var(--text); font: inherit; }
.audit-filters > .primary-button { width: auto; min-height: 40px; }
.admin-audit th { white-space: nowrap; }
.admin-audit td { vertical-align: top; overflow-wrap: anywhere; }
.admin-audit td small { display: block; color: #617894; margin: 3px 0; }
.admin-audit td div + div { margin-top: 8px; }
.admin-audit .audit-before { color: #617894; }
.batch-bar[hidden], .admin-batch-dialog [hidden], .attendance-day-controls[hidden],
.attendance-card-grid[hidden], .attendance-table-details[hidden] { display: none; }

.admin-app #scheduleTab .schedule-wrap .batch-check { min-width: 42px; }
.admin-app #scheduleTab .schedule-wrap .batch-check + :is(th, td) {
  position: sticky; left: 42px; z-index: 1; min-width: 180px; background: #fff;
}
.admin-app #scheduleTab .schedule-wrap .batch-check + th { z-index: 2; background: #eef3fa; }


/* Invitation progress is independent of permission to submit attendance. */
.employee-onboarding-summary { display: grid; gap: 4px; margin-top: 7px; }
.admin-app .employee-table th.batch-check, .admin-app .employee-table td.batch-check { width: 40px; }
.onboarding-badge { display: inline-block; width: fit-content; max-width: 100%; padding: 6px 9px; border-radius: 7px; background: #eef2f7; color: #52647c; font-size: 12px; font-weight: 600; line-height: 1.4; white-space: normal; }
.onboarding-pending, .onboarding-awaiting_login { background: #fff4da; color: #805600; }
.onboarding-accepted { background: #eaf1ff; color: #175cd3; }
.onboarding-first_attendance { background: #e4f5eb; color: #166038; }
.onboarding-declined, .onboarding-cancelled { background: #fff0ee; color: #a43629; }
.employee-onboarding { margin: 20px 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); }
.employee-onboarding h3 { margin: 0 0 10px; font-size: 15px; }
.onboarding-steps { list-style: none; margin: 18px 0 0; padding: 0; }
.onboarding-steps li { display: flex; gap: 12px; position: relative; padding-bottom: 20px; }
.onboarding-steps li:last-child { padding-bottom: 0; }
.onboarding-steps li:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 28px; bottom: 3px; width: 2px; background: var(--line); }
.onboarding-step-marker { display: grid; place-items: center; flex: 0 0 26px; height: 26px; border-radius: 50%; color: #637894; background: #eef2f7; font-size: 12px; font-weight: 700; }
.onboarding-steps .is-complete .onboarding-step-marker { background: #e4f5eb; color: #166038; }
.onboarding-steps strong, .onboarding-steps small { display: block; }
.onboarding-steps strong { font-size: 13px; line-height: 26px; }
.onboarding-steps small { color: var(--muted); font-size: 12px; line-height: 1.5; }

.attendance-unmarked-person { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.attendance-unmarked-person small { display: block; margin-top: 7px; color: var(--muted); }
.employee-onboarding-disclosure { margin-top: 24px; }

.schedule-template-library { margin: 22px 0; padding: 20px; }
.schedule-template-rows { display: grid; gap: 12px; margin-bottom: 18px; }
.schedule-template-card { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.schedule-template-card p { margin: 8px 0 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.template-weekday { display: grid; grid-template-columns: 60px minmax(0,1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.template-weekday > label { display: flex; align-items: flex-start; gap: 8px; padding-top: 8px; }
.template-weekday input[type="checkbox"] { width: 16px; min-height: 16px; }
.template-shift { align-items: end; margin-bottom: 8px; flex-wrap: wrap; }
.template-overnight-hint { color: #175cd3; align-self: center; font-weight: 600; }
.schedule-source-label { display: inline-block; margin: 0 0 16px; padding: 7px 10px; border-radius: 6px; background: #eaf1ff; color: #175cd3; font-size: 13px; font-weight: 600; }
.schedule-source-label.is-custom { background: #eef2f7; color: #52647c; }

/* Shared schedule controls for offices, employees and templates. */
.schedule-time-field { display: grid; gap: 0; min-width: 0; flex: 1 1 120px; }
.schedule-time-field .office-time-spinner { max-width: none; }
.admin-subpage .detail-form .schedule-time-field input,
.admin-app .detail-form .schedule-time-field input { min-height: 42px; padding: 9px 8px; border: 0; border-radius: 0; text-align: center; }
.schedule-time-field input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px #d92d20; background: #fff4f2; }
.admin-subpage input.schedule-day-enabled,
.admin-app input.schedule-day-enabled { appearance: none; flex: 0 0 20px; width: 20px; height: 20px; min-height: 20px; padding: 0; margin: 0; border: 2px solid #9eb3d0; border-radius: 50%; background: #fff; cursor: pointer; box-sizing: border-box; }
.admin-subpage input.schedule-day-enabled:checked,
.admin-app input.schedule-day-enabled:checked { border: 6px solid var(--accent); background: #fff; }
input.schedule-day-enabled:focus-visible { outline: 3px solid #80b9ff; outline-offset: 2px; }
.schedule-day-off .office-time-spinner { opacity: .45; }
.office-weekday-row { grid-template-columns: 58px minmax(0,1fr); align-items: start; }
.office-day-label { padding-top: 24px; }
.office-shift-list { display: grid; gap: 10px; min-width: 0; }
.office-shift-entry { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; align-items: end; gap: 8px; }
.office-shift-entry .template-overnight-hint { grid-column: 1 / -1; }
.office-remove-shift { min-height: 42px; padding: 8px; }
.office-add-shift { justify-self: start; }
.employee-schedule-shift { align-items: end; }
.employee-schedule-shift .schedule-time-field { flex: 1 1 120px; }
.manager-remove-button { margin-top: 6px; }

.admin-subpage .checkbox-label input.schedule-day-enabled[type="checkbox"],
.admin-app .checkbox-label input.schedule-day-enabled[type="checkbox"] { width: 20px; height: 20px; min-height: 20px; border: 2px solid #9eb3d0; border-radius: 50%; background: #fff; }
.admin-subpage .checkbox-label input.schedule-day-enabled[type="checkbox"]:checked,
.admin-app .checkbox-label input.schedule-day-enabled[type="checkbox"]:checked { border: 6px solid var(--accent); background: #fff; }
.admin-subpage .checkbox-label input.schedule-day-enabled[type="checkbox"]::after,
.admin-app .checkbox-label input.schedule-day-enabled[type="checkbox"]::after { content: none; }

.exit-rule-days { display: flex; flex-wrap: wrap; gap: 14px; }
.exit-rule-days .office-day-label { padding: 0; }
.exit-permission-status { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8faff; line-height: 1.5; }

/* Compact template library and explanatory payroll views. */
.schedule-template-library { padding: 16px 18px; margin: 20px 0; }
.schedule-template-library > .section-heading { margin-bottom: 10px; align-items: center; }
.schedule-template-library h2 { margin: 0; font-size: 17px; }
.schedule-template-rows { gap: 6px; margin: 0; }
.schedule-template-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px; }
.schedule-template-card > div { min-width: 0; }
.schedule-template-card strong { display: block; font-size: 13px; }
.schedule-template-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schedule-template-dialog, .payroll-day-dialog { padding: 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--text); max-height: 90vh; box-shadow: 0 24px 80px #10244145; }
.schedule-template-dialog { width: min(700px,calc(100vw - 24px)); }
.payroll-day-dialog { width: min(1120px,calc(100vw - 24px)); }
.schedule-template-dialog::backdrop, .payroll-day-dialog::backdrop { background: #101d3380; }
.compact-dialog-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: #fff; }
.compact-dialog-header h2 { margin: 0; font-size: 19px; }
.compact-dialog-header p { margin: 5px 0 0; font-size: 12px; }
#scheduleTemplateForm { padding: 18px 20px; gap: 14px; }
.compact-dialog-actions { position: sticky; bottom: -18px; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 0 0; border-top: 1px solid var(--line); background: #fff; }
.template-assignment-note { font-size: 12px; }
.payroll-period-summary { display: flex; flex-wrap: wrap; gap: 12px 30px; margin: 16px 0; }
.payroll-period-summary > div { display: grid; gap: 4px; }
.payroll-period-summary small { color: var(--muted); font-size: 12px; }
.payroll-period-summary strong { font-size: 18px; }
.payroll-pending-note { width: 100%; margin: 0; color: #8b5d00; font-size: 12px; }
.payroll-person-open, .payroll-fines-open { border: 0; padding: 0; background: transparent; text-align: left; color: var(--accent); cursor: pointer; font: inherit; font-weight: 600; }
.payroll-fines-open { color: #b42318; text-decoration: underline; text-underline-offset: 3px; }
.payroll-person-open:hover { text-decoration: underline; }
.payroll-result-table table { min-width: 730px; }
.payroll-net-cell { font-weight: 700; white-space: nowrap; }
.payroll-net-cell small { font-weight: 400; white-space: normal; }
.payroll-day-dialog > .payroll-period-summary, .payroll-day-filters, #payrollDayMessage { margin: 16px 20px; }
.payroll-day-filters { display: flex; gap: 8px; }
.payroll-day-filters button { border: 1px solid var(--line); border-radius: 7px; padding: 8px 12px; background: #fff; color: var(--text); cursor: pointer; }
.payroll-day-filters button[aria-pressed="true"] { background: #eaf1ff; color: var(--accent); border-color: #8bb6fc; }
#payrollDayMessage { font-size: 12px; }
.payroll-day-table { margin: 0; border-left: 0; border-right: 0; border-bottom: 0; border-radius: 0; }
.payroll-day-table table { min-width: 850px; width: 100%; }
.payroll-day-table th { background: #f0f4fa; white-space: nowrap; }
.payroll-day-table td { vertical-align: top; padding: 14px 12px; font-size: 13px; }
.payroll-day-table small, .payroll-day-table span { display: block; margin-top: 4px; line-height: 1.4; }
.payroll-day-status { color: var(--muted); font-size: 11px; }
.payroll-day-status.status-provisional, .payroll-day-status.status-time_review { color: #8b5d00; }
.payroll-day-marks { min-width: 130px; }
.payroll-day-marks small { color: var(--muted); margin-bottom: 7px; }
.payroll-day-fines { min-width: 220px; max-width: 330px; }
.payroll-day-fines > div + div { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.payroll-fine-active strong { color: #b42318; }
.payroll-day-fines small { color: var(--muted); font-size: 11px; }
.payroll-fine-cancelled { color: var(--muted); }
.payroll-fine-cancelled strong { text-decoration: line-through; }
.payroll-day-with-fine { background: #fffafa; }

.payroll-result-table .employee-secondary { display: block; margin-top: 5px; }

/* Employee profile: primary settings together, secondary views on demand. */
.admin-subpage .employee-profile-card .employee-profile-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.profile-office-settings .detail-form, .profile-access-settings { display: grid; gap: 12px; }
.profile-login-inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 13px; }
#employeePasswordSection[hidden] { display: none; }
.employee-profile-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 14px; margin-top: 16px; border-top: 1px solid var(--line); }
.employee-profile-tools small { color: var(--muted); font-size: 12px; margin-left: auto; }
.employee-detail-dialog { width: min(680px,calc(100vw - 24px)); max-height: 88vh; padding: 0; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--text); box-shadow: 0 24px 80px #10244145; }
.employee-detail-dialog::backdrop { background: #101d3380; }
.employee-dialog-content { padding: 18px 20px; }
.employee-dialog-content > p { margin: 0 0 14px; font-size: 13px; }
.employee-dialog-content .admin-disclosure { margin: 12px 0; }
.employee-action-bar { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: 14px; width: min(1080px,calc(100vw - 32px)); display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 8px 32px #142b4930; }
.employee-action-bar[hidden] { display: none; }
.employee-action-bar > span { flex: 1; color: var(--muted); font-size: 12px; }
.admin-subpage .employee-action-bar .employee-header-save { display: inline-block; }
.admin-subpage:has(.employee-action-bar) .employee-page-shell { padding-bottom: 110px; }
.schedule-source-label[hidden], .admin-subpage .detail-form .employee-schedule-method[hidden] { display: none; }
.schedule-uniform-hours { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; gap: 10px; align-items: end; padding: 12px; margin: 12px 0; border: 1px solid var(--line); border-radius: 9px; background: #f8faff; }
.schedule-uniform-hours[hidden] { display: none; }
.schedule-uniform-hours > strong { grid-column: 1 / -1; font-size: 12px; }
.schedule-uniform-hours > small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.schedule-uniform-hours > button { min-height: 42px; }
@media(max-width:700px) {
 .admin-subpage .employee-profile-card .employee-profile-settings { grid-template-columns: 1fr; }
 .employee-profile-tools small { width: 100%; margin: 4px 0 0; }
 .schedule-uniform-hours { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
 .schedule-uniform-hours > button { grid-column: 1 / -1; }
 .employee-action-bar { gap: 8px; padding: 10px; bottom: 8px; }
 .employee-action-bar > span { display: none; }
 .employee-action-bar > button { flex: 1; font-size: 12px; }
}

.employee-action-bar > .primary-button, .employee-action-bar > .danger-button { width: auto; flex: 0 0 auto; min-width: 170px; white-space: nowrap; }
@media(max-width:700px) { .employee-action-bar > .primary-button, .employee-action-bar > .danger-button { min-width: 0; flex: 1; white-space: normal; } }

.employee-action-bar .employee-header-save:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.employee-history-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.employee-attendance-history { width: min(940px,calc(100vw - 24px)); max-height: 90vh; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--text); box-shadow: 0 24px 80px #10244145; }
.employee-attendance-history::backdrop, .attendance-photo-dialog::backdrop { background: #101d3399; }
.employee-history-modes, .employee-history-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; margin: 16px 20px; }
.employee-history-modes button { padding: 8px 18px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--text); cursor: pointer; }
.employee-history-modes button[aria-pressed="true"] { color: var(--accent); background: #eaf1ff; border-color: #8bb6fc; }
.employee-history-controls label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.employee-history-controls input { min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: #fff; }
.employee-history-controls [hidden] { display: none; }
.employee-history-empty-toggle { display: flex; align-items: center; gap: 8px; margin: 12px 20px; font-size: 12px; color: var(--muted); }
.employee-history-empty-toggle input { width: 16px; height: 16px; }
.employee-history-summary, .employee-history-message { margin: 12px 20px; color: var(--muted); font-size: 13px; }
.employee-history-content { padding: 0 20px 20px; }
.employee-history-day { margin-top: 18px; }
.employee-history-day > h3 { margin: 0 0 10px; font-size: 15px; text-transform: capitalize; }
.employee-history-day .attendance-day-shift + .attendance-day-shift { margin-top: 10px; }
.attendance-photo-button { display: inline-flex; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: transparent; cursor: zoom-in; line-height: 0; }
.attendance-photo-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.attendance-photo-dialog { width: fit-content; max-width: calc(100vw - 24px); max-height: 92vh; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); box-shadow: 0 24px 80px #10244145; }
.attendance-photo-dialog .compact-dialog-header { min-width: min(480px,calc(100vw - 26px)); }
.attendance-photo-dialog h2 { font-size: 15px; }
#attendancePhotoFull { display: block; width: auto; height: auto; max-width: min(920px,calc(100vw - 26px)); max-height: 76vh; object-fit: contain; margin: 0 auto; }
#attendancePhotoMessage:empty { display: none; }
#attendancePhotoMessage { padding: 16px; color: var(--muted); }
@media(max-width:600px) { .employee-history-controls input { max-width: 145px; } .employee-attendance-history .compact-dialog-header { padding: 14px; } .employee-history-content { padding: 0 12px 14px; } }
