:root {
      --nav: #082957;
      --blue: #1478f2;
      --green: #16b861;
      --amber: #ffad24;
      --red: #f24452;
      --line: #e7ecf4;
      --text: #17233d;
      --muted: #6b7588;
      --soft: #f6f8fc;
      --white: #fff;
      --shadow: 0 10px 24px rgba(18, 38, 63, .08);
      --app-font: "Segoe UI", "Noto Sans", "Noto Sans CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
}

    * { box-sizing: border-box; }
body {
      margin: 0;
      color: var(--text);
      background: var(--soft);
      font-family: var(--app-font);
      font-size: 14px;
      line-height: 1.5;
      font-synthesis: none;
      text-rendering: optimizeLegibility;
      -webkit-font-smoothing: antialiased;
    }

    button, input, select, textarea { font: inherit; }
    button { cursor: pointer; }

    #view-attendance,
    #view-attendance *,
    #view-employees,
    #view-employees *,
    #view-documents,
    #view-documents * {
      font-family: var(--app-font) !important;
      letter-spacing: 0;
    }

    .app {
      min-height: 100vh;
      display: grid;
      grid-template-columns: 220px 1fr;
    }

    .sidebar {
      color: #fff;
      background: linear-gradient(180deg, var(--nav), #061d3d);
      display: flex;
      flex-direction: column;
      padding: 20px 14px;
      gap: 18px;
      position: sticky;
      top: 0;
      height: 100vh;
      overflow-y: auto;
    }

    .brand {
      min-height: 44px;
      display: flex;
      align-items: center;
      gap: 8px;
      font-weight: 800;
      letter-spacing: .5px;
      font-size: 22px;
    }

    .brand-dot {
      width: 12px;
      height: 12px;
      background: #0ec27f;
      border-radius: 50%;
      box-shadow: 22px 0 0 #f44336;
    }

    .nav { display: grid; gap: 8px; margin-top: 10px; }

    .nav-item {
      border: 0;
      color: #dce9fb;
      background: transparent;
      min-height: 44px;
      border-radius: 8px;
      padding: 0 14px;
      display: flex;
      align-items: center;
      gap: 12px;
      font-weight: 600;
      text-align: left;
    }

    .nav-item.active,
    .nav-item:hover {
      color: #fff;
      background: var(--blue);
    }

    .sidebar-footer {
      margin-top: auto;
      display: grid;
      gap: 10px;
    }

    .sidebar-footer-logo {
      display: block;
      width: min(100%, 170px);
      height: auto;
      margin: 0 auto;
      object-fit: contain;
    }

    .public-note {
      padding: 12px;
      color: #dce9fb;
      font-size: 12px;
      border-top: 1px solid rgba(255,255,255,.14);
    }

    .main { min-width: 0; }

    .topbar {
      height: 76px;
      background: var(--white);
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 28px;
      box-shadow: 0 1px 4px rgba(18, 38, 63, .04);
    }

    .company {
      display: flex;
      align-items: center;
      gap: 18px;
      font-size: 18px;
      font-weight: 800;
    }

    .account {
      display: flex;
      align-items: center;
      gap: 12px;
      color: var(--muted);
      font-weight: 600;
    }

    .lang-select {
      min-height: 38px;
      border: 1px solid #d7deea;
      border-radius: 8px;
      background: #fff;
      color: var(--text);
      padding: 0 10px;
      font-weight: 700;
    }

    .avatar {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      background: linear-gradient(135deg, #bfd7ff, #ffe0ba);
      display: grid;
      place-items: center;
      color: var(--nav);
      font-weight: 800;
    }

    .content {
      padding: 26px 28px 34px;
      max-width: 1680px;
      margin: 0 auto;
      overflow: visible;
    }

    .view { display: none; }
    .view.active { display: block; }

    #view-attendance.has-no-employee .cards,
    #view-attendance.has-no-employee .profile,
    #view-attendance.has-no-employee .table-card {
      display: none;
    }

    .title {
      margin: 0 0 16px;
      font-size: 22px;
      font-weight: 800;
    }

    .filters {
      display: grid;
      grid-template-columns: minmax(240px, 440px) 132px 120px 142px;
      gap: 14px;
      margin-bottom: 24px;
    }

    .field,
    .button,
    .input {
      min-height: 46px;
      border: 1px solid #d7deea;
      border-radius: 8px;
      background: #fff;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 0 14px;
      box-shadow: 0 1px 2px rgba(18, 38, 63, .04);
    }

    .field input,
    .field select,
    .input,
    textarea {
      width: 100%;
      outline: 0;
      color: var(--text);
    }

    .field input,
    .field select {
      border: 0;
      background: transparent;
    }

    textarea {
      min-height: 140px;
      border: 1px solid #d7deea;
      border-radius: 8px;
      padding: 12px 14px;
      resize: vertical;
    }

    .button {
      justify-content: center;
      font-weight: 700;
      color: #39445a;
    }

    .button.primary {
      border-color: var(--blue);
      color: #fff;
      background: var(--blue);
    }

    .button.danger {
      border-color: var(--red);
      color: #fff;
      background: var(--red);
    }

    .button.ghost {
      background: transparent;
      box-shadow: none;
    }

    .cards {
      display: grid;
      grid-template-columns: repeat(4, minmax(180px, 1fr));
      gap: 22px;
      margin-bottom: 24px;
    }

    .metric,
    .panel {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: var(--shadow);
    }

    .metric {
      min-height: 132px;
      padding: 22px 24px;
      display: flex;
      gap: 20px;
      align-items: center;
    }

    .metric-icon {
      width: 66px;
      height: 66px;
      min-width: 66px;
      min-height: 66px;
      flex: 0 0 66px;
      border-radius: 50%;
      color: #fff;
      display: grid;
      place-items: center;
      font-size: 30px;
      font-weight: 700;
      overflow: hidden;
    }

    .metric-icon svg {
      width: 34px;
      height: 34px;
      display: block;
      stroke: currentColor;
    }

    .metric small {
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: .4px;
    }

    .metric strong {
      display: inline-block;
      margin-top: 4px;
      font-size: 30px;
      line-height: 1;
    }

    .metric span { margin-left: 6px; font-size: 16px; }
    .metric p { margin: 12px 0 0; color: var(--muted); font-size: 13px; }

    #attendanceStatus {
      font-size: 25px;
      letter-spacing: .3px;
    }

    .attendance-rule {
      margin-top: 4px !important;
      font-size: 11px !important;
      line-height: 1.35;
      color: var(--muted);
      white-space: nowrap;
    }


    .profile {
      background: var(--white);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: var(--shadow);
      padding: 24px 28px;
      display: grid;
      grid-template-columns: 116px minmax(220px, 1.15fr) repeat(4, minmax(140px, 1fr));
      gap: 18px;
      align-items: center;
      margin-bottom: 24px;
      position: sticky;
      top: 12px;
      z-index: 5;
    }

    .portrait {
      width: 92px;
      height: 92px;
      box-sizing: border-box;
      border-radius: 50%;
      background: linear-gradient(135deg, #edf3ff, #d9e8ff);
      display: grid;
      place-items: center;
      overflow: hidden;
      color: var(--nav);
      font-size: 34px;
      font-weight: 800;
    }

    .name {
      margin: 0;
      font-size: 20px;
      line-height: 1.45;
      font-weight: 700;
      letter-spacing: 0;
      text-transform: none;
    }

    .status {
      display: inline-flex;
      margin-top: 8px;
      padding: 3px 8px;
      border-radius: 4px;
      color: #0c8e4a;
      background: #e7f8ef;
      font-size: 12px;
      font-weight: 700;
    }

    .info-label { color: var(--muted); margin-bottom: 6px; }
    .info-value { font-weight: 700; word-break: break-word; }

    .table-card { overflow: visible; }
    .table-wrap { overflow-x: auto; overflow-y: visible; }

    table {
      width: 100%;
      border-collapse: collapse;
      table-layout: fixed;
      min-width: 100%;
      background: #fff;
    }

    #view-attendance .table-wrap table {
      width: 100%;
      min-width: 1180px;
      table-layout: fixed;
    }

    #view-attendance .table-wrap th,
    #view-attendance .table-wrap td {
      box-sizing: border-box;
    }

    th {
      background: var(--nav);
      color: #fff;
      padding: 14px 10px;
      border-right: 1px solid rgba(255,255,255,.1);
      font-size: 13px;
      line-height: 1.25;
      text-align: center;
      white-space: nowrap;
    }

    .floating-header {
      position: fixed;
      display: none;
      overflow: hidden;
      z-index: 6;
      pointer-events: none;
      box-shadow: 0 8px 18px rgba(18, 38, 63, .12);
    }

    .floating-header table {
      margin: 0;
      table-layout: fixed;
      border-collapse: collapse;
    }

    .floating-header th {
      box-sizing: border-box;
    }

    td {
      border-right: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
      padding: 10px;
      text-align: center;
      white-space: nowrap;
    }

    tr.sunday td {
      color: #d92333;
      background: #eaf5ff;
      font-weight: 700;
    }

    td.note { text-align: left; min-width: 150px; }

    tfoot td {
      background: #f3f6fb;
      border-top: 2px solid var(--nav);
      color: var(--nav);
      font-weight: 800;
    }

    .footer {
      min-height: 58px;
      padding: 10px 18px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      color: var(--muted);
    }

    .pager { display: flex; gap: 8px; align-items: center; }

    .page-btn {
      width: 34px;
      height: 34px;
      border: 1px solid var(--line);
      background: #fff;
      border-radius: 6px;
    }

    .page-btn.active {
      color: #fff;
      background: var(--blue);
      border-color: var(--blue);
    }

    .grid-2 {
      display: grid;
      grid-template-columns: repeat(2, minmax(260px, 1fr));
      gap: 20px;
    }

    .panel { padding: 20px; margin-bottom: 20px; }
    .panel h2 { margin: 0 0 14px; font-size: 18px; }

    .form-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(160px, 1fr));
      gap: 12px;
    }

    .form-grid .wide { grid-column: 1 / -1; }

    .employee-info-search {
      display: grid;
      grid-template-columns: minmax(280px, 560px) auto;
      gap: 14px;
      align-items: end;
      margin-bottom: 18px;
    }

    .employee-info-search .input { height: 48px; }

    .employee-search-actions {
      display: flex;
      gap: 10px;
      align-items: center;
    }

    .employee-search-button,
    .employee-print-button {
      width: auto;
      min-width: 148px;
      height: 48px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      border: 0;
      border-radius: 8px;
      font-weight: 800;
      box-shadow: 0 6px 15px rgba(20, 120, 242, .2);
    }

    .employee-search-button:hover,
    .employee-print-button:hover { transform: translateY(-1px); }

    .employee-search-button svg,
    .employee-print-button svg { width: 19px; height: 19px; }

    .employee-print-button {
      color: #0752ae;
      border: 1px solid #9fc4f1;
      background: #fff;
      box-shadow: none;
    }

    .employee-print-button[hidden] { display: none !important; }

    .employee-info-area { width: 100%; }

    .content.employee-info-mode > .filters { display: none; }

    .hr-profile-card {
      overflow: hidden;
      border: 3px solid #073d8f;
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 14px 35px rgba(8, 41, 87, .13);
    }

    .hr-details-loading {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      padding: 10px 16px;
      color: #0750a9;
      background: #eaf4ff;
      border-bottom: 1px solid #cfe3fa;
      font-size: 13px;
      font-weight: 700;
    }
    .hr-details-loading svg { width: 17px; height: 17px; }
    .hr-details-loading.is-loading svg { animation: hr-spin .9s linear infinite; }
    @keyframes hr-spin { to { transform: rotate(360deg); } }

    .hr-hero {
      min-height: 96px;
      display: grid;
      grid-template-columns: 390px 1fr 390px;
      align-items: center;
      position: relative;
      color: #fff;
      background: #06469d;
    }

    .hr-brand-panel {
      height: 100%;
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 14px 58px 14px 30px;
      clip-path: polygon(0 0, 84% 0, 100% 100%, 0 100%);
      color: #073d8f;
      background: #fff;
    }

    .hr-brand-panel svg {
      width: 56px;
      height: 56px;
      stroke-width: 2.4;
    }

    .hr-brand-name {
      font-size: 26px;
      line-height: 1.1;
      font-weight: 900;
    }

    .hr-brand-slogan {
      margin-top: 4px;
      font-size: 13px;
      text-align: center;
    }

    .hr-hero-title {
      margin: 0;
      padding: 14px 12px;
      font-size: 42px;
      line-height: 1.2;
      text-align: center;
      text-transform: uppercase;
    }

    .hr-profile-grid {
      display: grid;
      grid-template-columns: minmax(290px, 28fr) minmax(330px, 32fr) minmax(420px, 40fr);
      gap: 16px;
      padding: 30px 20px 34px;
      background: #fff;
    }

    .hr-card {
      min-width: 0;
      padding: 18px 20px;
      border: 1px solid #78aef0;
      border-radius: 14px;
      background: #fff;
    }

    .hr-person-card {
      background: #f5faff;
    }

    .hr-photo {
      width: 190px;
      height: 190px;
      box-sizing: border-box;
      display: grid;
      place-items: center;
      margin: 0 auto 24px;
      border: 6px solid #fff;
      border-radius: 50%;
      object-fit: cover;
      background: #cfe5ff;
      outline: 1px solid #94bff1;
      box-shadow: 0 8px 24px rgba(18, 38, 63, .14);
      color: #073d8f;
      font-size: 48px;
      font-weight: 900;
      overflow: hidden;
    }

    .hr-employment-status {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      width: fit-content;
      max-width: 100%;
      margin: -6px auto 12px;
      padding: 7px 12px;
      border: 1px solid #a9dfc2;
      border-radius: 6px;
      background: #eaf9f0;
      color: #08783e;
      font-size: 13px;
      font-weight: 800;
      text-align: center;
    }

    .hr-employment-status.terminated {
      border-color: #f3b2b8;
      background: #fff0f1;
      color: #c52332;
    }

    .hr-employment-status svg { width: 16px; height: 16px; flex: 0 0 16px; }

    .hr-info-row {
      display: grid;
      grid-template-columns: 48px minmax(0, 1fr);
      gap: 14px;
      align-items: start;
      padding: 14px 0;
      border-bottom: 1px dashed #cbd8ea;
    }

    .hr-info-row:last-child { border-bottom: 0; }

    .hr-icon {
      width: 42px;
      height: 42px;
      display: grid;
      place-items: center;
      color: #073d8f;
    }

    .hr-icon svg { width: 34px; height: 34px; stroke-width: 2.25; }

    .hr-label {
      margin-bottom: 6px;
      color: #08449a;
      font-size: 15px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .hr-value {
      color: #0f172a;
      font-size: 17px;
      font-weight: 800;
      overflow-wrap: anywhere;
    }

    .hr-subvalue {
      margin-top: 4px;
      color: #334155;
      font-size: 14px;
      font-weight: 500;
    }
    .hr-leave-note {
      margin-top: 8px;
      padding: 8px 10px;
      color: #45617f;
      background: #f1f7ff;
      border-left: 3px solid #2b7bd7;
      border-radius: 0 7px 7px 0;
      font-size: 12px;
      line-height: 1.5;
    }

    .hr-middle-column {
      display: grid;
      grid-auto-rows: auto;
      gap: 16px;
      align-content: start;
      min-width: 0;
    }

    .hr-right-column {
      display: grid;
      gap: 16px;
      align-content: start;
      min-width: 0;
    }

    .hr-mini-card {
      display: grid;
      grid-template-columns: 92px minmax(0, 1fr);
      gap: 16px;
      align-items: start;
      padding: 20px 22px;
      border: 1px solid #d5dce7;
      border-radius: 14px;
      background: #fff;
    }

    .hr-mini-icon {
      width: 76px;
      height: 76px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      color: #0b4ca7;
      background: #e0efff;
    }

    .hr-mini-icon svg {
      width: 43px;
      height: 43px;
      stroke-width: 2.1;
    }

    .hr-reward-card {
      border-color: #aad9c0;
      background: #f7fffa;
      box-shadow: inset 4px 0 0 #15945d;
    }

    .hr-reward-card .hr-mini-icon {
      color: #087a4b;
      background: #dcf7e8;
    }

    .reward-months {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin: 10px 0 8px;
    }

    .reward-month {
      display: inline-flex;
      align-items: center;
      min-height: 30px;
      padding: 5px 10px;
      border: 1px solid #b9dec9;
      border-radius: 6px;
      color: #075f3c;
      background: #fff;
      font-size: 13px;
      font-weight: 800;
    }

    .reward-status {
      display: flex;
      align-items: flex-start;
      gap: 7px;
      color: #24634a;
      font-size: 13px;
      line-height: 1.45;
    }

    .reward-status.pending { color: #a45a07; }
    .reward-status svg { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 1px; }

    .hr-big-number {
      color: #0f172a;
      font-size: 30px;
      font-weight: 900;
    }

    .hr-progress {
      height: 10px;
      margin: 10px 0;
      overflow: hidden;
      border-radius: 999px;
      background: #dce5f1;
    }

    .hr-progress span {
      display: block;
      height: 100%;
      border-radius: inherit;
      background: #176ed1;
    }

    .hr-family-card {
      overflow: hidden;
      border: 1px solid #cbd8ea;
      border-radius: 8px;
      background: #fff;
    }

    .hr-family-heading {
      display: grid;
      grid-template-columns: 66px minmax(0, 1fr);
      align-items: center;
      gap: 12px;
      padding: 14px 16px;
    }

    .hr-family-heading .hr-label { margin: 0; }

    #view-employees .hr-family-heading .hr-mini-icon {
      width: 58px;
      height: 58px;
      border-radius: 8px;
      color: #0b55b5;
      background: #e3f1ff;
    }

    #view-employees .hr-family-heading .hr-mini-icon svg {
      width: 29px;
      height: 29px;
    }

    .family-table {
      width: 100%;
      min-width: 620px;
      border-collapse: collapse;
      table-layout: auto;
      font-size: 13px;
    }

    .family-table th {
      padding: 9px 8px;
      color: #fff;
      background: #0753b4;
      font-size: 12px;
      text-align: center;
    }

    .family-table td {
      padding: 9px 8px;
      border: 1px solid #dbe4ef;
      color: #172033;
      vertical-align: middle;
    }

    .family-table td:first-child,
    .family-table td:nth-child(3),
    .family-table td:nth-child(4) { text-align: center; }

    .hr-right-column .family-table {
      min-width: 0;
      table-layout: fixed;
      font-family: var(--app-font);
      font-size: 13px;
      line-height: 1.45;
    }

    .hr-right-column .family-table th,
    .hr-right-column .family-table td {
      padding: 9px 7px;
      white-space: normal;
      overflow-wrap: anywhere;
    }

    .hr-right-column .family-table th {
      font-family: var(--app-font);
      font-size: 12px;
      font-weight: 800;
    }

    .hr-right-column .family-table td {
      font-family: var(--app-font);
      font-size: 13px;
      font-weight: 500;
    }

    .hr-right-column .family-table th:first-child,
    .hr-right-column .family-table td:first-child { width: 38px; }

    .hr-right-column .family-person {
      min-width: 0;
      gap: 5px;
    }

    .hr-right-column .family-person > span:last-child {
      min-width: 0;
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: normal;
      line-height: 1.35;
    }

    .hr-right-column .dependent-table th:nth-child(2),
    .hr-right-column .dependent-table td:nth-child(2) { width: 31%; }
    .hr-right-column .dependent-table th:nth-child(3),
    .hr-right-column .dependent-table td:nth-child(3) { width: 16%; }
    .hr-right-column .dependent-table th:nth-child(4),
    .hr-right-column .dependent-table td:nth-child(4) { width: 22%; }
    .hr-right-column .dependent-table th:nth-child(5),
    .hr-right-column .dependent-table td:nth-child(5) { width: 21%; }

    .hr-right-column .child-table th:nth-child(2),
    .hr-right-column .child-table td:nth-child(2) { width: 34%; }
    .hr-right-column .child-table th:nth-child(3),
    .hr-right-column .child-table td:nth-child(3) { width: 23%; }
    .hr-right-column .child-table th:nth-child(4),
    .hr-right-column .child-table td:nth-child(4) { width: 12%; }
    .hr-right-column .child-table th:nth-child(5),
    .hr-right-column .child-table td:nth-child(5) { width: 21%; }

    .family-person {
      display: flex;
      align-items: center;
      gap: 7px;
      min-width: 130px;
      font-weight: 800;
    }

    .family-person-icon {
      width: 28px;
      height: 28px;
      flex: 0 0 28px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      color: #0753b4;
      background: #e2efff;
    }

    .family-person-icon.parent { color: #7c3aed; background: #f0e8ff; }
    .family-person-icon.partner { color: #d11a4b; background: #ffe8ef; }
    .family-person-icon.child { color: #087a55; background: #dcf8ec; }
    .family-person-icon svg { width: 17px; height: 17px; }

    .reward-dialog {
      width: min(520px, calc(100vw - 32px));
      padding: 0;
      overflow: hidden;
      border: 0;
      border-radius: 8px;
      color: #10213f;
      background: #fff;
      box-shadow: 0 24px 70px rgba(5, 35, 75, .28);
    }

    .reward-dialog::backdrop { background: rgba(4, 24, 52, .62); }

    .reward-dialog-content { padding: 30px; text-align: center; }

    .reward-dialog-icon {
      width: 72px;
      height: 72px;
      display: grid;
      place-items: center;
      margin: 0 auto 18px;
      border: 1px solid #9dd8b8;
      border-radius: 50%;
      color: #087a4b;
      background: #dcf7e8;
    }

    .reward-dialog-icon svg { width: 38px; height: 38px; }
    .reward-dialog h2 { margin: 0; color: #073d8f; font-size: 28px; }
    .reward-dialog-lead { margin: 10px 0 0; color: #087a4b; font-size: 17px; font-weight: 800; }
    .reward-dialog-thanks { margin: 16px 0; color: #405777; line-height: 1.6; }

    .reward-dialog-payment {
      display: flex;
      align-items: center;
      gap: 10px;
      margin: 18px 0 22px;
      padding: 14px;
      border: 1px solid #cfe1f8;
      border-radius: 8px;
      color: #08449a;
      background: #f2f7ff;
      font-weight: 800;
      text-align: left;
    }

    .reward-dialog-payment svg { width: 22px; height: 22px; flex: 0 0 22px; }

    .birthday-dialog {
      width: min(590px, calc(100vw - 28px));
      padding: 0;
      overflow: hidden;
      border: 0;
      border-radius: 8px;
      color: #10213f;
      background: #fff;
      box-shadow: 0 28px 80px rgba(4, 28, 62, .34);
    }

    .birthday-dialog::backdrop { background: rgba(4, 24, 52, .68); }

    .birthday-dialog-content {
      position: relative;
      z-index: 1;
      padding: 36px 34px 28px;
      overflow: hidden;
      text-align: center;
      background: #fffdf8;
    }

    .birthday-dialog-content::before,
    .birthday-dialog-content::after {
      content: '';
      position: absolute;
      z-index: -1;
      width: 150px;
      height: 150px;
      border: 24px solid #e4f1ff;
      border-radius: 50%;
    }

    .birthday-dialog-content::before { top: -92px; left: -72px; }
    .birthday-dialog-content::after { right: -82px; bottom: -108px; border-color: #e5f7eb; }

    .birthday-icon {
      width: 84px;
      height: 84px;
      display: grid;
      place-items: center;
      margin: 0 auto 18px;
      border: 2px solid #f1b84b;
      border-radius: 50%;
      color: #b76108;
      background: #fff3d6;
      box-shadow: 0 10px 25px rgba(181, 96, 8, .14);
    }

    .birthday-icon svg { width: 44px; height: 44px; }
    .birthday-dialog h2 { margin: 0; color: #073d8f; font-size: 30px; line-height: 1.25; }
    .birthday-date { margin: 9px 0 0; color: #b76108; font-weight: 800; }
    .birthday-thanks { max-width: 470px; margin: 18px auto 8px; color: #405777; line-height: 1.65; }
    .birthday-wish { max-width: 470px; margin: 0 auto 22px; color: #087a4b; font-weight: 800; line-height: 1.55; }

    .birthday-actions {
      position: relative;
      z-index: 2;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 14px;
      flex-wrap: wrap;
    }

    .birthday-countdown { color: #60738d; font-size: 13px; }

    .birthday-progress {
      position: absolute;
      right: 0;
      bottom: 0;
      left: 0;
      height: 5px;
      background: #e5edf6;
    }

    .birthday-progress span {
      display: block;
      width: 100%;
      height: 100%;
      transform-origin: left center;
      background: #15945d;
      animation: birthdayCountdown 10s linear forwards;
    }

    .birthday-flowers {
      position: absolute;
      z-index: 0;
      inset: 0;
      overflow: hidden;
      pointer-events: none;
    }

    .birthday-flower {
      position: absolute;
      top: -14%;
      left: var(--flower-left);
      color: var(--flower-color);
      font-size: var(--flower-size);
      line-height: 1;
      opacity: .9;
      animation: birthdayFlowerFall var(--flower-duration) linear var(--flower-delay) infinite;
    }

    @keyframes birthdayFlowerFall {
      0% { transform: translate3d(0, -20px, 0) rotate(0deg); }
      50% { transform: translate3d(var(--flower-drift), 270px, 0) rotate(240deg); }
      100% { transform: translate3d(0, 610px, 0) rotate(520deg); }
    }

    @keyframes birthdayCountdown {
      from { transform: scaleX(1); }
      to { transform: scaleX(0); }
    }

    @media (prefers-reduced-motion: reduce) {
      .birthday-flower { display: none; }
      .birthday-progress span { animation: none; }
    }

    .documents-experience {
      overflow: hidden;
      min-height: calc(100vh - 150px);
      border: 1px solid #d7e4f4;
      border-radius: 8px;
      background: #f5f9ff;
    }

    .documents-hero {
      position: relative;
      min-height: 280px;
      overflow: hidden;
      background: #eef7ff;
    }

    .documents-hero-image {
      position: absolute;
      z-index: 0;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      background-size: cover;
      background-position: center 11%;
    }

    .documents-hero::after {
      content: '';
      position: absolute;
      z-index: 1;
      inset: 0;
      pointer-events: none;
      background:
        linear-gradient(90deg, #fff 0%, rgba(255,255,255,.98) 24%, rgba(248,252,255,.88) 37%, rgba(224,238,253,.56) 49%, rgba(255,255,255,.18) 61%, rgba(255,255,255,0) 74%),
        linear-gradient(90deg, rgba(7,74,150,0) 30%, rgba(7,74,150,.12) 47%, rgba(7,74,150,.04) 60%, rgba(7,74,150,0) 72%);
      -webkit-backdrop-filter: blur(4px);
      backdrop-filter: blur(4px);
      -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 34%, rgba(0,0,0,.82) 48%, rgba(0,0,0,.28) 63%, transparent 76%);
      mask-image: linear-gradient(90deg, #000 0%, #000 34%, rgba(0,0,0,.82) 48%, rgba(0,0,0,.28) 63%, transparent 76%);
    }

    .documents-hero-copy {
      position: relative;
      z-index: 2;
      width: min(44%, 560px);
      padding: 54px 42px 72px;
      color: #0a234a;
    }

    .documents-hero-copy .title {
      margin: 0 0 14px;
      font-size: 36px;
      line-height: 1.2;
      color: #092552;
    }

    .documents-hero-copy p {
      max-width: 480px;
      margin: 0;
      color: #395473;
      font-size: 17px;
      line-height: 1.6;
    }

    .documents-hero-accent {
      display: block;
      width: 52px;
      height: 4px;
      margin-top: 20px;
      border-radius: 2px;
      background: #10a9b6;
    }

    .documents-list {
      position: relative;
      z-index: 2;
      display: grid;
      gap: 16px;
      margin-top: -42px;
      padding: 0 34px 24px;
    }

    .document-link {
      display: grid;
      grid-template-columns: 76px minmax(0, 1fr) 52px;
      gap: 20px;
      align-items: center;
      min-height: 108px;
      padding: 14px 22px;
      border: 1px solid #dbe6f4;
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 8px 22px rgba(23, 60, 105, .08);
      color: #10213f;
      text-decoration: none;
      transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
    }

    .document-link:hover {
      border-color: #9fc5f4;
      box-shadow: 0 12px 28px rgba(23, 60, 105, .13);
      transform: translateY(-2px);
    }

    .document-link:focus-visible { outline: 3px solid #80b7ff; outline-offset: 3px; }

    .document-link-icon {
      width: 68px;
      height: 68px;
      display: grid;
      place-items: center;
      border-radius: 8px;
      color: #0869d8;
      background: #e7f2ff;
    }

    .document-link-icon.green { color: #08945e; background: #e6f8ef; }
    .document-link-icon.amber { color: #e78408; background: #fff3df; }
    .document-link-icon svg { width: 34px; height: 34px; stroke-width: 2; }

    .document-link-copy {
      min-width: 0;
    }

    .document-link-copy strong {
      display: block;
      margin-bottom: 7px;
      color: #0b2856;
      font-size: 20px;
      line-height: 1.35;
    }

    .document-link-copy span {
      display: block;
      color: #5c6f89;
      font-size: 14px;
      line-height: 1.5;
    }

    .document-open-icon {
      width: 46px;
      height: 46px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      color: #0869d8;
      background: #edf5ff;
    }

    .document-link:nth-child(2) .document-open-icon { color: #078651; background: #e9f8ef; }
    .document-link:nth-child(3) .document-open-icon { color: #db7900; background: #fff5e7; }
    .document-open-icon svg { width: 22px; height: 22px; }

    .documents-values {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      max-width: 780px;
      margin: 0 auto;
      padding: 12px 30px 30px;
    }

    .documents-value {
      display: flex;
      gap: 10px;
      align-items: center;
      justify-content: center;
      min-height: 46px;
      padding: 0 18px;
      border-right: 1px solid #c9d9ec;
      color: #405777;
      font-size: 13px;
      line-height: 1.35;
    }

    .documents-value:last-child { border-right: 0; }
    .documents-value svg { width: 24px; height: 24px; flex: 0 0 24px; color: #0878d8; }

    @media (max-width: 860px) {
      .documents-hero { min-height: 248px; }
      .documents-hero-image { background-size: cover; background-position: center 11%; opacity: .72; }
      .documents-hero-copy { width: min(76%, 520px); padding: 40px 28px 70px; }
      .documents-hero-copy .title { font-size: 30px; }
      .documents-list { padding-right: 20px; padding-left: 20px; }
    }

    @media (max-width: 620px) {
      .documents-hero { min-height: 226px; }
      .documents-hero-image { background-size: cover; background-position: center 11%; opacity: .5; }
      .documents-hero-copy { width: 100%; padding: 34px 20px 66px; }
      .documents-hero-copy .title { font-size: 27px; }
      .documents-hero-copy p { font-size: 15px; }
      .documents-list { gap: 12px; margin-top: -34px; padding: 0 12px 20px; }
      .document-link { grid-template-columns: 58px minmax(0, 1fr) 38px; gap: 12px; min-height: 96px; padding: 12px; }
      .document-link-icon { width: 54px; height: 54px; }
      .document-link-icon svg { width: 27px; height: 27px; }
      .document-link-copy strong { margin-bottom: 4px; font-size: 16px; }
      .document-link-copy span { font-size: 12px; }
      .document-open-icon { width: 36px; height: 36px; }
      .documents-values { grid-template-columns: 1fr; padding: 6px 18px 22px; }
      .documents-value { justify-content: flex-start; border-right: 0; border-bottom: 1px solid #d7e3f1; }
      .documents-value:last-child { border-bottom: 0; }
    }

    .hr-contract-line + .hr-contract-line {
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px dashed #cbd8ea;
    }

    .hr-insurance-card {
      border-color: #d5dce7;
    }

    .hr-insurance-heading {
      display: grid;
      grid-template-columns: 78px 1fr;
      gap: 14px;
      align-items: center;
    }

    .hr-insurance-heading .hr-label {
      font-size: 16px;
      line-height: 1.5;
    }

    .insurance-total {
      margin: 18px 0;
      padding: 18px;
      border: 1px solid #bcd5f5;
      border-radius: 12px;
      text-align: center;
      background: #edf6ff;
      color: #0b2f69;
      font-weight: 800;
      overflow: hidden;
    }

    .insurance-total strong {
      display: block;
      margin-top: 8px;
      color: #0b2f69;
      font-size: 36px;
      font-weight: 900;
    }

    .insurance-table {
      min-width: 0;
      table-layout: fixed;
    }

    .insurance-table th {
      padding: 12px 10px;
      color: #fff;
      background: #0752ae;
      text-align: center;
    }

    .insurance-table td { padding: 12px 10px; }

    .insurance-table th,
    .insurance-table td {
      white-space: normal;
      overflow-wrap: anywhere;
    }

    .insurance-type-cell {
      display: grid;
      grid-template-columns: 38px minmax(0, 1fr);
      gap: 8px;
      align-items: center;
      font-weight: 800;
    }

    .insurance-type-icon {
      width: 36px;
      height: 36px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      color: #fff;
      background: #63b56b;
    }

    .insurance-type-icon.orange { background: #f68532; }
    .insurance-type-icon.purple { background: #8c67ce; }
    .insurance-type-icon.blue { background: #176ed1; }
    .insurance-type-icon svg { width: 21px; height: 21px; }

    .hr-updated {
      margin-top: 12px;
      padding: 9px 12px;
      border: 1px solid #cfe1f8;
      border-radius: 10px;
      color: #176ed1;
      background: #edf6ff;
      text-align: center;
    }

    .hr-footer {
      min-height: 54px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
      padding: 10px 30px;
      color: #fff;
      background: #06469d;
    }

    .hr-footer-note {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .hr-footer svg { width: 23px; height: 23px; }

    .hr-system-name {
      font-weight: 800;
      letter-spacing: 0;
    }

    .employee-info-empty {
      padding: 48px 24px;
      color: var(--muted);
      text-align: center;
    }

    /* Modern attendance and employee profile surfaces. */
    #view-attendance,
    #view-employees { color: #10213f; }

    #view-attendance.active { display: flex; flex-direction: column; }
    #view-attendance .attendance-filters { order: 1; }
    #view-attendance .attendance-heading { order: 2; }
    #view-attendance .cards { order: 3; }
    #view-attendance .profile { order: 4; }
    #view-attendance .table-card { order: 5; }

    .attendance-heading {
      position: relative;
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 24px;
      min-height: 132px;
      margin-bottom: 18px;
      padding: 26px 28px;
      overflow: hidden;
      border: 1px solid #d9e5f3;
      border-left: 5px solid #0878d8;
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 8px 24px rgba(25, 58, 100, .07);
    }

    .attendance-heading-image {
      position: absolute;
      z-index: 0;
      inset: 0 0 0 auto;
      width: 58%;
      height: 100%;
      object-fit: cover;
      background-position: right center;
    }

    .attendance-heading::before {
      content: '';
      position: absolute;
      z-index: 1;
      inset: 0;
      pointer-events: none;
      background:
        linear-gradient(90deg, #fff 0%, rgba(255,255,255,.98) 24%, rgba(248,252,255,.88) 37%, rgba(224,238,253,.56) 49%, rgba(255,255,255,.18) 61%, rgba(255,255,255,0) 74%),
        linear-gradient(90deg, rgba(7,74,150,0) 30%, rgba(7,74,150,.12) 47%, rgba(7,74,150,.04) 60%, rgba(7,74,150,0) 72%);
      -webkit-backdrop-filter: blur(4px);
      backdrop-filter: blur(4px);
      -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 34%, rgba(0,0,0,.82) 48%, rgba(0,0,0,.28) 63%, transparent 76%);
      mask-image: linear-gradient(90deg, #000 0%, #000 34%, rgba(0,0,0,.82) 48%, rgba(0,0,0,.28) 63%, transparent 76%);
    }

    .attendance-heading > div:first-of-type {
      position: relative;
      z-index: 2;
      width: min(50%, 620px);
    }

    .attendance-eyebrow {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;
      color: #0878d8;
      font-size: 12px;
      font-weight: 900;
    }

    .attendance-eyebrow svg { width: 17px; height: 17px; }
    .attendance-heading .title { margin: 0; color: #082b5f; font-size: 28px; line-height: 1.25; }
    .attendance-heading p { margin: 8px 0 0; color: #62748b; font-size: 14px; }

    .attendance-period {
      display: grid;
      grid-template-columns: 42px auto;
      gap: 10px;
      align-items: center;
      min-width: 176px;
      padding: 10px 14px;
      border: 1px solid #cfe0f4;
      border-radius: 8px;
      background: #f2f8ff;
    }

    .attendance-period > svg {
      width: 38px;
      height: 38px;
      padding: 8px;
      border-radius: 8px;
      color: #086ac9;
      background: #dceeff;
    }

    .attendance-period span { display: block; color: #64748b; font-size: 11px; font-weight: 700; }
    .attendance-period strong { display: block; margin-top: 2px; color: #0a326a; font-size: 16px; }
    .attendance-heading .attendance-period { display: none; }

    #view-attendance .filters {
      grid-template-columns: minmax(260px, 1fr) 138px 128px 164px;
      gap: 12px;
      margin-bottom: 18px;
      padding: 16px;
      border: 1px solid #dce6f2;
      border-radius: 8px;
      background: #f8fbff;
    }

    #view-attendance .filters .field,
    #view-attendance .filters .button { min-height: 48px; }
    #view-attendance .filters .field > svg { width: 19px; height: 19px; flex: 0 0 19px; color: #68809d; }
    #view-attendance .filters .button svg { width: 18px; height: 18px; }

    #view-attendance .cards { gap: 14px; margin-bottom: 18px; }
    #view-attendance .metric {
      position: relative;
      min-height: 122px;
      gap: 15px;
      overflow: hidden;
      padding: 19px;
      border-color: #dce6f2;
      box-shadow: 0 7px 20px rgba(25, 58, 100, .07);
    }

    #view-attendance .metric::after {
      content: '';
      position: absolute;
      inset: auto 0 0;
      height: 3px;
      background: #1681df;
    }

    #view-attendance .metric:nth-child(2)::after { background: #13a066; }
    #view-attendance .metric:nth-child(3)::after { background: #e9a21b; }
    #view-attendance .metric:nth-child(4)::after { background: #e85d68; }

    #view-attendance .metric-icon {
      width: 58px;
      height: 58px;
      min-width: 58px;
      min-height: 58px;
      flex-basis: 58px;
      border-radius: 8px;
      font-size: 0;
    }

    #view-attendance .metric-icon.metric-blue { color: #086ac9; background: #e4f1ff; }
    #view-attendance .metric-icon.metric-green { color: #0b8d59; background: #e3f7ed; }
    #view-attendance .metric-icon.metric-amber { color: #ca7c00; background: #fff1d8; }
    #view-attendance .metric-icon.metric-coral { color: #fff; background: #e85d68; }
    #view-attendance .metric-icon svg { width: 29px; height: 29px; }
    #view-attendance .metric small { color: #63748b; font-size: 11px; font-weight: 800; }
    #view-attendance .metric strong { color: #0a2e63; font-size: 27px; }
    #view-attendance .metric p { margin-top: 8px; }

    #view-attendance .profile {
      position: sticky;
      top: 12px;
      z-index: 5;
      grid-template-columns: minmax(260px, 1.25fr) repeat(4, minmax(150px, 1fr));
      gap: 0;
      margin-bottom: 18px;
      padding: 0;
      overflow: hidden;
      border-color: #d7e4f2;
      box-shadow: 0 8px 24px rgba(25, 58, 100, .09);
    }

    .attendance-person {
      display: grid;
      grid-template-columns: 76px minmax(0, 1fr);
      gap: 14px;
      align-items: center;
      min-height: 110px;
      padding: 16px 20px;
      background: #f1f7ff;
    }

    #view-attendance .portrait {
      width: 72px;
      height: 72px;
      border: 3px solid #fff;
      outline: 2px solid #8fbcf1;
      border-radius: 50%;
      background: #cfe4ff;
      box-shadow: 0 7px 18px rgba(10, 69, 145, .2);
      font-size: 26px;
    }

    #view-attendance .name { color: #092c60; font-size: 17px; }

    .attendance-profile-item {
      display: grid;
      grid-template-columns: 34px minmax(0, 1fr);
      gap: 9px;
      align-items: center;
      min-height: 110px;
      padding: 16px;
      border-left: 1px solid #e0e8f2;
      background: #fff;
    }

    .attendance-profile-item > svg { width: 25px; height: 25px; color: #0b65bd; }
    .attendance-profile-icon {
      width: 32px;
      height: 32px;
      display: grid;
      place-items: center;
      border-radius: 6px;
      color: #086ac9;
      background: #e3f1ff;
    }
    .attendance-profile-icon svg { width: 21px; height: 21px; }
    .attendance-profile-item .info-label { margin-bottom: 5px; font-size: 11px; }
    .attendance-profile-item .info-value { color: #10213f; font-size: 13px; }

    #view-attendance .table-card {
      padding: 0;
      overflow: hidden;
      border-color: #d7e4f2;
      box-shadow: 0 9px 26px rgba(25, 58, 100, .08);
    }

    .attendance-table-heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      padding: 16px 18px;
      border-bottom: 1px solid #dce6f2;
      background: #fff;
    }

    .attendance-table-heading > div { display: flex; align-items: center; gap: 12px; }
    .attendance-table-heading > div > svg { width: 34px; height: 34px; padding: 7px; border-radius: 6px; color: #086ac9; background: #e5f2ff; }
    .attendance-table-heading h2 { margin: 0 0 3px; color: #0a2e63; font-size: 16px; }
    .attendance-table-heading p { margin: 0; color: #6b7d93; font-size: 12px; }
    .attendance-table-badge { display: inline-flex; align-items: center; gap: 6px; color: #087a55; font-size: 12px; font-weight: 800; }
    .attendance-table-badge svg { width: 17px; height: 17px; }
    #view-attendance th { padding: 13px 8px; background: #082f66; }
    #view-attendance td { padding: 10px 8px; color: #263b58; }
    #view-attendance tbody tr:nth-child(even):not(.sunday) td { background: #f8fbff; }
    #view-attendance tbody tr:hover td { background: #edf6ff; }
    #view-attendance .footer { border-top: 1px solid #dce6f2; background: #fbfdff; }

    .employee-lookup-hero {
      position: relative;
      min-height: 218px;
      margin-bottom: 18px;
      overflow: hidden;
      border: 1px solid #d8e5f3;
      border-radius: 8px;
      background: #f3f9ff;
    }

    .employee-lookup-image {
      position: absolute;
      z-index: 0;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      background-position: center;
      opacity: .9;
    }

    .employee-lookup-hero::before {
      content: '';
      position: absolute;
      z-index: 1;
      inset: 0;
      pointer-events: none;
      background:
        linear-gradient(90deg, #fff 0%, rgba(255,255,255,.98) 24%, rgba(248,252,255,.88) 37%, rgba(224,238,253,.56) 49%, rgba(255,255,255,.18) 61%, rgba(255,255,255,0) 74%),
        linear-gradient(90deg, rgba(7,74,150,0) 30%, rgba(7,74,150,.12) 47%, rgba(7,74,150,.04) 60%, rgba(7,74,150,0) 72%);
      -webkit-backdrop-filter: blur(4px);
      backdrop-filter: blur(4px);
      -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 34%, rgba(0,0,0,.82) 48%, rgba(0,0,0,.28) 63%, transparent 76%);
      mask-image: linear-gradient(90deg, #000 0%, #000 34%, rgba(0,0,0,.82) 48%, rgba(0,0,0,.28) 63%, transparent 76%);
    }

    .employee-lookup-content {
      position: relative;
      z-index: 2;
      width: min(62%, 760px);
      padding: 28px 30px;
    }

    .employee-lookup-content .title { margin: 0 0 16px; color: #092c60; font-size: 28px; }
    .employee-lookup-content .employee-info-search { grid-template-columns: minmax(280px, 1fr) auto; margin: 0; }
    .employee-info-input-wrap { position: relative; display: block; }
    .employee-info-input-wrap > svg { position: absolute; z-index: 2; top: 15px; left: 14px; width: 18px; height: 18px; color: #71849c; }
    .employee-info-input-wrap .input { padding-left: 42px; }

    #view-employees .hr-profile-card {
      overflow: hidden;
      border: 0;
      border-radius: 8px;
      background: transparent;
      box-shadow: none;
    }

    #view-employees .hr-hero { min-height: 84px; border-radius: 8px 8px 0 0; background: #06469d; }
    #view-employees .hr-brand-panel { padding-left: 24px; }
    #view-employees .hr-brand-logo { width: 218px; max-width: 100%; height: 58px; object-fit: contain; object-position: left center; }
    #view-employees .hr-brand-name { font-size: 22px; }
    #view-employees .hr-hero-title { font-size: 32px; }
    #view-employees .hr-profile-grid { gap: 14px; padding: 18px; border-right: 1px solid #d8e5f3; border-left: 1px solid #d8e5f3; background: #f5f9ff; }
    #view-employees .hr-card,
    #view-employees .hr-mini-card { border-color: #d3e1f1; border-radius: 8px; box-shadow: 0 5px 16px rgba(25, 58, 100, .05); }
    #view-employees .hr-person-card { background: #f2f8ff; }
    #view-employees .hr-photo { width: 164px; height: 164px; margin-bottom: 18px; border: 5px solid #fff; outline: 2px solid #8fbcf1; background: #cbe2ff; box-shadow: 0 10px 26px rgba(10, 69, 145, .2); font-size: 44px; }
    #view-employees .hr-info-row { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; padding: 11px 0; }
    #view-employees .hr-icon { width: 34px; height: 34px; }
    #view-employees .hr-icon svg { width: 27px; height: 27px; }
    #view-employees .hr-label { font-size: 13px; }
    #view-employees .hr-value { font-size: 15px; }
    #view-employees .hr-mini-card { grid-template-columns: 66px minmax(0, 1fr); gap: 12px; padding: 16px; }
    #view-employees .hr-mini-icon { width: 58px; height: 58px; border-radius: 8px; }
    #view-employees .hr-mini-icon svg { width: 31px; height: 31px; }
    #view-employees .hr-family-card { border-color: #d3e1f1; box-shadow: 0 5px 16px rgba(25, 58, 100, .05); }
    #view-employees .hr-insurance-card { position: relative; display: flex; flex-direction: column; min-height: 0; background: #fff; }

    #view-employees .hr-insurance-footer {
      margin: auto -20px -18px;
      padding: 14px 18px 16px;
      border-top: 1px solid #cfe0f4;
      border-radius: 0 0 8px 8px;
      background: #f3f8ff;
      color: #17365f;
    }
    #view-employees .hr-insurance-footer .hr-footer-note { display: flex; align-items: center; gap: 10px; }
    #view-employees .hr-insurance-footer .hr-system-name { margin-top: 6px; font-weight: 900; color: #0a326a; }
    #view-employees .hr-footer { border-radius: 0 0 8px 8px; background: #06469d; }
    #view-employees .hr-security-icon {
      width: 34px;
      height: 34px;
      display: grid;
      place-items: center;
      flex: 0 0 34px;
      border: 1px solid rgba(255,255,255,.45);
      border-radius: 50%;
      color: #fff;
      background: #0b5ab8;
    }
    #view-employees .hr-security-icon svg { width: 20px; height: 20px; }

    /* Signature public experience: focused, bright and unmistakably ANYONE. */
    .language-control {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 42px;
      padding: 0 8px 0 12px;
      border: 1px solid #cbd9e9;
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 5px 16px rgba(20, 55, 96, .08);
      color: #075cac;
    }

    .language-control > svg { width: 19px; height: 19px; }
    .language-control .lang-select { min-height: 38px; padding: 0 6px; border: 0; box-shadow: none; }
    .nav-item > svg { width: 20px; height: 20px; flex: 0 0 20px; }

    #view-attendance .attendance-heading { order: 1; }
    #view-attendance .attendance-filters { order: 2; }
    #view-attendance .cards { order: 3; }
    #view-attendance .profile { order: 4; }
    #view-attendance .table-card { order: 5; }

    #view-attendance .attendance-heading {
      min-height: 250px;
      margin-bottom: 0;
      padding: 38px 42px 72px;
      align-items: center;
      border: 0;
      border-left: 0;
      background: #eaf5ff;
      box-shadow: 0 16px 38px rgba(19, 63, 112, .14);
    }

    #view-attendance .attendance-heading::after {
      content: '';
      position: absolute;
      inset: auto 0 0;
      height: 5px;
      background: #08a8a0;
    }

    #view-attendance .attendance-heading-image {
      width: 100%;
      background-size: cover;
      background-position: center 11%;
      opacity: 1;
    }

    #view-attendance .attendance-heading > div:first-of-type {
      width: min(48%, 660px);
      padding: 18px 0;
    }

    #view-attendance .attendance-eyebrow {
      width: fit-content;
      margin-bottom: 13px;
      padding: 7px 11px;
      border-left: 3px solid #e53b45;
      background: rgba(255,255,255,.88);
      color: #075cac;
    }

    #view-attendance .attendance-heading .title {
      max-width: 560px;
      color: #062b60;
      font-size: 38px;
      line-height: 1.15;
    }

    #view-attendance .attendance-heading p {
      max-width: 520px;
      margin-top: 13px;
      color: #425b78;
      font-size: 15px;
      line-height: 1.65;
    }

    #view-attendance .attendance-heading .attendance-period {
      position: absolute;
      z-index: 2;
      top: 26px;
      right: 28px;
      display: grid;
      border-color: rgba(255,255,255,.85);
      background: rgba(255,255,255,.93);
      box-shadow: 0 8px 22px rgba(16, 62, 112, .13);
    }

    #view-attendance .filters {
      position: relative;
      z-index: 3;
      margin: -38px 30px 22px;
      padding: 14px;
      border: 1px solid #d1e1f1;
      border-left: 4px solid #08a8a0;
      background: #fff;
      box-shadow: 0 15px 32px rgba(17, 57, 101, .16);
    }

    #view-attendance .filters .field { background: #f8fbff; }
    #view-attendance .filters .button.primary,
    #view-employees .employee-search-button {
      border-color: #086bc9;
      background: #086bc9;
      box-shadow: 0 7px 16px rgba(8, 107, 201, .22);
    }

    #view-attendance .metric { transition: transform .18s ease, box-shadow .18s ease; }
    #view-attendance .metric:hover { transform: translateY(-3px); box-shadow: 0 13px 28px rgba(25, 58, 100, .13); }

    #view-employees .employee-lookup-hero {
      min-height: 286px;
      margin-bottom: 22px;
      border: 0;
      background: #eaf5ff;
      box-shadow: 0 16px 38px rgba(19, 63, 112, .14);
    }

    #view-employees .employee-lookup-hero::after {
      content: '';
      position: absolute;
      z-index: 1;
      inset: auto 0 0;
      height: 5px;
      background: #e53b45;
    }

    #view-employees .employee-lookup-image { opacity: 1; background-size: cover; background-position: center 11%; }
    #view-employees .employee-lookup-content { width: min(58%, 780px); padding: 38px 38px 42px; }
    #view-employees .employee-lookup-content .title {
      max-width: 620px;
      margin: 0 0 22px;
      color: #062b60;
      font-size: 38px;
      line-height: 1.15;
    }

    #view-employees .employee-lookup-content .attendance-eyebrow {
      width: fit-content;
      padding: 7px 11px;
      border-left: 3px solid #08a8a0;
      background: rgba(255,255,255,.9);
    }

    #view-employees .employee-info-search {
      padding: 13px;
      border: 1px solid #cfe0f2;
      border-left: 4px solid #086bc9;
      border-radius: 8px;
      background: rgba(255,255,255,.95);
      box-shadow: 0 14px 30px rgba(17, 57, 101, .15);
    }

    #view-employees .employee-info-search .info-label { margin: 0 0 7px 2px; color: #536b87; }
    #view-employees .employee-info-input-wrap .input { background: #f8fbff; }
    #view-employees .employee-info-empty {
      min-height: 310px;
      border: 1px solid #d4e2f1;
      background-color: #f7fbff;
      background-image:
        linear-gradient(90deg, rgba(247, 251, 255, .99) 0%, rgba(247, 251, 255, .96) 34%, rgba(247, 251, 255, .68) 53%, rgba(247, 251, 255, .08) 78%),
        var(--payroll-image);
      background-repeat: no-repeat;
      background-position: center, center;
      background-size: cover, cover;
      box-shadow: 0 10px 26px rgba(25, 58, 100, .07);
    }

    #view-employees .employee-info-empty {
      display: grid;
      place-items: center;
      min-height: 260px;
      border: 1px dashed #b9cde5;
      border-radius: 8px;
      background: #fbfdff;
    }

    #view-employees .employee-info-empty span { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; color: #0878d8; background: #e3f1ff; }
    #view-employees .employee-info-empty span svg { width: 31px; height: 31px; }
    #view-employees .employee-info-empty strong { margin-top: 12px; color: #0a326a; font-size: 18px; }
    #view-employees .employee-info-empty p { margin: 6px 0 0; }

    @media (max-width: 1280px) {
      #view-attendance .profile { grid-template-columns: minmax(250px, 1.2fr) repeat(2, minmax(170px, 1fr)); }
      .attendance-profile-item { min-height: 88px; }
      .attendance-person { grid-row: span 2; min-height: 176px; }
      .employee-lookup-content { width: min(70%, 760px); }
    }

    @media (max-width: 820px) {
      .attendance-heading { align-items: flex-start; flex-direction: column; padding: 20px; }
      .attendance-heading-image { width: 100%; background-size: cover; background-position: center 11%; opacity: .72; }
      .attendance-heading > div:first-of-type { width: 72%; }
      .attendance-period { width: 100%; }
      #view-attendance .filters { grid-template-columns: 1fr 1fr; }
      #view-attendance .filters .attendance-search-field { grid-column: 1 / -1; }
      #view-attendance .profile { grid-template-columns: 1fr 1fr; position: static; }
      .attendance-person { grid-column: 1 / -1; grid-row: auto; min-height: 110px; }
      .employee-lookup-image { background-size: cover; background-position: center 11%; opacity: .72; }
      .employee-lookup-content { width: 100%; }
      .employee-lookup-content .employee-info-search { grid-template-columns: 1fr; }
    }

    @media (max-width: 560px) {
      .attendance-heading .title { font-size: 23px; }
      .attendance-heading-image { width: 100%; background-size: cover; background-position: center 11%; opacity: .5; }
      .attendance-heading > div:first-of-type { width: 100%; }
      #view-attendance .filters { grid-template-columns: 1fr; }
      #view-attendance .filters .attendance-search-field { grid-column: auto; }
      #view-attendance .profile { grid-template-columns: 1fr; }
      .attendance-profile-item { border-top: 1px solid #e0e8f2; border-left: 0; }
      .attendance-table-heading { align-items: flex-start; flex-direction: column; }
      .employee-lookup-content { padding: 22px 18px; }
      .employee-search-actions { display: grid; grid-template-columns: 1fr; }
      .employee-search-button, .employee-print-button { width: 100%; }
    }

    canvas {
      width: 100%;
      max-width: 720px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
    }

    .loading {
      position: fixed;
      inset: 0;
      display: none;
      place-items: center;
      background: rgba(255,255,255,.72);
      z-index: 10;
      font-weight: 800;
      color: var(--nav);
    }

    .loading.show { display: grid; }

    @media print {
      @page { size: landscape; margin: 8mm; }
      .sidebar, .topbar, .filters, .footer, .employee-info-search, .employee-lookup-hero { display: none !important; }
      .app { display: block; }
      .content { padding: 0; max-width: none; }
      .view { display: none !important; }
      #view-attendance.active, #view-employees.active { display: block !important; }
      .panel, .metric, .profile, .table-card { box-shadow: none; }
      #view-employees > .title { display: none !important; }
      #view-employees .hr-profile-card { border: 0; box-shadow: none; }
    }

    @media (max-width: 1120px) {
      .app { grid-template-columns: 76px 1fr; }
      .brand span, .nav-label, .public-note, .sidebar-footer-logo { display: none; }
      .nav-item { justify-content: center; padding: 0; }
      .filters { grid-template-columns: 1fr 130px; }
      .cards { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
      .profile { grid-template-columns: 92px repeat(2, minmax(180px, 1fr)); }
      .hr-profile-grid { grid-template-columns: minmax(270px, .82fr) minmax(390px, 1.18fr); }
      .hr-person-card { grid-row: 1 / span 2; }
      .hr-middle-column { grid-column: 2; }
      .hr-right-column { grid-column: 2; grid-template-columns: 1fr; }
      .hr-hero { grid-template-columns: 300px 1fr; }
      .hr-hero-spacer { display: none; }
      .hr-hero-title { font-size: 34px; }
      #view-attendance .attendance-heading-image { width: 100%; opacity: .82; }
      #view-attendance .attendance-heading > div:first-of-type { width: 58%; }
      #view-employees .employee-lookup-content { width: 68%; }
    }

    @media (max-width: 720px) {
      .app { display: block; }
      .sidebar { display: none; }
      .topbar, .content { padding-left: 16px; padding-right: 16px; }
      .filters, .cards, .profile, .grid-2, .form-grid, .employee-info-search, .hr-profile-grid { grid-template-columns: 1fr; }
      .employee-search-actions { flex-wrap: wrap; }
      .hr-person-card { grid-row: auto; }
      .hr-middle-column, .hr-right-column { grid-column: auto; }
      .hr-right-column { grid-template-columns: 1fr; }
      .hr-hero { grid-template-columns: 1fr; }
      .hr-brand-panel { display: none; }
      .hr-hero-title { font-size: 28px; }
      .hr-mini-card { grid-template-columns: 72px minmax(0, 1fr); padding: 16px; }
      .hr-mini-icon { width: 62px; height: 62px; }
      .hr-footer { align-items: flex-start; flex-direction: column; }
      .metric { min-height: 112px; }
      .footer { align-items: flex-start; flex-direction: column; }
      .profile {
        position: static;
      }
      .floating-header { display: none !important; }
      #view-attendance .attendance-heading {
        min-height: 310px;
        padding: 30px 24px 74px;
        align-items: flex-start;
      }
      #view-attendance .attendance-heading-image { width: 100%; opacity: .5; }
      #view-attendance .attendance-heading > div:first-of-type { width: 100%; padding-top: 42px; }
      #view-attendance .attendance-heading .title { font-size: 30px; }
      #view-attendance .attendance-heading .attendance-period { top: 18px; right: 18px; }
      #view-attendance .filters { margin: -32px 10px 20px; }
      #view-employees .employee-lookup-hero { min-height: 390px; }
      #view-employees .employee-lookup-image { background-size: cover; background-position: center 11%; opacity: .5; }
      #view-employees .employee-lookup-content { width: 100%; padding: 32px 20px; }
      #view-employees .employee-lookup-content .title { font-size: 30px; }
      #view-employees .employee-info-search { padding: 12px; }
    }

    /* Fit the complete banner into a compact frame without cropping. */
    #view-attendance .attendance-heading,
    #view-employees .employee-lookup-hero,
    #view-documents .documents-hero {
      height: 286px;
      min-height: 286px;
      aspect-ratio: auto;
      background-color: #fff;
    }

    #view-attendance .attendance-heading-image,
    #view-employees .employee-lookup-image,
    #view-documents .documents-hero-image {
      width: 100%;
      height: 100%;
      background-size: 100% 100%;
      background-position: center;
      background-repeat: no-repeat;
    }

    @media (max-width: 720px) {
      #view-attendance .attendance-heading,
      #view-employees .employee-lookup-hero,
      #view-documents .documents-hero {
        height: 390px;
        min-height: 390px;
      }

      html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
      .topbar { min-height: 64px; height: auto; gap: 10px; padding: 10px 12px; }
      .company { min-width: 0; font-size: 14px; line-height: 1.3; }
      .language-control { flex: 0 0 auto; min-height: 40px; }
      .content { width: 100%; padding: 14px 10px 24px; }

      #view-employees .employee-lookup-content { padding: 24px 14px 30px; }
      #view-employees .employee-lookup-content .title { font-size: 25px; }
      #view-employees .employee-info-search { gap: 10px; padding: 10px; }
      #view-employees .hr-profile-card { width: 100%; overflow: visible; }
      #view-employees .hr-hero { min-height: 66px; }
      #view-employees .hr-hero-title { padding: 12px 10px; font-size: 22px; }
      #view-employees .hr-profile-grid { width: 100%; gap: 12px; padding: 10px; }
      #view-employees .hr-person-card,
      #view-employees .hr-middle-column,
      #view-employees .hr-right-column { width: 100%; min-width: 0; }
      #view-employees .hr-card { padding: 14px; border-radius: 8px; }
      #view-employees .hr-photo { width: 132px; height: 132px; margin-bottom: 16px; font-size: 36px; }
      #view-employees .hr-employment-status { margin-bottom: 8px; font-size: 12px; }
      #view-employees .hr-info-row { grid-template-columns: 34px minmax(0, 1fr); gap: 8px; padding: 10px 0; }
      #view-employees .hr-icon { width: 30px; height: 30px; }
      #view-employees .hr-icon svg { width: 23px; height: 23px; }
      #view-employees .hr-label { margin-bottom: 4px; font-size: 12px; line-height: 1.35; }
      #view-employees .hr-value { font-size: 14px; line-height: 1.45; }
      #view-employees .hr-subvalue { font-size: 12px; line-height: 1.45; }
      #view-employees .hr-mini-card { grid-template-columns: 48px minmax(0, 1fr); gap: 10px; padding: 13px; border-radius: 8px; }
      #view-employees .hr-mini-icon { width: 44px; height: 44px; border-radius: 8px; }
      #view-employees .hr-mini-icon svg { width: 25px; height: 25px; }
      #view-employees .hr-big-number { font-size: 25px; }
      #view-employees .reward-month { font-size: 12px; }

      #view-employees .hr-family-card { width: 100%; min-width: 0; overflow: hidden; }
      #view-employees .hr-family-heading { grid-template-columns: 48px minmax(0, 1fr); gap: 10px; padding: 12px; }
      #view-employees .hr-family-heading .hr-mini-icon { width: 44px; height: 44px; }
      #view-employees .hr-family-heading .hr-mini-icon svg { width: 25px; height: 25px; }
      #view-employees .hr-family-heading .hr-label { margin: 0; overflow-wrap: anywhere; }
      #view-employees .hr-family-card .table-wrap,
      #view-employees .hr-insurance-card .table-wrap { width: 100%; overflow: visible; }
      #view-employees .family-table,
      #view-employees .insurance-table { width: 100%; min-width: 0; display: block; table-layout: auto; background: transparent; }
      #view-employees .family-table thead,
      #view-employees .insurance-table thead { display: none; }
      #view-employees .family-table tbody,
      #view-employees .insurance-table tbody { display: grid; gap: 10px; padding: 0 10px 10px; }
      #view-employees .family-table tr,
      #view-employees .insurance-table tr { width: 100%; display: block; overflow: hidden; border: 1px solid #d8e4f2; border-radius: 8px; background: #fff; }
      #view-employees .family-table td,
      #view-employees .insurance-table td {
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: minmax(84px, 34%) minmax(0, 1fr);
        gap: 10px;
        align-items: center;
        padding: 9px 10px;
        border-right: 0;
        border-bottom: 1px solid #e4ebf4;
        text-align: left !important;
        white-space: normal;
        overflow-wrap: anywhere;
      }
      #view-employees .family-table td:last-child,
      #view-employees .insurance-table td:last-child { border-bottom: 0; }
      #view-employees .family-table td::before,
      #view-employees .insurance-table td::before {
        content: attr(data-label);
        color: #536b87;
        font-size: 11px;
        font-weight: 800;
        line-height: 1.3;
        text-transform: uppercase;
      }
      #view-employees .family-table td[colspan],
      #view-employees .insurance-table td[colspan] { display: block; padding: 14px; text-align: center !important; }
      #view-employees .family-table td[colspan]::before,
      #view-employees .insurance-table td[colspan]::before { display: none; }
      #view-employees .family-person { min-width: 0; gap: 6px; }
      #view-employees .family-person span:last-child { min-width: 0; overflow-wrap: anywhere; }
      #view-employees .family-person-icon { width: 26px; height: 26px; flex-basis: 26px; }

      #view-employees .hr-insurance-heading { grid-template-columns: 48px minmax(0, 1fr); gap: 10px; }
      #view-employees .hr-insurance-heading .hr-label { font-size: 12px; }
      #view-employees .insurance-total { margin: 13px 0; padding: 14px 10px; }
      #view-employees .insurance-total strong { margin-top: 5px; font-size: 25px; overflow-wrap: anywhere; }
      #view-employees .insurance-type-cell { grid-template-columns: 30px minmax(0, 1fr); gap: 7px; }
      #view-employees .insurance-type-icon { width: 28px; height: 28px; }
      #view-employees .insurance-type-icon svg { width: 17px; height: 17px; }
      #view-employees .hr-updated { font-size: 12px; }

      #view-employees .hr-insurance-footer { margin: 12px -14px -14px; padding: 12px 14px; font-size: 12px; }
      #view-employees .hr-footer { gap: 8px; padding: 12px 14px; font-size: 12px; }

      #view-attendance .table-card { max-width: 100%; overflow: hidden; }
      #view-attendance .table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
      #view-documents .document-link { min-width: 0; }
      #view-documents .document-link-copy { min-width: 0; }
      #view-documents .document-link-copy strong,
      #view-documents .document-link-copy span { overflow-wrap: anywhere; }
    }

    @media (max-width: 420px) {
      .content { padding-right: 8px; padding-left: 8px; }
      #view-employees .hr-profile-grid { padding: 8px; }
      #view-employees .employee-lookup-content .title { font-size: 22px; }
      #view-employees .family-table td,
      #view-employees .insurance-table td { grid-template-columns: 76px minmax(0, 1fr); padding: 8px; }
      #view-employees .insurance-total strong { font-size: 22px; }
      #view-documents .document-link { grid-template-columns: 48px minmax(0, 1fr) 34px; gap: 8px; }
      #view-documents .document-link-icon { width: 46px; height: 46px; }
    }
    /* Authenticated employee portal */
    body:not(.authenticated) .app { display: none !important; }
    body.authenticated .auth-screen { display: none; }
    .auth-screen {
      position: fixed;
      inset: 0;
      z-index: 9000;
      display: grid;
      grid-template-columns: minmax(0, 1.25fr) minmax(390px, .75fr);
      min-height: 100dvh;
      background: #f4f8fd;
      color: #092d61;
    }
    .auth-showcase {
      position: relative;
      overflow: hidden;
      min-height: 100%;
      padding: clamp(34px, 5vw, 76px);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      background-color: #eaf4f8;
      background-image: none;
      background-repeat: no-repeat;
      background-position: center;
      background-size: cover;
      color: white;
    }
    .auth-showcase::after { display: none; }
    .auth-brand, .auth-message, .auth-values { display: none; }
    .auth-brand { display: flex; align-items: center; gap: 14px; font-size: 24px; font-weight: 900; }
    .auth-brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 8px; background: white; color: #0870d1; }
    .auth-brand-mark svg { width: 27px; height: 27px; }
    .auth-message { max-width: 720px; }
    .auth-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; font-size: 13px; font-weight: 800; text-transform: uppercase; }
    .auth-message h1 { margin: 0 0 18px; max-width: 720px; font-size: clamp(38px, 5vw, 72px); line-height: 1.04; letter-spacing: 0; }
    .auth-message p { max-width: 610px; margin: 0; font-size: clamp(16px, 1.7vw, 21px); line-height: 1.65; color: rgba(255,255,255,.82); }
    .auth-values { display: flex; gap: 28px; flex-wrap: wrap; font-size: 13px; font-weight: 700; color: rgba(255,255,255,.82); }
    .auth-values span { display: inline-flex; align-items: center; gap: 8px; }
    .auth-values svg { width: 18px; height: 18px; color: #43dec8; }
    .auth-panel { position: relative; display: grid; place-items: center; padding: clamp(24px, 5vw, 70px); background: white; }
    .auth-language { position: absolute; top: 24px; right: 28px; display: flex; align-items: center; gap: 8px; }
    .auth-language select { border: 1px solid #d6e2ef; border-radius: 6px; padding: 9px 10px; background: white; color: #0b315f; font-weight: 800; }
    .auth-card { width: min(100%, 440px); }
    .auth-card-icon { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 24px; border-radius: 8px; color: #0870d1; background: #e8f3ff; }
    .auth-card-icon svg { width: 30px; height: 30px; }
    .auth-card h2 { margin: 0 0 10px; font-size: 32px; letter-spacing: 0; }
    .auth-card > p { margin: 0 0 30px; color: #64748b; line-height: 1.6; }
    .auth-form { display: grid; gap: 18px; }
    .auth-field { display: grid; gap: 7px; font-weight: 800; font-size: 13px; color: #23415f; }
    .auth-input { position: relative; }
    .auth-input > svg { position: absolute; left: 14px; top: 50%; width: 19px; transform: translateY(-50%); color: #6f89a6; }
    .auth-input input { width: 100%; min-height: 50px; padding: 0 46px; border: 1px solid #cfdceb; border-radius: 6px; background: #f9fbfe; font: inherit; color: #102a48; outline: none; }
    .auth-input input:focus { border-color: #0870d1; box-shadow: 0 0 0 3px rgba(8,112,209,.12); background: white; }
    .auth-password-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; color: #6f89a6; cursor: pointer; }
    .auth-password-toggle svg { width: 18px; height: 18px; }
    .auth-submit { min-height: 52px; justify-content: center; margin-top: 4px; font-size: 15px; }
    .auth-error { min-height: 20px; margin: -4px 0 0; color: #d9273b; font-size: 13px; line-height: 1.45; }
    .auth-help { margin-top: 24px; padding-top: 20px; border-top: 1px solid #e2e8f0; color: #718096; font-size: 12px; line-height: 1.55; }

    /* Login portal: self-contained visuals and guarded form behavior. */
    .auth-panel {
      padding: clamp(58px, 6vw, 90px) clamp(24px, 5vw, 72px) 38px;
      background: #f7faff;
    }
    .auth-panel::before {
      content: "";
      position: absolute;
      inset: 0 0 auto;
      height: 5px;
      background: linear-gradient(90deg, #0a7b83 0 62%, #e93649 62% 100%);
    }
    .auth-language { top: 22px; right: 24px; z-index: 2; }
    .auth-language > svg { display: none; }
    .auth-language::before { content: "LANG"; color: #54708e; font-size: 10px; font-weight: 900; }
    .auth-card {
      width: min(100%, 500px);
      padding: clamp(26px, 3vw, 38px);
      border: 1px solid #d4e1ef;
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 22px 55px rgba(17, 55, 96, .12);
    }
    .auth-card-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid #e3ebf4; }
    .auth-card-brand-mark { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border-radius: 6px; background: #073b78; color: #fff; font-size: 14px; font-weight: 900; }
    .auth-card-brand-copy { min-width: 0; }
    .auth-card-brand-copy strong { display: block; color: #082f63; font-size: 17px; line-height: 1.2; }
    .auth-card-brand-copy span { display: block; margin-top: 3px; color: #0a7b83; font-size: 10px; font-weight: 900; text-transform: uppercase; }
    .auth-heading { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 15px; align-items: center; }
    .auth-card-icon { width: 54px; height: 54px; margin: 0; border: 1px solid #cfe2f6; background: #eaf4ff; color: #0870d1; font-size: 15px; font-weight: 900; }
    .auth-card h2 { margin: 0; color: #072e61; font-size: clamp(28px, 3vw, 34px); }
    .auth-card > .auth-subtitle { margin: 16px 0 28px; color: #5c728b; line-height: 1.6; }
    .auth-form { gap: 17px; }
    .auth-field { gap: 8px; color: #173b61; font-size: 13px; }
    .auth-input { display: block; }
    .auth-input-prefix { position: absolute; left: 14px; top: 50%; z-index: 1; transform: translateY(-50%); min-width: 25px; color: #52789f; font-size: 11px; font-weight: 900; pointer-events: none; }
    .auth-input input { min-height: 54px; padding: 0 58px 0 52px; border-color: #c8d8e9; background: #fbfdff; color: #0c2f55; font-size: 15px; font-weight: 700; }
    .auth-input input:focus { border-color: #0875cf; box-shadow: 0 0 0 3px rgba(8, 117, 207, .13); }
    .auth-password-toggle { right: 10px; width: auto; min-width: 43px; padding: 0 5px; color: #28618f; font-size: 11px; font-weight: 900; }
    .auth-submit { min-height: 54px; margin-top: 2px; border-radius: 6px; background: #0875cf; box-shadow: 0 10px 22px rgba(8, 117, 207, .2); }
    .auth-submit:hover { background: #0565b5; }
    .auth-submit:disabled { cursor: wait; opacity: .72; }
    .auth-submit-arrow { margin-left: 6px; font-size: 19px; line-height: 1; }
    .auth-error:not(:empty) { min-height: 0; padding: 10px 12px; border-left: 3px solid #d9273b; background: #fff3f5; color: #b91f32; line-height: 1.45; }
    .auth-help { margin-top: 18px; padding-top: 0; border-top: 0; text-align: center; }
    .auth-security-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 22px; padding-top: 18px; border-top: 1px solid #e3ebf4; color: #526c86; font-size: 12px; line-height: 1.5; }
    .auth-security-dot { width: 9px; height: 9px; flex: 0 0 9px; margin-top: 4px; border-radius: 50%; background: #0aa67f; box-shadow: 0 0 0 4px #e2f7f0; }
    @media (max-width: 900px) {
      .auth-screen { grid-template-columns: 1fr; }
      .auth-showcase { width: 100%; aspect-ratio: 16 / 9; min-height: 220px; max-height: 48vh; }
      .auth-showcase-image { object-fit: contain; }
      .auth-panel { min-height: auto; padding: 68px 18px 30px; }
      .auth-card { padding: 25px 20px; }
    }
    @media (max-width: 520px) {
      .auth-showcase { min-height: 170px; max-height: 34vh; }
      .auth-card-brand { margin-bottom: 22px; }
      .auth-heading { grid-template-columns: 46px minmax(0, 1fr); gap: 12px; }
      .auth-card-icon { width: 46px; height: 46px; }
      .auth-card h2 { font-size: 27px; }
      .auth-card > .auth-subtitle { margin: 13px 0 23px; font-size: 13px; }
    }
    .topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
    .session-user { display: flex; align-items: center; gap: 10px; min-width: 0; padding-right: 12px; border-right: 1px solid var(--line); }
    .session-avatar { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 50%; background: #e5f2ff; color: #075cba; font-weight: 900; }
    .session-copy { min-width: 0; display: grid; line-height: 1.25; }
    .session-copy strong { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
    .session-copy small { color: var(--muted); font-size: 11px; }
    .session-action { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: white; color: #0a4e9c; cursor: pointer; }
    .session-action:hover { background: #edf6ff; border-color: #9fc8f2; }
    .session-action svg { width: 18px; height: 18px; }
    .password-dialog { width: min(92vw, 460px); border: 0; border-radius: 8px; padding: 0; box-shadow: 0 24px 80px rgba(2,28,64,.26); }
    .password-dialog::backdrop { background: rgba(3,24,52,.56); }
    .password-dialog-card { padding: 28px; display: grid; gap: 18px; }
    .password-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
    .password-dialog-head h2 { margin: 0; font-size: 23px; }
    .password-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
    .admin-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .admin-edit-grid .auth-field:last-child { grid-column: 1 / -1; }
    .admin-edit-grid input, .admin-edit-grid select { width: 100%; min-height: 44px; border: 1px solid #cfdceb; border-radius: 6px; padding: 0 12px; background: #f9fbfe; color: #102a48; }
    body.employee-session #employeeSearch,
    body.employee-session #employeeInfoSearch { background: #eef4fa; cursor: not-allowed; }
    @media (min-width: 1201px) {
      body.admin-session #view-attendance .attendance-filters { grid-template-columns: minmax(240px, 1fr) 132px 120px 120px 142px; }
      body.employee-session #view-attendance .attendance-filters { grid-template-columns: minmax(240px, 1fr) 120px 142px; }
    }
    @media (max-width: 900px) {
      .auth-screen { grid-template-columns: 1fr; overflow-y: auto; }
      .auth-showcase { min-height: 0; aspect-ratio: 4 / 3; padding: 0; background-size: contain; }
      .auth-message h1 { font-size: 36px; }
      .auth-message p { font-size: 15px; }
      .auth-values { gap: 12px 20px; }
      .auth-panel { min-height: 560px; padding: 70px 22px 34px; }
      .topbar-actions { gap: 6px; }
      .session-copy { display: none; }
      .session-user { padding-right: 6px; }
    }
    @media (max-width: 560px) {
      .auth-showcase { min-height: 0; }
      .auth-message h1 { font-size: 31px; }
      .auth-values span:nth-child(n+3) { display: none; }
      .auth-panel { place-items: start center; min-height: 520px; }
      .auth-card h2 { font-size: 27px; }
      .topbar .company { max-width: 145px; }
      .language-control > svg { display: none; }
      .admin-edit-grid { grid-template-columns: 1fr; }
      .admin-edit-grid .auth-field:last-child { grid-column: auto; }
    }

    /* Feedback and improvement channel */
    .feedback-experience { display: grid; gap: 22px; color: #0b2e59; }
    .feedback-hero {
      position: relative;
      min-height: 230px;
      overflow: hidden;
      padding: 38px 42px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 320px;
      align-items: center;
      background: #073b78;
      border-bottom: 4px solid #20bda9;
      color: white;
    }
    .feedback-hero-copy { position: relative; z-index: 2; max-width: 760px; }
    .feedback-hero-copy h1 { margin: 10px 0 12px; color: white; font-size: clamp(30px, 4vw, 48px); letter-spacing: 0; }
    .feedback-hero-copy p { margin: 0; max-width: 650px; color: rgba(255,255,255,.8); font-size: 16px; line-height: 1.65; }
    .feedback-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #70ead8; font-size: 12px; font-weight: 900; text-transform: uppercase; }
    .feedback-hero-visual { position: relative; z-index: 2; display: grid; place-items: center; }
    .feedback-hero-icon { width: 156px; height: 156px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.32); border-radius: 50%; background: rgba(255,255,255,.1); }
    .feedback-hero-icon svg { width: 72px; height: 72px; color: white; }
    .feedback-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); gap: 22px; align-items: start; }
    .feedback-panel { background: white; border: 1px solid #cfdfef; box-shadow: 0 12px 34px rgba(23,65,111,.08); }
    .feedback-panel-head { padding: 24px 26px 18px; border-bottom: 1px solid #e0eaf4; }
    .feedback-panel-head > div { display: flex; align-items: center; gap: 12px; }
    .feedback-panel-head-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 42px; border-radius: 6px; background: #e5f2ff; color: #0869c8; }
    .feedback-panel-head h2 { margin: 0; font-size: 20px; letter-spacing: 0; }
    .feedback-panel-head p { margin: 8px 0 0 54px; color: #718096; font-size: 13px; }
    .feedback-form { padding: 24px 26px 28px; display: grid; gap: 20px; }
    .feedback-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .feedback-field { display: grid; gap: 8px; min-width: 0; }
    .feedback-field > span { font-size: 13px; font-weight: 800; color: #294762; }
    .feedback-field input, .feedback-field select, .feedback-field textarea { width: 100%; border: 1px solid #cbd9e8; border-radius: 6px; background: #fbfdff; color: #142f4d; font: inherit; outline: none; }
    .feedback-field input, .feedback-field select { min-height: 48px; padding: 0 13px; }
    .feedback-field textarea { min-height: 170px; padding: 13px; resize: vertical; line-height: 1.55; }
    .feedback-field input:focus, .feedback-field select:focus, .feedback-field textarea:focus { border-color: #0870d1; box-shadow: 0 0 0 3px rgba(8,112,209,.1); background: white; }
    .feedback-counter { justify-self: end; color: #7890a9; font-size: 11px; }
    .feedback-priority { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #cbd9e8; border-radius: 6px; overflow: hidden; }
    .feedback-priority label { position: relative; min-height: 46px; display: grid; place-items: center; padding: 8px; border-right: 1px solid #cbd9e8; cursor: pointer; font-size: 12px; font-weight: 800; text-align: center; }
    .feedback-priority label:last-child { border-right: 0; }
    .feedback-priority input { position: absolute; opacity: 0; pointer-events: none; }
    .feedback-priority label:has(input:checked) { background: #e7f2ff; color: #075cba; box-shadow: inset 0 -3px #0870d1; }
    .feedback-priority label:last-child:has(input:checked) { background: #fff0f1; color: #c5283d; box-shadow: inset 0 -3px #e53e52; }
    .feedback-submit-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 4px; }
    .feedback-privacy { display: flex; align-items: flex-start; gap: 8px; max-width: 520px; color: #6b7f94; font-size: 12px; line-height: 1.5; }
    .feedback-privacy svg { width: 17px; flex: 0 0 17px; color: #0d916d; }
    .feedback-submit { min-width: 152px; justify-content: center; }
    .feedback-side { display: grid; gap: 18px; }
    .feedback-process { padding: 24px; }
    .feedback-process h2 { margin: 0 0 20px; font-size: 19px; }
    .feedback-step { position: relative; display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 12px; padding-bottom: 19px; }
    .feedback-step:last-child { padding-bottom: 0; }
    .feedback-step:not(:last-child)::after { content: ''; position: absolute; left: 18px; top: 35px; bottom: 4px; width: 1px; background: #cbdced; }
    .feedback-step-number { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #e5f2ff; color: #075cba; font-weight: 900; }
    .feedback-step strong { display: block; margin: 2px 0 4px; font-size: 13px; }
    .feedback-step p { margin: 0; color: #718096; font-size: 12px; line-height: 1.45; }
    .feedback-receipt { padding: 20px 22px; border-left: 4px solid #18a77e; background: #effbf6; }
    .feedback-receipt[hidden] { display: none; }
    .feedback-receipt strong { display: block; margin-bottom: 5px; color: #087052; }
    .feedback-receipt p { margin: 0; color: #426859; font-size: 12px; }
    .feedback-history { grid-column: 1 / -1; }
    .feedback-history-list { padding: 0 26px 24px; display: grid; }
    .feedback-history-item { display: grid; grid-template-columns: 155px minmax(0,1fr) 150px; gap: 18px; align-items: center; padding: 17px 0; border-bottom: 1px solid #e1eaf3; }
    .feedback-history-item:last-child { border-bottom: 0; }
    .feedback-history-meta { display: grid; gap: 4px; color: #718096; font-size: 11px; }
    .feedback-history-main { min-width: 0; }
    .feedback-history-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
    .feedback-history-main span { display: block; margin-top: 5px; color: #708399; font-size: 12px; }
    .feedback-history-preview { display: -webkit-box; overflow: hidden; margin: 7px 0 0; color: #536c85; font-size: 12px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .feedback-employee-update {
      grid-column: 2 / 4;
      display: grid;
      gap: 7px;
      padding: 12px 14px;
      border: 1px solid #dce6f1;
      border-radius: 12px;
      color: #647990;
      background: #f7f9fc;
    }
    .feedback-employee-update.has-result {
      border-color: #b9e4d2;
      color: #245f4e;
      background: #edf9f4;
    }
    .feedback-employee-update-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }
    .feedback-employee-update-title {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      color: #31516f;
      font-size: 12px;
      font-weight: 900;
    }
    .feedback-employee-update.has-result .feedback-employee-update-title { color: #087653; }
    .feedback-employee-update-title svg { width: 16px; height: 16px; }
    .feedback-employee-update-time { color: #8293a6; font-size: 11px; }
    .feedback-employee-update p { margin: 0; white-space: pre-wrap; font-size: 12px; line-height: 1.6; }
    .feedback-status { justify-self: end; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 999px; background: #e9f7f1; color: #087455; font-size: 11px; font-weight: 800; }
    .feedback-empty { padding: 34px 20px; text-align: center; color: #718096; font-size: 13px; }
    @media (max-width: 980px) {
      .feedback-layout { grid-template-columns: 1fr; }
      .feedback-side { grid-row: 2; }
      .feedback-history { grid-column: auto; }
    }
    @media (max-width: 680px) {
      .feedback-hero { min-height: 260px; grid-template-columns: 1fr; padding: 28px 20px; }
      .feedback-hero-visual { display: none; }
      .feedback-form-row { grid-template-columns: 1fr; }
      .feedback-form, .feedback-panel-head { padding-left: 16px; padding-right: 16px; }
      .feedback-panel-head p { margin-left: 0; }
      .feedback-submit-row { align-items: stretch; flex-direction: column; }
      .feedback-history-list { padding: 0 16px 18px; }
      .feedback-history-item { grid-template-columns: 1fr; gap: 7px; }
      .feedback-employee-update { grid-column: auto; }
      .feedback-employee-update-head { align-items: flex-start; flex-direction: column; gap: 4px; }
      .feedback-status { justify-self: start; }
    }

    /* Focused employee workspace: data is loaded from the signed-in account. */
    #view-attendance .attendance-search-field,
    #view-attendance #searchButton,
    #view-employees .employee-info-search > label,
    #view-employees #employeeInfoSearchButton { display: none !important; }
    #view-employees .employee-info-search { display: flex; width: auto; padding: 0; border: 0; background: transparent; box-shadow: none; }
    #view-attendance .profile { order: 3; }
    #view-attendance .cards { order: 4; }
    #view-attendance .table-card { order: 5; }
    #view-attendance .attendance-legend { order: 6; }
    .attendance-legend { padding: 20px 24px 22px; border-left: 4px solid #0877d1; }
    .attendance-legend-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: #082f63; }
    .attendance-legend-heading svg { width: 21px; height: 21px; color: #0877d1; }
    .attendance-legend-heading h2 { margin: 0; font-size: 17px; letter-spacing: 0; }
    .attendance-legend-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 28px; }
    .attendance-legend-item { display: grid; grid-template-columns: 62px minmax(0, 1fr); align-items: center; min-height: 38px; border-bottom: 1px solid #e2ebf5; font-size: 13px; }
    .attendance-legend-code { color: #073b77; font-weight: 900; }
    .attendance-legend-text { color: #263d58; }
    @media (min-width: 1201px) {
      body.admin-session #view-attendance .attendance-filters { grid-template-columns: 120px 120px 142px; }
      body.employee-session #view-attendance .attendance-filters { grid-template-columns: 120px 142px; }
    }
    @media (max-width: 760px) {
      .attendance-legend { padding: 17px 16px 19px; }
      .attendance-legend-grid { grid-template-columns: 1fr; }
      .attendance-legend-item { grid-template-columns: 58px minmax(0, 1fr); }
      #view-employees .employee-info-search { justify-content: flex-start; }
    }

    /* Compact attendance controls inside the period panel. */
    #view-attendance .attendance-heading .attendance-period {
      grid-template-columns: 38px minmax(0, 1fr);
      align-items: center;
      min-width: 310px;
      padding: 12px;
    }
    .attendance-period-copy { min-width: 0; }
    .attendance-period-actions {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: 112px minmax(0, 1fr);
      gap: 8px;
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px solid #d9e5f1;
    }
    .attendance-period-actions .button,
    .attendance-period-month {
      min-width: 0;
      min-height: 40px;
      border: 1px solid #cddceb;
      border-radius: 6px;
      background: #f8fbff;
      color: #123b6b;
      box-shadow: none;
    }
    .attendance-period-actions .button { justify-content: center; padding: 0 10px; }
    .attendance-period-month { display: flex; align-items: center; gap: 7px; padding: 0 9px; }
    .attendance-period-month > svg { width: 17px; height: 17px; flex: 0 0 17px; color: #47749f; }
    .attendance-period-month select {
      width: 100%;
      min-width: 0;
      height: 38px;
      border: 0;
      outline: 0;
      background: transparent;
      color: #123b6b;
      font-weight: 700;
    }
    .attendance-internal-controls { display: none !important; }
    .auth-showcase > .auth-brand,
    .auth-showcase > .auth-message,
    .auth-showcase > .auth-values { display: none !important; }
    .auth-showcase {
      background-color: #eaf4f8;
      background-size: contain !important;
      background-position: center;
      background-repeat: no-repeat;
    }
    .auth-showcase-image {
      position: absolute;
      inset: 0;
      z-index: 0;
      width: 100%;
      height: 100%;
      display: block;
      object-fit: scale-down;
      object-position: center;
      image-rendering: auto;
      pointer-events: none;
      user-select: none;
    }
    @media (max-width: 760px) {
      #view-attendance .attendance-heading { min-height: 0; padding: 24px 18px; }
      #view-attendance .attendance-heading > div:first-of-type { width: 100%; padding: 12px 0 0; }
      #view-attendance .attendance-heading .attendance-period {
        position: relative;
        inset: auto;
        width: 100%;
        min-width: 0;
        margin-top: 18px;
      }
    }
    @media (max-width: 430px) {
      .attendance-period-actions { grid-template-columns: 1fr; }
    }

    /* Final responsive safeguards for dense employee data. */
    .auth-showcase { image-rendering: auto; }
    #view-attendance .cards > *,
    #view-attendance .profile > *,
    #view-attendance .metric > div:last-child,
    #view-attendance .attendance-person > div,
    #view-attendance .attendance-profile-item > div,
    #view-employees .hr-profile-grid > *,
    #view-employees .hr-info-row > div:last-child,
    #view-employees .hr-mini-card > div:last-child,
    #view-employees .hr-family-heading > div:last-child,
    #view-employees .insurance-type-cell > * { min-width: 0; }
    #view-attendance .name,
    #view-attendance .info-label,
    #view-attendance .info-value,
    #view-attendance .metric small,
    #view-attendance .metric p,
    #view-employees .hr-label,
    #view-employees .hr-value,
    #view-employees .hr-subvalue,
    #view-employees .reward-month,
    #view-employees .hr-updated,
    #view-employees .hr-footer,
    #view-employees .hr-insurance-footer {
      max-width: 100%;
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: normal;
    }
    #view-attendance .cards { align-items: stretch; }
    #view-attendance .metric { min-width: 0; height: auto; }
    #view-attendance .metric strong { display: inline-block; max-width: 100%; }
    #view-attendance .profile { align-items: stretch; }
    #view-attendance .attendance-profile-item { min-width: 0; }
    #view-attendance .table-wrap {
      width: 100%;
      max-width: 100%;
      overflow-x: auto;
      overscroll-behavior-inline: contain;
      -webkit-overflow-scrolling: touch;
      scrollbar-gutter: stable;
    }
    #attendanceTable { width: 100%; min-width: 1240px; table-layout: fixed; }
    #attendanceTable th {
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: normal;
      vertical-align: middle;
    }
    #attendanceTable td {
      white-space: nowrap;
      vertical-align: middle;
    }
    #view-employees .hr-hero,
    #view-employees .hr-brand-panel,
    #view-employees .hr-hero-title { min-width: 0; }
    #view-employees .hr-hero-title,
    #view-employees .hr-brand-name,
    #view-employees .hr-brand-slogan { overflow-wrap: anywhere; }
    #view-employees .family-table td > *,
    #view-employees .insurance-table td > * { min-width: 0; max-width: 100%; }
    #view-employees .family-person {
      width: 100%;
      min-width: 0;
      white-space: normal;
    }
    #view-employees .family-person > span:last-child,
    #view-employees .insurance-type-cell > span:last-child {
      min-width: 0;
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: normal;
    }
    #view-employees .insurance-total strong {
      max-width: 100%;
      overflow-wrap: anywhere;
      line-height: 1.15;
    }
    @media (max-width: 1320px) {
      #view-employees .hr-profile-grid {
        grid-template-columns: minmax(250px, .86fr) minmax(0, 1.14fr);
      }
      #view-employees .hr-person-card { grid-row: 1 / span 2; }
      #view-employees .hr-middle-column,
      #view-employees .hr-right-column { grid-column: 2; }
      #view-employees .hr-right-column { grid-template-columns: minmax(0, 1fr); }
      #view-employees .hr-hero { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); }
      #view-employees .hr-hero-spacer { display: none; }
    }
    @media (max-width: 1120px) {
      #view-attendance .profile { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      #view-attendance .attendance-person { grid-column: 1 / -1; grid-row: auto; min-height: 118px; }
      #view-attendance .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    @media (max-width: 720px) {
      #view-attendance .cards,
      #view-attendance .profile,
      #view-employees .hr-profile-grid { grid-template-columns: minmax(0, 1fr); }
      #view-attendance .attendance-person { grid-column: auto; }
      #view-attendance .attendance-profile-item { border-left: 0; }
      #view-attendance .table-card { overflow: hidden; }
      #attendanceTable { min-width: 1120px; }
      #view-employees .hr-hero { grid-template-columns: minmax(0, 1fr); }
      #view-employees .hr-person-card { grid-row: auto; }
      #view-employees .hr-right-column,
      #view-employees .hr-middle-column { min-width: 0; grid-column: auto; }
      #view-employees .family-table td,
      #view-employees .insurance-table td {
        grid-template-columns: minmax(82px, 32%) minmax(0, 1fr);
        line-height: 1.45;
      }
    }
    @media (max-width: 420px) {
      #view-attendance .metric { padding: 15px 14px; }
      #view-attendance .metric strong { font-size: 24px; }
      #view-attendance .attendance-person { grid-template-columns: 68px minmax(0, 1fr); }
      #view-attendance .portrait { width: 62px; height: 62px; font-size: 22px; }
      #view-employees .family-table td,
      #view-employees .insurance-table td {
        grid-template-columns: minmax(72px, 30%) minmax(0, 1fr);
        gap: 8px;
      }
    }
    /* Keep the login composition stable after all legacy responsive rules. */
    @media (max-width: 900px) {
      .auth-screen { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
      .auth-showcase { width: 100%; min-height: 220px; max-height: 48vh; aspect-ratio: 16 / 9; padding: 0; }
      .auth-showcase-image { width: 100%; height: 100%; object-fit: contain; object-position: center; }
      .auth-panel { min-height: auto; padding: 68px 18px 30px; place-items: center; }
      .auth-card { width: min(100%, 520px); padding: 25px 20px; }
    }
    @media (max-width: 520px) {
      .auth-showcase { min-height: 170px; max-height: 34vh; }
      .auth-panel { padding: 62px 12px 22px; }
      .auth-language { top: 16px; right: 14px; }
      .auth-card { padding: 22px 16px; }
      .auth-card-brand { margin-bottom: 22px; }
      .auth-heading { grid-template-columns: 46px minmax(0, 1fr); gap: 12px; }
      .auth-card-icon { width: 46px; height: 46px; }
      .auth-card h2 { font-size: 27px; }
      .auth-card > .auth-subtitle { margin: 13px 0 23px; font-size: 13px; }
      .auth-input input { font-size: 16px; }
    }

    /* Dedicated admin workspace. */
    .admin-nav { display: none; }
    body.admin-session .employee-nav { display: none !important; }
    body.admin-session .admin-nav { display: flex; }
    body.employee-session .admin-nav { display: none !important; }
    body.admin-session #view-attendance .attendance-search-field { display: flex !important; }
    body.admin-session #view-attendance #searchButton { display: inline-flex !important; }
    body.admin-session #view-attendance .attendance-filters {
      display: grid !important;
      grid-template-columns: minmax(280px, 1fr) auto;
      align-items: center;
      gap: 10px;
    }
    body.admin-session #view-attendance .attendance-search-field input { min-width: 0; }
    .attendance-internal-controls { display: none; }
    body.admin-session #view-attendance .attendance-internal-controls {
      display: grid !important;
      grid-template-columns: minmax(280px, 1fr) auto auto minmax(150px, auto);
      order: 2;
      gap: 10px;
      margin: 18px 0;
      padding: 14px;
      border: 1px solid #cfdeed;
      background: #fff;
      box-shadow: 0 8px 22px rgba(23, 65, 111, .07);
    }
    .attendance-admin-search { min-width: 0; min-height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid #cbd9e8; border-radius: 6px; background: #f8fbff; }
    .attendance-admin-search:focus-within { border-color: #0875cf; box-shadow: 0 0 0 3px rgba(8, 117, 207, .11); background: #fff; }
    .attendance-admin-search svg { width: 18px; height: 18px; flex: 0 0 18px; color: #607d9b; }
    .attendance-admin-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #173b61; font: inherit; }
    body.admin-session #view-attendance .attendance-internal-controls .button { min-height: 46px; justify-content: center; }
    .attendance-admin-month { min-width: 0; min-height: 46px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid #cbd9e8; border-radius: 6px; background: #f8fbff; color: #173b61; }
    .attendance-admin-month svg { width: 18px; height: 18px; flex: 0 0 18px; color: #607d9b; }
    .attendance-admin-month select { width: 100%; min-width: 0; height: 42px; border: 0; outline: 0; background: transparent; color: #173b61; font: inherit; font-weight: 700; }
    body.admin-session #view-attendance .attendance-heading,
    body.admin-session #view-payroll .payroll-hero { display: none !important; }
    body.admin-session #view-attendance .attendance-heading .attendance-period { display: none !important; }
    body.admin-session #view-attendance .profile { order: 3; }
    body.admin-session #view-attendance .cards { order: 4; }
    body.admin-session #view-attendance .table-card { order: 5; }
    body.admin-session #view-attendance.admin-awaiting-search > * { display: none !important; }
    body.admin-session #view-attendance.admin-awaiting-search > .attendance-heading { display: none !important; }
    body.admin-session #view-attendance.admin-awaiting-search > .attendance-internal-controls { display: grid !important; }
    .admin-view { color: #102d4f; }
    .admin-view.active { display: block; }
    .workforce-toolbar {
      display: grid;
      grid-template-columns: auto minmax(150px, 190px) minmax(180px, 240px) auto auto;
      gap: 12px;
      align-items: end;
      padding: 16px;
      background: #fff;
      border: 1px solid #dbe6f3;
      border-radius: 8px;
      box-shadow: var(--shadow);
    }
    .workforce-toolbar.reason-mode { grid-template-columns: auto minmax(140px, 180px) minmax(150px, 190px) minmax(180px, 240px) auto auto; }
    .workforce-period-switch { display: inline-flex; gap: 4px; padding: 4px; background: #edf4fc; border-radius: 7px; }
    .workforce-period-switch button { height: 38px; padding: 0 16px; border: 0; border-radius: 5px; background: transparent; color: #55708f; font: 700 13px var(--app-font); cursor: pointer; }
    .workforce-period-switch button.active { color: #fff; background: #0b6fd3; box-shadow: 0 5px 12px rgba(11,111,211,.2); }
    .workforce-field { display: grid; gap: 6px; min-width: 0; }
    .workforce-field span { color: #60748e; font-size: 12px; font-weight: 700; }
    .workforce-field input, .workforce-field select { width: 100%; height: 46px; border: 1px solid #cddbeb; border-radius: 6px; padding: 0 12px; background: #fff; color: #12335c; font: 700 14px var(--app-font); }
    .workforce-year-field[hidden], .workforce-month-field[hidden], .workforce-reason-period-field[hidden], .workforce-standard-section[hidden], .workforce-reason-view[hidden] { display: none !important; }
    .workforce-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
    .workforce-kpi { min-height: 112px; padding: 18px; background: #fff; border: 1px solid #dbe6f3; border-top: 3px solid #1376db; border-radius: 8px; }
    .workforce-kpi.green { border-top-color: #15a873; }
    .workforce-kpi.amber { border-top-color: #f2a318; }
    .workforce-kpi.red { border-top-color: #e84d5b; }
    .workforce-kpi small { display: block; color: #667a93; font-size: 12px; font-weight: 700; }
    .workforce-kpi strong { display: block; margin-top: 8px; color: #062e63; font-size: 30px; line-height: 1; }
    .workforce-kpi em { display: block; margin-top: 8px; color: #70839a; font-size: 12px; font-style: normal; }
    .workforce-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .65fr); gap: 16px; }
    .workforce-panel { min-width: 0; padding: 18px; background: #fff; border: 1px solid #dbe6f3; border-radius: 8px; box-shadow: 0 8px 20px rgba(17,47,82,.05); }
    .workforce-panel-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
    .workforce-panel-head h2 { margin: 0; color: #082f66; font-size: 17px; }
    .workforce-panel-head p { margin: 4px 0 0; color: #71839a; font-size: 12px; }
    .workforce-chart-wrap { position: relative; width: 100%; height: 360px; }
    .workforce-chart-wrap canvas { display: block !important; width: 100% !important; height: 100% !important; }
    .workforce-grid > .workforce-panel:first-child .workforce-chart-wrap { height: 430px; }
    .workforce-target-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; min-width: 250px; }
    .workforce-target-box .workforce-field input { text-align: right; }
    .workforce-target-box button { height: 46px; }
    .workforce-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
    .workforce-list-shell { max-height: 390px; overflow: auto; border: 1px solid #dce7f3; border-radius: 6px; }
    .workforce-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
    .workforce-table th { position: sticky; top: 0; z-index: 1; padding: 10px; background: #075eb9; color: #fff; text-align: left; }
    .workforce-table td { padding: 10px; border-top: 1px solid #e3ebf4; color: #203a5b; vertical-align: top; overflow-wrap: anywhere; }
    .workforce-table td strong { display: block; color: #0b2e5b; }
    .workforce-table td small { display: block; margin-top: 3px; color: #778aa0; }
    .workforce-empty { padding: 28px 12px !important; color: #7b8ca0 !important; text-align: center; }
    .workforce-updated { margin: 14px 2px 0; color: #7b8da2; font-size: 12px; text-align: right; }
    .workforce-annual-matrices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
    .workforce-annual-matrices .workforce-panel { padding: 18px; overflow: hidden; border-radius: 16px; box-shadow: 0 12px 32px rgba(17,47,82,.09); }
    .workforce-annual-matrices .workforce-panel-head { position: relative; align-items: center; margin-bottom: 14px; padding-right: 56px; }
    .workforce-annual-matrices .workforce-panel-head::after {
      content: ''; position: absolute; top: 2px; right: 2px; width: 42px; height: 30px; opacity: .8;
      background-image: radial-gradient(circle, #3b82f6 2.2px, transparent 2.5px); background-size: 12px 12px;
    }
    .workforce-matrix-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
    .workforce-matrix-title-icon { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; color: #075fc4; background: #edf5ff; border: 1px solid #cfe2fb; border-radius: 11px; box-shadow: 0 5px 14px rgba(7,95,196,.12); }
    .workforce-matrix-title-icon svg { width: 23px; height: 23px; stroke-width: 2.1; }
    .workforce-annual-matrices .workforce-panel-head h2 { font-size: 17px; line-height: 1.3; letter-spacing: -.15px; }
    .workforce-annual-matrices .workforce-panel-head p { font-size: 12px; line-height: 1.5; }
    .workforce-matrix-shell { max-height: none; overflow-x: hidden; overflow-y: visible; }
    .workforce-monthly-matrix { width: 100%; min-width: 0; table-layout: fixed; border-radius: 10px; overflow: hidden; font-size: 13px; }
    .workforce-monthly-matrix col.workforce-department-column { width: 150px; }
    .workforce-monthly-matrix col.workforce-total-column { width: 56px; }
    .workforce-monthly-matrix td { height: 48px; padding: 9px 3px; text-align: center; font-size: 13px; line-height: 1.35; }
    .workforce-monthly-matrix th { height: 42px; padding: 9px 3px; text-align: center; font-size: 13px; line-height: 1.2; background: linear-gradient(180deg,#0871d5 0%,#075bb2 100%); }
    .workforce-monthly-matrix th:first-child,
    .workforce-monthly-matrix td:first-child {
      position: sticky;
      left: 0;
      z-index: 2;
      width: 150px;
      text-align: left;
      overflow-wrap: normal;
    }
    .workforce-monthly-matrix th:first-child { z-index: 4; background: #075eb9; }
    .workforce-monthly-matrix td:first-child { background: #fff; }
    .workforce-department-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
    .workforce-department-icon { display: inline-grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; color: #0867d1; background: #eff6ff; border: 1px solid #d5e6fb; border-radius: 8px; box-shadow: 0 3px 8px rgba(8,103,209,.08); }
    .workforce-department-icon svg { width: 16px; height: 16px; stroke-width: 2.1; }
    .workforce-department-name { min-width: 0; color: #092f63; font-size: 13.5px; line-height: 1.22; white-space: normal; word-break: normal; overflow-wrap: normal; }
    .workforce-monthly-matrix tbody tr:nth-child(even) td:first-child { background: #f7faff; }
    .workforce-monthly-matrix tbody tr:not(.workforce-total-row):hover td { background: #edf6ff; }
    .workforce-monthly-matrix tbody tr:not(.workforce-total-row):hover td:first-child { background: #e6f2ff; }
    .workforce-monthly-matrix tbody td:not(:first-child):not(:last-child) { color: #173b67; font-size: 13.5px; font-variant-numeric: tabular-nums; }
    .workforce-monthly-matrix th:last-child,
    .workforce-monthly-matrix td:last-child {
      position: sticky;
      right: 0;
      z-index: 2;
      width: 56px;
      color: #fff;
      background: #083b7d;
      height: 44px;
      font-size: 14px;
      font-weight: 900;
    }
    .workforce-monthly-matrix th:last-child { z-index: 4; }
    .workforce-monthly-matrix .workforce-total-row td {
      color: #fff;
      background: #075eb9;
      border-top: 2px solid #064d98;
      font-weight: 900;
    }
    .workforce-monthly-matrix .workforce-total-row td:first-child,
    .workforce-monthly-matrix .workforce-total-row td:last-child {
      color: #fff;
      background: #083b7d;
    }
    .workforce-monthly-matrix tbody tr.workforce-total-row > td:first-child {
      z-index: 3;
      color: #fff !important;
      background: #083b7d !important;
      font-weight: 900;
    }
    .workforce-monthly-matrix .workforce-empty {
      position: static;
      color: #7b8ca0 !important;
      background: #fff !important;
      text-align: center;
    }
    .workforce-matrix-note { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; color: #58708f; background: linear-gradient(90deg,#edf5ff,#f8fbff); border-radius: 8px; font-size: 11px; }
    .workforce-matrix-note-icon { display: inline-grid; flex: 0 0 25px; width: 25px; height: 25px; place-items: center; color: #fff; background: #0865c8; border-radius: 50%; }
    .workforce-matrix-note-icon svg { width: 14px; height: 14px; }
    .workforce-matrix-note strong { color: #0a4c9b; }
    .workforce-reason-view { margin-top: 16px; }
    .workforce-reason-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
    .workforce-reason-grid { display: block; }
    .workforce-reason-summary-panel {
      padding: 0;
      overflow: hidden;
      border: 1px solid #d6e2f1;
      box-shadow: 0 12px 34px rgba(15, 61, 112, .09);
    }
    .workforce-reason-summary-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      padding: 20px 22px;
      margin: 0;
      background:
        radial-gradient(circle at 92% 15%, rgba(53, 166, 255, .18), transparent 34%),
        linear-gradient(135deg, #073f82 0%, #096dc7 60%, #0b83db 100%);
      color: #fff;
      border-bottom: 0;
    }
    .workforce-reason-summary-head h2 {
      margin: 0 0 7px;
      color: #fff;
      font-size: 21px;
      letter-spacing: -.2px;
    }
    .workforce-reason-summary-head p {
      margin: 0;
      color: rgba(255, 255, 255, .82);
      line-height: 1.55;
    }
    .workforce-reason-summary-icon {
      width: 48px;
      height: 48px;
      flex: 0 0 48px;
      display: grid;
      place-items: center;
      border: 1px solid rgba(255,255,255,.32);
      border-radius: 15px;
      background: rgba(255,255,255,.14);
      backdrop-filter: blur(6px);
    }
    .workforce-reason-summary-icon svg { width: 24px; height: 24px; }
    .workforce-reason-matrix-shell {
      max-height: 640px;
      overflow: auto;
      margin: 0;
      border: 0;
      border-radius: 0;
      background: #fff;
      scrollbar-color: #8fa7c2 #edf3f9;
      scrollbar-width: thin;
    }
    .workforce-reason-matrix { min-width: 1320px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
    .workforce-reason-matrix th,
    .workforce-reason-matrix td {
      padding: 11px 10px;
      text-align: center;
      vertical-align: middle;
      border-right: 1px solid #e1e9f3;
      border-bottom: 1px solid #e1e9f3;
    }
    .workforce-reason-matrix thead th {
      position: sticky;
      top: 0;
      z-index: 4;
      color: #fff;
      background: linear-gradient(180deg, #116fc4 0%, #075bab 100%);
      font-size: 12px;
      font-weight: 800;
      letter-spacing: .1px;
      box-shadow: inset 0 -1px rgba(255,255,255,.14);
    }
    .workforce-reason-matrix tbody tr { transition: background-color .15s ease; }
    .workforce-reason-matrix tbody tr:hover td { background: #f0f7ff; }
    .workforce-reason-matrix tbody td { color: #263d59; font-size: 12px; }
    .workforce-reason-matrix tbody tr:nth-child(even) td { background: #f8fbff; }
    .workforce-reason-matrix th:nth-child(1),
    .workforce-reason-matrix td:nth-child(1) {
      position: sticky;
      left: 0;
      z-index: 3;
      width: 205px;
      min-width: 205px;
      text-align: left;
      font-weight: 800;
    }
    .workforce-reason-matrix th:nth-child(2),
    .workforce-reason-matrix td:nth-child(2) {
      position: sticky;
      left: 205px;
      z-index: 3;
      width: 295px;
      min-width: 280px;
      text-align: left;
    }
    .workforce-reason-matrix th:nth-child(1),
    .workforce-reason-matrix th:nth-child(2) { z-index: 5; background: #075eb9; }
    .workforce-reason-matrix td:nth-child(1),
    .workforce-reason-matrix td:nth-child(2) { background: #fff; }
    .workforce-reason-matrix tbody tr:nth-child(even) td:nth-child(1),
    .workforce-reason-matrix tbody tr:nth-child(even) td:nth-child(2) { background: #f7faff; }
    .workforce-reason-matrix .department-cell {
      color: #06366f;
      background: linear-gradient(180deg, #eef7ff 0%, #e5f1fd 100%) !important;
      border-right: 2px solid #c6daef;
      font-weight: 900;
      line-height: 1.45;
      padding: 12px 12px;
    }
    .workforce-department-badge {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }
    .workforce-department-icon {
      width: 38px;
      height: 38px;
      flex: 0 0 38px;
      display: grid;
      place-items: center;
      border-radius: 12px;
      border: 1px solid rgba(11, 101, 189, .13);
      box-shadow: 0 5px 14px rgba(18, 80, 143, .10);
    }
    .workforce-department-icon svg {
      width: 19px;
      height: 19px;
      stroke-width: 2.2;
    }
    .workforce-department-name {
      min-width: 0;
      color: #073a72;
      font-size: 14px;
      font-weight: 900;
      line-height: 1.4;
      letter-spacing: .05px;
      word-break: break-word;
    }
    .workforce-department-badge[data-tone="blue"] .workforce-department-icon {
      color: #0968bd;
      background: #e3f1ff;
    }
    .workforce-department-badge[data-tone="violet"] .workforce-department-icon {
      color: #7446bb;
      background: #f0e9ff;
    }
    .workforce-department-badge[data-tone="green"] .workforce-department-icon {
      color: #13805d;
      background: #e4f7ef;
    }
    .workforce-department-badge[data-tone="orange"] .workforce-department-icon {
      color: #b5620c;
      background: #fff0dc;
    }
    .workforce-department-badge[data-tone="red"] .workforce-department-icon {
      color: #c24755;
      background: #ffe8ec;
    }
    .workforce-department-badge[data-tone="cyan"] .workforce-department-icon {
      color: #087d92;
      background: #e1f7fb;
    }
    .workforce-department-badge[data-tone="slate"] .workforce-department-icon {
      color: #52657c;
      background: #edf1f6;
    }
    .workforce-reason-chip {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      max-width: 100%;
      padding: 5px 9px;
      border: 1px solid #dce7f3;
      border-radius: 999px;
      color: #3f5874;
      background: #f6f9fd;
      font-weight: 700;
      line-height: 1.3;
    }
    .workforce-reason-chip::before {
      content: "";
      width: 7px;
      height: 7px;
      flex: 0 0 7px;
      border-radius: 50%;
      background: #4d91d2;
      box-shadow: 0 0 0 3px rgba(77, 145, 210, .12);
    }
    .workforce-month-value {
      display: inline-grid;
      min-width: 25px;
      height: 25px;
      place-items: center;
      padding: 0 6px;
      border-radius: 8px;
      color: #0b559d;
      background: #eaf4ff;
      font-weight: 900;
    }
    .workforce-month-empty {
      color: #a4b2c2;
      font-weight: 600;
    }
    .workforce-row-total {
      display: inline-grid;
      min-width: 31px;
      height: 27px;
      place-items: center;
      padding: 0 8px;
      border-radius: 9px;
      color: #fff;
      background: linear-gradient(180deg, #1680db 0%, #0861b1 100%);
      box-shadow: 0 5px 12px rgba(8, 97, 177, .18);
      font-weight: 900;
    }
    .workforce-reason-matrix .reason-total-row td {
      font-weight: 900;
      border-top: 2px solid #0a4f90;
      border-bottom: 0;
    }
    .workforce-reason-matrix .reason-total-label {
      color: #fff;
      text-align: left;
      letter-spacing: .15px;
      background: linear-gradient(180deg, #083f79 0%, #062f5d 100%) !important;
    }
    .workforce-reason-matrix .reason-total-month {
      color: #073a72;
      background: linear-gradient(180deg, #e8f4ff 0%, #d8ebfd 100%) !important;
    }
    .workforce-reason-matrix .reason-total-month strong {
      display: inline-grid;
      min-width: 28px;
      height: 28px;
      place-items: center;
      padding: 0 7px;
      border: 1px solid #b9d8f4;
      border-radius: 8px;
      color: #0758a5;
      background: #fff;
      box-shadow: 0 3px 8px rgba(22, 94, 159, .10);
    }
    .workforce-reason-matrix .reason-grand-total {
      color: #fff;
      background: linear-gradient(180deg, #f2a41e 0%, #d98200 100%) !important;
      border-left: 2px solid #bd7100;
      font-size: 13px;
    }
    .workforce-reason-matrix .reason-grand-total strong {
      display: inline-grid;
      min-width: 34px;
      height: 30px;
      place-items: center;
      padding: 0 9px;
      border-radius: 9px;
      color: #8a4c00;
      background: #fff7e6;
      box-shadow: 0 4px 10px rgba(126, 72, 0, .16);
    }

    @media (max-width: 1100px) {
      .workforce-toolbar, .workforce-toolbar.reason-mode { grid-template-columns: 1fr 1fr; }
      .workforce-grid, .workforce-lists, .workforce-reason-grid { grid-template-columns: 1fr; }
      .workforce-kpis { grid-template-columns: 1fr 1fr; }
      .workforce-grid > .workforce-panel:first-child .workforce-chart-wrap { height: 360px; }
    }
    @media (max-width: 680px) {
      .workforce-toolbar, .workforce-toolbar.reason-mode, .workforce-kpis, .workforce-reason-kpis { grid-template-columns: 1fr; }
      .workforce-period-switch { width: 100%; }
      .workforce-period-switch button { flex: 1; }
      .workforce-panel { padding: 14px; }
      .workforce-panel-head { flex-direction: column; }
      .workforce-target-box { width: 100%; min-width: 0; }
      .workforce-chart-wrap { height: 290px; }
      .workforce-grid > .workforce-panel:first-child .workforce-chart-wrap { height: 320px; }
      .workforce-table { min-width: 560px; }
      .workforce-reason-summary-head { padding: 17px 16px; align-items: flex-start; }
      .workforce-reason-summary-head h2 { font-size: 18px; }
      .workforce-reason-summary-icon { width: 42px; height: 42px; flex-basis: 42px; border-radius: 13px; }
      .workforce-reason-matrix-shell { max-height: 72vh; }
      .workforce-reason-matrix th,
      .workforce-reason-matrix td { padding: 9px 8px; }
      .workforce-department-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        border-radius: 10px;
      }
      .workforce-department-icon svg { width: 17px; height: 17px; }
      .workforce-department-name { font-size: 12.5px; line-height: 1.35; }
      .workforce-reason-chip { padding: 4px 8px; font-size: 11px; }
    }
    .admin-page-header {
      min-height: 176px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 28px;
      padding: 30px 34px;
      border: 1px solid #cfdeed;
      border-bottom: 4px solid #0a7b83;
      background: #fff;
      box-shadow: 0 12px 32px rgba(23, 65, 111, .08);
    }
    .admin-page-header > div { min-width: 0; }
    .admin-eyebrow { display: block; margin-bottom: 9px; color: #0a7b83; font-size: 11px; font-weight: 900; }
    .admin-page-header h1 { margin: 0; color: #082f63; font-size: clamp(26px, 3vw, 38px); letter-spacing: 0; }
    .admin-page-header p { margin: 10px 0 0; color: #61758c; font-size: 14px; line-height: 1.55; }
    .admin-header-icon { width: 82px; height: 82px; flex: 0 0 82px; display: grid; place-items: center; border-radius: 8px; background: #e5f1ff; color: #0870d1; }
    .admin-header-icon svg { width: 38px; height: 38px; }
    .admin-header-icon-green { color: #07815a; background: #e3f6ed; }
    .admin-header-icon-amber { color: #bf7300; background: #fff1d8; }
    .admin-toolbar {
      display: grid;
      grid-template-columns: minmax(260px, 1fr) auto auto;
      gap: 10px;
      margin-top: 18px;
      padding: 14px;
      border: 1px solid #cfdeed;
      background: #fff;
      box-shadow: 0 8px 22px rgba(23, 65, 111, .06);
    }
    .admin-search { min-width: 0; min-height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid #cbd9e8; border-radius: 6px; background: #f8fbff; }
    .admin-search:focus-within { border-color: #0875cf; box-shadow: 0 0 0 3px rgba(8, 117, 207, .11); background: #fff; }
    .admin-search svg { width: 18px; height: 18px; flex: 0 0 18px; color: #607d9b; }
    .admin-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #173b61; font: inherit; }
    .admin-toolbar .button { min-height: 46px; }
    .admin-result-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 4px 10px; color: #5d728a; font-size: 13px; }
    .admin-result-bar strong { color: #0870d1; font-size: 18px; }
    .admin-table-shell { border: 1px solid #cbdbea; background: #fff; box-shadow: 0 10px 28px rgba(23, 65, 111, .07); }
    .admin-table-scroll { width: 100%; max-height: calc(100vh - 365px); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
    .admin-pagination {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      min-height: 66px;
      padding: 10px 14px;
      border-top: 1px solid #dbe6f2;
      color: #5f748d;
      background: #fbfdff;
      font-size: 13px;
    }
    .admin-pagination[hidden] { display: none !important; }
    .admin-page-size {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      white-space: nowrap;
    }
    .admin-page-size select {
      min-width: 68px;
      height: 38px;
      padding: 0 28px 0 12px;
      border: 1px solid #cbd9e8;
      border-radius: 10px;
      outline: 0;
      color: #173b61;
      background: #fff;
      font: 800 13px var(--app-font);
      cursor: pointer;
    }
    .admin-page-size select:focus-visible {
      border-color: #0875cf;
      box-shadow: 0 0 0 3px rgba(8,117,207,.11);
    }
    .admin-page-summary {
      color: #506984;
      font-weight: 700;
      text-align: center;
      white-space: nowrap;
    }
    .admin-page-nav,
    .admin-page-numbers {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }
    .admin-page-button {
      min-width: 38px;
      height: 38px;
      display: inline-grid;
      place-items: center;
      padding: 0 10px;
      border: 1px solid #cad9e9;
      border-radius: 10px;
      color: #345675;
      background: #fff;
      font: 800 13px var(--app-font);
      cursor: pointer;
    }
    .admin-page-button svg { width: 17px; height: 17px; }
    .admin-page-button:hover:not(:disabled) { color: #075eb9; border-color: #90bde8; background: #edf6ff; }
    .admin-page-button.active {
      color: #fff;
      border-color: #0864be;
      background: linear-gradient(135deg, #1676d2, #0862bd);
      box-shadow: 0 5px 12px rgba(8,98,189,.18);
    }
    .admin-page-button:disabled { opacity: .42; cursor: not-allowed; }
    .admin-page-ellipsis { min-width: 22px; color: #8293a7; text-align: center; }
    .admin-data-table { width: 100%; min-width: 1180px; border-collapse: separate; border-spacing: 0; font-size: 12px; }
    .admin-data-table th { position: sticky; top: 0; z-index: 3; padding: 12px 10px; border-right: 1px solid rgba(255,255,255,.2); background: #0a4f98; color: #fff; text-align: left; white-space: nowrap; }
    .admin-data-table td { max-width: 250px; padding: 10px; border-right: 1px solid #e0e8f1; border-bottom: 1px solid #e0e8f1; color: #263e59; vertical-align: middle; white-space: nowrap; }
    .admin-data-table tbody tr:nth-child(even) td { background: #f8fbff; }
    .admin-data-table tbody tr:hover td { background: #edf6ff; }
    .admin-data-table .admin-cell-wrap { min-width: 190px; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
    #adminFeedbackTable { min-width: 2110px; table-layout: fixed; }
    #adminFeedbackTable th,
    #adminFeedbackTable td { box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; }
    #adminFeedbackTable .admin-cell-wrap { min-width: 0; white-space: normal; overflow-wrap: anywhere; word-break: break-word; text-overflow: clip; }
    #adminFeedbackTable .admin-col-id { width: 190px; }
    #adminFeedbackTable .admin-col-submittedAt { width: 165px; }
    #adminFeedbackTable .admin-col-employeeCode { width: 100px; }
    #adminFeedbackTable .admin-col-employeeName { width: 165px; }
    #adminFeedbackTable .admin-col-username { width: 145px; }
    #adminFeedbackTable .admin-col-category { width: 170px; }
    #adminFeedbackTable .admin-col-title { width: 185px; }
    #adminFeedbackTable .admin-col-content { width: 250px; }
    #adminFeedbackTable .admin-col-priority { width: 115px; }
    #adminFeedbackTable .admin-col-responseMethod { width: 150px; }
    #adminFeedbackTable .admin-col-contact { width: 135px; }
    #adminFeedbackTable .admin-col-status { width: 135px; }
    #adminFeedbackTable .admin-col-resolutionNote { width: 200px; }
    .admin-data-table .admin-actions-head,
    .admin-data-table .admin-actions-cell { position: sticky; right: 0; z-index: 2; min-width: 92px; text-align: center; }
    .admin-data-table .admin-actions-head { z-index: 4; }
    .admin-data-table .admin-actions-cell { background: #fff; }
    .admin-data-table tbody tr:nth-child(even) .admin-actions-cell { background: #f8fbff; }
    .admin-row-actions { display: inline-flex; gap: 5px; }
    .admin-icon-button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #c9d9e8; border-radius: 6px; background: #fff; color: #0870d1; cursor: pointer; }
    .admin-icon-button:hover { border-color: #0870d1; background: #eaf4ff; }
    .admin-icon-button.danger { color: #cf2e43; }
    .admin-icon-button.danger:hover { border-color: #cf2e43; background: #fff0f2; }
    .admin-icon-button svg { width: 17px; height: 17px; }
    .admin-status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 5px; background: #e2f7ed; color: #087a53; font-size: 11px; font-weight: 900; }
    .admin-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
    .admin-status.terminated { background: #fff0f2; color: #c62e42; }
    .admin-status.pending { background: #fff3dc; color: #a96300; }
    .admin-account-status { display: inline-grid; gap: 2px; min-width: 118px; padding: 7px 9px; border-radius: 7px; background: #e5f7ef; color: #087a53; font-size: 11px; font-weight: 900; line-height: 1.25; }
    .admin-account-status small { color: inherit; font-size: 10px; font-weight: 700; opacity: .82; }
    .admin-account-status.inactive { background: #fff0f2; color: #c62e42; }
    #adminEmployeesTable tbody tr { height: 62px; }
    #adminEmployeesTable td { height: 62px; box-sizing: border-box; overflow: hidden; }
    #adminEmployeesTable .admin-col-name { min-width: 190px; width: 190px; }
    #adminEmployeesTable .admin-employee-name { display: block; color: #071f3f; font-size: 13px; font-weight: 900; line-height: 1.35; }
    #adminEmployeesTable .admin-col-address { min-width: 280px; width: 280px; max-width: 280px; white-space: nowrap; overflow: hidden; }
    #adminEmployeesTable .admin-address-ellipsis { display: block; max-width: 100%; overflow: hidden; color: #405975; text-overflow: ellipsis; white-space: nowrap; }
    #adminEmployeesTable .admin-col-status { min-width: 138px; width: 138px; padding-left: 10px; padding-right: 10px; overflow: hidden; }
    #adminEmployeesTable .admin-col-status .admin-status { max-width: 100%; box-sizing: border-box; white-space: nowrap; vertical-align: middle; }
    #adminEmployeesTable { width: 100%; min-width: 2130px; table-layout: fixed; }
    #adminEmployeesTable th,
    #adminEmployeesTable td { min-width: 0; max-width: none; box-sizing: border-box; }
    #adminEmployeesTable th {
      height: 54px;
      padding: 9px 10px;
      overflow: hidden;
      line-height: 1.25;
      white-space: normal;
      overflow-wrap: anywhere;
      vertical-align: middle;
    }
    #adminEmployeesTable .admin-cell-wrap { min-width: 0; }
    #adminEmployeesTable .admin-col-code { width: 115px; }
    #adminEmployeesTable .admin-col-name { width: 190px; }
    #adminEmployeesTable .admin-col-email { width: 220px; }
    #adminEmployeesTable .admin-col-phone { width: 135px; }
    #adminEmployeesTable .admin-col-birthDate { width: 110px; }
    #adminEmployeesTable .admin-col-department { width: 135px; }
    #adminEmployeesTable .admin-col-position { width: 135px; }
    #adminEmployeesTable .admin-col-startDate { width: 135px; }
    #adminEmployeesTable .admin-col-address { width: 280px; }
    #adminEmployeesTable .admin-col-citizenId { width: 140px; }
    #adminEmployeesTable .admin-col-bankAccount { width: 150px; }
    #adminEmployeesTable .admin-col-status { width: 145px; }
    #adminEmployeesTable .admin-col-terminationDate { width: 135px; }
    #adminEmployeesTable .admin-actions-head,
    #adminEmployeesTable .admin-actions-cell { width: 100px; min-width: 100px; max-width: 100px; }
    .admin-empty-row td { padding: 50px 20px; color: #72859a; text-align: center; }
    .admin-record-dialog { width: min(940px, calc(100vw - 30px)); max-height: calc(100vh - 30px); padding: 0; border: 0; border-radius: 8px; color: #173b61; box-shadow: 0 26px 80px rgba(8, 34, 67, .3); }
    .admin-record-dialog::backdrop { background: rgba(5, 25, 49, .58); }
    .photo-upload-dialog { width: min(470px, calc(100vw - 30px)); padding: 0; overflow: hidden; border: 0; border-radius: 14px; color: #173b61; background: #fff; box-shadow: 0 28px 85px rgba(5,31,63,.34); }
    .photo-upload-dialog::backdrop { background: rgba(5,25,49,.68); backdrop-filter: blur(2px); }
    .photo-upload-card { padding: 28px; }
    .photo-upload-head { display: flex; align-items: center; gap: 14px; }
    .photo-upload-icon { display: grid; flex: 0 0 50px; width: 50px; height: 50px; place-items: center; color: #0870d1; background: #e8f3ff; border-radius: 12px; }
    .photo-upload-icon svg { width: 26px; height: 26px; }
    .photo-upload-dialog.uploading .photo-upload-icon svg { animation: photo-upload-spin 1.1s linear infinite; }
    @keyframes photo-upload-spin { to { transform: rotate(360deg); } }
    .photo-upload-head h2 { margin: 0; color: #082f63; font-size: 21px; }
    .photo-upload-head p { margin: 5px 0 0; color: #687e96; font-size: 12px; line-height: 1.45; }
    .photo-upload-progress { height: 9px; margin: 22px 0 18px; overflow: hidden; background: #e5edf6; border-radius: 999px; }
    .photo-upload-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg,#0874d8,#14a673); border-radius: inherit; transition: width .3s ease; }
    .photo-upload-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
    .photo-upload-steps li { display: flex; align-items: center; gap: 10px; color: #7a8da2; font-size: 13px; font-weight: 700; }
    .photo-upload-steps li::before { content: ''; width: 10px; height: 10px; flex: 0 0 10px; border: 2px solid #c4d2e1; border-radius: 50%; }
    .photo-upload-steps li.active { color: #075fba; }
    .photo-upload-steps li.active::before { border-color: #0874d8; background: #0874d8; box-shadow: 0 0 0 4px #e2f0ff; }
    .photo-upload-steps li.done { color: #13805c; }
    .photo-upload-steps li.done::before { border-color: #17a673; background: #17a673; }
    .photo-upload-error { margin: 16px 0 0; padding: 11px 12px; color: #ad2638; background: #fff0f2; border: 1px solid #ffd4da; border-radius: 8px; font-size: 12px; line-height: 1.55; }
    .photo-upload-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
    .admin-record-form { display: grid; max-height: calc(100vh - 30px); background: #fff; }
    .admin-record-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 26px 18px; border-bottom: 1px solid #dce6f0; }
    .admin-record-head h2 { margin: 4px 0 6px; color: #082f63; font-size: 24px; }
    .admin-record-head p { margin: 0; color: #6a7e93; font-size: 13px; }
    .admin-record-kicker { color: #0a7b83; font-size: 10px; font-weight: 900; }
    .admin-record-fields { overflow-y: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; padding: 22px 26px; }
    .admin-record-field { min-width: 0; display: grid; gap: 7px; color: #264866; font-size: 12px; font-weight: 800; }
    .admin-record-field.full { grid-column: 1 / -1; }
    .admin-record-field input,
    .admin-record-field select,
    .admin-record-field textarea { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid #cbd9e8; border-radius: 6px; background: #f9fbfe; color: #173b61; font: inherit; outline: 0; }
    .admin-record-field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
    .admin-record-field-hint { color: #6b8098; font-size: 11px; font-weight: 650; line-height: 1.45; }
    .admin-record-field input:focus,
    .admin-record-field select:focus,
    .admin-record-field textarea:focus { border-color: #0875cf; box-shadow: 0 0 0 3px rgba(8, 117, 207, .11); background: #fff; }
    .admin-record-form > .auth-error { margin: 0 26px; }
    .admin-record-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 17px 26px 22px; border-top: 1px solid #dce6f0; }
    @media (max-width: 760px) {
      body.admin-session #view-attendance .attendance-filters { grid-template-columns: minmax(0, 1fr); }
      body.admin-session #view-attendance #searchButton { width: 100%; justify-content: center; }
      body.admin-session #view-attendance .attendance-internal-controls { grid-template-columns: minmax(0, 1fr); padding: 12px; }
      .admin-page-header { min-height: 0; padding: 24px 20px; }
      .admin-header-icon { width: 58px; height: 58px; flex-basis: 58px; }
      .admin-header-icon svg { width: 28px; height: 28px; }
      .admin-toolbar { grid-template-columns: 1fr 1fr; }
      .admin-search { grid-column: 1 / -1; }
      .admin-toolbar .button { justify-content: center; min-width: 0; padding: 0 10px; }
      .admin-table-scroll { max-height: none; }
      #adminEmployeesTable { min-width: 0; table-layout: auto; }
      #adminEmployeesTable tbody tr { height: auto; }
      #adminEmployeesTable tbody td,
      #adminEmployeesTable .admin-col-name,
      #adminEmployeesTable .admin-col-address,
      #adminEmployeesTable .admin-col-status,
      #adminEmployeesTable .admin-actions-cell {
        width: 100% !important;
        min-width: 0;
        max-width: none;
        height: auto;
        overflow: visible;
      }
      .admin-record-fields { grid-template-columns: 1fr; padding: 18px 16px; }
      .admin-record-field.full { grid-column: auto; }
      .admin-record-head { padding: 20px 16px 16px; }
      .admin-record-form > .auth-error { margin: 0 16px; }
      .admin-record-actions { padding: 15px 16px 18px; }
    }
    @media (max-width: 430px) {
      .admin-page-header { align-items: flex-start; }
      .admin-header-icon { display: none; }
      .admin-toolbar { grid-template-columns: 1fr; }
      .admin-search { grid-column: auto; }
      .admin-result-bar { align-items: flex-start; flex-direction: column; gap: 3px; }
      .admin-pagination { align-items: stretch; flex-direction: column; }
      .admin-page-size,
      .admin-page-nav { justify-content: center; }
      .admin-page-summary { order: -1; }
      .admin-page-button { min-width: 36px; height: 36px; padding: 0 8px; }
      .admin-record-actions .button { flex: 1; min-width: 0; justify-content: center; }
    }
    /* Payroll */
    #view-payroll { color: #10213f; font-family: var(--app-font); font-size: 15px; }
    #view-payroll * { font-family: var(--app-font) !important; letter-spacing: 0; }
    #view-payroll.active { display: block; }
    .payroll-page { max-width: 1580px; margin: 0 auto; }
    .payroll-hero {
      min-height: 178px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 28px;
      margin-bottom: 16px;
      padding: 30px 34px;
      border: 1px solid #cfe0f2;
      border-bottom: 4px solid #0aa79d;
      border-radius: 8px;
      background: #f7fbff;
      box-shadow: 0 12px 30px rgba(21, 65, 111, .08);
    }
    .payroll-eyebrow { display: flex; align-items: center; gap: 8px; color: #0873ce; font-size: 13px; font-weight: 900; text-transform: uppercase; }
    .payroll-eyebrow svg { width: 18px; height: 18px; }
    .payroll-hero h1 { margin: 9px 0 7px; color: #082e65; font-size: 34px; line-height: 1.14; }
    .payroll-hero p { margin: 0; color: #5a6f89; font-size: 15px; line-height: 1.5; }
    .payroll-period {
      min-width: 210px;
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 15px 17px;
      border: 1px solid #c8dcf1;
      border-radius: 8px;
      background: #fff;
    }
    .payroll-period > span { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 44px; border-radius: 8px; color: #0873ce; background: #e5f2ff; }
    .payroll-period svg { width: 23px; height: 23px; }
    .payroll-period small { display: block; color: #667b94; font-size: 12px; font-weight: 800; }
    .payroll-period strong { display: block; margin-top: 3px; color: #082e65; font-size: 18px; }
    .payroll-period select { width: 130px; margin-top: 3px; padding: 3px 22px 3px 0; border: 0; outline: 0; color: #082e65; background: transparent; font-size: 18px; font-weight: 900; cursor: pointer; }
    .payroll-period select:focus-visible { border-radius: 4px; box-shadow: 0 0 0 3px rgba(8, 115, 206, .14); }
    .payroll-admin-search {
      display: grid;
      grid-template-columns: minmax(260px, 1fr) auto auto;
      gap: 10px;
      margin-bottom: 16px;
      padding: 14px;
      border: 1px solid #cfdeed;
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 7px 20px rgba(23, 65, 111, .06);
    }
    body.employee-session .payroll-admin-search { display: none; }
    .payroll-search-field { min-height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid #cad9e9; border-radius: 6px; background: #f8fbff; }
    .payroll-search-field:focus-within { border-color: #0875cf; box-shadow: 0 0 0 3px rgba(8, 117, 207, .1); background: #fff; }
    .payroll-search-field svg { width: 18px; height: 18px; flex: 0 0 18px; color: #637e9b; }
    .payroll-search-field input { width: 100%; min-width: 0; border: 0; outline: 0; color: #15385e; background: transparent; font: inherit; font-size: 15px; }
    .payroll-empty {
      min-height: 300px;
      display: grid;
      place-items: center;
      padding: 38px;
      border: 1px dashed #b9cee5;
      border-radius: 8px;
      color: #657b94;
      background: #f8fbff;
      text-align: center;
    }
    .payroll-empty span { width: 68px; height: 68px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 50%; color: #0873ce; background: #e4f2ff; }
    .payroll-empty svg { width: 34px; height: 34px; }
    .payroll-empty strong { display: block; color: #0a326a; font-size: 19px; }
    .payroll-empty p { max-width: 520px; margin: 7px auto 0; }
    .payroll-empty[hidden] { display: none !important; }
    .payroll-content[hidden] { display: none !important; }
    .payroll-employee-band {
      display: grid;
      grid-template-columns: 1.2fr repeat(4, minmax(145px, 1fr));
      border: 1px solid #d0deed;
      border-radius: 8px;
      background: #fff;
      overflow: hidden;
      box-shadow: 0 8px 22px rgba(25, 58, 100, .06);
    }
    .payroll-identity { display: flex; align-items: center; gap: 14px; padding: 18px; background: #eef6ff; }
    .payroll-avatar { width: 58px; height: 58px; display: grid; place-items: center; flex: 0 0 58px; border: 3px solid #fff; outline: 1px solid #8fbcf1; border-radius: 50%; color: #074a9e; background: #cfe5ff; font-size: 19px; font-weight: 900; }
    .payroll-identity strong { display: block; color: #082e65; font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
    .payroll-identity span { display: block; margin-top: 4px; color: #17835d; font-size: 13px; font-weight: 800; }
    .payroll-basic-item { min-width: 0; display: flex; align-items: center; gap: 11px; padding: 15px; border-left: 1px solid #d9e5f1; }
    .payroll-basic-item > svg { width: 20px; height: 20px; flex: 0 0 20px; color: #0873ce; }
    .payroll-basic-item small { display: block; color: #73849a; font-size: 12px; font-weight: 700; line-height: 1.4; }
    .payroll-basic-item strong { display: block; margin-top: 4px; color: #102d51; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
    .payroll-income-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
    .payroll-income-card { min-width: 0; padding: 16px; border: 1px solid #d4e1ef; border-top: 3px solid #0873ce; border-radius: 8px; background: #fff; }
    .payroll-income-card:nth-child(3), .payroll-income-card:nth-child(6) { border-top-color: #0a9c70; }
    .payroll-income-card small { display: block; min-height: 40px; color: #61758e; font-size: 13px; font-weight: 800; line-height: 1.5; overflow-wrap: anywhere; }
    .payroll-income-card strong { display: block; margin-top: 8px; color: #082e65; font-size: 22px; line-height: 1.3; overflow-wrap: anywhere; }
    .payroll-sections {
      display: grid;
      grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr) minmax(0, 1fr);
      grid-template-areas:
        "salary welfare deduction"
        "allowance allowance allowance";
      gap: 10px;
    }
    .payroll-section { min-width: 0; border: 1px solid #d1dfed; border-radius: 8px; background: #fff; overflow: hidden; box-shadow: 0 6px 18px rgba(25, 58, 100, .05); }
    .payroll-section-salary { grid-area: salary; }
    .payroll-section-welfare { grid-area: welfare; }
    .payroll-section-deduction { grid-area: deduction; }
    .payroll-section-allowance { grid-area: allowance; }
    .payroll-section-head { display: flex; align-items: center; gap: 9px; min-height: 54px; padding: 8px 11px; border-bottom: 1px solid #d8e5f1; }
    .payroll-section-head span { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border-radius: 7px; color: #0873ce; background: #e4f2ff; }
    .payroll-section-head svg { width: 19px; height: 19px; }
    .payroll-section-head h2 { margin: 0; color: #08346f; font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
    .payroll-section-head p { margin: 2px 0 0; color: #71839a; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
    .payroll-section-welfare .payroll-section-head span { color: #0a8b60; background: #e2f7ed; }
    .payroll-section-allowance .payroll-section-head span { color: #bd7200; background: #fff1d8; }
    .payroll-section-deduction .payroll-section-head span { color: #cf4653; background: #ffeaed; }
    .payroll-table-wrap { width: 100%; overflow-x: auto; }
    .payroll-table { width: 100%; min-width: 0; border-collapse: collapse; table-layout: fixed; }
    .payroll-table th { padding: 9px 10px; color: #fff; background: #075cba; font-size: 12px; line-height: 1.4; text-align: left; overflow-wrap: anywhere; }
    .payroll-table th:nth-child(n+2), .payroll-table td:nth-child(n+2) { text-align: right; }
    .payroll-table td { padding: 9px 10px; border-bottom: 1px solid #e0e8f1; color: #28405e; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; word-break: normal; }
    .payroll-table tbody tr:nth-child(even) td { background: #f8fbff; }
    .payroll-table .payroll-zero { color: #9aa8b8; }
    .payroll-table tfoot td { padding: 9px; border: 0; color: #fff; background: #083b7d; font-weight: 900; }
    .payroll-section-allowance .payroll-table th:nth-child(1),
    .payroll-section-allowance .payroll-table th:nth-child(3) { width: 36%; }
    .payroll-section-allowance .payroll-table th:nth-child(2),
    .payroll-section-allowance .payroll-table th:nth-child(4) { width: 14%; }
    .payroll-section-allowance .payroll-table th:nth-child(3) { text-align: left; }
    .payroll-section-allowance .payroll-table td:nth-child(3) { text-align: center; }
    .payroll-section-allowance .payroll-table td:nth-child(3) { border-left: 1px solid #d7e3ef; }
    .payroll-non-cash { display: inline-block; margin-left: 5px; padding: 2px 5px; border-radius: 4px; color: #8a5a00; background: #fff1d8; font-size: 10px; font-weight: 800; }
    .payroll-no-data { text-align: center !important; color: #71829d; font-weight: 600 !important; }
    .payroll-summary {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      margin-top: 16px;
      padding: 18px;
      border: 1px solid #c8dcf0;
      border-radius: 8px;
      background: #edf6ff;
    }
    .payroll-summary-item { min-width: 0; padding: 12px 14px; border-right: 1px solid #c8d9eb; }
    .payroll-summary-item:last-child { border-right: 0; }
    .payroll-summary-item small { display: block; color: #647b96; font-size: 13px; font-weight: 800; line-height: 1.4; }
    .payroll-summary-item strong { display: block; margin-top: 7px; color: #082e65; font-size: 24px; line-height: 1.3; overflow-wrap: anywhere; }
    .payroll-summary-item.payroll-net { border: 0; border-radius: 7px; background: #0873ce; }
    .payroll-summary-item.payroll-net small, .payroll-summary-item.payroll-net strong { color: #fff; }
    .payroll-formula { margin: 10px 0 0; color: #6a7f98; font-size: 13px; line-height: 1.5; text-align: right; }
    .hq-payroll-content[hidden] { display: none !important; }
    .hq-payroll-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 16px 0; }
    .hq-payroll-group { overflow: hidden; border: 1px solid #d5e2ef; border-radius: 10px; background: #fff; box-shadow: 0 7px 20px rgba(19,51,88,.06); }
    .hq-payroll-group header { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; padding: 14px; border-bottom: 1px solid #dce7f2; background: #f5f9ff; }
    .hq-payroll-group header > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: #0873ce; font-size: 17px; font-weight: 900; }
    .hq-payroll-group header h2 { margin: 0; color: #082e65; font-size: 17px; }
    .hq-payroll-group header p { margin: 3px 0 0; color: #71839a; font-size: 11px; }
    .hq-payroll-group header strong { color: #075cba; font-size: 17px; text-align: right; }
    .hq-payroll-group-b header > span { background: #159267; }
    .hq-payroll-group-c header > span { background: #d84b58; }
    .hq-payroll-items { padding: 5px 14px; }
    .hq-payroll-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 58px; padding: 9px 0; border-bottom: 1px solid #e5edf5; }
    .hq-payroll-item:last-child { border-bottom: 0; }
    .hq-payroll-item span { color: #24415f; font-size: 13px; font-weight: 750; line-height: 1.4; }
    .hq-payroll-item small { display: block; margin-top: 2px; color: #7a8da2; font-size: 10px; font-weight: 600; }
    .hq-payroll-item strong { color: #082e65; font-size: 15px; white-space: nowrap; }
    .hq-payroll-net { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 16px; border-radius: 10px; background: linear-gradient(135deg,#063b7d,#0873ce); }
    .hq-payroll-net > div { padding: 8px 14px; border-radius: 8px; background: rgba(255,255,255,.1); }
    .hq-payroll-net small { display: block; color: #dbeeff; font-size: 13px; font-weight: 800; }
    .hq-payroll-net strong { display: block; margin-top: 6px; color: #fff; font-size: 26px; }
    #view-payroll.hq-payroll-mode .payroll-income-grid,
    #view-payroll.hq-payroll-mode .payroll-sections,
    #view-payroll.hq-payroll-mode .payroll-summary,
    #view-payroll.hq-payroll-mode .payroll-formula { display: none !important; }
    @media (max-width: 1050px) { .hq-payroll-grid { grid-template-columns: 1fr; } }
    @media (max-width: 640px) {
      .hq-payroll-group header { grid-template-columns: 34px 1fr; }
      .hq-payroll-group header > strong { grid-column: 1 / -1; text-align: left; }
      .hq-payroll-net { grid-template-columns: 1fr; }
      .hq-payroll-net strong { font-size: 21px; }
    }
    @media (max-width: 1120px) {
      .payroll-employee-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .payroll-identity { grid-column: 1 / -1; }
      .payroll-basic-item { border-top: 1px solid #d9e5f1; }
      .payroll-income-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .payroll-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .payroll-summary-item:nth-child(2) { border-right: 0; }
    }
    @media (max-width: 760px) {
      .payroll-hero {
        min-height: 250px;
        align-items: flex-start;
        flex-direction: column;
        padding: 22px 18px;
        background-image:
          linear-gradient(90deg, rgba(247, 251, 255, .98) 0%, rgba(247, 251, 255, .92) 55%, rgba(247, 251, 255, .45) 100%),
          var(--payroll-image);
        background-position: center, 68% center;
      }
      .payroll-hero h1 { font-size: 27px; }
      .payroll-period { width: 100%; min-width: 0; }
      .payroll-admin-search { grid-template-columns: 1fr 1fr; }
      .payroll-search-field { grid-column: 1 / -1; }
      .payroll-admin-search .button { justify-content: center; }
      .payroll-employee-band, .payroll-sections { grid-template-columns: 1fr; }
      .payroll-sections {
        grid-template-areas: "salary" "welfare" "allowance" "deduction";
      }
      .payroll-section-allowance .payroll-table { min-width: 680px; }
      .payroll-basic-item { border-left: 0; border-top: 1px solid #d9e5f1; }
      .payroll-income-grid { grid-template-columns: 1fr 1fr; }
      .payroll-summary { grid-template-columns: 1fr; }
      .payroll-summary-item { border-right: 0; border-bottom: 1px solid #c8d9eb; }
      .payroll-summary-item:last-child { border-bottom: 0; }
      .payroll-formula { text-align: left; }
    }
    @media (max-width: 460px) {
      .payroll-income-grid { grid-template-columns: 1fr; }
      .payroll-admin-search { grid-template-columns: 1fr; }
      .payroll-search-field { grid-column: auto; }
    }

    /* Previous mobile layout is retained; this experimental workspace is disabled. */
    @media (max-width: 0px) {
      :root { --mobile-nav-height: 74px; }
      html { scroll-padding-bottom: calc(var(--mobile-nav-height) + 18px); }
      body { padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom)); }
      body:not(.authenticated) { padding-bottom: 0; }

      .app { display: block; min-height: 100dvh; }
      .main { width: 100%; min-width: 0; }
      .content { padding: 12px 10px 28px; overflow-x: clip; }

      .sidebar {
        position: fixed;
        z-index: 120;
        inset: auto 0 0;
        display: block;
        width: 100%;
        height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
        padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
        overflow: hidden;
        color: #31506f;
        border-top: 1px solid #d8e5f2;
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 -8px 24px rgba(18, 54, 92, .12);
        backdrop-filter: blur(14px);
      }
      .sidebar .brand,
      .sidebar .sidebar-footer { display: none !important; }
      .sidebar .nav {
        display: flex;
        gap: 4px;
        height: 100%;
        margin: 0;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
      }
      .sidebar .nav::-webkit-scrollbar { display: none; }
      .sidebar .nav-item {
        min-width: 72px;
        min-height: 58px;
        flex: 1 0 72px;
        flex-direction: column;
        justify-content: center;
        gap: 3px;
        padding: 5px 7px;
        color: #526b86;
        border-radius: 8px;
        font-size: 10px;
        line-height: 1.15;
        text-align: center;
      }
      .sidebar .nav-item svg { width: 20px; height: 20px; flex: 0 0 20px; }
      .sidebar .nav-item .nav-label {
        display: block !important;
        width: 100%;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
      }
      .sidebar .nav-item.active,
      .sidebar .nav-item:hover {
        color: #086cc5;
        background: #eaf4ff;
      }

      .topbar {
        position: sticky;
        z-index: 95;
        top: 0;
        min-height: 58px;
        height: auto;
        padding: 8px 10px;
        gap: 8px;
        box-shadow: 0 4px 14px rgba(18, 54, 92, .08);
      }
      .company { max-width: 43vw; gap: 8px; font-size: 12px; line-height: 1.25; }
      .topbar-actions { min-width: 0; gap: 6px; }
      .session-copy { display: none; }
      .session-user { min-width: 40px; padding: 0; border: 0; background: transparent; }
      .session-avatar { width: 38px; height: 38px; flex-basis: 38px; }
      .session-action,
      .language-control,
      .lang-select { min-width: 42px; min-height: 42px; }
      .session-action span { display: none; }

      .panel, .profile, .metric, .table-card,
      .hr-card, .payroll-section, .workforce-panel { border-radius: 8px; }
      .view > .title, .admin-page-title { font-size: 24px; line-height: 1.2; }

      #view-attendance .attendance-heading,
      #view-employees .employee-lookup-hero,
      #view-documents .documents-hero {
        height: 220px;
        min-height: 220px;
        border-radius: 8px;
      }
      #view-attendance .attendance-heading {
        padding: 20px 16px 52px;
        align-items: flex-end;
      }
      #view-attendance .attendance-heading-image,
      #view-employees .employee-lookup-image,
      #view-documents .documents-hero-image {
        background-size: contain;
        background-position: center;
      }
      #view-attendance .attendance-heading > div:first-of-type {
        width: 100%;
        padding-top: 0;
      }
      #view-attendance .attendance-heading .title,
      #view-employees .employee-lookup-content .title,
      #view-documents .documents-hero h1 {
        max-width: 100%;
        font-size: 23px;
        line-height: 1.18;
        overflow-wrap: anywhere;
      }
      #view-attendance .attendance-heading p,
      #view-documents .documents-hero p { font-size: 12px; line-height: 1.45; }
      #view-attendance .filters { margin: -26px 8px 14px; padding: 10px; }
      #view-employees .employee-lookup-content { width: 100%; padding: 18px 14px; }
      #view-employees .employee-info-search { grid-template-columns: 1fr; }

      .profile { grid-template-columns: 1fr; position: static; }
      .profile-person { min-width: 0; padding: 14px; }
      .profile-item { min-width: 0; padding: 12px 14px; }
      .profile-item strong, .profile-person strong { overflow-wrap: anywhere; }
      .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
      .metric { min-height: 104px; padding: 13px 10px; gap: 10px; }
      .metric-icon { width: 42px; height: 42px; flex: 0 0 42px; }
      .metric-icon svg { width: 22px; height: 22px; }
      .metric strong { font-size: 22px; }
      .metric small { font-size: 9px; line-height: 1.3; }

      #view-attendance .table-card { overflow: visible; background: transparent; box-shadow: none; }
      #view-attendance .table-wrap { width: 100%; overflow: visible; }
      #attendanceTable { display: block; width: 100%; min-width: 0; background: transparent; }
      #attendanceTable colgroup,
      #attendanceTable thead,
      #attendanceTable tfoot { display: none; }
      #attendanceTable tbody { display: grid; gap: 10px; padding: 0; }
      #attendanceTable tbody tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        overflow: hidden;
        border: 1px solid #d5e2ef;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 5px 14px rgba(24, 65, 108, .05);
      }
      #attendanceTable tbody td {
        display: grid;
        grid-template-columns: minmax(76px, 46%) minmax(0, 1fr);
        align-items: center;
        gap: 7px;
        min-width: 0;
        padding: 9px 10px;
        border: 0;
        border-bottom: 1px solid #edf2f7;
        color: #173858;
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: right;
      }
      #attendanceTable tbody td:nth-child(odd) { border-right: 1px solid #edf2f7; }
      #attendanceTable tbody td::before {
        content: attr(data-label);
        min-width: 0;
        color: #6b7f96;
        font-size: 10px;
        font-weight: 700;
        line-height: 1.25;
        text-align: left;
      }
      #attendanceTable tbody td.mobile-empty { display: none; }
      #attendanceTable tbody tr.sunday { border-color: #f6c8cc; background: #fff8f8; }
      #attendanceTable tbody tr.sunday td { background: transparent; }
      .table-card .footer { padding: 10px 2px 0; }
      .table-card .pager { display: none; }

      #view-employees .hr-profile-grid { padding: 8px; }
      #view-employees .hr-person-card { min-height: 0; }
      #view-employees .hr-mini-card { align-items: flex-start; }
      #view-employees .hr-value,
      #view-employees .hr-subvalue,
      #view-employees .family-table td,
      #view-employees .insurance-table td { overflow-wrap: anywhere; word-break: normal; }

      .payroll-hero { padding: 18px 14px; }
      .payroll-hero h1 { font-size: 25px; line-height: 1.2; }
      .payroll-employee-band { overflow: visible; }
      .payroll-income-grid { gap: 9px; }
      .payroll-income-card { padding: 12px; }
      .payroll-income-card small { min-height: 0; font-size: 13px; line-height: 1.5; }
      .payroll-income-card strong { font-size: 20px; }
      #view-payroll .payroll-sections {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
      }
      #view-payroll .payroll-section {
        width: 100%;
        min-width: 0;
      }
      #view-payroll .payroll-section-head {
        min-height: 72px;
        padding: 14px;
        align-items: flex-start;
      }
      #view-payroll .payroll-section-head span {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
      }
      #view-payroll .payroll-section-head h2 {
        font-size: 18px;
        line-height: 1.4;
        overflow-wrap: anywhere;
      }
      #view-payroll .payroll-section-head p {
        margin-top: 4px;
        font-size: 14px;
        line-height: 1.5;
        overflow-wrap: anywhere;
      }
      #view-payroll .payroll-table-wrap { width: 100%; overflow: visible; }
      #view-payroll .payroll-table {
        display: block;
        width: 100%;
        min-width: 0;
        table-layout: auto;
        background: #f6f9fd;
      }
      #view-payroll .payroll-table thead { display: none; }
      #view-payroll .payroll-table tbody {
        display: grid;
        gap: 10px;
        padding: 12px;
      }
      #view-payroll .payroll-table tbody tr {
        display: block;
        width: 100%;
        min-width: 0;
        overflow: hidden;
        border: 1px solid #d6e3f0;
        border-radius: 8px;
        background: #fff;
      }
      #view-payroll .payroll-table tbody td,
      #view-payroll .payroll-table tbody td:nth-child(n+2) {
        display: block;
        width: 100% !important;
        min-width: 0;
        padding: 11px 13px;
        border: 0;
        border-bottom: 1px solid #e4ebf3;
        background: #fff;
        color: #173858;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.5;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;
        text-align: left;
      }
      #view-payroll .payroll-table tbody td:last-child {
        border-bottom: 0;
        color: #083b7d;
        font-size: 17px;
      }
      #view-payroll .payroll-table tbody td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: #70839a;
        font-size: 12px;
        font-weight: 800;
        line-height: 1.35;
      }
      #view-payroll .payroll-table tbody td strong {
        display: block;
        max-width: 100%;
        font-size: inherit;
        line-height: inherit;
        white-space: normal;
        overflow-wrap: anywhere;
      }
      #view-payroll .payroll-table tbody tr:nth-child(even) td { background: #fff; }
      #view-payroll .payroll-table .payroll-no-data {
        padding: 18px 13px;
        font-size: 15px;
        text-align: center !important;
      }
      #view-payroll .payroll-table .payroll-no-data::before { display: none; }
      #view-payroll .payroll-table tfoot {
        display: block;
        padding: 0 12px 12px;
        background: #f6f9fd;
      }
      #view-payroll .payroll-table tfoot tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(112px, auto);
        align-items: center;
        overflow: hidden;
        border-radius: 8px;
        background: #083b7d;
      }
      #view-payroll .payroll-table tfoot td,
      #view-payroll .payroll-table tfoot td:nth-child(n+2) {
        min-width: 0;
        padding: 13px;
        color: #fff;
        background: transparent;
        font-size: 15px;
        line-height: 1.45;
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: left;
      }
      #view-payroll .payroll-table tfoot td:last-child {
        font-size: 17px;
        text-align: right;
      }
      #view-payroll .payroll-non-cash {
        display: table;
        margin: 5px 0 0;
        font-size: 11px;
        white-space: normal;
      }
      .payroll-summary { padding: 10px; }
      .payroll-summary-item strong { font-size: 20px; }

      .admin-page-header, .admin-toolbar, .workforce-toolbar { padding: 12px; }
      .admin-toolbar { grid-template-columns: 1fr; }
      .admin-toolbar .button { min-height: 44px; justify-content: center; }
      .admin-table-scroll { overflow: visible; }
      .admin-data-table { display: block; width: 100%; min-width: 0; background: transparent; }
      .admin-data-table thead { display: none; }
      .admin-data-table tbody { display: grid; gap: 10px; }
      .admin-data-table tbody tr {
        display: block;
        overflow: hidden;
        border: 1px solid #d5e2ef;
        border-radius: 8px;
        background: #fff;
      }
      .admin-data-table tbody td {
        display: grid;
        grid-template-columns: minmax(96px, 36%) minmax(0, 1fr);
        gap: 10px;
        width: 100%;
        max-width: none;
        padding: 9px 11px;
        border: 0;
        border-bottom: 1px solid #edf2f7;
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: left;
      }
      .admin-data-table tbody td::before {
        content: attr(data-label);
        color: #657b93;
        font-size: 10px;
        font-weight: 800;
      }
      .admin-data-table .admin-actions-cell { align-items: center; }
      .admin-data-table .admin-empty-row td { display: block; text-align: center; }
      .admin-data-table .admin-empty-row td::before { display: none; }

      .workforce-toolbar { grid-template-columns: 1fr; gap: 10px; }
      .workforce-mode-switch { grid-template-columns: repeat(3, minmax(0, 1fr)); overflow-x: auto; }
      .workforce-summary-grid, .workforce-chart-grid, .workforce-list-grid { grid-template-columns: 1fr; }
      .workforce-chart-wrap { height: 260px; }
      .workforce-table-scroll { overflow: visible; }
      .workforce-table { display: block; width: 100%; min-width: 0; background: transparent; }
      .workforce-table thead { display: none; }
      .workforce-table tbody { display: grid; gap: 9px; }
      .workforce-table tbody tr { display: block; overflow: hidden; border: 1px solid #d8e4f0; border-radius: 8px; background: #fff; }
      .workforce-table tbody td {
        display: grid;
        grid-template-columns: minmax(92px, 36%) minmax(0, 1fr);
        gap: 9px;
        width: 100%;
        padding: 9px 11px;
        border: 0;
        border-bottom: 1px solid #edf2f7;
        white-space: normal;
        overflow-wrap: anywhere;
        text-align: left;
      }
      .workforce-table tbody td::before { content: attr(data-label); color: #657b93; font-size: 10px; font-weight: 800; }
      .workforce-table .workforce-empty { display: block; text-align: center; }
      .workforce-table .workforce-empty::before { display: none; }

      input, select, textarea { font-size: 16px; }
      button, .button, .nav-item { touch-action: manipulation; }
    }

    @media (max-width: 0px) {
      .company { max-width: 36vw; }
      .cards { gap: 8px; }
      .metric { min-height: 98px; padding: 11px 8px; }
      .metric-icon { width: 38px; height: 38px; flex-basis: 38px; }
      #attendanceTable tbody tr { grid-template-columns: 1fr; }
      #attendanceTable tbody td:nth-child(odd) { border-right: 0; }
      .payroll-income-grid { grid-template-columns: 1fr; }
      #view-payroll .payroll-table tfoot tr { grid-template-columns: 1fr; }
      #view-payroll .payroll-table tfoot td:last-child {
        padding-top: 0;
        font-size: 17px;
        text-align: left;
      }
      .workforce-mode-switch { grid-template-columns: repeat(3, 108px); }
    }

    /* Text safety for the original desktop/mobile layout. */
    #view-attendance table th,
    #view-attendance table td,
    #view-employees table th,
    #view-employees table td,
    #view-payroll table th,
    #view-payroll table td,
    #view-admin-workforce table th,
    #view-admin-workforce table td {
      box-sizing: border-box;
      line-height: 1.45;
      word-break: normal;
      overflow-wrap: anywhere;
    }
    #view-employees .hr-value,
    #view-employees .hr-subvalue,
    #view-payroll .payroll-section-head h2,
    #view-payroll .payroll-section-head p,
    #view-payroll .payroll-table td strong,
    #view-admin-workforce .workforce-table td strong,
    #view-admin-workforce .workforce-table td small {
      max-width: 100%;
      white-space: normal;
      overflow-wrap: anywhere;
    }

  

    /* Banner dùng chung cho tab Bảng công và Bảng lương.
       Chỉ bổ sung phần hiển thị, không thay đổi ID, sự kiện hoặc logic JavaScript. */
    #view-attendance .attendance-heading-image {
      background-image: linear-gradient(135deg, #eef5fc 0%, #ffffff 52%, #e8f2fb 100%);
      background-repeat: no-repeat;
      background-size: cover;
      background-position: center center;
    }

    #view-payroll .payroll-hero {
      position: relative;
      isolation: isolate;
      overflow: hidden;
      min-height: clamp(190px, 18vw, 280px);
      padding: clamp(28px, 3vw, 46px) clamp(24px, 3.4vw, 54px);
      background-color: #f5faff;
      background-image:
        linear-gradient(90deg,
          rgba(247, 251, 255, .99) 0%,
          rgba(247, 251, 255, .96) 28%,
          rgba(247, 251, 255, .78) 46%,
          rgba(247, 251, 255, .18) 66%,
          rgba(247, 251, 255, 0) 78%),
        var(--payroll-image);
      background-repeat: no-repeat;
      background-size: cover, cover;
      background-position: center, center center;
    }

    #view-payroll .payroll-hero > * {
      position: relative;
      z-index: 1;
    }

    #view-payroll .payroll-hero > div:first-child {
      width: min(48%, 660px);
    }

    #view-payroll .payroll-period {
      background: rgba(255, 255, 255, .94);
      -webkit-backdrop-filter: blur(6px);
      backdrop-filter: blur(6px);
    }

    @media (max-width: 1024px) {
      #view-attendance .attendance-heading {
        min-height: 230px;
        padding: 30px 28px 66px;
      }
      #view-attendance .attendance-heading-image { background-position: 61% center; }
      #view-payroll .payroll-hero {
        min-height: 230px;
        background-position: center, 61% center;
      }
    }

    @media (max-width: 760px) {
      #view-attendance .attendance-heading {
        min-height: 250px;
        padding: 22px 18px 68px;
      }
      #view-attendance .attendance-heading-image {
        width: 100%;
        background-size: cover;
        background-position: 66% center;
        opacity: 1;
      }
      #view-attendance .attendance-heading::before {
        background: linear-gradient(90deg,
          rgba(255,255,255,.98) 0%,
          rgba(255,255,255,.94) 48%,
          rgba(255,255,255,.54) 72%,
          rgba(255,255,255,.14) 100%);
        -webkit-mask-image: none;
        mask-image: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
      }
      #view-attendance .attendance-heading > div:first-of-type { width: min(76%, 520px); }
      #view-payroll .payroll-hero {
        min-height: 260px;
        align-items: flex-start;
        flex-direction: column;
        justify-content: space-between;
        gap: 18px;
        padding: 22px 18px;
        background-image:
          linear-gradient(90deg,
            rgba(247,251,255,.99) 0%,
            rgba(247,251,255,.95) 48%,
            rgba(247,251,255,.58) 73%,
            rgba(247,251,255,.16) 100%),
          var(--payroll-image);
        background-size: cover, cover;
        background-position: center, 66% center;
      }
      #view-payroll .payroll-hero > div:first-child { width: min(78%, 520px); }
      #view-payroll .payroll-period { width: 100%; min-width: 0; }
    }

    @media (max-width: 480px) {
      #view-attendance .attendance-heading {
        min-height: 238px;
        padding: 18px 14px 64px;
      }
      #view-attendance .attendance-heading-image { background-position: 70% center; }
      #view-attendance .attendance-heading > div:first-of-type { width: 84%; }
      #view-attendance .attendance-heading .title { font-size: clamp(24px, 7vw, 30px); }
      #view-attendance .attendance-heading p { font-size: 13px; line-height: 1.5; }
      #view-payroll .payroll-hero {
        min-height: 245px;
        padding: 18px 14px;
        background-position: center, 70% center;
      }
      #view-payroll .payroll-hero > div:first-child { width: 86%; }
      #view-payroll .payroll-hero h1 { font-size: clamp(23px, 7vw, 28px); }
      #view-payroll .payroll-hero p { font-size: 13px; line-height: 1.5; }
    }

    .default-light-banner {
      position: relative;
      overflow: hidden;
      background:
        radial-gradient(circle at 82% 25%, rgba(25, 115, 210, .11), transparent 29%),
        radial-gradient(circle at 92% 78%, rgba(14, 155, 115, .08), transparent 24%),
        linear-gradient(135deg, #f0f6fc 0%, #ffffff 52%, #e9f3fb 100%) !important;
    }
    .default-light-banner::after {
      content: "";
      position: absolute;
      right: 4%;
      bottom: 12%;
      width: 210px;
      height: 80px;
      opacity: .28;
      pointer-events: none;
      background:
        linear-gradient(90deg,
          transparent 0 9%, #a8cae8 9% 16%,
          transparent 16% 25%, #8db9df 25% 34%,
          transparent 34% 44%, #73a8d4 44% 55%,
          transparent 55% 67%, #5797c9 67% 80%,
          transparent 80% 88%, #367fb8 88% 100%);
      clip-path: polygon(0 100%, 0 80%, 15% 80%, 15% 62%, 31% 62%, 31% 45%, 48% 45%, 48% 28%, 65% 28%, 65% 12%, 82% 12%, 82% 0, 100% 0, 100% 100%);
    }

  
    /* -----------------------------------------------------------------
       Đồng bộ toàn bộ banner/tab theo khung mượt như tab Toàn bộ nhân viên
       - Áp dụng cho tài khoản người dùng và admin
       - Không thay đổi cấu trúc HTML hay logic JavaScript
    ----------------------------------------------------------------- */
    #view-attendance .attendance-heading,
    #view-employees .employee-lookup-hero,
    #view-documents .documents-hero,
    #view-feedback .feedback-hero,
    #view-payroll .payroll-hero,
    #view-admin-workforce .admin-page-header,
    #view-admin-employees .admin-page-header,
    #view-admin-accounts .admin-page-header,
    #view-admin-feedback .admin-page-header {
      position: relative;
      overflow: hidden;
      border: 1px solid #d8e5f3 !important;
      border-radius: 24px !important;
      background:
        radial-gradient(circle at 84% 20%, rgba(21, 118, 218, .11), transparent 25%),
        radial-gradient(circle at 93% 82%, rgba(16, 170, 126, .08), transparent 22%),
        linear-gradient(135deg, #f4f8fc 0%, #ffffff 46%, #edf5fc 100%) !important;
      box-shadow:
        0 14px 34px rgba(18, 59, 104, .08),
        inset 0 -4px 0 #18a39a;
      isolation: isolate;
    }

    #view-attendance .attendance-heading::after,
    #view-employees .employee-lookup-hero::after,
    #view-documents .documents-hero::after,
    #view-feedback .feedback-hero::after,
    #view-payroll .payroll-hero::after,
    #view-admin-workforce .admin-page-header::after,
    #view-admin-employees .admin-page-header::after,
    #view-admin-accounts .admin-page-header::after,
    #view-admin-feedback .admin-page-header::after {
      content: "";
      position: absolute;
      right: 3%;
      bottom: 10%;
      width: 220px;
      height: 84px;
      opacity: .24;
      pointer-events: none;
      background:
        linear-gradient(90deg,
          transparent 0 9%, #a9cbea 9% 16%,
          transparent 16% 24%, #90badf 24% 33%,
          transparent 33% 43%, #75a8d4 43% 54%,
          transparent 54% 66%, #5c97ca 66% 78%,
          transparent 78% 87%, #397fba 87% 100%);
      clip-path: polygon(0 100%, 0 82%, 13% 82%, 13% 66%, 26% 66%, 26% 51%, 39% 51%, 39% 36%, 53% 36%, 53% 21%, 68% 21%, 68% 10%, 83% 10%, 83% 0, 100% 0, 100% 100%);
      z-index: 0;
    }

    #view-attendance .attendance-heading > *,
    #view-employees .employee-lookup-hero > *,
    #view-documents .documents-hero > *,
    #view-feedback .feedback-hero > *,
    #view-payroll .payroll-hero > *,
    #view-admin-workforce .admin-page-header > *,
    #view-admin-employees .admin-page-header > *,
    #view-admin-accounts .admin-page-header > *,
    #view-admin-feedback .admin-page-header > * {
      position: relative;
      z-index: 1;
    }

    #view-attendance .attendance-heading-image,
    #view-employees .employee-lookup-image,
    #view-documents .documents-hero-image {
      border-radius: inherit;
      opacity: .34 !important;
      background-size: cover;
      background-position: center center;
      mix-blend-mode: normal;
    }

    #view-attendance .attendance-heading::before,
    #view-employees .employee-lookup-hero::before,
    #view-documents .documents-hero::before {
      border-radius: inherit;
    }

    #view-attendance .attendance-heading {
      min-height: 220px !important;
      padding: 30px 30px 34px !important;
      gap: 22px;
      align-items: flex-start;
    }

    #view-employees .employee-lookup-hero {
      min-height: 220px !important;
      margin-bottom: 20px;
    }

    #view-employees .employee-lookup-content,
    #view-documents .documents-hero-copy {
      width: min(64%, 760px);
      padding: 30px 32px 34px;
    }

    #view-documents .documents-hero {
      min-height: 220px !important;
      align-items: flex-start;
    }

    #view-documents .documents-hero-copy .title,
    #view-feedback .feedback-hero-copy h1,
    #view-attendance .attendance-heading .title,
    #view-payroll .payroll-hero h1,
    .admin-page-header h1 {
      color: #0a3168 !important;
      letter-spacing: -.3px;
    }

    #view-documents .documents-hero-copy p,
    #view-feedback .feedback-hero-copy p,
    #view-attendance .attendance-heading p,
    #view-payroll .payroll-hero p,
    .admin-page-header p {
      color: #60748d !important;
    }

    #view-feedback .feedback-hero {
      min-height: 220px !important;
      padding: 30px 32px !important;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 20px;
    }

    #view-feedback .feedback-eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 9px 12px;
      border: 1px solid #d8e6f3;
      border-radius: 999px;
      color: #0b6dcb !important;
      background: rgba(255,255,255,.78);
      font-weight: 800;
      backdrop-filter: blur(6px);
    }

    #view-feedback .feedback-hero-icon {
      width: 112px;
      height: 112px;
      border-radius: 28px;
      border: 1px solid #d8e5f3;
      background: rgba(255,255,255,.84);
      box-shadow: 0 10px 22px rgba(22, 72, 128, .08);
    }
    #view-feedback .feedback-hero-icon svg { width: 52px; height: 52px; color: #0a71cf; }

    #view-payroll .payroll-hero {
      min-height: 220px !important;
      padding: 30px 32px !important;
      background-image:
        linear-gradient(90deg,
          rgba(255,255,255,.95) 0%,
          rgba(255,255,255,.92) 36%,
          rgba(255,255,255,.72) 56%,
          rgba(255,255,255,.18) 76%,
          rgba(255,255,255,0) 100%) !important;
      background-size: cover !important;
      background-position: center center !important;
    }

    #view-admin-workforce .admin-page-header,
    #view-admin-employees .admin-page-header,
    #view-admin-accounts .admin-page-header,
    #view-admin-feedback .admin-page-header {
      min-height: 188px;
      padding: 28px 30px;
      align-items: center;
    }

    .admin-eyebrow,
    .payroll-eyebrow,
    .attendance-eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 12px;
      padding: 8px 12px;
      border: 1px solid #dce8f4;
      border-radius: 999px;
      background: rgba(255,255,255,.82);
      box-shadow: 0 6px 16px rgba(16, 58, 102, .05);
      color: #0c69c4 !important;
      font-size: 12px !important;
      font-weight: 900 !important;
      letter-spacing: .2px;
      width: fit-content;
      max-width: 100%;
    }

    #view-documents .documents-hero-accent {
      width: 92px;
      height: 4px;
      margin-top: 18px;
      border-radius: 999px;
      background: linear-gradient(90deg, #0d77d8 0%, #18a39a 100%);
      opacity: 1;
    }

    #view-attendance .attendance-period,
    #view-payroll .payroll-period {
      border: 1px solid #d9e6f3;
      border-radius: 18px !important;
      background: rgba(255,255,255,.86) !important;
      box-shadow: 0 10px 22px rgba(21, 69, 121, .07);
      backdrop-filter: blur(8px);
    }

    #view-payroll .payroll-period {
      min-width: 222px;
    }

    .admin-header-icon {
      width: 88px;
      height: 88px;
      flex: 0 0 88px;
      border-radius: 24px !important;
      border: 1px solid rgba(11, 113, 207, .08);
      box-shadow: 0 12px 24px rgba(16, 68, 121, .08);
      background: rgba(255,255,255,.9) !important;
    }

    .admin-header-icon svg { width: 40px; height: 40px; }

    #view-admin-workforce .workforce-toolbar,
    #view-admin-employees .admin-toolbar,
    #view-admin-accounts .admin-toolbar,
    #view-admin-feedback .admin-toolbar {
      margin-top: 16px;
      border-radius: 18px;
    }

    @media (max-width: 1024px) {
      #view-attendance .attendance-heading,
      #view-documents .documents-hero,
      #view-payroll .payroll-hero,
      #view-feedback .feedback-hero,
      #view-admin-workforce .admin-page-header,
      #view-admin-employees .admin-page-header,
      #view-admin-accounts .admin-page-header,
      #view-admin-feedback .admin-page-header {
        border-radius: 22px !important;
      }

      #view-employees .employee-lookup-content,
      #view-documents .documents-hero-copy {
        width: min(74%, 700px);
      }
    }

    @media (max-width: 760px) {
      #view-attendance .attendance-heading,
      #view-employees .employee-lookup-hero,
      #view-documents .documents-hero,
      #view-feedback .feedback-hero,
      #view-payroll .payroll-hero,
      #view-admin-workforce .admin-page-header,
      #view-admin-employees .admin-page-header,
      #view-admin-accounts .admin-page-header,
      #view-admin-feedback .admin-page-header {
        border-radius: 20px !important;
      }

      #view-attendance .attendance-heading,
      #view-documents .documents-hero,
      #view-feedback .feedback-hero,
      #view-payroll .payroll-hero,
      #view-admin-workforce .admin-page-header,
      #view-admin-employees .admin-page-header,
      #view-admin-accounts .admin-page-header,
      #view-admin-feedback .admin-page-header {
        min-height: 0 !important;
        padding: 22px 18px !important;
      }

      #view-employees .employee-lookup-content,
      #view-documents .documents-hero-copy {
        width: 100%;
        padding: 24px 18px 30px;
      }

      #view-attendance .attendance-heading > div:first-of-type,
      #view-payroll .payroll-hero > div:first-child {
        width: 100% !important;
      }

      #view-feedback .feedback-hero {
        grid-template-columns: 1fr;
      }

      #view-feedback .feedback-hero-visual,
      .admin-header-icon {
        display: none !important;
      }

      #view-payroll .payroll-period,
      #view-attendance .attendance-period {
        width: 100%;
        min-width: 0;
      }

      #view-attendance .attendance-heading::after,
      #view-employees .employee-lookup-hero::after,
      #view-documents .documents-hero::after,
      #view-feedback .feedback-hero::after,
      #view-payroll .payroll-hero::after,
      #view-admin-workforce .admin-page-header::after,
      #view-admin-employees .admin-page-header::after,
      #view-admin-accounts .admin-page-header::after,
      #view-admin-feedback .admin-page-header::after {
        width: 160px;
        height: 64px;
        right: 2%;
        bottom: 8%;
      }
    }

    @media (max-width: 480px) {
      #view-attendance .attendance-heading,
      #view-employees .employee-lookup-hero,
      #view-documents .documents-hero,
      #view-feedback .feedback-hero,
      #view-payroll .payroll-hero,
      #view-admin-workforce .admin-page-header,
      #view-admin-employees .admin-page-header,
      #view-admin-accounts .admin-page-header,
      #view-admin-feedback .admin-page-header {
        border-radius: 18px !important;
      }

      .admin-eyebrow,
      .payroll-eyebrow,
      .attendance-eyebrow,
      #view-feedback .feedback-eyebrow {
        font-size: 11px !important;
        padding: 7px 10px;
      }

      #view-attendance .attendance-heading .title,
      #view-documents .documents-hero-copy .title,
      #view-feedback .feedback-hero-copy h1,
      #view-payroll .payroll-hero h1,
      .admin-page-header h1 {
        font-size: clamp(24px, 7vw, 30px) !important;
      }
    }

  
    /* ================================================================
       ANYONE VINA HR PORTAL — UNIFIED UI UPGRADE
       Đồng bộ sidebar, topbar, banner, card và trạng thái tương tác.
       Chỉ thay đổi giao diện; không thay đổi ID, sự kiện hoặc logic.
    ================================================================= */

    :root {
      --portal-navy: #082f66;
      --portal-navy-deep: #062755;
      --portal-blue: #1676d2;
      --portal-blue-soft: #eaf4ff;
      --portal-teal: #16a39a;
      --portal-teal-soft: #e8f8f6;
      --portal-border: #d8e5f3;
      --portal-surface: #ffffff;
      --portal-page: #f4f7fb;
      --portal-shadow: 0 12px 30px rgba(17, 55, 96, .08);
      --portal-radius: 18px;
      --portal-radius-lg: 24px;
    }

    body {
      background:
        radial-gradient(circle at 84% 4%, rgba(30, 125, 220, .055), transparent 23%),
        linear-gradient(180deg, #f5f8fc 0%, #f1f5fa 100%);
    }

    /* SIDEBAR */
    .sidebar {
      border-right: 1px solid rgba(255,255,255,.08);
      background:
        radial-gradient(circle at 25% 8%, rgba(28, 123, 221, .20), transparent 25%),
        linear-gradient(180deg, #0a356f 0%, #082d61 48%, #062653 100%);
      box-shadow: 12px 0 30px rgba(5, 31, 70, .12);
    }

    .brand {
      position: relative;
      display: flex;
      align-items: center;
      gap: 8px;
      margin: 4px 10px 18px;
      padding: 16px 15px;
      border: 1px solid rgba(255,255,255,.11);
      border-radius: 18px;
      background: rgba(255,255,255,.06);
      box-shadow: inset 0 1px rgba(255,255,255,.06);
      backdrop-filter: blur(8px);
    }

    .brand span {
      color: #fff;
      font-size: 18px;
      font-weight: 900;
      letter-spacing: 1.5px;
    }

    .brand-dot {
      width: 9px;
      height: 9px;
      border: 2px solid rgba(255,255,255,.75);
      border-radius: 50%;
      background: var(--portal-teal);
      box-shadow: 0 0 0 4px rgba(22,163,154,.17);
    }

    .nav {
      display: flex;
      flex-direction: column;
      gap: 6px;
      padding: 0 10px 16px;
    }

    .nav-item {
      position: relative;
      min-height: 48px;
      gap: 12px;
      padding: 11px 14px;
      overflow: hidden;
      border: 1px solid transparent;
      border-radius: 14px;
      color: #dbe9fb;
      background: transparent;
      font-weight: 700;
      transition:
        color .18s ease,
        background .18s ease,
        border-color .18s ease,
        transform .18s ease,
        box-shadow .18s ease;
    }

    .nav-item::before {
      content: "";
      position: absolute;
      top: 9px;
      bottom: 9px;
      left: 0;
      width: 3px;
      border-radius: 0 4px 4px 0;
      background: transparent;
      transition: background .18s ease;
    }

    .nav-item svg {
      width: 21px;
      height: 21px;
      flex: 0 0 21px;
      color: #cce2fb;
      stroke-width: 2;
      transition: color .18s ease, transform .18s ease;
    }

    .nav-item:hover {
      color: #fff;
      border-color: rgba(255,255,255,.08);
      background: rgba(255,255,255,.075);
      transform: translateX(2px);
    }

    .nav-item:hover svg {
      color: #fff;
      transform: scale(1.06);
    }

    .nav-item.active {
      color: #fff;
      border-color: rgba(255,255,255,.18);
      background:
        linear-gradient(135deg, rgba(31,126,229,.98) 0%, rgba(21,111,209,.98) 72%, rgba(18,157,171,.95) 145%);
      box-shadow:
        0 10px 22px rgba(1, 24, 59, .24),
        inset 0 1px rgba(255,255,255,.16);
      transform: translateX(0);
    }

    .nav-item.active::before { background: #67e1d5; }

    .nav-item.active svg {
      color: #fff;
      filter: drop-shadow(0 2px 4px rgba(0,0,0,.12));
    }

    .nav-label {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    /* TOPBAR */
    .topbar {
      min-height: 70px;
      border-bottom: 1px solid var(--portal-border);
      background: rgba(255,255,255,.88);
      box-shadow: 0 6px 20px rgba(18, 55, 96, .045);
      backdrop-filter: blur(14px);
    }

    .account {
      border: 1px solid var(--portal-border);
      border-radius: 15px;
      background: #fff;
      box-shadow: 0 7px 18px rgba(20, 61, 105, .06);
    }

    /* PAGE LAYOUT */
    .content {
      background: transparent;
    }

    .view {
      animation: portalViewIn .24s ease both;
    }

    @keyframes portalViewIn {
      from { opacity: 0; transform: translateY(5px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* Banner thống nhất */
    #view-attendance .attendance-heading,
    #view-employees .employee-lookup-hero,
    #view-documents .documents-hero,
    #view-feedback .feedback-hero,
    #view-payroll .payroll-hero,
    #view-admin-workforce .admin-page-header,
    #view-admin-employees .admin-page-header,
    #view-admin-accounts .admin-page-header,
    #view-admin-feedback .admin-page-header {
      border-color: var(--portal-border) !important;
      box-shadow:
        0 16px 38px rgba(17, 59, 104, .085),
        inset 0 -4px 0 var(--portal-teal);
    }

    /* Các toolbar dưới banner */
    .filters,
    .attendance-internal-controls,
    .employee-info-search,
    .payroll-admin-search,
    .workforce-toolbar,
    .admin-toolbar {
      border: 1px solid var(--portal-border);
      border-radius: 18px;
      background: rgba(255,255,255,.94);
      box-shadow: 0 10px 25px rgba(18, 58, 101, .055);
    }

    /* Cards, panels, table shells */
    .panel,
    .metric,
    .workforce-panel,
    .workforce-kpi,
    .feedback-panel,
    .feedback-receipt,
    .document-link,
    .payroll-section,
    .payroll-income-card,
    .payroll-summary-item,
    .admin-result-bar,
    .admin-table-shell,
    .profile,
    .payroll-employee-band {
      border-color: var(--portal-border) !important;
      border-radius: var(--portal-radius) !important;
      box-shadow: 0 9px 24px rgba(18, 58, 101, .055);
    }

    .metric,
    .workforce-kpi,
    .payroll-income-card,
    .payroll-summary-item,
    .document-link {
      transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
    }

    .metric:hover,
    .workforce-kpi:hover,
    .payroll-income-card:hover,
    .payroll-summary-item:hover,
    .document-link:hover {
      transform: translateY(-2px);
      border-color: #bdd5ed !important;
      box-shadow: 0 14px 29px rgba(18, 58, 101, .09);
    }

    /* Buttons */
    .button {
      min-height: 42px;
      border-radius: 12px;
      font-weight: 800;
      transition:
        transform .16s ease,
        box-shadow .16s ease,
        border-color .16s ease,
        background .16s ease;
    }

    .button:hover {
      transform: translateY(-1px);
      box-shadow: 0 8px 18px rgba(18, 86, 155, .12);
    }

    .button.primary {
      border-color: #1676d2;
      background: linear-gradient(135deg, #1d7fe2 0%, #146fce 65%, #149aab 140%);
      box-shadow: 0 8px 18px rgba(15, 106, 205, .18);
    }

    .button.primary:hover {
      box-shadow: 0 11px 22px rgba(15, 106, 205, .24);
    }

    /* Inputs */
    input,
    select,
    textarea,
    .input {
      border-radius: 11px !important;
      border-color: #cfdeee !important;
      transition: border-color .16s ease, box-shadow .16s ease;
    }

    input:focus,
    select:focus,
    textarea:focus,
    .input:focus {
      border-color: #4b98df !important;
      box-shadow: 0 0 0 3px rgba(31,126,229,.11) !important;
      outline: none;
    }

    /* Table */
    table {
      border-collapse: separate;
      border-spacing: 0;
    }

    table thead th:first-child { border-top-left-radius: 10px; }
    table thead th:last-child { border-top-right-radius: 10px; }

    .table-wrap,
    .workforce-list-shell,
    .payroll-table-wrap,
    .admin-table-scroll {
      scrollbar-color: #8aa7c4 #eef3f8;
      scrollbar-width: thin;
    }

    .workforce-table tbody tr,
    .admin-data-table tbody tr,
    .payroll-table tbody tr,
    #attendanceTable tbody tr {
      transition: background-color .14s ease;
    }

    /* KPI icon polish */
    .metric-icon,
    .payroll-section-head > span,
    .feedback-panel-head-icon,
    .document-link-icon {
      border-radius: 14px !important;
      box-shadow: inset 0 0 0 1px rgba(21, 91, 158, .06);
    }

    /* Admin page result and toolbar */
    .admin-result-bar {
      margin-top: 14px;
      background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
    }

    /* Mobile sidebar/menu polish */
    @media (max-width: 900px) {
      .sidebar {
        box-shadow: none;
      }

      .brand {
        margin: 4px 6px 10px;
        padding: 12px;
        border-radius: 15px;
      }

      .nav {
        gap: 5px;
        padding-inline: 7px;
      }

      .nav-item {
        min-height: 45px;
        padding: 10px 12px;
        border-radius: 12px;
      }
    }

    @media (max-width: 760px) {
      .panel,
      .metric,
      .workforce-panel,
      .workforce-kpi,
      .feedback-panel,
      .document-link,
      .payroll-section,
      .payroll-income-card,
      .payroll-summary-item,
      .admin-result-bar,
      .admin-table-shell,
      .profile,
      .payroll-employee-band {
        border-radius: 15px !important;
      }

      .filters,
      .attendance-internal-controls,
      .employee-info-search,
      .payroll-admin-search,
      .workforce-toolbar,
      .admin-toolbar {
        border-radius: 15px;
      }

      .button { border-radius: 11px; }
    }

  
    /* ================================================================
       UNIFORM TAB BANNERS — FIX BẢNG CÔNG + ĐỒNG BỘ KÍCH THƯỚC
    ================================================================= */
    :root {
      --portal-banner-height: 220px;
      --portal-banner-radius: 22px;
      --portal-banner-padding-y: 30px;
      --portal-banner-padding-x: 32px;
    }

    #view-attendance .attendance-heading,
    #view-employees .employee-lookup-hero,
    #view-documents .documents-hero,
    #view-feedback .feedback-hero,
    #view-payroll .payroll-hero,
    #view-admin-workforce .admin-page-header,
    #view-admin-employees .admin-page-header,
    #view-admin-accounts .admin-page-header,
    #view-admin-feedback .admin-page-header {
      box-sizing: border-box;
      width: 100%;
      min-height: var(--portal-banner-height) !important;
      height: var(--portal-banner-height);
      padding: var(--portal-banner-padding-y) var(--portal-banner-padding-x) !important;
      border-radius: var(--portal-banner-radius) !important;
      align-items: center;
    }

    #view-attendance .attendance-heading {
      display: flex;
      justify-content: space-between;
      gap: 24px;
      background:
        radial-gradient(circle at 84% 20%, rgba(21,118,218,.10), transparent 25%),
        radial-gradient(circle at 94% 82%, rgba(16,170,126,.08), transparent 22%),
        linear-gradient(135deg, #f4f8fc 0%, #fff 46%, #edf5fc 100%) !important;
      background-image: none !important;
    }

    #view-attendance .attendance-heading-image {
      display: none !important;
      background: none !important;
      background-image: none !important;
    }

    #view-attendance .attendance-heading::before {
      content: none !important;
      display: none !important;
      background: none !important;
      -webkit-mask-image: none !important;
      mask-image: none !important;
      -webkit-backdrop-filter: none !important;
      backdrop-filter: none !important;
    }

    #view-attendance .attendance-heading > div:first-of-type {
      width: min(66%, 760px) !important;
      margin: 0;
      padding: 0 !important;
    }

    #view-attendance .attendance-heading .attendance-period {
      position: relative !important;
      top: auto !important;
      right: auto !important;
      flex: 0 0 auto;
      width: min(330px, 34%);
      margin: 0;
    }

    #view-employees .employee-lookup-content,
    #view-documents .documents-hero-copy {
      box-sizing: border-box;
      width: min(66%, 760px);
      padding: 0 !important;
    }

    #view-feedback .feedback-hero-copy,
    #view-payroll .payroll-hero > div:first-child,
    #view-admin-workforce .admin-page-header > div:first-child,
    #view-admin-employees .admin-page-header > div:first-child,
    #view-admin-accounts .admin-page-header > div:first-child,
    #view-admin-feedback .admin-page-header > div:first-child {
      width: min(66%, 760px) !important;
    }

    #view-payroll .payroll-hero {
      background:
        radial-gradient(circle at 84% 20%, rgba(21,118,218,.10), transparent 25%),
        radial-gradient(circle at 94% 82%, rgba(16,170,126,.08), transparent 22%),
        linear-gradient(135deg, #f4f8fc 0%, #fff 46%, #edf5fc 100%) !important;
      background-image: none !important;
    }

    .admin-header-icon,
    #view-feedback .feedback-hero-visual,
    #view-payroll .payroll-period {
      align-self: center;
    }

    #view-attendance .attendance-heading .title,
    #view-payroll .payroll-hero h1,
    #view-documents .documents-hero .title,
    #view-feedback .feedback-hero h1,
    .admin-page-header h1 {
      margin-top: 0;
      margin-bottom: 8px;
      line-height: 1.16;
    }

    @media (max-width: 1024px) {
      :root {
        --portal-banner-height: 210px;
        --portal-banner-padding-y: 26px;
        --portal-banner-padding-x: 26px;
      }

      #view-attendance .attendance-heading > div:first-of-type,
      #view-employees .employee-lookup-content,
      #view-documents .documents-hero-copy,
      #view-feedback .feedback-hero-copy,
      #view-payroll .payroll-hero > div:first-child,
      #view-admin-workforce .admin-page-header > div:first-child,
      #view-admin-employees .admin-page-header > div:first-child,
      #view-admin-accounts .admin-page-header > div:first-child,
      #view-admin-feedback .admin-page-header > div:first-child {
        width: min(68%, 700px) !important;
      }

      #view-attendance .attendance-heading .attendance-period {
        width: min(310px, 36%);
      }
    }

    @media (max-width: 760px) {
      :root {
        --portal-banner-height: auto;
        --portal-banner-radius: 18px;
        --portal-banner-padding-y: 22px;
        --portal-banner-padding-x: 18px;
      }

      #view-attendance .attendance-heading,
      #view-employees .employee-lookup-hero,
      #view-documents .documents-hero,
      #view-feedback .feedback-hero,
      #view-payroll .payroll-hero,
      #view-admin-workforce .admin-page-header,
      #view-admin-employees .admin-page-header,
      #view-admin-accounts .admin-page-header,
      #view-admin-feedback .admin-page-header {
        height: auto;
        min-height: 190px !important;
        align-items: flex-start;
      }

      #view-attendance .attendance-heading,
      #view-payroll .payroll-hero,
      #view-feedback .feedback-hero,
      #view-admin-workforce .admin-page-header,
      #view-admin-employees .admin-page-header,
      #view-admin-accounts .admin-page-header,
      #view-admin-feedback .admin-page-header {
        flex-direction: column;
      }

      #view-attendance .attendance-heading > div:first-of-type,
      #view-employees .employee-lookup-content,
      #view-documents .documents-hero-copy,
      #view-feedback .feedback-hero-copy,
      #view-payroll .payroll-hero > div:first-child,
      #view-admin-workforce .admin-page-header > div:first-child,
      #view-admin-employees .admin-page-header > div:first-child,
      #view-admin-accounts .admin-page-header > div:first-child,
      #view-admin-feedback .admin-page-header > div:first-child {
        width: 100% !important;
      }

      #view-attendance .attendance-heading .attendance-period,
      #view-payroll .payroll-period {
        width: 100%;
        max-width: none;
      }
    }

    @media (max-width: 480px) {
      #view-attendance .attendance-heading,
      #view-employees .employee-lookup-hero,
      #view-documents .documents-hero,
      #view-feedback .feedback-hero,
      #view-payroll .payroll-hero,
      #view-admin-workforce .admin-page-header,
      #view-admin-employees .admin-page-header,
      #view-admin-accounts .admin-page-header,
      #view-admin-feedback .admin-page-header {
        min-height: 176px !important;
      }
    }

  
    /* ================================================================
       PAYROLL-STYLE UNIFIED BANNERS
       - Bỏ ảnh banner ở tab Thông tin nhân viên & Giấy tờ liên quan
       - Chỉnh lại banner Bảng công
       - Đồng bộ banner mọi tab người dùng/admin theo style Bảng lương
    ================================================================= */
    :root {
      --unified-banner-bg:
        radial-gradient(circle at 84% 20%, rgba(21, 118, 218, .10), transparent 25%),
        radial-gradient(circle at 94% 82%, rgba(16, 170, 126, .08), transparent 22%),
        linear-gradient(135deg, #f4f8fc 0%, #ffffff 46%, #edf5fc 100%);
      --unified-banner-border: #d8e5f3;
      --unified-banner-shadow:
        0 16px 38px rgba(17, 59, 104, .085),
        inset 0 -4px 0 #18a39a;
      --unified-banner-radius: 22px;
      --unified-banner-min-height: 220px;
      --unified-banner-padding: 30px 32px;
    }

    #view-attendance .attendance-heading,
    #view-employees .employee-lookup-hero,
    #view-documents .documents-hero,
    #view-feedback .feedback-hero,
    #view-payroll .payroll-hero,
    #view-admin-workforce .admin-page-header,
    #view-admin-employees .admin-page-header,
    #view-admin-accounts .admin-page-header,
    #view-admin-feedback .admin-page-header {
      position: relative;
      overflow: hidden;
      min-height: var(--unified-banner-min-height) !important;
      padding: var(--unified-banner-padding) !important;
      border: 1px solid var(--unified-banner-border) !important;
      border-radius: var(--unified-banner-radius) !important;
      background: var(--unified-banner-bg) !important;
      box-shadow: var(--unified-banner-shadow) !important;
      box-sizing: border-box;
      isolation: isolate;
    }

    #view-attendance .attendance-heading::before,
    #view-employees .employee-lookup-hero::before,
    #view-documents .documents-hero::before {
      content: none !important;
      display: none !important;
      background: none !important;
      -webkit-mask-image: none !important;
      mask-image: none !important;
      -webkit-backdrop-filter: none !important;
      backdrop-filter: none !important;
    }

    #view-attendance .attendance-heading::after,
    #view-employees .employee-lookup-hero::after,
    #view-documents .documents-hero::after,
    #view-feedback .feedback-hero::after,
    #view-payroll .payroll-hero::after,
    #view-admin-workforce .admin-page-header::after,
    #view-admin-employees .admin-page-header::after,
    #view-admin-accounts .admin-page-header::after,
    #view-admin-feedback .admin-page-header::after {
      content: "";
      position: absolute;
      right: 3%;
      bottom: 10%;
      width: 220px;
      height: 84px;
      opacity: .24;
      pointer-events: none;
      z-index: 0;
      background:
        linear-gradient(90deg,
          transparent 0 9%, #a9cbea 9% 16%,
          transparent 16% 24%, #90badf 24% 33%,
          transparent 33% 43%, #75a8d4 43% 54%,
          transparent 54% 66%, #5c97ca 66% 78%,
          transparent 78% 87%, #397fba 87% 100%);
      clip-path: polygon(0 100%, 0 82%, 13% 82%, 13% 66%, 26% 66%, 26% 51%, 39% 51%, 39% 36%, 53% 36%, 53% 21%, 68% 21%, 68% 10%, 83% 10%, 83% 0, 100% 0, 100% 100%);
    }

    #view-attendance .attendance-heading > *,
    #view-employees .employee-lookup-hero > *,
    #view-documents .documents-hero > *,
    #view-feedback .feedback-hero > *,
    #view-payroll .payroll-hero > *,
    #view-admin-workforce .admin-page-header > *,
    #view-admin-employees .admin-page-header > *,
    #view-admin-accounts .admin-page-header > *,
    #view-admin-feedback .admin-page-header > * {
      position: relative;
      z-index: 1;
    }

    /* Bỏ toàn bộ ảnh banner của tab Thông tin nhân viên và Giấy tờ liên quan */
    #view-employees .employee-lookup-image,
    #view-documents .documents-hero-image,
    #view-attendance .attendance-heading-image {
      display: none !important;
      width: 0 !important;
      opacity: 0 !important;
      background: none !important;
      background-image: none !important;
    }

    /* Bảng công chỉnh về đúng style như Bảng lương */
    #view-attendance .attendance-heading {
      display: flex !important;
      align-items: flex-start !important;
      justify-content: space-between !important;
      gap: 24px;
      border-left: 1px solid var(--unified-banner-border) !important;
    }

    #view-attendance .attendance-heading > div:first-of-type {
      width: auto !important;
      max-width: 760px !important;
      flex: 1 1 auto;
      padding: 0 !important;
      margin: 0 !important;
    }

    #view-attendance .attendance-heading .attendance-period {
      position: relative !important;
      top: auto !important;
      right: auto !important;
      width: min(320px, 34%) !important;
      min-width: 280px;
      margin: 0 !important;
      align-self: flex-start !important;
      border: 1px solid #d9e6f3 !important;
      border-radius: 18px !important;
      background: rgba(255,255,255,.90) !important;
      box-shadow: 0 10px 22px rgba(21, 69, 121, .07) !important;
      backdrop-filter: blur(8px);
    }

    /* Thông tin nhân viên & Giấy tờ liên quan: bỏ khung banner ảnh, dùng header dạng payroll */
    #view-employees .employee-lookup-hero,
    #view-documents .documents-hero {
      display: block !important;
      margin-bottom: 18px;
    }

    #view-employees .employee-lookup-content,
    #view-documents .documents-hero-copy {
      width: 100% !important;
      max-width: 860px !important;
      padding: 0 !important;
    }

    #view-documents .documents-hero-accent {
      width: 92px;
      height: 4px;
      margin-top: 18px;
      border-radius: 999px;
      background: linear-gradient(90deg, #0d77d8 0%, #18a39a 100%);
      opacity: 1 !important;
    }

    /* Bảng lương giữ làm chuẩn */
    #view-payroll .payroll-hero {
      display: flex !important;
      align-items: flex-start !important;
      justify-content: space-between !important;
      gap: 24px;
      background-image: none !important;
    }

    #view-payroll .payroll-hero > div:first-child {
      width: auto !important;
      max-width: 760px !important;
      flex: 1 1 auto;
    }

    #view-payroll .payroll-period {
      min-width: 220px;
      align-self: flex-start !important;
      border: 1px solid #d9e6f3 !important;
      border-radius: 18px !important;
      background: rgba(255,255,255,.90) !important;
      box-shadow: 0 10px 22px rgba(21, 69, 121, .07) !important;
      backdrop-filter: blur(8px);
    }

    /* Feedback & Admin cũng về cùng hệ khung */
    #view-feedback .feedback-hero {
      display: grid !important;
      grid-template-columns: minmax(0, 1fr) auto !important;
      gap: 22px;
      align-items: start !important;
      color: inherit !important;
    }

    #view-feedback .feedback-hero-copy {
      max-width: 760px;
    }

    #view-feedback .feedback-hero-icon {
      width: 112px !important;
      height: 112px !important;
      border-radius: 28px !important;
      border: 1px solid #d8e5f3 !important;
      background: rgba(255,255,255,.84) !important;
      box-shadow: 0 10px 22px rgba(22, 72, 128, .08);
    }

    #view-feedback .feedback-hero-icon svg {
      width: 52px !important;
      height: 52px !important;
      color: #0a71cf !important;
    }

    #view-admin-workforce .admin-page-header,
    #view-admin-employees .admin-page-header,
    #view-admin-accounts .admin-page-header,
    #view-admin-feedback .admin-page-header {
      display: flex !important;
      align-items: flex-start !important;
      justify-content: space-between !important;
      gap: 24px;
      border-bottom: 1px solid var(--unified-banner-border) !important;
    }

    #view-admin-workforce .admin-page-header > div:first-child,
    #view-admin-employees .admin-page-header > div:first-child,
    #view-admin-accounts .admin-page-header > div:first-child,
    #view-admin-feedback .admin-page-header > div:first-child {
      width: auto !important;
      max-width: 760px !important;
      flex: 1 1 auto;
    }

    .admin-header-icon {
      width: 88px !important;
      height: 88px !important;
      flex: 0 0 88px !important;
      align-self: flex-start !important;
      border-radius: 24px !important;
      border: 1px solid rgba(11,113,207,.08) !important;
      box-shadow: 0 12px 24px rgba(16, 68, 121, .08) !important;
      background: rgba(255,255,255,.90) !important;
    }

    .admin-header-icon svg { width: 40px !important; height: 40px !important; }

    /* Typography đồng bộ theo banner Bảng lương */
    #view-attendance .attendance-heading .title,
    #view-employees .employee-lookup-content .title,
    #view-documents .documents-hero-copy .title,
    #view-feedback .feedback-hero-copy h1,
    #view-payroll .payroll-hero h1,
    .admin-page-header h1 {
      margin: 9px 0 7px !important;
      color: #082e65 !important;
      font-size: 34px !important;
      line-height: 1.14 !important;
      letter-spacing: -.2px;
    }

    #view-attendance .attendance-heading p,
    #view-documents .documents-hero-copy p,
    #view-feedback .feedback-hero-copy p,
    #view-payroll .payroll-hero p,
    .admin-page-header p,
    #view-employees .employee-lookup-content > p {
      margin: 0 !important;
      color: #5a6f89 !important;
      font-size: 15px !important;
      line-height: 1.5 !important;
      max-width: 760px;
    }

    .attendance-eyebrow,
    .payroll-eyebrow,
    .admin-eyebrow,
    #view-feedback .feedback-eyebrow {
      display: inline-flex !important;
      align-items: center;
      gap: 8px;
      margin-bottom: 12px !important;
      padding: 8px 12px;
      border: 1px solid #dce8f4;
      border-radius: 999px;
      background: rgba(255,255,255,.82);
      color: #0c69c4 !important;
      font-size: 12px !important;
      font-weight: 900 !important;
      letter-spacing: .2px;
      text-transform: none !important;
      width: fit-content;
      max-width: 100%;
      box-shadow: 0 6px 16px rgba(16, 58, 102, .05);
    }

    /* Responsive */
    @media (max-width: 900px) {
      #view-attendance .attendance-heading,
      #view-payroll .payroll-hero,
      #view-feedback .feedback-hero,
      #view-admin-workforce .admin-page-header,
      #view-admin-employees .admin-page-header,
      #view-admin-accounts .admin-page-header,
      #view-admin-feedback .admin-page-header {
        gap: 18px;
      }
      #view-attendance .attendance-heading .attendance-period,
      #view-payroll .payroll-period { min-width: 240px; }
    }

    @media (max-width: 760px) {
      #view-attendance .attendance-heading,
      #view-payroll .payroll-hero,
      #view-feedback .feedback-hero,
      #view-admin-workforce .admin-page-header,
      #view-admin-employees .admin-page-header,
      #view-admin-accounts .admin-page-header,
      #view-admin-feedback .admin-page-header {
        display: flex !important;
        flex-direction: column !important;
        min-height: 190px !important;
        padding: 22px 18px !important;
      }

      #view-employees .employee-lookup-hero,
      #view-documents .documents-hero {
        min-height: 190px !important;
        padding: 22px 18px !important;
      }

      #view-attendance .attendance-heading .attendance-period,
      #view-payroll .payroll-period {
        width: 100% !important;
        min-width: 0 !important;
      }

      #view-feedback .feedback-hero {
        grid-template-columns: 1fr !important;
      }

      #view-feedback .feedback-hero-visual,
      .admin-header-icon {
        display: none !important;
      }

      #view-attendance .attendance-heading .title,
      #view-employees .employee-lookup-content .title,
      #view-documents .documents-hero-copy .title,
      #view-feedback .feedback-hero-copy h1,
      #view-payroll .payroll-hero h1,
      .admin-page-header h1 {
        font-size: clamp(24px, 7vw, 30px) !important;
      }

      #view-attendance .attendance-heading::after,
      #view-employees .employee-lookup-hero::after,
      #view-documents .documents-hero::after,
      #view-feedback .feedback-hero::after,
      #view-payroll .payroll-hero::after,
      #view-admin-workforce .admin-page-header::after,
      #view-admin-employees .admin-page-header::after,
      #view-admin-accounts .admin-page-header::after,
      #view-admin-feedback .admin-page-header::after {
        width: 160px;
        height: 64px;
        right: 2%;
        bottom: 8%;
      }
    }

  
    /* CLEAN EXTERNAL-ASSET BANNERS
       Ba tab này chỉ dùng nền CSS nhẹ, không tải ảnh nhà máy. */
    #view-employees .employee-lookup-hero,
    #view-documents .documents-hero,
    #view-payroll .payroll-hero {
      background-image: none !important;
      background:
        radial-gradient(circle at 84% 20%, rgba(21,118,218,.10), transparent 25%),
        radial-gradient(circle at 94% 82%, rgba(16,170,126,.08), transparent 22%),
        linear-gradient(135deg, #f4f8fc 0%, #ffffff 46%, #edf5fc 100%) !important;
    }

    #view-employees .employee-lookup-hero,
    #view-documents .documents-hero,
    #view-payroll .payroll-hero {
      min-height: 220px !important;
      border: 1px solid #d8e5f3 !important;
      border-radius: 22px !important;
      box-shadow:
        0 16px 38px rgba(17,59,104,.085),
        inset 0 -4px 0 #18a39a !important;
    }

    @media (max-width: 760px) {
      #view-employees .employee-lookup-hero,
      #view-documents .documents-hero,
      #view-payroll .payroll-hero {
        min-height: 190px !important;
        border-radius: 18px !important;
      }
    }

  
    /* ================================================================
       FINAL UNIFIED BANNER SYSTEM
       Đồng bộ toàn bộ banner các tab: font, kích thước, icon, layout
    ================================================================= */
    :root {
      --banner-unified-bg:
        radial-gradient(circle at 84% 20%, rgba(21,118,218,.10), transparent 25%),
        radial-gradient(circle at 94% 82%, rgba(16,170,126,.08), transparent 22%),
        linear-gradient(135deg, #f4f8fc 0%, #ffffff 46%, #edf5fc 100%);
      --banner-unified-border: #d9e4ef;
      --banner-unified-shadow:
        0 16px 38px rgba(17,59,104,.085),
        inset 0 -4px 0 #18a39a;
      --banner-unified-radius: 22px;
      --banner-unified-height: 220px;
      --banner-unified-padding: 30px 32px;
      --banner-title-size: 34px;
      --banner-subtitle-size: 15px;
      --banner-pill-font-size: 12px;
    }

    #view-attendance .attendance-heading,
    #view-employees .employee-lookup-hero,
    #view-documents .documents-hero,
    #view-feedback .feedback-hero,
    #view-payroll .payroll-hero,
    #view-admin-workforce .admin-page-header,
    #view-admin-employees .admin-page-header,
    #view-admin-accounts .admin-page-header,
    #view-admin-feedback .admin-page-header {
      position: relative !important;
      overflow: hidden !important;
      box-sizing: border-box;
      width: 100%;
      min-height: var(--banner-unified-height) !important;
      height: auto !important;
      padding: var(--banner-unified-padding) !important;
      border: 1px solid var(--banner-unified-border) !important;
      border-radius: var(--banner-unified-radius) !important;
      background: var(--banner-unified-bg) !important;
      box-shadow: var(--banner-unified-shadow) !important;
      isolation: isolate;
    }

    #view-attendance .attendance-heading::before,
    #view-employees .employee-lookup-hero::before,
    #view-documents .documents-hero::before {
      content: none !important;
      display: none !important;
    }

    #view-attendance .attendance-heading::after,
    #view-employees .employee-lookup-hero::after,
    #view-documents .documents-hero::after,
    #view-feedback .feedback-hero::after,
    #view-payroll .payroll-hero::after,
    #view-admin-workforce .admin-page-header::after,
    #view-admin-employees .admin-page-header::after,
    #view-admin-accounts .admin-page-header::after,
    #view-admin-feedback .admin-page-header::after {
      content: "";
      position: absolute;
      right: 3%;
      bottom: 8%;
      left: auto !important;
      width: 210px;
      height: 82px;
      opacity: .22;
      pointer-events: none;
      z-index: 0;
      transform: none !important;
      background:
        linear-gradient(90deg,
          transparent 0 9%, #a9cbea 9% 16%,
          transparent 16% 24%, #90badf 24% 33%,
          transparent 33% 43%, #75a8d4 43% 54%,
          transparent 54% 66%, #5c97ca 66% 78%,
          transparent 78% 87%, #397fba 87% 100%);
      clip-path: polygon(0 100%, 0 82%, 13% 82%, 13% 66%, 26% 66%, 26% 51%, 39% 51%, 39% 36%, 53% 36%, 53% 21%, 68% 21%, 68% 10%, 83% 10%, 83% 0, 100% 0, 100% 100%);
    }

    #view-attendance .attendance-heading > *,
    #view-employees .employee-lookup-hero > *,
    #view-documents .documents-hero > *,
    #view-feedback .feedback-hero > *,
    #view-payroll .payroll-hero > *,
    #view-admin-workforce .admin-page-header > *,
    #view-admin-employees .admin-page-header > *,
    #view-admin-accounts .admin-page-header > *,
    #view-admin-feedback .admin-page-header > * {
      position: relative;
      z-index: 1;
    }

    #view-attendance .attendance-heading,
    #view-payroll .payroll-hero,
    #view-feedback .feedback-hero,
    #view-admin-workforce .admin-page-header,
    #view-admin-employees .admin-page-header,
    #view-admin-accounts .admin-page-header,
    #view-admin-feedback .admin-page-header {
      display: flex !important;
      align-items: flex-start !important;
      justify-content: space-between !important;
      gap: 24px;
    }

    #view-feedback .feedback-hero {
      color: inherit !important;
    }

    #view-employees .employee-lookup-hero,
    #view-documents .documents-hero {
      display: block !important;
      margin-bottom: 18px;
    }

    #view-attendance .attendance-heading > div:first-of-type,
    #view-employees .employee-lookup-content,
    #view-documents .documents-hero-copy,
    #view-feedback .feedback-hero-copy,
    #view-payroll .payroll-hero > div:first-child,
    #view-admin-workforce .admin-page-header > div:first-child,
    #view-admin-employees .admin-page-header > div:first-child,
    #view-admin-accounts .admin-page-header > div:first-child,
    #view-admin-feedback .admin-page-header > div:first-child {
      width: auto !important;
      max-width: 760px !important;
      padding: 0 !important;
      margin: 0 !important;
      flex: 1 1 auto;
    }

    #view-attendance .attendance-heading .title,
    #view-employees .employee-lookup-content .title,
    #view-documents .documents-hero-copy .title,
    #view-feedback .feedback-hero-copy h1,
    #view-payroll .payroll-hero h1,
    .admin-page-header h1 {
      margin: 10px 0 8px !important;
      color: #082e65 !important;
      font-size: var(--banner-title-size) !important;
      line-height: 1.14 !important;
      font-weight: 900 !important;
      letter-spacing: -.25px !important;
    }

    #view-attendance .attendance-heading p,
    #view-employees .employee-lookup-content > p,
    #view-documents .documents-hero-copy p,
    #view-feedback .feedback-hero-copy p,
    #view-payroll .payroll-hero p,
    .admin-page-header p {
      margin: 0 !important;
      color: #5a6f89 !important;
      font-size: var(--banner-subtitle-size) !important;
      line-height: 1.5 !important;
      max-width: 760px !important;
    }

    .attendance-eyebrow,
    .payroll-eyebrow,
    #view-feedback .feedback-eyebrow,
    .admin-eyebrow {
      display: inline-flex !important;
      align-items: center !important;
      gap: 8px;
      margin: 0 0 12px !important;
      padding: 8px 12px !important;
      border: 1px solid #dce8f4 !important;
      border-radius: 999px !important;
      background: rgba(255,255,255,.84) !important;
      color: #0c69c4 !important;
      font-size: var(--banner-pill-font-size) !important;
      font-weight: 900 !important;
      letter-spacing: .15px !important;
      text-transform: none !important;
      box-shadow: 0 6px 16px rgba(16,58,102,.05) !important;
      width: fit-content !important;
      max-width: 100%;
      line-height: 1.15;
    }

    .attendance-eyebrow svg,
    .payroll-eyebrow svg,
    #view-feedback .feedback-eyebrow svg {
      width: 16px !important;
      height: 16px !important;
      flex: 0 0 16px !important;
    }

    .admin-eyebrow::before {
      content: "";
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: linear-gradient(135deg, #1e7fe1 0%, #18a39a 100%);
      flex: 0 0 8px;
      box-shadow: 0 0 0 4px rgba(24,163,154,.10);
    }

    #view-attendance .attendance-heading .attendance-period,
    #view-payroll .payroll-period {
      width: min(320px, 34%) !important;
      min-width: 280px;
      margin: 0 !important;
      align-self: flex-start !important;
      border: 1px solid #d9e6f3 !important;
      border-radius: 18px !important;
      background: rgba(255,255,255,.90) !important;
      box-shadow: 0 10px 22px rgba(21,69,121,.07) !important;
      backdrop-filter: blur(8px);
    }

    #view-feedback .feedback-hero-icon,
    .admin-header-icon {
      width: 88px !important;
      height: 88px !important;
      display: grid !important;
      place-items: center !important;
      flex: 0 0 88px !important;
      align-self: flex-start !important;
      border-radius: 24px !important;
      border: 1px solid #d8e5f3 !important;
      background: rgba(255,255,255,.90) !important;
      box-shadow: 0 12px 24px rgba(16,68,121,.08) !important;
    }

    #view-feedback .feedback-hero-icon svg,
    .admin-header-icon svg {
      width: 38px !important;
      height: 38px !important;
      color: #0b71cf !important;
    }

    #view-documents .documents-hero-accent {
      display: none !important;
    }

    #view-employees .employee-info-search {
      margin-top: 18px !important;
    }

    @media (max-width: 900px) {
      #view-attendance .attendance-heading,
      #view-payroll .payroll-hero,
      #view-feedback .feedback-hero,
      #view-admin-workforce .admin-page-header,
      #view-admin-employees .admin-page-header,
      #view-admin-accounts .admin-page-header,
      #view-admin-feedback .admin-page-header {
        gap: 18px;
      }

      #view-attendance .attendance-heading .attendance-period,
      #view-payroll .payroll-period {
        min-width: 240px;
      }
    }

    @media (max-width: 760px) {
      :root {
        --banner-unified-height: 190px;
        --banner-unified-padding: 22px 18px;
      }

      #view-attendance .attendance-heading,
      #view-payroll .payroll-hero,
      #view-feedback .feedback-hero,
      #view-admin-workforce .admin-page-header,
      #view-admin-employees .admin-page-header,
      #view-admin-accounts .admin-page-header,
      #view-admin-feedback .admin-page-header {
        flex-direction: column !important;
      }

      #view-attendance .attendance-heading .attendance-period,
      #view-payroll .payroll-period {
        width: 100% !important;
        min-width: 0 !important;
      }

      #view-feedback .feedback-hero-visual,
      .admin-header-icon {
        display: none !important;
      }

      #view-attendance .attendance-heading .title,
      #view-employees .employee-lookup-content .title,
      #view-documents .documents-hero-copy .title,
      #view-feedback .feedback-hero-copy h1,
      #view-payroll .payroll-hero h1,
      .admin-page-header h1 {
        font-size: clamp(24px, 7vw, 30px) !important;
      }

      #view-attendance .attendance-heading::after,
      #view-employees .employee-lookup-hero::after,
      #view-documents .documents-hero::after,
      #view-feedback .feedback-hero::after,
      #view-payroll .payroll-hero::after,
      #view-admin-workforce .admin-page-header::after,
      #view-admin-employees .admin-page-header::after,
      #view-admin-accounts .admin-page-header::after,
      #view-admin-feedback .admin-page-header::after {
        width: 158px;
        height: 60px;
        right: 2%;
        bottom: 7%;
      }
    }

  
    /* EMPLOYEE DRIVE PHOTO AVATARS */
    .employee-avatar-image {
      display: block;
      width: 100%;
      height: 100%;
      border-radius: inherit;
      object-fit: cover;
      object-position: center top;
    }

    .portrait.has-photo,
    .hr-photo.has-photo,
    .payroll-avatar.has-photo,
    .session-avatar.has-photo {
      overflow: hidden;
      padding: 0 !important;
      color: transparent !important;
      background: #e8f2fb !important;
    }

    .hr-photo {
      position: relative;
      display: grid;
      place-items: center;
      overflow: hidden;
    }

    .hr-photo .avatar-fallback {
      display: grid;
      place-items: center;
      width: 100%;
      height: 100%;
    }

    .hr-photo.has-photo .avatar-fallback {
      display: none;
    }

    .hr-photo .employee-avatar-image {
      position: absolute;
      inset: 0;
    }

    @media print {
      .employee-avatar-image {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
      }
    }

    .workforce-print-cover { display: none; }
    #workforcePrintDialog {
      box-sizing: border-box;
      width: min(720px, calc(100vw - 32px));
      max-width: none;
      max-height: none;
      padding: 0;
      overflow: hidden;
    }
    #workforcePrintDialog::backdrop { background: rgba(10, 32, 58, .55); backdrop-filter: blur(2px); }
    .workforce-print-dialog-card {
      box-sizing: border-box;
      width: 100%;
      max-width: 100%;
      max-height: calc(100vh - 32px);
      margin: 0;
      overflow-x: hidden;
      overflow-y: auto;
    }
    .workforce-print-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .workforce-print-settings .auth-field { min-width: 0; }
    .workforce-print-settings .auth-input {
      display: grid;
      grid-template-columns: 20px minmax(0, 1fr);
      align-items: center;
      width: 100%;
      min-width: 0;
      padding: 0 10px;
      overflow: hidden;
    }
    .workforce-print-settings .auth-input > svg {
      position: static !important;
      width: 18px;
      height: 18px;
      color: #56718f;
      pointer-events: none;
    }
    .workforce-print-settings .auth-input > select {
      box-sizing: border-box;
      width: 100%;
      min-width: 0;
      height: 44px;
      border: 0;
      outline: 0;
      padding: 0 28px 0 7px;
      background-color: transparent;
      color: #173b61;
      font: 700 14px var(--app-font);
    }
    .workforce-print-note { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
    .workforce-print-button { white-space: nowrap; }
    #view-admin-workforce { font-size: 15px; }
    #view-admin-workforce .workforce-period-switch button { font-size: 14px; }
    #view-admin-workforce .workforce-field span { font-size: 13px; }
    #view-admin-workforce .workforce-field input,
    #view-admin-workforce .workforce-field select { font-size: 15px; }
    #view-admin-workforce .workforce-kpi small { font-size: 13px; }
    #view-admin-workforce .workforce-kpi strong { font-size: 31px; }
    #view-admin-workforce .workforce-kpi em { font-size: 12px; line-height: 1.45; }
    #view-admin-workforce .workforce-panel-head h2,
    #view-admin-workforce .workforce-reason-summary-head h2 { font-size: 19px; }
    #view-admin-workforce .workforce-panel-head p,
    #view-admin-workforce .workforce-reason-summary-head p { font-size: 13px; line-height: 1.55; }
    #view-admin-workforce .workforce-table { font-size: 13px; }
    #view-admin-workforce .workforce-monthly-matrix { font-size: 13px; }
    #view-admin-workforce .workforce-reason-matrix { font-size: 11.5px; }
    #view-admin-workforce .workforce-monthly-matrix th { font-size: 13px; font-weight: 900; }
    #view-admin-workforce .workforce-monthly-matrix th:first-child,
    #view-admin-workforce .workforce-monthly-matrix td:first-child { font-size: 13.5px; font-weight: 900; }
    #view-admin-workforce .workforce-monthly-matrix th:last-child,
    #view-admin-workforce .workforce-monthly-matrix td:last-child,
    #view-admin-workforce .workforce-monthly-matrix tbody tr:last-child > * { font-size: 14px; font-weight: 900; }
    #view-admin-workforce .workforce-monthly-matrix .workforce-department-badge { gap: 7px; }
    #view-admin-workforce .workforce-monthly-matrix .workforce-department-icon {
      width: 28px; height: 28px; flex-basis: 28px; border-radius: 8px;
      box-shadow: 0 3px 8px rgba(18,80,143,.09);
    }
    #view-admin-workforce .workforce-monthly-matrix .workforce-department-icon svg { width: 16px; height: 16px; }
    #view-admin-workforce .workforce-monthly-matrix .workforce-department-name {
      font-size: 13px; line-height: 1.2; word-break: normal; overflow-wrap: normal;
    }
    #view-admin-workforce .workforce-reason-matrix th { font-size: 12.5px; font-weight: 900; }
    #view-admin-workforce .workforce-reason-matrix th:first-child,
    #view-admin-workforce .workforce-reason-matrix td:first-child,
    #view-admin-workforce .workforce-reason-matrix th:last-child,
    #view-admin-workforce .workforce-reason-matrix td:last-child,
    #view-admin-workforce .workforce-reason-matrix tbody tr:last-child > * { font-size: 13px; font-weight: 900; }
    .workforce-print-chart-image { display: none; }

    @media (max-width: 1180px) {
      .workforce-annual-matrices { grid-template-columns: 1fr; }
      .workforce-monthly-matrix { width: 100%; min-width: 0; }
    }
    .workforce-print-dialog-card .password-dialog-actions {
      position: sticky;
      bottom: -1px;
      z-index: 2;
      margin: 4px -2px -2px;
      padding: 14px 2px 2px;
      background: linear-gradient(180deg, rgba(255,255,255,0), #fff 24%);
    }

    @media (max-width: 640px) {
      .workforce-print-settings { grid-template-columns: 1fr; }
    }

    @media print {
      body.workforce-printing { background: #fff !important; }
      body.workforce-printing .sidebar,
      body.workforce-printing .topbar,
      body.workforce-printing .loading,
      body.workforce-printing .workforce-toolbar,
      body.workforce-printing #view-admin-workforce > .admin-page-header,
      body.workforce-printing #workforceTargetSave,
      body.workforce-printing .workforce-updated,
      body.workforce-printing dialog { display: none !important; }
      body.workforce-printing .app,
      body.workforce-printing .main,
      body.workforce-printing .content { display: block !important; width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }
      body.workforce-printing .view { display: none !important; }
      body.workforce-printing #view-admin-workforce { display: block !important; zoom: var(--workforce-print-scale, 1); color: #172b45; }
      body.workforce-printing #view-admin-workforce [hidden] { display: none !important; }
      body.workforce-printing .workforce-print-cover {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 18px;
        align-items: end;
        margin: 0 0 8mm;
        padding: 0 0 5mm;
        border-bottom: 2px solid #075eb9;
      }
      body.workforce-printing .workforce-print-cover h1 { margin: 2mm 0 1mm; color: #073a70; font-size: 24pt; line-height: 1.1; }
      body.workforce-printing .workforce-print-cover p { margin: 0; color: #49627e; font-size: 9pt; }
      body.workforce-printing .workforce-print-company { color: #075eb9; font-weight: 900; font-size: 10pt; letter-spacing: .08em; }
      body.workforce-printing .workforce-print-meta { display: grid; grid-template-columns: auto auto; gap: 1.5mm 5mm; font-size: 8.5pt; }
      body.workforce-printing .workforce-print-meta span { color: #60748b; }
      body.workforce-printing .workforce-print-meta strong { color: #173452; text-align: right; }
      body.workforce-printing .workforce-kpis,
      body.workforce-printing .workforce-reason-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 3mm !important; }
      body.workforce-printing .workforce-reason-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
      body.workforce-printing .workforce-grid,
      body.workforce-printing .workforce-chart-grid,
      body.workforce-printing .workforce-list-grid,
      body.workforce-printing .workforce-lists { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 4mm !important; }
      body.workforce-printing .workforce-panel,
      body.workforce-printing .workforce-kpi { box-shadow: none !important; break-inside: avoid; page-break-inside: avoid; border: 1px solid #cfdbe8 !important; }
      body.workforce-printing .workforce-chart-wrap { height: 70mm !important; }
      body.workforce-printing canvas { max-width: 100% !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
      body.workforce-printing .workforce-chart-wrap canvas { display: block !important; width: 100% !important; height: 100% !important; }
      body.workforce-printing .workforce-list-shell,
      body.workforce-printing .workforce-table-scroll,
      body.workforce-printing .workforce-matrix-shell,
      body.workforce-printing .workforce-reason-matrix-shell { overflow: visible !important; max-height: none !important; }
      body.workforce-printing .workforce-table { display: table !important; width: 100% !important; min-width: 0 !important; table-layout: auto !important; font-size: 7.5pt !important; }
      body.workforce-printing .workforce-table thead { display: table-header-group !important; }
      body.workforce-printing .workforce-table tbody { display: table-row-group !important; }
      body.workforce-printing .workforce-table tr { display: table-row !important; break-inside: avoid; page-break-inside: avoid; }
      body.workforce-printing .workforce-table th,
      body.workforce-printing .workforce-table td { display: table-cell !important; padding: 1.7mm !important; border: 1px solid #d5dfeb !important; }
      body.workforce-printing .workforce-table td::before { display: none !important; }
      body.workforce-printing .workforce-table th { position: static !important; background: #075eb9 !important; color: #fff !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
      body.workforce-printing .workforce-annual-matrices { grid-template-columns: 1fr !important; gap: 4mm !important; }
      body.workforce-printing .workforce-annual-matrices .workforce-panel { padding: 3mm !important; }
      body.workforce-printing .workforce-annual-matrices .workforce-panel-head { margin-bottom: 2mm !important; }
      body.workforce-printing .workforce-annual-matrices .workforce-panel-head h2 { font-size: 10pt !important; }
      body.workforce-printing .workforce-annual-matrices .workforce-panel-head p { font-size: 7pt !important; }
      body.workforce-printing .workforce-monthly-matrix,
      body.workforce-printing .workforce-reason-matrix { font-size: 7.4pt !important; }
      body.workforce-printing .workforce-monthly-matrix { min-width: 0 !important; table-layout: fixed !important; font-size: 8pt !important; }
      body.workforce-printing .workforce-monthly-matrix th,
      body.workforce-printing .workforce-monthly-matrix td { padding: 1.1mm .5mm !important; }
      body.workforce-printing .workforce-monthly-matrix th,
      body.workforce-printing .workforce-reason-matrix th { font-size: 8.6pt !important; font-weight: 900 !important; }
      body.workforce-printing .workforce-monthly-matrix th { font-size: 8.3pt !important; }
      body.workforce-printing .workforce-monthly-matrix th:first-child,
      body.workforce-printing .workforce-monthly-matrix td:first-child,
      body.workforce-printing .workforce-reason-matrix th:first-child,
      body.workforce-printing .workforce-reason-matrix td:first-child { font-size: 9pt !important; font-weight: 900 !important; }
      body.workforce-printing .workforce-monthly-matrix th:first-child,
      body.workforce-printing .workforce-monthly-matrix td:first-child { width: 34mm !important; font-size: 8.5pt !important; }
      body.workforce-printing .workforce-monthly-matrix th:last-child,
      body.workforce-printing .workforce-monthly-matrix td:last-child,
      body.workforce-printing .workforce-reason-matrix th:last-child,
      body.workforce-printing .workforce-reason-matrix td:last-child,
      body.workforce-printing .workforce-monthly-matrix tbody tr:last-child > *,
      body.workforce-printing .workforce-reason-matrix tbody tr:last-child > * { font-size: 9.2pt !important; font-weight: 900 !important; }
      body.workforce-printing .workforce-monthly-matrix th:last-child,
      body.workforce-printing .workforce-monthly-matrix td:last-child,
      body.workforce-printing .workforce-monthly-matrix tbody tr:last-child > * { width: auto !important; font-size: 8.5pt !important; }
      body.workforce-printing .workforce-reason-print-chart { display: none !important; }
      body.workforce-printing.workforce-print-reason #workforceReasonView .workforce-panel,
      body.workforce-printing.workforce-print-reason .workforce-reason-summary-panel {
        break-inside: auto !important;
        page-break-inside: auto !important;
      }
      body.workforce-printing.workforce-print-reason .workforce-reason-kpis { margin-bottom: 3mm !important; }
      body.workforce-printing.workforce-print-reason .workforce-reason-summary-panel { margin-top: 0 !important; }
      body.workforce-printing.workforce-print-year .workforce-monthly-matrix { font-size: 9.5pt !important; }
      body.workforce-printing.workforce-print-year .workforce-monthly-matrix th { font-size: 9.8pt !important; }
      body.workforce-printing.workforce-print-year .workforce-monthly-matrix th:first-child,
      body.workforce-printing.workforce-print-year .workforce-monthly-matrix td:first-child,
      body.workforce-printing.workforce-print-year .workforce-monthly-matrix th:last-child,
      body.workforce-printing.workforce-print-year .workforce-monthly-matrix td:last-child,
      body.workforce-printing.workforce-print-year .workforce-monthly-matrix tbody tr:last-child > * { font-size: 10pt !important; }
      body.workforce-printing.workforce-print-year .workforce-monthly-matrix th,
      body.workforce-printing.workforce-print-year .workforce-monthly-matrix td { padding: 1.5mm .8mm !important; }
      body.workforce-printing .workforce-annual-matrices { break-before: page; page-break-before: always; }
      body.workforce-printing.workforce-print-fit-one .workforce-annual-matrices {
        break-before: auto !important;
        page-break-before: auto !important;
      }
      body.workforce-printing.workforce-print-fit-one #view-admin-workforce {
        break-after: avoid-page;
        page-break-after: avoid;
      }
    }

    /* Trung tâm dữ liệu HR: gom danh bạ, công, lương, con nhỏ và bảo hiểm. */
    #view-admin-hr {
      color: #10213f;
    }
    body.admin-session #view-admin-hr.active {
      display: flex;
      flex-direction: column;
    }
    body.admin-session #view-admin-hr > .hr-center-header { order: 1; }
    body.admin-session #view-admin-hr > .hr-center-tabs { order: 2; }
    body.admin-session #view-admin-hr > .hr-center-panel { order: 3; }

    .hr-center-header {
      position: relative;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 24px;
      min-height: 176px;
      padding: 32px 34px;
      overflow: hidden;
      border: 1px solid #d8e5f3;
      border-radius: 24px;
      background:
        radial-gradient(circle at 88% 18%, rgba(22, 163, 154, .14), transparent 23%),
        linear-gradient(135deg, #f7fbff 0%, #edf6ff 64%, #eefaf8 100%);
      box-shadow: 0 16px 38px rgba(17, 59, 104, .085), inset 0 -4px 0 #16a39a;
    }

    .hr-center-header::after {
      content: "";
      position: absolute;
      right: 4%;
      bottom: 12%;
      width: 230px;
      height: 88px;
      opacity: .23;
      background: linear-gradient(90deg, transparent 0 9%, #a9cbea 9% 16%, transparent 16% 28%, #75a8d4 28% 42%, transparent 42% 55%, #4c92ca 55% 70%, transparent 70% 82%, #16a39a 82% 100%);
      clip-path: polygon(0 100%, 0 82%, 18% 82%, 18% 62%, 40% 62%, 40% 42%, 62% 42%, 62% 22%, 82% 22%, 82% 0, 100% 0, 100% 100%);
      pointer-events: none;
    }

    .hr-center-header-copy,
    .hr-center-header-icon { position: relative; z-index: 1; }
    .hr-center-header-copy { max-width: 820px; }
    .hr-center-eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      border: 1px solid #dce8f4;
      border-radius: 999px;
      color: #0c69c4;
      background: rgba(255,255,255,.82);
      font-size: 12px;
      font-weight: 900;
      letter-spacing: .2px;
    }
    .hr-center-eyebrow svg { width: 17px; height: 17px; }
    .hr-center-header h1 {
      margin: 14px 0 8px;
      color: #082e65;
      font-size: 36px;
      line-height: 1.14;
    }
    .hr-center-header p {
      max-width: 720px;
      margin: 0;
      color: #5a6f89;
      font-size: 15px;
      line-height: 1.55;
    }
    .hr-center-header-icon {
      width: 92px;
      height: 92px;
      flex: 0 0 92px;
      display: grid;
      place-items: center;
      border: 1px solid rgba(11,113,207,.1);
      border-radius: 26px;
      color: #0a71cf;
      background: rgba(255,255,255,.9);
      box-shadow: 0 12px 24px rgba(16, 68, 121, .08);
    }
    .hr-center-header-icon svg { width: 44px; height: 44px; }

    .hr-center-tabs {
      display: flex;
      gap: 8px;
      margin: 18px 0;
      padding: 8px;
      overflow-x: auto;
      border: 1px solid #d8e5f3;
      border-radius: 18px;
      background: rgba(255,255,255,.96);
      box-shadow: 0 10px 25px rgba(18, 58, 101, .055);
      scrollbar-width: thin;
    }
    .hr-center-tab {
      min-height: 46px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      flex: 1 0 max-content;
      padding: 10px 16px;
      border: 1px solid transparent;
      border-radius: 12px;
      color: #44617f;
      background: transparent;
      font: inherit;
      font-size: 13px;
      font-weight: 800;
      cursor: pointer;
      transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
    }
    .hr-center-tab svg { width: 18px; height: 18px; }
    .hr-center-tab:hover { color: #075eb9; background: #f1f7ff; }
    .hr-center-tab.active {
      color: #fff;
      border-color: #0a67c3;
      background: linear-gradient(135deg, #1676d2, #0862bd);
      box-shadow: 0 8px 18px rgba(8, 98, 189, .2);
    }
    .hr-center-panel[hidden] { display: none !important; }
    .hr-center-panel > .view { width: 100%; }
    #view-admin-hr #view-admin-employees .admin-page-header { display: none !important; }
    #view-admin-hr #view-admin-employees .admin-toolbar { margin-top: 0; }
    #view-admin-hr #view-attendance .attendance-heading,
    #view-admin-hr #view-payroll .payroll-hero {
      display: none !important;
    }
    #view-admin-hr #view-attendance .attendance-internal-controls,
    #view-admin-hr #view-payroll .payroll-admin-search {
      margin-top: 0;
    }
    #view-admin-hr #view-payroll .payroll-admin-search {
      grid-template-columns: minmax(260px, 1fr) auto auto minmax(210px, 240px);
      align-items: stretch;
    }
    #view-admin-hr #view-payroll .payroll-admin-search .payroll-period {
      width: auto !important;
      min-width: 210px !important;
      margin: 0 !important;
      align-self: stretch !important;
      gap: 10px;
      padding: 7px 12px;
      border-radius: 12px !important;
      box-shadow: none !important;
      backdrop-filter: none;
    }
    #view-admin-hr #view-payroll .payroll-admin-search .payroll-period > span {
      width: 34px;
      height: 34px;
      flex-basis: 34px;
      border-radius: 9px;
    }
    #view-admin-hr #view-payroll .payroll-admin-search .payroll-period svg {
      width: 19px;
      height: 19px;
    }
    #view-admin-hr #view-payroll .payroll-admin-search .payroll-period select {
      width: 120px;
      margin-top: 1px;
      font-size: 15px;
    }
    body.employee-session #view-payroll .payroll-admin-search {
      display: flex !important;
      justify-content: flex-end;
    }
    body.employee-session #view-payroll .payroll-search-field,
    body.employee-session #view-payroll #payrollSearchButton,
    body.employee-session #view-payroll #payrollRefreshButton {
      display: none !important;
    }
    body.employee-session #view-payroll .payroll-admin-search .payroll-period {
      width: min(240px, 100%) !important;
      min-width: 0 !important;
      margin: 0 !important;
    }
    #view-admin-hr #view-attendance,
    #view-admin-hr #view-payroll,
    #view-admin-hr #view-admin-employees { animation: none; }

    .hr-readonly-page .admin-page-header { margin-bottom: 16px; }
    .hr-readonly-note {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      color: #087a55;
      font-size: 12px;
      font-weight: 800;
    }
    .hr-readonly-note svg { width: 16px; height: 16px; }
    .hr-money { color: #075eb9; font-weight: 900; white-space: nowrap; }
    .hr-eligible {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 5px 9px;
      border-radius: 999px;
      color: #087a55;
      background: #e7f8ef;
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
    }
    .hr-eligible.no { color: #68798d; background: #eef2f6; }
    .hr-employee-row { cursor: pointer; }
    .hr-employee-row:hover td,
    .hr-employee-row:focus-visible td { background: #edf6ff !important; }
    .hr-employee-row:focus-visible { outline: 3px solid #80b7ff; outline-offset: -3px; }
    .hr-employee-open-hint {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      color: #075eb9;
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
    }
    .hr-employee-open-hint svg { width: 15px; height: 15px; }

    .hr-employee-preview-dialog {
      width: min(1500px, calc(100vw - 28px));
      max-height: calc(100vh - 28px);
      padding: 0;
      overflow: hidden;
      border: 0;
      border-radius: 20px;
      color: #10213f;
      background: #f5f9ff;
      box-shadow: 0 30px 90px rgba(4, 28, 62, .38);
    }
    .hr-employee-preview-dialog::backdrop { background: rgba(4, 24, 52, .68); backdrop-filter: blur(3px); }
    .hr-employee-preview-head {
      position: sticky;
      z-index: 4;
      top: 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      min-height: 70px;
      padding: 14px 18px 14px 24px;
      border-bottom: 1px solid #d5e3f2;
      background: rgba(255,255,255,.96);
      box-shadow: 0 8px 22px rgba(13, 55, 99, .08);
    }
    .hr-employee-preview-head h2 { margin: 0; color: #082e65; font-size: 21px; }
    .hr-employee-preview-head p { margin: 3px 0 0; color: #687c94; font-size: 12px; }
    .hr-employee-preview-body {
      max-height: calc(100vh - 98px);
      padding: 18px;
      overflow: auto;
    }
    .hr-employee-preview-body .hr-profile-grid {
      grid-template-columns: minmax(270px, 28fr) minmax(300px, 32fr) minmax(380px, 40fr);
      gap: 14px;
      padding: 18px;
      border: 1px solid #d8e5f3;
      border-top: 0;
      background: #f5f9ff;
    }
    .hr-employee-preview-body .hr-hero { min-height: 78px; border-radius: 12px 12px 0 0; background: #06469d; }
    .hr-employee-preview-body .hr-brand-panel { padding-left: 24px; }
    .hr-employee-preview-body .hr-brand-logo { width: 218px; max-width: 100%; height: 58px; object-fit: contain; object-position: left center; }
    .hr-employee-preview-body .hr-hero-title { font-size: 30px; }
    .hr-employee-preview-body .hr-card,
    .hr-employee-preview-body .hr-mini-card { border-color: #d3e1f1; border-radius: 10px; box-shadow: 0 5px 16px rgba(25,58,100,.05); }
    .hr-employee-preview-body .hr-photo { width: 150px; height: 150px; margin-bottom: 16px; font-size: 40px; }
    .hr-employee-preview-body .hr-info-row { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 10px 0; }
    .hr-employee-preview-body .hr-icon { width: 32px; height: 32px; }
    .hr-employee-preview-body .hr-icon svg { width: 25px; height: 25px; }
    .hr-employee-preview-body .hr-label { font-size: 12px; }
    .hr-employee-preview-body .hr-value { font-size: 14px; }
    .hr-employee-preview-body .hr-mini-card { grid-template-columns: 58px minmax(0,1fr); gap: 12px; padding: 14px; }
    .hr-employee-preview-body .hr-mini-icon { width: 52px; height: 52px; border-radius: 10px; }
    .hr-employee-preview-body .hr-mini-icon svg { width: 28px; height: 28px; }
    .hr-employee-preview-loading {
      min-height: 320px;
      display: grid;
      place-items: center;
      color: #5c718b;
      text-align: center;
    }
    .hr-employee-preview-loading span {
      width: 58px;
      height: 58px;
      display: grid;
      place-items: center;
      margin: 0 auto 12px;
      border-radius: 50%;
      color: #0878d8;
      background: #e3f1ff;
    }
    .hr-employee-preview-loading svg { width: 30px; height: 30px; }

    @media (max-width: 1100px) {
      .hr-employee-preview-body .hr-profile-grid { grid-template-columns: 1fr 1fr; }
      .hr-employee-preview-body .hr-right-column { grid-column: 1 / -1; }
      #view-admin-hr #view-payroll .payroll-admin-search {
        grid-template-columns: minmax(220px, 1fr) auto auto;
      }
      #view-admin-hr #view-payroll .payroll-admin-search .payroll-period {
        grid-column: 1 / -1;
      }
    }
    @media (max-width: 760px) {
      .hr-center-header { min-height: 0; padding: 24px 20px; border-radius: 20px; }
      .hr-center-header h1 { font-size: 28px; }
      .hr-center-header-icon { display: none; }
      .hr-center-tabs { margin: 14px 0; border-radius: 14px; }
      .hr-center-tab { flex: 0 0 auto; min-height: 42px; padding: 9px 12px; }
      .hr-employee-preview-dialog { width: calc(100vw - 12px); max-height: calc(100vh - 12px); border-radius: 14px; }
      .hr-employee-preview-head { min-height: 62px; padding: 10px 10px 10px 16px; }
      .hr-employee-preview-head h2 { font-size: 17px; }
      .hr-employee-preview-body { max-height: calc(100vh - 74px); padding: 8px; }
      .hr-employee-preview-body .hr-profile-grid { grid-template-columns: 1fr; padding: 8px; }
      .hr-employee-preview-body .hr-right-column { grid-column: auto; }
      .hr-employee-preview-body .hr-hero { min-height: 62px; }
      .hr-employee-preview-body .hr-brand-panel { display: none; }
      .hr-employee-preview-body .hr-hero-title { font-size: 21px; }
      #view-admin-hr #view-payroll .payroll-admin-search {
        grid-template-columns: minmax(0, 1fr);
      }
      #view-admin-hr #view-payroll .payroll-admin-search .payroll-period,
      #view-admin-hr #view-payroll .payroll-admin-search .payroll-search-field {
        grid-column: auto;
        width: 100% !important;
        min-width: 0 !important;
      }
    }

    /* Popup tiến trình phản ánh, kế thừa từ dự án ANYONE PULSE. */
    .admin-feedback-preview-row {
      cursor: pointer;
      transition: background .15s ease, box-shadow .15s ease;
    }
    .admin-feedback-preview-row:hover td {
      background: #eef7ff !important;
      box-shadow: inset 3px 0 0 #1477d4;
    }
    .admin-feedback-preview-row:focus-visible {
      outline: 3px solid rgba(20,119,212,.25);
      outline-offset: -3px;
    }
    .feedback-progress-dialog {
      width: min(1080px, calc(100vw - 24px));
      max-width: 1080px;
      max-height: 94dvh;
      padding: 0;
      overflow: hidden;
      border: 0;
      border-radius: 22px;
      color: #173653;
      background: #f4f7fb;
      box-shadow: 0 32px 90px rgba(7,31,67,.34);
    }
    .feedback-progress-dialog::backdrop {
      background: rgba(5,18,38,.66);
      backdrop-filter: blur(5px);
    }
    .feedback-progress-card {
      display: flex;
      flex-direction: column;
      max-height: 94dvh;
    }
    .feedback-progress-card > header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 20px 22px;
      color: #fff;
      background: linear-gradient(135deg,#063e88,#0876d1);
    }
    .feedback-progress-card > header small {
      color: #bfe4ff;
      font-weight: 900;
      letter-spacing: .12em;
    }
    .feedback-progress-card > header h2 { margin: 5px 0 3px; color: #fff; font-size: 24px; }
    .feedback-progress-card > header p { margin: 0; color: rgba(255,255,255,.8); }
    .feedback-progress-close {
      width: 42px;
      height: 42px;
      border: 1px solid rgba(255,255,255,.34);
      border-radius: 12px;
      color: #fff;
      background: rgba(255,255,255,.12);
      font-size: 25px;
      cursor: pointer;
    }
    .feedback-progress-body { padding: 18px; overflow: auto; }
    .feedback-ticket-summary {
      display: grid;
      grid-template-columns: repeat(4,minmax(0,1fr));
      gap: 10px;
    }
    .feedback-ticket-summary > div {
      padding: 14px;
      border: 1px solid #dce7f2;
      border-radius: 14px;
      background: #fff;
    }
    .feedback-ticket-summary small {
      display: block;
      color: #6a7e94;
      font-size: 11px;
      font-weight: 800;
      text-transform: uppercase;
    }
    .feedback-ticket-summary strong { display: block; margin-top: 6px; color: #082f66; }
    .feedback-ticket-content,
    .feedback-progress-section {
      margin-top: 14px;
      padding: 18px;
      border: 1px solid #d8e4f0;
      border-radius: 18px;
      background: #fff;
    }
    .feedback-ticket-content h3 { margin: 0 0 10px; color: #082f66; font-size: 21px; }
    .feedback-ticket-content p { margin: 0; color: #304b69; line-height: 1.7; white-space: pre-wrap; }
    .feedback-ticket-contact {
      display: flex;
      flex-wrap: wrap;
      gap: 12px 24px;
      margin-top: 14px;
      padding-top: 12px;
      border-top: 1px solid #e5edf5;
      color: #60748d;
    }
    .feedback-progress-heading {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
    }
    .feedback-progress-heading h3 { margin: 0; color: #082f66; font-size: 20px; }
    .feedback-progress-heading p { margin: 5px 0 0; color: #6b7e94; }
    .feedback-status-pill {
      padding: 7px 11px;
      border-radius: 999px;
      color: #0864be;
      background: #e7f2ff;
      font-weight: 900;
      white-space: nowrap;
    }
    .feedback-progress-steps {
      display: grid;
      grid-template-columns: repeat(4,minmax(0,1fr));
      gap: 10px;
      margin: 18px 0;
    }
    .feedback-progress-step {
      position: relative;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px;
      border: 1px solid #dce6f0;
      border-radius: 14px;
      background: #f8fafc;
    }
    .feedback-progress-step > span {
      width: 32px;
      height: 32px;
      display: grid;
      place-items: center;
      flex: 0 0 32px;
      border-radius: 50%;
      color: #52677e;
      background: #dfe7f0;
      font-weight: 900;
    }
    .feedback-progress-step strong,
    .feedback-progress-step small { display: block; }
    .feedback-progress-step small { margin-top: 2px; color: #7a8ca0; font-size: 10px; }
    .feedback-progress-step.done { border-color: #bfead9; background: #ecfbf5; }
    .feedback-progress-step.done > span { color: #fff; background: #15a873; }
    .feedback-progress-step.active {
      border-color: #97c8f5;
      background: #edf6ff;
      box-shadow: 0 0 0 3px rgba(20,119,212,.09);
    }
    .feedback-progress-step.active > span { color: #fff; background: #1477d4; }
    .feedback-progress-editor {
      display: grid;
      grid-template-columns: minmax(220px,.45fr) minmax(0,1.55fr);
      gap: 14px;
    }
    .feedback-progress-editor label {
      display: grid;
      gap: 7px;
      color: #52677e;
      font-size: 12px;
      font-weight: 800;
    }
    .feedback-progress-editor select,
    .feedback-progress-editor textarea {
      box-sizing: border-box;
      width: 100%;
      padding: 12px;
      border: 1px solid #cbdbea;
      border-radius: 12px;
      color: #173653;
      background: #fff;
      font: inherit;
    }
    .feedback-progress-editor select { height: 48px; }
    .feedback-progress-editor textarea { min-height: 120px; resize: vertical; }
    .feedback-progress-card > footer {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      padding: 15px 18px;
      border-top: 1px solid #dbe5ef;
      background: #fff;
    }
    @media (max-width: 760px) {
      .feedback-ticket-summary,
      .feedback-progress-steps,
      .feedback-progress-editor { grid-template-columns: 1fr; }
      .feedback-progress-dialog {
        width: calc(100vw - 8px);
        max-height: calc(100dvh - 8px);
        border-radius: 14px;
      }
      .feedback-progress-card { max-height: calc(100dvh - 8px); }
      .feedback-progress-body { padding: 10px; }
      .feedback-progress-card > footer { flex-wrap: wrap; }
      .feedback-progress-card > footer .button { flex: 1; min-width: 130px; }
    }
