    :root {
      --bg: #f7faf8;
      --card: #ffffff;
      --text: #132033;
      --muted: #7c8799;
      --line: #e8ecef;
      --green: #27c46a;
      --green-soft: #eaf9f0;
      --green-soft-2: #f3fcf6;
      --orange: #ff9e3d;
      --orange-soft: #fff3e6;
      --blue: #4a8cff;
      --blue-soft: #eef4ff;
      --red: #ff5d5d;
      --red-soft: #fff1f1;
      --shadow: 0 10px 35px rgba(17, 24, 39, 0.06);
      --radius-xl: 7px;
      --radius-lg: 7px;
      --radius-md: 7px;
      --radius-sm: 7px;
      --phone-width: 430px;
      --safe-bottom: calc(env(safe-area-inset-bottom) + 18px);
      --safe-top: calc(env(safe-area-inset-top) + 12px);
      --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
      --type-caption: 0.75rem;
      --type-small: 0.8125rem;
      --type-body: 0.9375rem;
      --type-ui: 1rem;
      --type-subhead: 1.125rem;
      --type-title: 1.375rem;
      --type-display: 2.125rem;
      --leading-tight: 1.12;
      --leading-ui: 1.28;
      --leading-body: 1.5;
    }

    * {
      box-sizing: border-box;
      -webkit-tap-highlight-color: transparent;
    }

    html, body {
      margin: 0;
      padding: 0;
      background: #edf2ef;
      color: var(--text);
      font-family: var(--font-sans);
      min-height: 100%;
    }

    body {
      display: flex;
      justify-content: center;
    }

    .material-symbols-rounded {
      font-variation-settings:
        'FILL' 0,
        'wght' 500,
        'GRAD' 0,
        'opsz' 24;
      font-size: 22px;
      line-height: 1;
    }

    .mobile-shell {
      width: 100%;
      max-width: var(--phone-width);
      min-height: 100svh;
      background:
        radial-gradient(circle at bottom left, rgba(39, 196, 106, 0.08), transparent 30%),
        radial-gradient(circle at bottom right, rgba(39, 196, 106, 0.08), transparent 30%),
        linear-gradient(180deg, #fbfffc 0%, #f7faf8 45%, #f5faf7 100%);
      position: relative;
      overflow-x: hidden;
    }

    .hidden {
      display: none !important;
    }

    .phone-only {
      max-width: 430px;
      margin: 0 auto;
    }

    /* LOGIN */
    .login-wrap {
      min-height: 100svh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 22px 18px 28px;
    }

    .login-page {
      width: 100%;
    }

    .brand-top {
      text-align: center;
      margin-bottom: 22px;
    }

    .big-logo {
      width: 86px;
      height: 86px;
      border-radius: 50%;
      margin: 0 auto 18px;
      background: transparent;
      display: grid;
      place-items: center;
    }

    .brand-logo-img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
    }

    .brand-title {
      font-size: 36px;
      line-height: 1.05;
      letter-spacing: 0;
      font-weight: 800;
      margin: 0;
    }

    .brand-title .green {
      color: var(--green);
    }

    .brand-sub {
      margin: 10px 0 0;
      font-size: 15px;
      color: var(--muted);
      font-weight: 500;
    }

    .login-card {
      background: rgba(255,255,255,0.92);
      border: 1px solid #eef1f4;
      border-radius: 28px;
      box-shadow: var(--shadow);
      padding: 26px 18px 18px;
      backdrop-filter: blur(8px);
    }

    .field {
      margin-bottom: 18px;
    }

    .field label {
      display: block;
      font-size: 14px;
      font-weight: 700;
      margin-bottom: 10px;
    }

    .input-wrap {
      position: relative;
    }

    .input-wrap .material-symbols-rounded.left {
      position: absolute;
      left: 16px;
      top: 50%;
      transform: translateY(-50%);
      color: #a8b1bf;
      font-size: 22px;
      pointer-events: none;
    }

    .input-wrap .material-symbols-rounded.right {
      position: absolute;
      right: 16px;
      top: 50%;
      transform: translateY(-50%);
      color: #a8b1bf;
      font-size: 22px;
      cursor: pointer;
    }

    input,
    select,
    textarea,
    button {
      font-family: inherit;
    }

    input[type="email"],
    input[type="password"],
    input[type="text"],
    input[type="date"],
    input[type="time"],
    input[type="number"],
    select,
    textarea {
      width: 100%;
      height: 60px;
      border: 1px solid #e6ebef;
      background: #fff;
      border-radius: 18px;
      padding: 0 16px 0 50px;
      font-size: 16px;
      color: var(--text);
      outline: none;
    }

    textarea {
      height: 116px;
      padding: 16px;
      resize: none;
    }

    input:focus,
    select:focus,
    textarea:focus {
      border-color: #bfe7cb;
      box-shadow: 0 0 0 4px rgba(39, 196, 106, 0.08);
    }

    .btn {
      border: none;
      border-radius: 18px;
      min-height: 58px;
      font-size: 16px;
      font-weight: 800;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      vertical-align: middle;
    }

    .btn:active {
      filter: brightness(1.06);
    }

    .btn:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      transform: none;
      filter: none;
    }

    .btn-primary {
      width: 100%;
      background: linear-gradient(180deg, #168a49 0%, #106d39 100%);
      color: #ffffff;
      box-shadow: 0 12px 26px rgba(16, 109, 57, 0.24);
    }

    .btn-primary:active {
      background: linear-gradient(90deg, #b8f0ca 0%, #a4edc1 100%);
      color: #132033;
      box-shadow: 0 8px 18px rgba(39, 196, 106, 0.16);
    }

    .btn-danger {
      width: 100%;
      background: linear-gradient(180deg, #c53030 0%, #9f1f1f 100%);
      color: #ffffff;
      box-shadow: 0 12px 26px rgba(197, 48, 48, 0.22);
    }

    .btn-danger:active {
      background: linear-gradient(90deg, #ffd7d7 0%, #ffc2c2 100%);
      color: #8a1f1f;
      box-shadow: 0 8px 18px rgba(197, 48, 48, 0.14);
    }

    .btn-outline {
      width: 100%;
      background: #ffffff;
      border: 2px solid #168a49;
      color: #106d39;
      box-shadow: 0 8px 18px rgba(16, 109, 57, 0.08);
    }

    .btn-outline:active {
      background: #eaf9f0;
      color: #132033;
    }

    .login-divider {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      gap: 12px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      margin: 18px 0;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    .login-divider::before,
    .login-divider::after {
      content: "";
      height: 1px;
      background: #e8ecef;
    }

    .google-login-btn {
      width: 100%;
      min-height: 58px;
      border: 1px solid #dfe4ea;
      background: #ffffff;
      color: var(--text);
      box-shadow: 0 8px 18px rgba(17, 24, 39, 0.05);
    }

    .google-mark {
      width: 22px;
      height: 22px;
      flex: 0 0 auto;
    }

    .login-link {
      display: block;
      text-align: center;
      margin-top: 18px;
      color: var(--green);
      font-weight: 600;
      font-size: 14px;
      text-decoration: none;
    }

    .login-footer {
      text-align: center;
      color: var(--muted);
      font-size: 13px;
      margin-top: 22px;
    }

    .login-footer span {
      color: var(--green);
      font-weight: 600;
    }

    .legal-links {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 7px 12px;
      margin-top: 14px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
      text-align: center;
    }

    .legal-links a {
      color: var(--green);
      font-weight: 700;
      text-decoration: none;
    }

    .legal-links a:focus-visible,
    .legal-links a:hover {
      text-decoration: underline;
    }

    .legal-footer {
      margin-top: 10px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
      text-align: center;
    }

    .message {
      display: none;
      margin-top: 14px;
      padding: 12px 14px;
      border-radius: 16px;
      font-size: 13px;
      font-weight: 600;
      line-height: 1.4;
    }

    .message.show {
      display: block;
    }

    .message.error {
      background: #fff1f1;
      color: #c53030;
      border: 1px solid #ffd8d8;
    }

    .message.success {
      background: #edfcf2;
      color: #12834a;
      border: 1px solid #c8efd8;
    }

    .message.info {
      background: #f1f7ff;
      color: #2864b4;
      border: 1px solid #d8e7ff;
    }

    /* APP HEADER */
    .app-header {
      position: sticky;
      top: 0;
      z-index: 15;
      background: rgba(247, 250, 248, 0.92);
      backdrop-filter: blur(12px);
      padding: var(--safe-top) 18px 14px;
      border-bottom: 1px solid rgba(232, 236, 239, 0.8);
    }

    .header-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
    }

    .brand-inline {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
      flex: 1;
    }

    .mini-logo {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background: transparent;
      display: grid;
      place-items: center;
      flex: none;
    }

    .brand-inline h1 {
      font-size: 18px;
      margin: 0;
      line-height: 1.1;
      letter-spacing: 0;
      white-space: nowrap;
    }

    .brand-inline h1 .green {
      color: var(--green);
    }

    .header-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex: none;
    }

    .desktop-header-context,
    .desktop-profile-copy {
      display: none;
    }

    .desktop-header-title {
      margin: 0;
      color: var(--text);
      font-size: 1.08rem;
      font-weight: 850;
      line-height: 1.15;
    }

    .desktop-header-subtitle {
      margin: 2px 0 0;
      color: var(--muted);
      font-size: 0.72rem;
      font-weight: 600;
      line-height: 1.3;
    }

    .desktop-profile-name,
    .desktop-profile-role {
      display: block;
      max-width: 170px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      text-align: left;
    }

    .desktop-profile-name {
      color: var(--text);
      font-size: var(--type-small);
      font-weight: 800;
    }

    .desktop-profile-role {
      display: none;
    }

    .request-notification-btn,
    .nav-request-label {
      position: relative;
    }

    .notification-center {
      position: relative;
      flex: none;
    }

    .request-notification-count,
    .nav-request-count {
      min-width: 19px;
      height: 19px;
      border-radius: 999px;
      background: #d92d20;
      color: #fff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0 5px;
      font-size: 11px;
      font-weight: 850;
      line-height: 1;
    }

    .request-notification-count {
      position: absolute;
      top: -4px;
      right: -4px;
      border: 2px solid #f7faf8;
    }

    .request-notification-count.hidden,
    .nav-request-count.hidden,
    .request-notification-toast.hidden,
    .app-toast.hidden {
      display: none;
    }

    .nav-request-label {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .notification-panel {
      position: absolute;
      top: calc(100% + 10px);
      right: 0;
      z-index: 120;
      width: min(360px, calc(100vw - 24px));
      max-height: min(560px, calc(100vh - 96px));
      overflow: hidden;
      border: 1px solid #dfe7e2;
      border-radius: 7px;
      background: #ffffff;
      box-shadow: 0 18px 44px rgba(16, 24, 40, 0.14);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transform: translateY(-6px) scale(0.985);
      transform-origin: top right;
      transition:
        opacity 180ms ease,
        transform 180ms ease,
        visibility 180ms ease;
    }

    .notification-panel.show {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transform: translateY(0) scale(1);
    }

    .notification-panel-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
      padding: 18px 18px 14px;
      border-bottom: 1px solid #edf1ee;
    }

    .notification-panel-title {
      margin: 0;
      color: var(--text);
      font-size: 1rem;
      font-weight: 850;
      line-height: 1.25;
    }

    .notification-panel-summary {
      display: block;
      margin-top: 4px;
      color: var(--muted);
      font-size: var(--type-caption);
      font-weight: 650;
      line-height: 1.35;
    }

    .notification-panel-close {
      width: 32px;
      height: 32px;
      border: 0;
      border-radius: 7px;
      background: transparent;
      color: #667085;
      display: grid;
      place-items: center;
      cursor: pointer;
      flex: none;
    }

    .notification-panel-close .material-symbols-rounded {
      font-size: 20px;
    }

    .notification-list {
      max-height: 390px;
      overflow-y: auto;
      overscroll-behavior: contain;
    }

    .notification-item {
      width: 100%;
      min-height: 78px;
      border: 0;
      border-bottom: 1px solid #edf1ee;
      background: #ffffff;
      color: inherit;
      display: grid;
      grid-template-columns: 38px minmax(0, 1fr) 18px;
      align-items: center;
      gap: 12px;
      padding: 13px 18px;
      text-align: left;
      cursor: pointer;
    }

    .notification-item-icon {
      width: 38px;
      height: 38px;
      border-radius: 7px;
      background: #edf8f1;
      color: #12864f;
      display: grid;
      place-items: center;
    }

    .notification-item-icon .material-symbols-rounded {
      font-size: 20px;
    }

    .notification-item-copy {
      min-width: 0;
    }

    .notification-item-copy strong,
    .notification-item-copy span {
      display: block;
    }

    .notification-item-copy strong {
      overflow: hidden;
      color: #182230;
      font-size: var(--type-small);
      font-weight: 800;
      line-height: 1.3;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .notification-item-copy span {
      margin-top: 3px;
      color: #667085;
      font-size: var(--type-caption);
      font-weight: 600;
      line-height: 1.4;
    }

    .notification-item > .material-symbols-rounded {
      color: #98a2b3;
      font-size: 18px;
    }

    .notification-empty {
      min-height: 190px;
      padding: 30px 24px;
      display: grid;
      place-items: center;
      align-content: center;
      text-align: center;
    }

    .notification-empty .material-symbols-rounded {
      margin-bottom: 10px;
      color: #98a2b3;
      font-size: 30px;
    }

    .notification-empty strong {
      color: #344054;
      font-size: var(--type-small);
    }

    .notification-empty span {
      max-width: 28ch;
      margin-top: 5px;
      color: var(--muted);
      font-size: var(--type-caption);
      line-height: 1.45;
    }

    .notification-live-region {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    .request-notification-btn.incoming .material-symbols-rounded {
      animation: notification-bell-ring 700ms ease-in-out;
      transform-origin: 50% 15%;
    }

    .request-notification-btn.incoming .request-notification-count {
      animation: notification-count-pulse 700ms ease-out;
    }

    @keyframes notification-bell-ring {
      0%, 100% { transform: rotate(0); }
      20% { transform: rotate(14deg); }
      40% { transform: rotate(-12deg); }
      60% { transform: rotate(8deg); }
      80% { transform: rotate(-5deg); }
    }

    @keyframes notification-count-pulse {
      0% { transform: scale(0.82); }
      55% { transform: scale(1.18); }
      100% { transform: scale(1); }
    }

    @media (hover: hover) and (pointer: fine) {
      .notification-panel-close:hover,
      .notification-item:hover {
        background: #f4f8f5;
      }
    }

    .request-notification-toast {
      position: fixed;
      top: 18px;
      right: 18px;
      z-index: 9500;
      width: min(360px, calc(100vw - 36px));
      border: 1px solid #cfe6d7;
      border-radius: 7px;
      background: #f8fcf9;
      box-shadow: 0 18px 44px rgba(16, 24, 40, 0.16);
      padding: 14px;
      display: flex;
      align-items: center;
      gap: 12px;
      cursor: pointer;
    }

    .request-notification-toast > .material-symbols-rounded {
      color: #12864f;
      font-size: 24px;
      flex: none;
    }

    .request-notification-toast strong {
      display: block;
      color: #182230;
      font-size: 14px;
      margin-bottom: 2px;
    }

    .request-notification-toast span {
      color: #667085;
      font-size: 13px;
      line-height: 1.35;
    }

    .app-toast {
      position: fixed;
      top: calc(var(--safe-top) + 18px);
      right: 18px;
      z-index: 9600;
      width: min(360px, calc(100vw - 36px));
      border: 1px solid #dfe7e2;
      border-radius: 7px;
      background: #ffffff;
      box-shadow: 0 18px 44px rgba(16, 24, 40, 0.16);
      padding: 14px;
      display: flex;
      align-items: center;
      gap: 12px;
      animation: appToastIn 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .app-toast-icon {
      width: 34px;
      height: 34px;
      border-radius: 7px;
      background: #edf8f1;
      color: #12864f;
      display: grid;
      place-items: center;
      flex: none;
      font-size: 21px;
    }

    .app-toast-copy {
      min-width: 0;
    }

    .app-toast-copy strong,
    .app-toast-copy span {
      display: block;
    }

    .app-toast-copy strong {
      color: #182230;
      font-size: 14px;
      font-weight: 850;
      line-height: 1.25;
    }

    .app-toast-copy span {
      margin-top: 3px;
      color: #667085;
      font-size: 13px;
      font-weight: 600;
      line-height: 1.35;
    }

    .app-toast-info .app-toast-icon {
      background: #eef4ff;
      color: #3069d6;
    }

    .app-toast-error {
      border-color: #f3c6c6;
    }

    .app-toast-error .app-toast-icon {
      background: #fff1f1;
      color: #c62828;
    }

    @keyframes appToastIn {
      from {
        opacity: 0;
        transform: translateY(-6px) scale(0.985);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    @media (max-width: 760px) {
      .dashboard-top-controls {
        grid-template-columns: 1fr;
      }

      .dashboard-insights-grid,
      .dashboard-payroll-mini {
        grid-template-columns: 1fr;
      }

      .dashboard-trend-chart {
        min-height: 236px;
      }

      .dashboard-trend-visual,
      .dashboard-trend-empty {
        min-height: 236px;
      }

      .dashboard-trend-svg {
        height: 184px;
      }

      .dashboard-trend-visual::before {
        inset: 14px 12px 48px 34px;
      }

      .dashboard-trend-labels {
        left: 30px;
        right: 10px;
        bottom: 14px;
        gap: 2px;
        font-size: 9px;
      }

      .dashboard-insight-head {
        align-items: stretch;
      }

      .dashboard-payroll-action {
        min-width: 44px;
      }

      .notification-panel {
        position: fixed;
        top: calc(var(--safe-top) + 70px);
        right: 12px;
        left: 12px;
        width: auto;
        max-height: calc(100vh - var(--safe-top) - 88px);
        transform-origin: top right;
      }

      .request-notification-toast {
        top: calc(var(--safe-top) + 10px);
        right: 12px;
        width: calc(100vw - 24px);
      }

      .app-toast {
        top: calc(var(--safe-top) + 10px);
        right: 12px;
        left: 12px;
        width: auto;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .notification-panel {
        transition: none;
      }

      .request-notification-btn.incoming .material-symbols-rounded,
      .request-notification-btn.incoming .request-notification-count {
        animation: none;
      }

      .app-toast {
        animation: none;
      }
    }

    .icon-btn,
    .avatar-chip {
      width: 46px;
      height: 46px;
      border-radius: 50%;
      border: 1px solid #edf0f2;
      background: #fff;
      display: grid;
      place-items: center;
      cursor: pointer;
      color: #4e5a6b;
      box-shadow: 0 4px 14px rgba(17, 24, 39, 0.03);
    }

    .avatar-chip {
      font-size: 28px;
      font-weight: 700;
      color: var(--green);
      background: #ecfbf2;
    }

    .bell-wrap {
      position: relative;
    }

    .bell-wrap::after {
      content: "";
      position: absolute;
      top: 11px;
      right: 12px;
      width: 9px;
      height: 9px;
      border-radius: 50%;
      background: var(--green);
      border: 2px solid #fff;
    }

    /* PAGES */
    .page {
      padding: 18px;
      padding-bottom: calc(92px + var(--safe-bottom));
    }

    .greeting {
      margin-bottom: 18px;
    }

    .greeting h2 {
      margin: 0 0 8px;
      font-size: 22px;
      line-height: 1.15;
      letter-spacing: 0;
    }

    .greeting p {
      margin: 0;
      color: var(--muted);
      font-size: 15px;
      line-height: 1.45;
    }

    .top-controls {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-bottom: 16px;
    }

    .dashboard-top-controls {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      align-items: stretch;
    }

    .pill-btn,
    .pill-select,
    .pill-input {
      min-height: 56px;
      width: 100%;
      border-radius: 16px;
      border: 1px solid #e8ecef;
      background: #fff;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 0 14px;
      color: var(--text);
      font-size: 15px;
      font-weight: 600;
      box-shadow: 0 3px 10px rgba(17, 24, 39, 0.02);
      cursor: pointer;
    }

    .pill-btn .material-symbols-rounded,
    .pill-select .material-symbols-rounded,
    .pill-input .material-symbols-rounded {
      color: #7d8998;
      font-size: 20px;
      flex: none;
    }

    .pill-btn .text-clip,
    .pill-select .text-clip {
      flex: 1;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      text-align: left;
    }

    .dashboard-code-pill {
      justify-content: flex-start;
    }

    .dashboard-code-pill .dashboard-code-copy {
      display: grid;
      min-width: 0;
      gap: 2px;
      line-height: 1.05;
    }

    .dashboard-code-pill .dashboard-code-label {
      color: #687384;
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.02em;
      text-transform: uppercase;
    }

    .dashboard-code-pill .dashboard-code-value {
      overflow: hidden;
      color: var(--text);
      font-size: 15px;
      font-weight: 850;
      letter-spacing: 0.03em;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .dashboard-code-pill.copied {
      border-color: rgba(28, 139, 79, 0.34);
      background: #f2fbf5;
      box-shadow: 0 8px 18px rgba(18, 128, 75, 0.08);
    }

    .stat-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
      margin-bottom: 18px;
    }

    .stat-card {
      background: var(--card);
      border-radius: 22px;
      border: 1px solid #edf0f3;
      box-shadow: var(--shadow);
      padding: 18px;
    }

    .stat-head {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 14px;
    }

    .stat-icon {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      flex: none;
    }

    .stat-icon.green {
      background: #eaf8ef;
      color: var(--green);
    }

    .stat-icon.orange {
      background: #fff3e8;
      color: var(--orange);
    }

    .stat-icon.blue {
      background: #eef4ff;
      color: var(--blue);
    }

    .stat-icon.red {
      background: #fff1f5;
      color: #ff658c;
    }

    .stat-label {
      color: #687384;
      font-size: 14px;
      font-weight: 500;
      line-height: 1.25;
    }

    .stat-value {
      font-size: 26px;
      font-weight: 800;
      letter-spacing: 0;
      line-height: 1;
      margin-bottom: 6px;
    }

    .stat-note {
      font-size: 13px;
      font-weight: 600;
      color: var(--green);
    }

    .stat-note.orange {
      color: var(--orange);
    }

    .stat-note.red {
      color: var(--red);
    }

    .section-card {
      background: var(--card);
      border-radius: 24px;
      border: 1px solid #edf0f3;
      box-shadow: var(--shadow);
      padding: 16px;
      margin-bottom: 16px;
    }

    .section-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 14px;
    }

    .dashboard-insights-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
      gap: 16px;
      margin-bottom: 16px;
    }

    .dashboard-insight-card {
      min-width: 0;
    }

    .dashboard-insight-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
      margin-bottom: 14px;
    }

    .dashboard-insight-title {
      margin: 0;
      color: var(--text);
      font-size: 16px;
      font-weight: 850;
      line-height: 1.25;
    }

    .dashboard-insight-copy {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: var(--type-caption);
      font-weight: 600;
      line-height: 1.4;
    }

    .dashboard-insight-kicker {
      flex: none;
      border-radius: 999px;
      background: #f2f8f4;
      color: #14834f;
      padding: 6px 10px;
      font-size: 12px;
      font-weight: 800;
      line-height: 1;
    }

    .dashboard-trend-chart {
      min-height: 224px;
    }

    .dashboard-trend-visual {
      position: relative;
      min-height: 232px;
      border: 1px solid #e8f0eb;
      border-radius: 7px;
      background: #fcfefc;
      overflow: hidden;
      isolation: isolate;
    }

    .dashboard-trend-visual::before {
      content: "";
      position: absolute;
      inset: 14px 18px 42px 44px;
      border-radius: 7px;
      background: linear-gradient(90deg, rgba(102, 112, 133, 0.07) 1px, transparent 1px);
      background-size: calc(100% / 6) 100%, 100% 100%;
      pointer-events: none;
      opacity: 0.8;
    }

    .dashboard-trend-svg {
      position: relative;
      z-index: 1;
      display: block;
      width: 100%;
      height: 184px;
      overflow: visible;
    }

    .dashboard-trend-grid {
      stroke: rgba(102, 112, 133, 0.13);
      stroke-width: 1;
      vector-effect: non-scaling-stroke;
    }

    .dashboard-trend-area {
      fill: url(#dashboardTrendFill);
      opacity: 0.9;
      animation: dashboardTrendFade 260ms var(--ease-out-quart) 40ms both;
    }

    .dashboard-trend-line {
      fill: none;
      stroke: url(#dashboardTrendStroke);
      stroke-width: 3.5;
      stroke-linecap: round;
      stroke-linejoin: round;
      filter: none;
      stroke-dasharray: var(--trend-length, 560);
      stroke-dashoffset: var(--trend-length, 560);
      animation: dashboardTrendDraw 520ms var(--ease-out-quart) 80ms both;
    }

    .dashboard-trend-late-line {
      fill: none;
      stroke: #d99725;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      stroke-dasharray: 1 9;
      opacity: 0.82;
    }

    .dashboard-trend-point {
      fill: #fcfefc;
      stroke: #178a53;
      stroke-width: 2.5;
      filter: none;
      transform-origin: center;
      animation: dashboardTrendPointIn 220ms var(--ease-out-quart) both;
    }

    .dashboard-trend-point.late {
      stroke: #d99725;
    }

    .dashboard-trend-value {
      fill: #475467;
      font-size: 11px;
      font-weight: 800;
      text-anchor: middle;
      paint-order: stroke;
      stroke: rgba(255, 255, 255, 0.94);
      stroke-width: 4px;
      stroke-linejoin: round;
    }

    .dashboard-trend-labels {
      position: absolute;
      z-index: 2;
      left: 44px;
      right: 18px;
      bottom: 12px;
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 6px;
      color: #667085;
      font-size: 11px;
      font-weight: 850;
      line-height: 1;
      text-align: center;
    }

    .dashboard-trend-summary {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 12px;
      justify-content: space-between;
    }

    .dashboard-trend-chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-height: 28px;
      border-radius: 999px;
      border: 1px solid #e3ece7;
      background: #fbfdfb;
      color: #344054;
      padding: 0 10px;
      font-size: 12px;
      font-weight: 850;
      line-height: 1;
    }

    .dashboard-trend-chip.trend-health {
      color: #176f3d;
      background: #f1fbf5;
      border-color: #cfe8d8;
    }

    .dashboard-trend-chip.trend-health::before {
      background: linear-gradient(135deg, #19a463, #81c784);
    }

    .dashboard-trend-chip::before {
      content: "";
      width: 8px;
      height: 8px;
      border-radius: 999px;
      background: #178a53;
    }

    .dashboard-trend-chip.late::before {
      background: #d99725;
    }

    .dashboard-trend-empty {
      min-height: 224px;
      display: grid;
      place-items: center;
      border: 1px solid #e8f0eb;
      border-radius: 7px;
      background: #fbfdfb;
      color: var(--muted);
      text-align: center;
      padding: 18px;
    }

    @keyframes dashboardTrendDraw {
      to {
        stroke-dashoffset: 0;
      }
    }

    @keyframes dashboardTrendFade {
      from {
        opacity: 0;
        transform: translateY(4px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes dashboardTrendPointIn {
      from {
        opacity: 0;
        transform: scale(0.78);
      }
      to {
        opacity: 1;
        transform: scale(1);
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .dashboard-trend-area,
      .dashboard-trend-line,
      .dashboard-trend-point {
        animation: none;
      }

      .dashboard-trend-line {
        stroke-dashoffset: 0;
      }
    }

    @media (max-width: 760px) {
      .dashboard-insights-grid {
        grid-template-columns: minmax(0, 1fr);
      }

      .dashboard-trend-chart {
        min-height: 236px;
      }

      .dashboard-trend-visual,
      .dashboard-trend-empty {
        min-height: 236px;
      }

      .dashboard-trend-svg {
        height: 184px;
      }

      .dashboard-trend-visual::before {
        inset: 14px 12px 48px 34px;
      }

      .dashboard-trend-labels {
        left: 30px;
        right: 10px;
        bottom: 14px;
        gap: 2px;
        font-size: 9px;
      }
    }

    @media (max-width: 520px) {
      .dashboard-insight-head {
        flex-direction: column;
        gap: 8px;
      }

      .dashboard-payroll-action {
        width: 100%;
      }

      .dashboard-trend-summary {
        display: grid;
        grid-template-columns: 1fr;
        gap: 7px;
      }

      .dashboard-trend-chip {
        justify-content: center;
        width: 100%;
      }

      .dashboard-trend-value {
        font-size: 11px;
      }
    }

    .dashboard-team-performance-card {
      display: flex;
      flex-direction: column;
    }

    .team-performance-range {
      flex: none;
      display: inline-grid;
      grid-template-columns: repeat(2, minmax(56px, 1fr));
      min-height: 34px;
      padding: 2px;
      border: 1px solid #dfe7e2;
      border-radius: 7px;
      background: #f7faf8;
    }

    .team-performance-range button {
      min-height: 28px;
      border: 0;
      border-radius: 5px;
      background: transparent;
      color: #667085;
      padding: 0 9px;
      font-size: 12px;
      font-weight: 800;
      cursor: pointer;
      transition: background 180ms var(--ease-out-quart), color 180ms var(--ease-out-quart), box-shadow 180ms var(--ease-out-quart);
    }

    .team-performance-range button:hover:not(:disabled) {
      color: #344054;
      background: #eef3f0;
    }

    .team-performance-range button:focus-visible {
      outline: 2px solid #27c46a;
      outline-offset: 2px;
    }

    .team-performance-range button.active {
      background: #ffffff;
      color: #147a47;
      box-shadow: 0 1px 3px rgba(16, 24, 40, 0.10);
    }

    .team-performance-range button:disabled {
      cursor: wait;
      opacity: 0.65;
    }

    .team-performance {
      display: flex;
      flex: 1;
      flex-direction: column;
      min-height: 224px;
    }

    .team-performance-period-label {
      margin-bottom: 12px;
      color: #667085;
      font-size: 11px;
      font-weight: 750;
      line-height: 1.2;
    }

    .team-performance-eyebrow {
      color: #667085;
      font-size: 11px;
      font-weight: 850;
      line-height: 1;
      text-transform: uppercase;
    }

    .team-performance-leader {
      padding-bottom: 14px;
      border-bottom: 1px solid #e6ece8;
    }

    .team-performance-leader-row {
      display: grid;
      grid-template-columns: 46px minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      margin-top: 10px;
    }

    .team-performance-avatar,
    .team-performance-mini-avatar {
      display: grid;
      place-items: center;
      overflow: hidden;
      border-radius: 50%;
      background: #eaf7ef;
      color: #147a47;
      font-weight: 850;
    }

    .team-performance-avatar {
      width: 46px;
      height: 46px;
      font-size: 14px;
    }

    .team-performance-mini-avatar {
      width: 30px;
      height: 30px;
      font-size: 10px;
    }

    .team-performance-avatar img,
    .team-performance-mini-avatar img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .team-performance-leader-copy {
      min-width: 0;
    }

    .team-performance-leader-copy strong,
    .team-performance-leader-copy span {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .team-performance-leader-copy strong {
      color: #182230;
      font-size: 15px;
      font-weight: 850;
      line-height: 1.2;
    }

    .team-performance-leader-copy span {
      margin-top: 4px;
      color: #667085;
      font-size: 11px;
      font-weight: 650;
      line-height: 1.3;
    }

    .team-performance-score {
      display: flex;
      align-items: baseline;
      color: #176f3d;
      line-height: 1;
      white-space: nowrap;
    }

    .team-performance-score strong {
      font-size: 28px;
      font-weight: 900;
    }

    .team-performance-score span {
      margin-left: 2px;
      color: #667085;
      font-size: 11px;
      font-weight: 750;
    }

    .team-performance-evidence {
      display: grid;
      gap: 6px;
      margin-top: 11px;
    }

    .team-performance-evidence > span {
      display: flex;
      align-items: center;
      gap: 7px;
      color: #344054;
      font-size: 11px;
      font-weight: 700;
      line-height: 1.3;
    }

    .team-performance-evidence .material-symbols-rounded {
      flex: none;
      color: #178a53;
      font-size: 16px;
    }

    .team-performance-standing {
      padding: 14px 0;
    }

    .team-performance-standing ol {
      margin: 8px 0 0;
      padding: 0;
      list-style: none;
    }

    .team-performance-standing li {
      display: grid;
      grid-template-columns: 16px 30px minmax(82px, 1fr) minmax(44px, 0.7fr) 24px;
      align-items: center;
      gap: 8px;
      min-height: 42px;
      border-top: 1px solid #edf1ee;
    }

    .team-performance-standing li:first-child {
      border-top: 0;
    }

    .team-performance-rank,
    .team-performance-row-score {
      color: #475467;
      font-size: 11px;
      font-weight: 850;
      text-align: right;
    }

    .team-performance-person {
      min-width: 0;
    }

    .team-performance-person strong,
    .team-performance-person small {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .team-performance-person strong {
      color: #344054;
      font-size: 11px;
      font-weight: 800;
      line-height: 1.2;
    }

    .team-performance-person small {
      margin-top: 2px;
      color: #7c8799;
      font-size: 9px;
      font-weight: 650;
      line-height: 1.2;
    }

    .team-performance-bar {
      height: 5px;
      overflow: hidden;
      border-radius: 999px;
      background: #e8eeea;
    }

    .team-performance-bar > span {
      display: block;
      height: 100%;
      border-radius: inherit;
      background: #1b8f55;
    }

    .team-performance-attention {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      margin-top: auto;
      border: 1px solid #dce9e1;
      border-radius: 7px;
      background: #f5faf7;
      color: #344054;
      padding: 10px;
      font-size: 11px;
      font-weight: 700;
      line-height: 1.35;
    }

    .team-performance-method {
      margin: -4px 0 10px;
      color: #7c8799;
      font-size: 9px;
      font-weight: 650;
      line-height: 1.35;
    }

    .team-performance-attention .material-symbols-rounded {
      flex: none;
      color: #178a53;
      font-size: 17px;
    }

    .team-performance-empty {
      display: grid;
      flex: 1;
      place-items: center;
      align-content: center;
      gap: 6px;
      min-height: 224px;
      border: 1px solid #e8f0eb;
      border-radius: 7px;
      background: #fbfdfb;
      color: #667085;
      padding: 18px;
      text-align: center;
    }

    .team-performance-empty .material-symbols-rounded {
      color: #178a53;
      font-size: 24px;
    }

    .team-performance-empty strong {
      color: #344054;
      font-size: 13px;
    }

    .team-performance-empty span,
    .team-performance-empty small {
      max-width: 34ch;
      font-size: 11px;
      font-weight: 650;
      line-height: 1.4;
    }

    .team-performance-skeleton {
      display: grid;
      gap: 10px;
      min-height: 224px;
    }

    .team-performance-skeleton span {
      display: block;
      border-radius: 7px;
      background: #edf2ef;
      animation: teamPerformancePulse 1.1s ease-in-out infinite alternate;
    }

    .team-performance-skeleton span:nth-child(1) { width: 34%; height: 12px; }
    .team-performance-skeleton span:nth-child(2) { width: 100%; height: 72px; }
    .team-performance-skeleton span:nth-child(3) { width: 100%; height: 94px; }
    .team-performance-skeleton span:nth-child(4) { width: 100%; height: 38px; }

    @keyframes teamPerformancePulse {
      from { opacity: 0.55; }
      to { opacity: 1; }
    }

    @media (prefers-reduced-motion: reduce) {
      .team-performance-skeleton span {
        animation: none;
      }
    }

    .dashboard-payroll-mini {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
    }

    .dashboard-payroll-mini-box {
      min-width: 0;
      border: 1px solid #edf0f3;
      border-radius: 7px;
      background: #fbfcfb;
      padding: 12px;
    }

    .dashboard-payroll-mini-box span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      line-height: 1.2;
    }

    .dashboard-payroll-mini-box strong {
      display: block;
      margin-top: 7px;
      color: var(--text);
      font-size: 18px;
      font-weight: 900;
      line-height: 1.1;
    }

    .dashboard-payroll-action {
      min-height: 40px;
      border: 1px solid #cfe8d8;
      border-radius: 7px;
      background: #f8fcf9;
      color: #157a49;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 0 12px;
      font-size: var(--type-small);
      font-weight: 850;
      line-height: 1;
      cursor: pointer;
      white-space: nowrap;
      transition:
        background 180ms var(--ease-out-quart),
        border-color 180ms var(--ease-out-quart),
        box-shadow 180ms var(--ease-out-quart),
        transform 180ms var(--ease-out-quart);
    }

    .dashboard-payroll-action .material-symbols-rounded {
      font-size: 18px;
    }

    .section-head h3 {
      margin: 0;
      font-size: 18px;
      letter-spacing: 0;
    }

    .section-head a,
    .section-head button.link-btn {
      border: none;
      background: transparent;
      color: var(--green);
      font-weight: 700;
      font-size: 15px;
      padding: 0;
      cursor: pointer;
      text-decoration: none;
    }

    /* RECORD LIST */
    .record-list {
      display: flex;
      flex-direction: column;
      gap: 0;
    }

    .list-row {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 0;
      border-bottom: 1px solid #eef1f4;
      cursor: pointer;
    }

    .list-row:last-child {
      border-bottom: none;
      padding-bottom: 2px;
    }

    .avatar {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background: #eaf9f0;
      color: var(--green);
      display: grid;
      place-items: center;
      font-weight: 700;
      font-size: 22px;
      flex: none;
      overflow: hidden;
    }

    .avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .row-main {
      min-width: 0;
      flex: 1;
    }

    .row-name {
      font-size: 15px;
      font-weight: 700;
      margin-bottom: 4px;
      line-height: 1.2;
    }

    .row-sub {
      font-size: 13px;
      color: var(--muted);
      line-height: 1.3;
    }

    .row-time {
      font-size: 13px;
      color: #647082;
      font-weight: 600;
      white-space: nowrap;
    }

    .status-pill {
      min-width: 86px;
      padding: 8px 12px;
      border-radius: 999px;
      display: inline-flex;
      justify-content: center;
      align-items: center;
      gap: 6px;
      font-size: 13px;
      font-weight: 700;
      white-space: nowrap;
    }

    .pill-working {
      background: #eaf9f0;
      color: var(--green);
    }

    .pill-late {
      background: #fff3e6;
      color: var(--orange);
    }

    .pill-checked_out {
      background: #edf3ff;
      color: var(--blue);
    }

    .pill-offline {
      background: #f2f4f7;
      color: #667085;
    }

    .pill-absent {
      background: #fff1f1;
      color: var(--red);
    }


    .pill-late_checked_out {
      background: #fff1f1;
      color: var(--red);
    }

    .pill-working_late {
      background: #fff3e6;
      color: var(--orange);
    }

    .attendance-card.late-node {
      border-color: #ffd7d7;
      background: linear-gradient(180deg, #fffafa 0%, #ffffff 100%);
      box-shadow: 0 10px 35px rgba(255, 93, 93, 0.08);
    }

    .attendance-card.late-node .avatar {
      background: #fff1f1;
      color: var(--red);
    }

    .attendance-card.late-node .mini-circle {
      background: #fff1f1;
      color: var(--red);
    }

    .attendance-card.offline-node {
      border-color: #e6ebef;
      background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
      cursor: default;
    }

    .attendance-card.offline-node .avatar,
    .attendance-card.offline-node .mini-circle {
      background: #f2f4f7;
      color: #667085;
    }

    .attendance-card.absent-node {
      border-color: #ffd7d7;
      background: linear-gradient(180deg, #fffafa 0%, #ffffff 100%);
      box-shadow: 0 10px 35px rgba(255, 93, 93, 0.08);
      cursor: default;
    }

    .attendance-card.absent-node .avatar,
    .attendance-card.absent-node .mini-circle {
      background: #fff1f1;
      color: var(--red);
    }

    .attendance-card.manual-verification-node {
      border-color: #f1cf8a;
      background: linear-gradient(180deg, #fffbf2 0%, #ffffff 100%);
      box-shadow: 0 10px 35px rgba(216, 157, 34, 0.11);
    }

    .attendance-card.manual-verification-node .avatar,
    .attendance-card.manual-verification-node .mini-circle {
      background: #fff3d6;
      color: #9a6700;
    }

    .pill-pending {
      background: #fff7e8;
      color: #d89d22;
    }

    .pill-manual_verification {
      background: #fff3d6;
      color: #9a6700;
    }

    .pill-approved {
      background: #eaf9f0;
      color: var(--green);
    }

    .pill-flagged,
    .pill-missing_checkout {
      background: #fff1f1;
      color: var(--red);
    }

    .verification-line {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-top: 7px;
      padding: 6px 10px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 800;
      line-height: 1;
    }

    .verification-line .material-symbols-rounded {
      font-size: 16px;
    }

    .verification-line.verified {
      background: #eaf9f0;
      color: var(--green);
    }

    .verification-line.pending {
      background: #fff7e8;
      color: #d89d22;
    }

    .verification-line.flagged,
    .verification-line.declined {
      background: #fff1f1;
      color: var(--red);
    }

    .attendance-source-chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-top: 7px;
      padding: 6px 10px;
      border-radius: 999px;
      background: #eef4ff;
      color: #315c9f;
      font-size: 12px;
      font-weight: 800;
      line-height: 1;
    }

    .attendance-source-chip.admin-pro {
      background: #eaf9f0;
      color: #087443;
    }

    .attendance-source-chip .material-symbols-rounded {
      font-size: 16px;
    }

    .empty {
      text-align: center;
      color: var(--muted);
      font-size: 14px;
      padding: 28px 10px;
    }

    /* EMPLOYEES */
    .employee-top-actions {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 12px;
      margin-bottom: 14px;
    }

    .add-employee-btn {
      width: 58px;
      height: 58px;
      border: none;
      border-radius: 18px;
      background: linear-gradient(180deg, #168a49 0%, #106d39 100%);
      color: white;
      display: grid;
      place-items: center;
      cursor: pointer;
      box-shadow: 0 12px 26px rgba(16, 109, 57, 0.24);
    }

    .add-employee-btn:disabled {
      background: #e7edf0;
      color: #8a98a8;
      cursor: not-allowed;
      opacity: 1;
      box-shadow: none;
    }

    .add-employee-btn:active {
      background: linear-gradient(90deg, #b8f0ca 0%, #a4edc1 100%);
      color: #132033;
      box-shadow: 0 8px 18px rgba(39, 196, 106, 0.16);
    }

    .employee-title-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .share-invite-btn {
      width: auto;
      min-height: 58px;
      padding: 0 18px;
      border-radius: 18px;
      white-space: nowrap;
    }

    .invite-link-box {
      display: grid;
      gap: 10px;
      padding: 14px;
      border: 1px solid #e6edf0;
      border-radius: 18px;
      background: #f8fbf9;
      margin-bottom: 14px;
    }

    .invite-link-output {
      min-height: 48px;
      border: 1px dashed #b8d9c4;
      border-radius: 14px;
      background: #ffffff;
      color: var(--ink);
      padding: 12px;
      font-size: 13px;
      line-height: 1.4;
      word-break: break-all;
    }

    .invite-link-meta {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }

    .employee-card {
      background: #fff;
      border: 1px solid #edf0f2;
      border-radius: 22px;
      box-shadow: var(--shadow);
      padding: 16px;
      margin-bottom: 14px;
    }

    .employee-card-top {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .employee-status {
      margin-left: auto;
    }

    .employee-code {
      margin-top: 14px;
      padding-top: 14px;
      border-top: 1px solid #eef1f4;
      display: flex;
      justify-content: space-between;
      gap: 12px;
      color: var(--muted);
      font-size: 14px;
    }

    .employee-code strong {
      color: var(--text);
    }

    .employee-directory-stats {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 14px;
    }

    .directory-stat {
      background: #fff;
      border: 1px solid #edf0f2;
      border-radius: 18px;
      padding: 13px 14px;
      box-shadow: 0 8px 22px rgba(17, 24, 39, 0.04);
    }

    .directory-stat span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0;
      margin-bottom: 6px;
    }

    .directory-stat strong {
      color: var(--text);
      display: block;
      font-size: 22px;
      line-height: 1;
    }

    .employee-directory-toolbar {
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
      margin-bottom: 14px;
    }

    .employee-search-wrap {
      margin-bottom: 0;
    }

    .directory-filter {
      display: grid;
      gap: 6px;
    }

    .directory-filter span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .employee-filter-row {
      display: grid;
      gap: 10px;
      margin-bottom: 14px;
    }

    .employee-directory-count {
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
      line-height: 1.4;
    }

    .employee-filter-tab span {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 20px;
      height: 20px;
      margin-left: 5px;
      padding: 0 6px;
      border-radius: 999px;
      background: #f3f6f5;
      color: #667085;
      font-size: 11px;
      line-height: 1;
    }

    .employee-filter-tab.active span {
      background: #d8f4e4;
      color: var(--green);
    }

    .employee-directory-list {
      display: grid;
      gap: 10px;
    }

    .employee-directory-header {
      display: none;
    }

    .employee-directory-row {
      display: grid;
      gap: 12px;
    }

    .employee-directory-row .employee-card-top {
      display: grid;
      align-items: stretch;
      gap: 12px;
    }

    .employee-person-cell {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }

    .employee-directory-cell {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding-top: 12px;
      border-top: 1px solid #eef1f4;
      color: var(--muted);
      font-size: 13px;
    }

    .employee-directory-cell > span:not(.status-pill) {
      font-weight: 700;
    }

    .employee-directory-cell strong {
      color: var(--text);
      font-size: 14px;
      text-align: right;
    }

    .employee-directory-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      padding-top: 12px;
      border-top: 1px solid #eef1f4;
    }

    .employee-document-summary {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      width: fit-content;
      margin-top: 7px;
      padding: 5px 9px;
      border-radius: 999px;
      background: #f4f8f5;
      color: #667085;
      font-size: 12px;
      font-weight: 800;
      line-height: 1;
    }

    .employee-document-summary.complete {
      background: #e7f8ee;
      color: var(--green);
    }

    .employee-document-summary .material-symbols-rounded {
      font-size: 16px;
    }

    .employee-documents-panel {
      margin: 18px 0;
      padding: 16px;
      border: 1px solid #dfe7e2;
      border-radius: 7px;
      background: #fbfdfc;
    }

    .employee-documents-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
      margin-bottom: 12px;
    }

    .employee-documents-head h3 {
      margin: 0;
      color: var(--text);
      font-size: 16px;
      font-weight: 850;
      line-height: 1.25;
    }

    .employee-documents-head p {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 13px;
      font-weight: 600;
      line-height: 1.4;
    }

    .employee-document-progress {
      flex: none;
      min-width: 62px;
      padding: 6px 9px;
      border-radius: 999px;
      background: #eef4ff;
      color: #3069d6;
      text-align: center;
      font-size: 12px;
      font-weight: 850;
      line-height: 1;
    }

    .employee-document-progress.complete {
      background: #d8f4e4;
      color: var(--green);
    }

    .employee-document-list {
      display: grid;
      gap: 10px;
    }

    .employee-document-item {
      min-height: 58px;
      display: grid;
      grid-template-columns: 34px minmax(0, 1fr);
      align-items: center;
      gap: 11px;
      padding: 11px;
      border: 1px solid #e8eeea;
      border-radius: 7px;
      background: #ffffff;
    }

    .employee-document-item input[type="file"] {
      grid-column: 1 / -1;
      width: 100%;
      min-width: 0;
      padding: 9px;
      border: 1px dashed #cfd8d3;
      border-radius: 7px;
      background: #f8fbf9;
      color: #344054;
      font-size: 12px;
      font-weight: 650;
    }

    .employee-document-item > .material-symbols-rounded {
      width: 34px;
      height: 34px;
      border-radius: 7px;
      display: grid;
      place-items: center;
      background: #edf8f1;
      color: #12864f;
      font-size: 20px;
    }

    .employee-document-copy {
      min-width: 0;
    }

    .employee-document-item strong,
    .employee-document-item small {
      display: block;
    }

    .employee-document-item strong {
      color: var(--text);
      font-size: 14px;
      font-weight: 850;
      line-height: 1.25;
    }

    .employee-document-item small {
      margin-top: 2px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
      line-height: 1.35;
    }

    .employee-document-upload-btn,
    .employee-document-view-btn,
    .employee-document-remove-btn {
      min-height: 38px;
      border-radius: 7px;
      border: 1px solid #cfe6d7;
      background: #f8fcf9;
      color: var(--green);
      font-size: 13px;
      font-weight: 850;
      cursor: pointer;
    }

    .employee-document-upload-btn {
      grid-column: 1 / -1;
      background: var(--green);
      border-color: var(--green);
      color: #ffffff;
    }

    .employee-document-view-btn,
    .employee-document-remove-btn {
      min-width: 0;
    }

    .employee-document-view-btn.hidden,
    .employee-document-remove-btn.hidden {
      display: none;
    }

    .employee-document-remove-btn {
      border-color: #f3c6c6;
      background: #fff8f8;
      color: #b42318;
    }

    .employee-directory-row .employee-status {
      margin-left: 0;
    }

    .form-help {
      font-size: 13px;
      color: var(--muted);
      line-height: 1.45;
      margin: -4px 0 16px;
    }

    /* ATTENDANCE PAGE */
    .page-title-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 14px;
    }

    .page-title-row h2 {
      margin: 0;
      font-size: 28px;
      letter-spacing: 0;
      line-height: 1;
    }

    .search-wrap {
      position: relative;
      margin-bottom: 14px;
    }

    .search-wrap input {
      padding-left: 48px;
      height: 58px;
    }

    .search-wrap .material-symbols-rounded {
      position: absolute;
      left: 15px;
      top: 50%;
      transform: translateY(-50%);
      color: #98a2b3;
      pointer-events: none;
    }

    .filter-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-bottom: 16px;
    }

    .attendance-card {
      background: #fff;
      border: 1px solid #edf0f2;
      border-radius: 22px;
      box-shadow: var(--shadow);
      padding: 16px;
      margin-bottom: 14px;
      cursor: pointer;
    }

    .attendance-card-top {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 16px;
    }

    .attendance-card-right {
      flex: 1;
      min-width: 0;
    }

    .attendance-card-name {
      font-size: 15px;
      font-weight: 700;
      margin: 2px 0 4px;
      line-height: 1.2;
    }

    .attendance-card-sub {
      font-size: 13px;
      color: var(--muted);
    }

    .attendance-status-wrap {
      margin-left: auto;
    }

    #attendanceCards.attendance-directory-mode {
      display: block;
    }

    .attendance-directory-list .attendance-card-top {
      display: grid;
      align-items: stretch;
      gap: 12px;
      margin-bottom: 0;
    }

    .attendance-directory-list .attendance-status-wrap {
      margin-left: 0;
    }

    .attendance-directory-list .employee-directory-cell strong {
      font-variant-numeric: tabular-nums;
    }

    .time-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      border-top: 1px solid #eef1f4;
      padding-top: 14px;
    }

    .time-box {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      min-width: 0;
    }

    .mini-circle {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background: #f1fbf5;
      color: var(--green);
      display: grid;
      place-items: center;
      flex: none;
    }

    .mini-circle .material-symbols-rounded {
      font-size: 18px;
    }

    .time-box-label {
      font-size: 13px;
      color: var(--muted);
      margin-bottom: 4px;
    }

    .time-box-value {
      font-size: 15px;
      font-weight: 700;
      line-height: 1.2;
    }

    /* REPORTS */
    .report-summary {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      margin-bottom: 16px;
    }

    .mini-stat {
      background: #fff;
      border: 1px solid #edf0f2;
      border-radius: 20px;
      padding: 14px 12px;
      box-shadow: var(--shadow);
    }

    .mini-stat-icon {
      width: 44px;
      height: 44px;
      border-radius: 16px;
      display: grid;
      place-items: center;
      margin-bottom: 12px;
    }

    .mini-stat-label {
      color: #677384;
      font-size: 13px;
      min-height: 34px;
      line-height: 1.3;
      margin-bottom: 8px;
    }

    .mini-stat-value {
      font-size: 18px;
      font-weight: 800;
      letter-spacing: 0;
      line-height: 1;
      margin-bottom: 6px;
    }

    .mini-stat-note {
      font-size: 12px;
      font-weight: 600;
      color: var(--green);
      line-height: 1.35;
    }

    .mini-stat-note.red {
      color: var(--red);
    }

    .chart-card {
      background: #fff;
      border: 1px solid #edf0f2;
      border-radius: 24px;
      box-shadow: var(--shadow);
      padding: 16px;
      margin-bottom: 16px;
    }

    .chart-title {
      font-size: 16px;
      font-weight: 700;
      margin-bottom: 16px;
    }

    .bar-chart {
      height: 210px;
      display: flex;
      align-items: flex-end;
      gap: 14px;
      padding: 12px 0 2px;
    }

    .bar-col {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
    }

    .bar-track {
      width: 28px;
      height: 160px;
      background: #f3f5f7;
      border-radius: 999px;
      display: flex;
      align-items: flex-end;
      overflow: hidden;
    }

    .bar-fill {
      width: 100%;
      background: linear-gradient(180deg, #2dcc73 0%, #29bf69 100%);
      border-radius: 999px;
      min-height: 4px;
    }

    .bar-label {
      font-size: 13px;
      color: #667284;
      font-weight: 600;
    }

    .generate-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      margin-bottom: 14px;
    }

    .mini-btn {
      height: 58px;
      border-radius: 16px;
      border: 2px solid #e8edf1;
      background: #fff;
      color: #5f6c7d;
      display: grid;
      place-items: center;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
    }

    .mini-btn.active {
      border-color: #aee2c1;
      color: var(--green);
      background: #f5fcf8;
    }


    /* SCHEDULES */
    .schedule-toolbar {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 10px;
      margin-bottom: 14px;
    }

    .schedule-range-card {
      background: #fff;
      border: 1px solid #edf0f2;
      border-radius: 22px;
      box-shadow: var(--shadow);
      padding: 16px;
      margin-bottom: 14px;
    }

    .schedule-range-title {
      font-size: 17px;
      font-weight: 800;
      margin-bottom: 6px;
      letter-spacing: 0;
    }

    .schedule-range-copy {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }

    .schedule-save-bar {
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
      margin-bottom: 14px;
    }

    .schedule-autosave-status {
      min-height: 50px;
      border: 1px solid #d8eadf;
      border-radius: var(--radius-sm);
      background: #f5fbf7;
      color: #2f7b4d;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 0 16px;
      font-weight: 800;
      text-align: center;
    }

    .schedule-autosave-status.saving {
      background: #fff8e9;
      border-color: #f0d8a8;
      color: #986a17;
    }

    .schedule-autosave-status.error {
      background: #fff1f1;
      border-color: #ffd8d8;
      color: #c53030;
    }

    .schedule-table-card {
      background: #fff;
      border: 1px solid #edf0f2;
      border-radius: 22px;
      box-shadow: var(--shadow);
      padding: 12px;
      margin-bottom: 14px;
      overflow: hidden;
    }

    .schedule-table-wrap {
      width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }

    .schedule-table {
      width: 100%;
      min-width: 920px;
      border-collapse: separate;
      border-spacing: 0;
    }

    .schedule-table th,
    .schedule-table td {
      border-bottom: 1px solid #eef1f4;
      padding: 10px 8px;
      vertical-align: middle;
      text-align: left;
    }

    .schedule-table thead th {
      position: sticky;
      top: 0;
      z-index: 2;
      background: #f8fbf9;
      color: #4f5b6e;
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.03em;
    }

    .schedule-employee-cell {
      min-width: 220px;
      position: sticky;
      left: 0;
      z-index: 3;
      background: #fff;
      box-shadow: 8px 0 16px rgba(17, 24, 39, 0.035);
    }

    .schedule-table thead .schedule-employee-cell {
      background: #f8fbf9;
      z-index: 4;
    }

    .schedule-employee-mini {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    .schedule-employee-mini .avatar {
      width: 42px;
      height: 42px;
      font-size: 16px;
    }

    .schedule-employee-name {
      font-size: 14px;
      font-weight: 900;
      line-height: 1.2;
      color: var(--text);
      margin-bottom: 3px;
    }

    .schedule-employee-sub {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.25;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 160px;
    }

    .schedule-day-head {
      min-width: 132px;
      text-align: center !important;
    }

    .schedule-day-head span {
      display: block;
      margin-top: 2px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
      text-transform: none;
      letter-spacing: 0;
    }

    .schedule-select {
      width: 100%;
      height: 44px;
      border: 1px solid #e6ebef;
      background: #fff;
      border-radius: 14px;
      padding: 0 10px;
      font-size: 13px;
      font-weight: 700;
      color: var(--text);
      outline: none;
    }

    .schedule-cell-controls {
      display: grid;
      gap: 6px;
      min-width: 132px;
    }

    .schedule-shift-select {
      height: 38px;
      color: #475467;
      background: #f8fbf9;
      font-size: 12px;
    }

    .schedule-select:focus {
      border-color: #bfe7cb;
      box-shadow: 0 0 0 4px rgba(39, 196, 106, 0.08);
    }

    .schedule-select.schedule-dirty {
      border-color: #ffd18a;
      background: #fffaf2;
    }

    .schedule-hint {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
      margin-top: 10px;
      text-align: center;
    }

    @media (max-width: 700px) {
      .schedule-table {
        min-width: 820px;
      }

      .schedule-employee-cell {
        min-width: 180px;
      }

      .schedule-day-head {
        min-width: 118px;
      }
    }


    /* SETTINGS */
    .setting-row {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      padding: 16px 0;
      border-bottom: 1px solid #eef1f4;
    }

    .setting-row:last-child {
      border-bottom: none;
    }

    .setting-label {
      font-size: 14px;
      color: var(--muted);
    }

    .setting-value {
      font-size: 14px;
      font-weight: 700;
      text-align: right;
      max-width: 62%;
      word-break: break-word;
    }

    .business-code-card {
      margin-bottom: 16px;
    }

    .dashboard-business-code-card {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 12px;
      margin-bottom: 16px;
    }

    .dashboard-business-code-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
    }

    .dashboard-business-code-copy {
      color: var(--muted);
      font-size: var(--type-small);
      font-weight: 500;
      line-height: var(--leading-body);
      margin: 4px 0 0;
    }

    .business-code-box {
      display: grid;
      gap: 8px;
      margin: 14px 0;
      padding: 14px;
      border: 1px solid #dceee4;
      border-radius: var(--radius-sm);
      background: #f8fbf9;
    }

    .business-code-label {
      color: var(--muted);
      font-size: var(--type-caption);
      font-weight: 750;
      letter-spacing: 0.015em;
      line-height: 1.2;
    }

    .business-code-value {
      color: var(--text);
      font-size: 1.5rem;
      font-weight: 850;
      line-height: 1;
      letter-spacing: 0.08em;
      font-variant-numeric: tabular-nums;
      overflow-wrap: anywhere;
    }

    .dashboard-business-code-card .business-code-box {
      margin: 0;
    }

    .business-code-actions {
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
    }

    .settings-section-stack {
      display: grid;
      gap: 28px;
    }

    .settings-group {
      display: grid;
      gap: 10px;
    }

    .settings-group-head {
      display: grid;
      gap: 4px;
      padding: 0 2px;
    }

    .settings-group-title {
      color: var(--text);
      font-size: 12px;
      font-weight: 850;
      letter-spacing: 0.08em;
      line-height: 1.2;
      text-transform: uppercase;
    }

    .settings-group-copy {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.5;
      margin: 0;
      max-width: 68ch;
    }

    .settings-profile-card {
      display: grid;
      gap: 18px;
    }

    .settings-profile-summary {
      display: grid;
      gap: 0;
      border-top: 1px solid #eef1f4;
    }

    .settings-name-form {
      display: grid;
      gap: 12px;
    }

    .settings-name-actions {
      display: flex;
      justify-content: flex-start;
    }

    .settings-name-actions .btn,
    .settings-group .settings-form-grid > .btn {
      width: fit-content;
      min-width: 168px;
    }

    .settings-page-actions {
      display: flex;
      padding-top: 0;
      margin-top: 12px;
    }

    .settings-title-row {
      margin-bottom: 10px;
    }

    .settings-title-row .page-sub {
      margin: 4px 0 0;
    }

    @media (max-width: 520px) {
      .settings-section-stack {
        gap: 22px;
      }

      .settings-name-actions .btn,
      .settings-group .settings-form-grid > .btn,
      .settings-page-actions .btn {
        width: 100%;
      }
    }

    /* SETTINGS WORKSPACE */
    .settings-workspace {
      display: grid;
      grid-template-columns: 216px minmax(0, 1fr);
      gap: 18px;
      align-items: start;
    }

    .settings-nav {
      position: sticky;
      top: 98px;
      display: grid;
      gap: 3px;
      padding: 7px;
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      background: color-mix(in srgb, var(--card) 96%, var(--green-soft));
      box-shadow: 0 12px 30px rgba(19, 32, 51, 0.05);
    }

    .settings-nav-btn {
      width: 100%;
      min-height: 42px;
      display: grid;
      grid-template-columns: 20px minmax(0, 1fr);
      align-items: center;
      gap: 10px;
      padding: 0 11px;
      border: 1px solid transparent;
      border-radius: var(--radius-sm);
      background: transparent;
      color: #667085;
      font: inherit;
      font-size: 12px;
      font-weight: 750;
      text-align: left;
      cursor: pointer;
      transition: background 180ms cubic-bezier(0.22, 1, 0.36, 1), color 180ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
    }

    .settings-nav-btn .material-symbols-rounded {
      font-size: 19px;
    }

    .settings-nav-btn:hover {
      color: #244333;
      background: #f3f8f5;
    }

    .settings-nav-btn.active {
      color: #176f3d;
      border-color: #cfe8d8;
      background: #edf8f1;
    }

    .settings-content {
      min-width: 0;
    }

    .settings-panel {
      display: none;
      animation: settingsPanelIn 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .settings-panel.active {
      display: grid;
      gap: 12px;
    }

    @keyframes settingsPanelIn {
      from { opacity: 0; transform: translateY(5px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .settings-panel-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 18px;
      padding: 0 2px 2px;
    }

    .settings-panel-head h3 {
      margin: 0 0 4px;
      color: var(--text);
      font-size: 18px;
      line-height: 1.2;
    }

    .settings-panel-head p {
      max-width: 64ch;
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.55;
    }

    .settings-surface {
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      background: var(--card);
      box-shadow: 0 10px 26px rgba(19, 32, 51, 0.04);
      overflow: hidden;
    }

    .settings-surface-section {
      padding: 18px;
    }

    .settings-surface-section + .settings-surface-section {
      border-top: 1px solid var(--line);
    }

    .settings-section-heading {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 12px;
    }

    .settings-section-heading h4 {
      margin: 0 0 4px;
      color: var(--text);
      font-size: 15px;
      line-height: 1.3;
    }

    .settings-section-heading p {
      max-width: 62ch;
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.5;
    }

    .settings-account-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.9fr);
      gap: 16px;
      align-items: start;
    }

    .settings-identity-summary {
      display: grid;
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      background: #f8faf9;
      overflow: hidden;
    }

    .settings-identity-summary .setting-row {
      padding: 13px 15px;
    }

    .settings-action-row {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 10px;
    }

    .settings-action-row .btn {
      width: auto;
      min-width: 150px;
    }

    .settings-code-layout {
      display: grid;
      grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
      gap: 16px;
      align-items: center;
    }

    .settings-code-layout .business-code-box {
      margin: 0;
    }

    .settings-security-note {
      display: flex;
      align-items: flex-start;
      gap: 9px;
      padding: 11px 12px;
      border: 1px solid #dbe8df;
      border-radius: var(--radius-sm);
      background: #f6faf7;
      color: #52645a;
      font-size: 12px;
      line-height: 1.5;
    }

    .settings-security-note .material-symbols-rounded {
      flex: 0 0 auto;
      color: #27844d;
      font-size: 19px;
    }

    .admin-invite-grid {
      display: grid;
      grid-template-columns: minmax(220px, 1fr) 150px auto;
      gap: 10px;
      align-items: end;
    }

    .admin-invite-grid .btn {
      height: 48px;
      white-space: nowrap;
    }

    .admin-access-list {
      display: grid;
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      overflow: hidden;
    }

    .admin-access-row {
      min-width: 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 16px;
      align-items: center;
      padding: 12px 14px;
      background: var(--card);
    }

    .admin-access-row + .admin-access-row {
      border-top: 1px solid var(--line);
    }

    .admin-access-person {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .admin-access-avatar {
      width: 38px;
      height: 38px;
      flex: 0 0 38px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      background: #eaf7ef;
      color: #23804a;
      font-size: 13px;
      font-weight: 850;
    }

    .admin-access-name,
    .admin-access-email {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .admin-access-name {
      color: var(--text);
      font-size: 13px;
      font-weight: 800;
    }

    .admin-access-email {
      margin-top: 2px;
      color: var(--muted);
      font-size: 12px;
    }

    .admin-access-meta {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
    }

    .settings-role-pill {
      display: inline-flex;
      align-items: center;
      min-height: 28px;
      padding: 0 10px;
      border: 1px solid #dce6e0;
      border-radius: 999px;
      background: #f8faf9;
      color: #52645a;
      font-size: 11px;
      font-weight: 800;
    }

    .settings-role-pill.owner {
      border-color: #c9e7d4;
      background: #edf8f1;
      color: #176f3d;
    }

    .admin-invite-result {
      display: none;
      gap: 10px;
      margin-top: 12px;
      padding: 12px;
      border: 1px solid #cfe7d7;
      border-radius: var(--radius-sm);
      background: #f5fbf7;
    }

    .admin-invite-result.show {
      display: grid;
    }

    .admin-invite-link {
      min-width: 0;
      padding: 11px 12px;
      border: 1px solid #dce7e0;
      border-radius: var(--radius-sm);
      background: var(--card);
      color: #3d4f45;
      font-size: 12px;
      line-height: 1.45;
      overflow-wrap: anywhere;
      user-select: all;
    }

    .settings-empty-state {
      padding: 16px;
      color: var(--muted);
      font-size: 13px;
      text-align: center;
    }

    .settings-owner-lock {
      display: none;
      align-items: flex-start;
      gap: 11px;
      padding: 16px;
      border: 1px solid #e4e8e6;
      border-radius: var(--radius-sm);
      background: #f8faf9;
      color: #667085;
      font-size: 13px;
      line-height: 1.5;
    }

    .settings-owner-lock.show {
      display: flex;
    }

    .settings-danger-zone {
      border-color: #f0d4d1;
    }

    .settings-danger-zone .settings-surface-section {
      background: #fffafa;
    }

    .settings-account-danger-zone {
      margin-top: 16px;
    }

    .delete-account-form {
      display: grid;
      gap: 14px;
      max-width: 560px;
    }

    .delete-account-warning {
      border-color: #efc4bf;
      background: #fff3f1;
      color: #8b2f27;
    }

    .delete-account-form input {
      margin-top: 7px;
      border-color: #dfaaa4;
    }

    .delete-account-form input:focus {
      border-color: #b84236;
      box-shadow: 0 0 0 3px rgba(184, 66, 54, 0.12);
    }

    @media (max-width: 900px) {
      .settings-workspace {
        grid-template-columns: 1fr;
      }

      .settings-nav {
        position: static;
        display: flex;
        gap: 6px;
        padding: 6px;
        overflow-x: auto;
        scrollbar-width: none;
      }

      .settings-nav::-webkit-scrollbar {
        display: none;
      }

      .settings-nav-btn {
        width: auto;
        min-width: max-content;
        grid-template-columns: 20px auto;
        min-height: 42px;
        padding: 0 11px;
      }
    }

    @media (max-width: 700px) {
      .settings-panel-head,
      .settings-section-heading {
        display: grid;
      }

      .settings-account-grid,
      .settings-code-layout,
      .admin-invite-grid {
        grid-template-columns: 1fr;
      }

      .settings-surface-section {
        padding: 16px;
      }

      .admin-invite-grid .btn,
      .settings-action-row .btn {
        width: 100%;
      }

      .admin-access-row {
        grid-template-columns: 1fr;
        gap: 10px;
      }

      .admin-access-meta {
        justify-content: flex-start;
        padding-left: 50px;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .settings-panel {
        animation: none;
      }
    }

    /* NAV */
    .bottom-nav {
      position: fixed;
      left: 50%;
      transform: translateX(-50%);
      bottom: 0;
      width: 100%;
      max-width: var(--phone-width);
      background: rgba(255,255,255,0.95);
      backdrop-filter: blur(16px);
      border-top: 1px solid #edf0f3;
      padding: 10px 8px calc(var(--safe-bottom) + 2px);
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 2px;
      z-index: 20;
    }

    .nav-btn {
      border: none;
      background: transparent;
      border-radius: 16px;
      padding: 8px 2px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      color: #7a8697;
      cursor: pointer;
      min-height: 62px;
    }

    .nav-btn .material-symbols-rounded {
      font-size: 24px;
    }

    .nav-btn span.label {
      font-size: 11px;
      font-weight: 600;
      line-height: 1;
    }

    .nav-btn.active {
      color: var(--green);
    }

    /* OVERLAYS */
    .overlay {
      position: fixed;
      inset: 0;
      background: rgba(10, 18, 31, 0.34);
      display: none;
      align-items: flex-end;
      justify-content: center;
      z-index: 40;
    }

    .overlay.show {
      display: flex;
    }

    .sheet {
      width: 100%;
      max-width: var(--phone-width);
      max-height: 95svh;
      overflow: auto;
      background: #fff;
      border-radius: 28px 28px 0 0;
      padding: 14px 18px calc(20px + var(--safe-bottom));
      box-shadow: 0 -16px 40px rgba(10, 18, 31, 0.18);
    }

    .sheet-header {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 18px;
    }

    .sheet-header.centered-title {
      justify-content: space-between;
    }

    .sheet-back {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      border: none;
      background: #f4f7f8;
      display: grid;
      place-items: center;
      cursor: pointer;
      color: #4f5b6e;
      flex: none;
    }

    .sheet-title {
      font-size: 20px;
      font-weight: 800;
      letter-spacing: 0;
      line-height: 1.1;
    }

    .sheet-sub {
      color: var(--muted);
      font-size: 15px;
      line-height: 1.45;
      margin: 0 0 18px;
    }

    .branch-list {
      display: flex;
      flex-direction: column;
      gap: 14px;
      margin-bottom: 18px;
    }

    .branch-card {
      background: #fff;
      border: 1.6px solid #edf0f3;
      border-radius: 22px;
      box-shadow: var(--shadow);
      padding: 18px;
      display: flex;
      align-items: center;
      gap: 14px;
      cursor: pointer;
    }

    .branch-card.active {
      border-color: #7bdd9e;
      background: linear-gradient(180deg, #f5fcf8 0%, #f7fdf9 100%);
    }

    .branch-icon {
      width: 62px;
      height: 62px;
      border-radius: 50%;
      background: #eaf9f0;
      color: var(--green);
      display: grid;
      place-items: center;
      flex: none;
    }

    .branch-main {
      flex: 1;
      min-width: 0;
    }

    .branch-name {
      font-size: 17px;
      font-weight: 700;
      margin-bottom: 6px;
    }

    .branch-address {
      color: var(--muted);
      font-size: 14px;
      line-height: 1.4;
    }

    .branch-chevron {
      color: var(--green);
    }

    .sheet-footer-note {
      text-align: center;
      color: var(--muted);
      font-size: 13px;
      margin-top: 18px;
    }

    .sheet-footer-note span {
      color: var(--green);
      font-weight: 600;
    }

    /* DETAILS SHEET */
    .employee-detail-card {
      display: flex;
      align-items: center;
      gap: 14px;
      background: #fff;
      border: 1px solid #edf0f3;
      border-radius: 22px;
      box-shadow: var(--shadow);
      padding: 16px;
      margin-bottom: 14px;
    }

    .employee-photo {
      width: 84px;
      height: 84px;
      border-radius: 50%;
      overflow: hidden;
      flex: none;
      background: #eaf9f0;
      display: grid;
      place-items: center;
      color: var(--green);
      font-size: 28px;
      font-weight: 700;
      border: 3px solid #d8f3e3;
    }

    .employee-photo img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .employee-name {
      font-size: 18px;
      font-weight: 800;
      margin: 0 0 10px;
      line-height: 1.2;
    }

    .employee-meta {
      display: flex;
      align-items: center;
      gap: 8px;
      color: var(--muted);
      font-size: 15px;
      line-height: 1.4;
      margin-bottom: 6px;
    }

    .detail-card {
      background: #fff;
      border: 1px solid #edf0f3;
      border-radius: 22px;
      box-shadow: var(--shadow);
      padding: 12px 16px;
      margin-bottom: 14px;
    }

    .detail-line {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 14px 0;
      border-bottom: 1px solid #eef1f4;
    }

    .detail-line:last-child {
      border-bottom: none;
    }

    .detail-left {
      display: flex;
      align-items: center;
      gap: 12px;
      color: #475466;
      font-size: 15px;
      min-width: 0;
    }

    .detail-right {
      font-size: 15px;
      font-weight: 700;
      text-align: right;
      line-height: 1.3;
    }

    .selfie-proof-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 12px;
      margin-bottom: 16px;
    }

    .selfie-proof-card {
      background: #fff;
      border: 1px solid #edf0f3;
      border-radius: 20px;
      padding: 12px;
    }

    .selfie-proof-title {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
      font-weight: 800;
      color: #475466;
      margin-bottom: 10px;
    }

    .selfie-proof-title .material-symbols-rounded {
      font-size: 18px;
      color: var(--green);
    }

    .selfie-proof-box {
      border-radius: 18px;
      overflow: hidden;
      background: #f4f7f8;
      border: 1px solid #edf0f3;
      min-height: 178px;
      display: grid;
      place-items: center;
      color: var(--muted);
      font-size: 14px;
      text-align: center;
      line-height: 1.4;
    }

    .selfie-proof-box a {
      display: block;
      width: 100%;
      height: 100%;
    }

    .selfie-proof-box img {
      width: 100%;
      max-height: 360px;
      display: block;
      object-fit: cover;
    }

    .selfie-proof-help {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
      margin: -2px 0 12px;
    }

    .notes-label {
      font-size: 15px;
      font-weight: 700;
      margin-bottom: 10px;
    }

    .notes-counter {
      text-align: right;
      color: var(--muted);
      font-size: 13px;
      margin-top: 8px;
    }

    .details-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
      margin-top: 18px;
    }

    .missing-checkout-repair {
      display: grid;
      gap: 12px;
      border: 1px solid #f0d7a6;
      border-radius: var(--radius-sm);
      background: #fffaf0;
      padding: 14px;
      margin-bottom: 14px;
    }

    .missing-checkout-repair.hidden {
      display: none;
    }

    .missing-checkout-repair-title {
      display: flex;
      align-items: center;
      gap: 8px;
      color: #855c12;
      font-size: 15px;
      font-weight: 850;
      line-height: 1.25;
    }

    .missing-checkout-repair-title .material-symbols-rounded {
      font-size: 20px;
    }

    .missing-checkout-repair-copy {
      color: #725c32;
      font-size: 13px;
      font-weight: 600;
      line-height: 1.45;
    }

    .missing-checkout-repair-controls {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: end;
      gap: 10px;
    }

    .missing-checkout-repair-controls input {
      height: 48px;
      border-radius: var(--radius-sm);
      padding: 0 12px;
    }

    .missing-checkout-queue {
      display: grid;
      gap: 10px;
      border: 1px solid #f0d7a6;
      border-radius: var(--radius-sm);
      background: #fffaf0;
      padding: 14px;
      margin-bottom: 14px;
    }

    .missing-checkout-queue.hidden {
      display: none;
    }

    .missing-checkout-queue-head,
    .missing-checkout-queue-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .missing-checkout-queue-head {
      width: 100%;
      border: 0;
      background: transparent;
      color: inherit;
      cursor: pointer;
      font: inherit;
      padding: 0;
      text-align: left;
    }

    .missing-checkout-queue-head:focus-visible {
      outline: 3px solid rgba(22, 138, 73, 0.22);
      outline-offset: 5px;
      border-radius: var(--radius-sm);
    }

    .missing-checkout-queue-summary {
      display: flex;
      align-items: center;
      gap: 10px;
      flex: none;
    }

    .missing-checkout-queue-toggle {
      color: #855c12;
      font-size: 22px;
      transition: transform 180ms ease;
    }

    .missing-checkout-queue.collapsed .missing-checkout-queue-toggle {
      transform: rotate(-90deg);
    }

    .missing-checkout-queue-title {
      color: #855c12;
      font-size: 15px;
      font-weight: 850;
      line-height: 1.25;
    }

    .missing-checkout-queue-copy,
    .missing-checkout-queue-meta {
      color: #725c32;
      font-size: 13px;
      font-weight: 600;
      line-height: 1.4;
    }

    .missing-checkout-queue-list {
      display: grid;
      gap: 8px;
    }

    .missing-checkout-queue.collapsed .missing-checkout-queue-list {
      display: none;
    }

    .missing-checkout-queue-row {
      border-top: 1px solid #f0dfbd;
      padding-top: 10px;
    }

    .missing-checkout-queue .mini-btn {
      flex: none;
    }

    .btn-flag {
      background: #ffffff;
      border: 2px solid #168a49;
      color: #106d39;
      box-shadow: 0 8px 18px rgba(16, 109, 57, 0.08);
    }

    .btn-flag:active {
      background: #eaf9f0;
      color: #132033;
    }

    .btn-approve {
      background: linear-gradient(180deg, #168a49 0%, #106d39 100%);
      color: #ffffff;
      box-shadow: 0 12px 26px rgba(16, 109, 57, 0.24);
    }

    .btn-approve:active {
      background: linear-gradient(90deg, #b8f0ca 0%, #a4edc1 100%);
      color: #132033;
      box-shadow: 0 8px 18px rgba(39, 196, 106, 0.16);
    }

    .btn-approve span,
    .btn-flag span {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    /* BUTTON ICON ALIGNMENT PASS */
    button,
    .btn,
    .mini-btn,
    .pill-btn,
    .toolbar-action-btn,
    .employee-manage-btn,
    .branch-edit-btn,
    .employee-edit-btn,
    .employee-delete-btn,
    .add-employee-btn,
    .desktop-nav-btn,
    .nav-btn,
    .sheet-back,
    .back-btn,
    .icon-btn {
      align-items: center;
    }

    .btn,
    .mini-btn,
    .pill-btn,
    .toolbar-action-btn,
    .employee-manage-btn,
    .branch-edit-btn,
    .employee-edit-btn,
    .employee-delete-btn,
    .add-employee-btn {
      display: inline-flex;
      justify-content: center;
      gap: 8px;
      text-align: center;
    }

    button > .material-symbols-rounded,
    .btn > .material-symbols-rounded,
    .mini-btn > .material-symbols-rounded,
    .pill-btn > .material-symbols-rounded,
    .toolbar-action-btn > .material-symbols-rounded,
    .employee-manage-btn > .material-symbols-rounded,
    .branch-edit-btn > .material-symbols-rounded,
    .employee-edit-btn > .material-symbols-rounded,
    .employee-delete-btn > .material-symbols-rounded,
    .add-employee-btn > .material-symbols-rounded,
    button > span > .material-symbols-rounded {
      display: inline-flex;
      width: 1.2em;
      height: 1.2em;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
      font-size: 1.2em;
      line-height: 1;
      transform: translateY(0.01em);
      vertical-align: middle;
    }

    .btn-approve > span,
    .btn-flag > span {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      line-height: 1;
    }





    /* BRANCHES PAGE */
    .branches-tools {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 12px;
      margin-bottom: 14px;
    }

    .branch-time-card {
      background: #fff;
      border: 1px solid #edf0f2;
      border-radius: 22px;
      box-shadow: var(--shadow);
      padding: 16px;
      margin-bottom: 14px;
      cursor: pointer;
    }

    .branch-time-top {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 14px;
    }

    .branch-time-icon {
      width: 52px;
      height: 52px;
      border-radius: 50%;
      background: #eaf9f0;
      color: var(--green);
      display: grid;
      place-items: center;
      flex: none;
    }

    .branch-device-panel {
      margin-top: 22px;
    }

    .branch-device-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 14px;
      margin-bottom: 14px;
    }

    .branch-device-head h3 {
      margin: 0 0 6px;
      font-size: 20px;
      letter-spacing: 0;
    }

    .branch-device-head p {
      margin: 0;
      color: var(--muted);
      line-height: 1.45;
    }

    .branch-device-list {
      display: grid;
      gap: 10px;
    }

    .branch-device-card {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 14px;
      align-items: center;
      border: 1px solid #e7ecef;
      border-radius: 7px;
      padding: 14px;
      background: #fbfdfc;
    }

    .branch-device-main {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }

    .branch-device-icon {
      width: 42px;
      height: 42px;
      border-radius: 7px;
      background: #eaf9f0;
      color: var(--green);
      display: grid;
      place-items: center;
      flex: none;
    }

    .branch-device-title {
      font-weight: 850;
      color: var(--ink);
      line-height: 1.2;
    }

    .branch-device-meta {
      margin-top: 4px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.35;
    }

    .branch-device-side {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .device-status-pill {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      border-radius: 999px;
      padding: 7px 10px;
      font-size: 12px;
      font-weight: 850;
      border: 1px solid #d8eee0;
      color: #157347;
      background: #f0fbf4;
      white-space: nowrap;
    }

    .device-status-pill::before {
      content: "";
      width: 8px;
      height: 8px;
      border-radius: 999px;
      background: currentColor;
    }

    .device-status-pill.offline {
      border-color: #f1d3ce;
      color: #bd4438;
      background: #fff5f3;
    }

    .device-status-pill.inactive {
      border-color: #dde3ea;
      color: #667085;
      background: #f7f9fb;
    }

    .branch-device-remove {
      border: 1px solid #f1c3bd;
      background: #fff;
      color: #bd4438;
      border-radius: 7px;
      min-height: 42px;
      padding: 0 12px;
      display: inline-flex;
      align-items: center;
      gap: 7px;
      font-weight: 850;
      cursor: pointer;
    }

    .branch-device-remove:disabled {
      opacity: 0.55;
      cursor: not-allowed;
    }

    @media (max-width: 760px) {
      .branch-device-head,
      .branch-device-card,
      .branch-device-side {
        grid-template-columns: 1fr;
        align-items: stretch;
      }

      .branch-device-side {
        display: grid;
      }
    }

    .branch-time-main {
      flex: 1;
      min-width: 0;
    }

    .branch-time-name {
      font-size: 16px;
      font-weight: 800;
      margin-bottom: 5px;
      line-height: 1.2;
    }

    .branch-time-address {
      font-size: 13px;
      color: var(--muted);
      line-height: 1.35;
    }

    .branch-time-edit {
      color: var(--green);
      flex: none;
    }

    .branch-time-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 10px;
      border-top: 1px solid #eef1f4;
      padding-top: 14px;
    }

    .branch-time-box {
      background: #f8fbf9;
      border: 1px solid #eef3ef;
      border-radius: 16px;
      padding: 12px 10px;
    }

    .branch-time-label {
      font-size: 12px;
      color: var(--muted);
      margin-bottom: 5px;
      line-height: 1.2;
    }

    .branch-time-value {
      font-size: 15px;
      font-weight: 800;
      line-height: 1.2;
    }


    /* EMPLOYEE EDIT */
    .employee-card {
      cursor: pointer;
    }

    .employee-card:active {
    }

    .status-toggle-card {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      background: #f8fbf9;
      border: 1px solid #eef3ef;
      border-radius: 18px;
      padding: 14px;
      margin-bottom: 16px;
    }

    .status-toggle-copy {
      min-width: 0;
    }

    .status-toggle-title {
      font-size: 14px;
      font-weight: 800;
      margin-bottom: 4px;
    }

    .status-toggle-sub {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.35;
    }

    .branch-shift-card {
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      background: #f8fbf9;
      padding: 12px;
      margin-bottom: 14px;
    }

    .branch-shift-title {
      color: var(--text);
      font-size: var(--type-body);
      font-weight: 850;
      line-height: var(--leading-ui);
      margin-bottom: 10px;
    }

    .branch-shift-summary {
      color: var(--muted);
      font-size: var(--type-small);
      font-weight: 650;
      line-height: var(--leading-body);
      margin-top: 8px;
    }

    .switch {
      position: relative;
      width: 54px;
      height: 32px;
      flex: none;
    }

    .switch input {
      opacity: 0;
      width: 0;
      height: 0;
    }

    .slider {
      position: absolute;
      cursor: pointer;
      inset: 0;
      background: #d6dde5;
      border-radius: 999px;
    }

    .slider:before {
      position: absolute;
      content: "";
      height: 24px;
      width: 24px;
      left: 4px;
      bottom: 4px;
      background: white;
      border-radius: 50%;
      box-shadow: 0 2px 8px rgba(17, 24, 39, 0.15);
    }

    .switch input:checked + .slider {
      background: var(--green);
    }

    .switch input:checked + .slider:before {
      transform: translateX(22px);
    }

    .danger-zone {
      background: #fff7f7;
      border: 1px solid #ffdada;
      border-radius: 18px;
      padding: 14px;
      margin-top: 14px;
    }

    .danger-zone-title {
      font-size: 14px;
      font-weight: 800;
      color: #b42318;
      margin-bottom: 6px;
    }

    .danger-zone-copy {
      color: #8a4b4b;
      font-size: 12px;
      line-height: 1.4;
      margin-bottom: 12px;
    }

    /* LATE SETTINGS */
    .settings-form-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 14px;
    }

    .settings-panel .settings-form-grid {
      gap: 12px;
    }

    .settings-panel .status-toggle-card {
      min-height: 72px;
      padding: 14px 16px;
    }

    .settings-panel input,
    .settings-panel select {
      min-height: 48px;
    }

    .settings-panel .message {
      margin-top: 0;
    }

    .settings-help {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
      margin: -4px 0 4px;
    }

    .settings-two-col {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .settings-mini-label {
      display: block;
      font-size: 13px;
      font-weight: 700;
      color: #4a5568;
      margin-bottom: 8px;
    }

    .drive-destination-card {
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      padding: 14px;
      background: #fbfdfc;
    }

    .drive-status-card {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      background: #fbfdfc;
      padding: 14px 16px;
      margin-bottom: 14px;
      box-shadow: 0 8px 20px rgba(17, 24, 39, 0.035);
    }

    .drive-status-main {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }

    .drive-status-icon {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      color: var(--green);
      background: var(--green-soft);
      flex: none;
    }

    .drive-status-title {
      font-size: 14px;
      font-weight: 800;
      line-height: 1.25;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .drive-status-copy {
      margin-top: 3px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.35;
    }

    .drive-live-dot {
      width: 13px;
      height: 13px;
      border-radius: 50%;
      background: var(--red);
      box-shadow: 0 0 0 5px var(--red-soft);
      flex: none;
    }

    .drive-status-card.connected .drive-live-dot {
      background: var(--green);
      box-shadow: 0 0 0 5px var(--green-soft);
    }

    .drive-destination-action {
      display: none;
      margin-top: 12px;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 44px;
      text-decoration: none;
    }

    .drive-destination-action.show {
      display: inline-flex;
    }

    .export-action-group {
      display: grid;
      gap: 12px;
      margin-top: 4px;
    }

    .export-action-group .btn {
      min-height: 54px;
      width: 100%;
    }

    .export-action-group + .drive-destination-action.show {
      margin-top: 16px;
      margin-bottom: 16px;
    }

    .payroll-export-card .drive-status-card {
      margin-top: 16px;
    }

    .payroll-rules-divider {
      border: 0;
      border-top: 1px solid var(--line);
      margin: 2px 0 4px;
    }

    .payroll-rule-group {
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      background: #fbfdfc;
      padding: 14px;
    }

    .payroll-rule-group + .payroll-rule-group {
      margin-top: 2px;
    }

    .payroll-rule-group-title {
      display: flex;
      align-items: center;
      gap: 8px;
      color: var(--text);
      font-size: var(--type-small);
      font-weight: 750;
      line-height: var(--leading-ui);
      margin-bottom: 4px;
    }

    .payroll-rule-group-title .material-symbols-rounded {
      color: var(--green);
      font-size: 19px;
    }

    .payroll-rule-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-items: end;
      gap: 12px;
      margin-top: 12px;
    }

    .payroll-rule-grid > div {
      display: flex;
      min-width: 0;
      flex-direction: column;
      justify-content: flex-end;
    }

    .payroll-rule-grid .settings-mini-label {
      min-height: calc(var(--type-caption) * 2.4);
      display: flex;
      align-items: flex-end;
    }

    .payroll-rule-grid.single {
      grid-template-columns: 1fr;
    }

    .payroll-rule-actions {
      display: flex;
      justify-content: flex-end;
      padding-top: 2px;
    }

    .payroll-rule-actions .btn {
      width: auto;
      min-width: 210px;
    }

    .pay-period-map {
      margin-top: 12px;
      border: 1px solid #dfe8e2;
      background: #ffffff;
      padding: 12px;
    }

    .pay-period-map.collapsed .pay-period-weekdays,
    .pay-period-map.collapsed .pay-period-days,
    .pay-period-map.collapsed .pay-period-map-foot {
      display: none;
    }

    .pay-period-map-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      width: 100%;
      min-height: 40px;
      border: 0;
      background: transparent;
      padding: 0;
      margin: 0 0 10px;
      color: inherit;
      cursor: pointer;
      text-align: left;
    }

    .pay-period-map.collapsed .pay-period-map-head {
      margin-bottom: 0;
    }

    .pay-period-map-head-main {
      display: grid;
      gap: 2px;
      min-width: 0;
    }

    .pay-period-map-title {
      color: var(--text);
      font-size: var(--type-small);
      font-weight: 750;
      line-height: var(--leading-ui);
    }

    .pay-period-map-range {
      color: var(--muted);
      font-size: var(--type-caption);
      font-weight: 650;
      line-height: 1.2;
      text-align: right;
    }

    .pay-period-map-toggle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      flex: 0 0 auto;
      color: var(--green-strong, var(--green));
      transition: transform var(--motion-ui, 180ms) var(--ease-out-quart, ease);
    }

    .pay-period-map.collapsed .pay-period-map-toggle {
      transform: rotate(-90deg);
    }

    .pay-period-map:not(.collapsed) .pay-period-weekdays,
    .pay-period-map:not(.collapsed) .pay-period-days,
    .pay-period-map:not(.collapsed) .pay-period-map-foot {
      animation: tr-calendar-reveal var(--motion-panel, 240ms) var(--ease-out-quint, ease-out) both;
    }

    .pay-period-days {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 5px;
    }

    .pay-period-weekdays {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 5px;
      margin-bottom: 6px;
      color: #667085;
      font-size: 0.6875rem;
      font-weight: 750;
      line-height: 1;
      text-align: center;
    }

    .pay-period-day {
      position: relative;
      min-height: 42px;
      border: 1px solid #e8ecef;
      background: #f8fbf9;
      padding: 7px 6px 6px;
      color: #667085;
      text-align: center;
    }

    .pay-period-day.out-month {
      opacity: 0.42;
      background: #fbfcfb;
    }

    .pay-period-day.in-range {
      border-color: rgba(18, 134, 79, 0.28);
      background: #f0faf4;
      color: #106d41;
    }

    .pay-period-day.selected {
      border-color: rgba(18, 134, 79, 0.46);
      background: #dff4e8;
      color: #0f7445;
    }

    .pay-period-day.period-start,
    .pay-period-day.period-end {
      border-color: rgba(18, 134, 79, 0.58);
      background: #bfead0;
      color: #0f5f39;
      box-shadow: inset 0 -2px 0 rgba(18, 134, 79, 0.18);
    }

    .pay-period-weekday {
      display: none;
      font-size: 0.6875rem;
      font-weight: 700;
      line-height: 1;
      margin-bottom: 5px;
    }

    .pay-period-day.selected::after {
      content: "";
      position: absolute;
      left: 50%;
      bottom: 5px;
      width: 4px;
      height: 4px;
      background: currentColor;
      border-radius: 50% !important;
      transform: translateX(-50%);
    }

    .pay-period-date {
      display: block;
      font-size: var(--type-small);
      font-weight: 800;
      line-height: 1;
      font-variant-numeric: tabular-nums;
    }

    .pay-period-map-foot {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 10px;
      color: var(--muted);
      font-size: var(--type-caption);
      font-weight: 600;
      line-height: 1.25;
    }

    .pay-period-map-foot span {
      border: 1px solid #e8ecef;
      background: #f8fbf9;
      padding: 6px 8px;
    }

    @media (max-width: 760px) {
      .missing-checkout-repair-controls {
        grid-template-columns: 1fr;
      }

      .missing-checkout-queue-row {
        align-items: stretch;
        flex-direction: column;
      }

      .payroll-rule-grid {
        grid-template-columns: 1fr;
      }

      .payroll-rule-actions .btn {
        width: 100%;
        min-width: 0;
      }

      .pay-period-days,
      .pay-period-weekdays {
        gap: 4px;
      }

      .pay-period-day {
        min-height: 38px;
        padding: 6px 4px;
      }
    }

    /* IMPECCABLE ADAPT PASS: payroll settings across narrow screens */
    @media (max-width: 760px) {
      .payroll-settings-overlay {
        align-items: flex-end;
        padding: 0;
      }

      .payroll-settings-overlay .sheet {
        width: 100%;
        max-width: none;
        max-height: calc(100svh - 8px);
        border-radius: var(--radius-sm) var(--radius-sm) 0 0;
        padding: 12px 12px calc(16px + var(--safe-bottom));
      }

      .payroll-settings-overlay .sheet-header {
        top: -12px;
        margin: -12px -12px 14px;
        padding: 12px;
      }

      .payroll-settings-overlay .sheet-title {
        font-size: var(--type-subhead);
      }

      .payroll-settings-overlay .section-card {
        padding: 14px;
      }

      .salary-bulk-row,
      .salary-editor-row,
      .salary-editor-controls,
      .salary-bulk-controls,
      .deduction-type-row,
      .deduction-employee-row,
      .deduction-employee-controls {
        grid-template-columns: 1fr;
      }

      .salary-bulk-row .btn,
      .salary-editor-row .btn,
      .payroll-rule-actions .btn {
        width: 100%;
      }

      .payroll-rule-group {
        padding: 14px;
      }

      .pay-period-map {
        overflow-x: auto;
        overscroll-behavior-x: contain;
      }

      .pay-period-map-head {
        align-items: flex-start;
      }

      .pay-period-map-range {
        max-width: 28ch;
        text-align: left;
      }

      .pay-period-weekdays,
      .pay-period-days {
        min-width: 252px;
      }

      .pay-period-map-foot span {
        flex: 1 1 100%;
      }
    }

    @media (max-width: 430px) {
      .payroll-settings-overlay .sheet {
        max-height: calc(100svh - 4px);
        padding-left: 10px;
        padding-right: 10px;
      }

      .payroll-settings-overlay .sheet-header {
        margin-left: -10px;
        margin-right: -10px;
        padding-left: 10px;
        padding-right: 10px;
      }

      .payroll-settings-overlay .sheet-back {
        width: 40px;
        height: 40px;
      }

      .payroll-settings-overlay .sheet-title {
        margin-right: 40px !important;
      }

      .pay-period-map {
        padding: 10px;
      }
    }

    @media (max-width: 360px) {
      .stat-grid,
      .dashboard-insights-grid,
      .dashboard-payroll-mini,
      .top-controls,
      .filter-row,
      .report-summary,
      .generate-grid,
      .details-actions {
        grid-template-columns: 1fr;
      }

      .bottom-nav {
        gap: 0;
        padding-left: 6px;
        padding-right: 6px;
      }

      .nav-btn span.label {
        font-size: 10px;
      }

      .nav-btn .material-symbols-rounded {
        font-size: 23px;
      }

      .setting-value {
        max-width: 58%;
      }
    }
  
    .employee-card[data-employee-id] {
      touch-action: manipulation;
    }

    .sheet .field select {
      cursor: pointer;
    }


    .employee-card-actions {
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid #eef1f4;
      display: grid;
      grid-template-columns: 1fr;
    }

    .employee-edit-btn {
      width: 100%;
      border: 0;
      min-height: 48px;
      border-radius: 16px;
      background: #eaf9f0;
      color: var(--green);
      font-size: 14px;
      font-weight: 800;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      cursor: pointer;
    }

    .employee-edit-btn:active {
    }


    /* BRANCH MANAGEMENT */
    .branch-status-pill {
      padding: 7px 10px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
    }

    .branch-status-pill.active {
      background: #eaf9f0;
      color: var(--green);
    }

    .branch-status-pill.inactive {
      background: #fff1f1;
      color: var(--red);
    }

    .branch-card-actions {
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid #eef1f4;
      display: grid;
      grid-template-columns: 1fr;
    }

    .branch-edit-btn {
      width: 100%;
      border: 0;
      min-height: 48px;
      border-radius: 16px;
      background: #eaf9f0;
      color: var(--green);
      font-size: 14px;
      font-weight: 800;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      cursor: pointer;
    }

    .branch-edit-btn:active {
    }


    /* REPORT EXPORT */
    .report-export-note {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
      margin: -4px 0 14px;
    }

    #billingPage {
      --billing-space-xs: 6px;
      --billing-space-sm: 10px;
      --billing-space-md: 16px;
      --billing-space-lg: 24px;
      --billing-space-xl: 32px;
    }

    .billing-page-intro {
      max-width: 720px;
      margin: 6px 0 0;
      color: var(--muted);
      line-height: 1.55;
    }

    .billing-overview-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
      gap: var(--billing-space-md);
      margin-bottom: var(--billing-space-lg);
    }

    .billing-summary-card,
    #billingPage .drive-status-card {
      min-height: 118px;
      margin: 0;
    }

    .billing-summary-card {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: var(--billing-space-lg);
    }

    .billing-summary-copy {
      min-width: 0;
    }

    .billing-summary-label {
      margin-bottom: var(--billing-space-xs);
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    .billing-summary-copy .settings-help {
      margin: 0;
      max-width: 62ch;
      font-size: 15px;
      line-height: 1.5;
    }

    .billing-summary-icon {
      flex: 0 0 auto;
      width: 46px;
      height: 46px;
      border-radius: var(--radius-sm);
      display: grid;
      place-items: center;
      background: #ecf8f0;
      color: #106d39;
    }

    .billing-summary-icon .material-symbols-rounded {
      font-size: 23px;
    }

    .billing-plans-card,
    .billing-terms-card {
      padding: var(--billing-space-lg);
    }

    .billing-plan-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: var(--billing-space-md);
    }

    .billing-section-stack {
      display: grid;
      gap: var(--billing-space-xl);
    }

    .billing-section-heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: var(--billing-space-lg);
      margin-bottom: var(--billing-space-md);
    }

    .billing-section-heading h3 {
      margin: 0 0 var(--billing-space-xs);
      font-size: 20px;
    }

    .billing-section-heading p {
      margin: 0;
      max-width: 58ch;
      color: var(--muted);
      line-height: 1.45;
    }

    .billing-cycle-toggle {
      display: inline-grid;
      grid-template-columns: 1fr 1fr;
      gap: 4px;
      padding: 4px;
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      background: #f8faf9;
    }

    .billing-cycle-toggle button {
      border: 0;
      border-radius: var(--radius-sm);
      min-height: 40px;
      padding: 0 12px;
      background: transparent;
      color: var(--muted);
      font-weight: 900;
      cursor: pointer;
    }

    .billing-cycle-toggle button.active {
      background: #fff;
      color: #106d39;
      box-shadow: 0 6px 18px rgba(16, 109, 57, 0.1);
    }

    .billing-save-badge {
      display: inline-flex;
      align-items: center;
      min-height: 24px;
      border-radius: var(--radius-sm);
      padding: 0 8px;
      margin-left: 6px;
      background: #ecfbf2;
      color: #106d39;
      font-size: 11px;
      font-weight: 950;
      vertical-align: middle;
      white-space: nowrap;
    }

    .billing-product-section {
      display: grid;
      gap: var(--billing-space-md);
    }

    .billing-product-section + .billing-product-section {
      padding-top: var(--billing-space-xl);
      border-top: 1px solid var(--line);
    }

    .billing-product-header {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: var(--billing-space-lg);
    }

    .billing-product-header .settings-help {
      margin: var(--billing-space-xs) 0 0;
      max-width: 68ch;
      line-height: 1.5;
    }

    .billing-product-count {
      flex: 0 0 auto;
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
    }

    .billing-product-kicker {
      color: #106d39;
      font-size: 12px;
      font-weight: 950;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .billing-plan-grid.admin-pro {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .billing-plan-card {
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      padding: var(--billing-space-lg);
      background: #fff;
      display: flex;
      flex-direction: column;
      gap: var(--billing-space-md);
      min-width: 0;
    }

    .billing-plan-card.active {
      border-color: #168a49;
      box-shadow: 0 10px 24px rgba(16, 109, 57, 0.1);
    }

    .billing-plan-top {
      display: grid;
      gap: var(--billing-space-sm);
    }

    .billing-plan-name {
      font-size: 18px;
      font-weight: 900;
      color: var(--text);
    }

    .billing-plan-price {
      font-size: 22px;
      font-weight: 950;
      color: #106d39;
      line-height: 1.15;
    }

    .billing-plan-price-note {
      margin-top: 4px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 750;
    }

    .billing-plan-meta,
    .billing-plan-features {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }

    .billing-plan-features {
      margin: 0;
      padding: var(--billing-space-md) 0 0;
      border-top: 1px solid #edf2ef;
      list-style: none;
      display: grid;
      gap: var(--billing-space-sm);
    }

    .billing-plan-features li {
      position: relative;
      padding-left: 22px;
    }

    .billing-plan-features li::before {
      content: "check";
      position: absolute;
      left: 0;
      top: 1px;
      color: #168a49;
      font-family: "Material Symbols Rounded";
      font-size: 16px;
      font-weight: 600;
    }

    .billing-plan-action {
      width: 100%;
      min-height: 46px;
      margin-top: auto;
    }

    .billing-plan-actions {
      display: grid;
      gap: 10px;
      margin-top: auto;
    }

    .billing-plan-actions .billing-plan-action {
      margin-top: 0;
    }

    .billing-current-badge {
      display: inline-flex;
      align-items: center;
      min-height: 28px;
      width: fit-content;
      border-radius: var(--radius-sm);
      padding: 0 10px;
      background: #ecfbf2;
      color: #106d39;
      font-size: 12px;
      font-weight: 900;
    }

    .billing-plan-card.admin-pro {
      background: #fbfdfc;
    }

    .billing-plan-note {
      border-radius: var(--radius-sm);
      background: #f7faf8;
      border: 1px solid #edf2ef;
      padding: 12px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }

    .billing-info-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 0;
      border-top: 1px solid var(--line);
    }

    .billing-info-card {
      padding: var(--billing-space-lg);
    }

    .billing-info-card + .billing-info-card {
      border-left: 1px solid var(--line);
    }

    .billing-info-card strong {
      display: block;
      margin-bottom: var(--billing-space-sm);
      color: var(--text);
      font-size: 15px;
    }

    .billing-info-card p,
    .billing-info-card ul {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.45;
    }

    .billing-info-card ul {
      padding-left: 18px;
    }

    @media (max-width: 1020px) {
      .billing-overview-grid {
        grid-template-columns: 1fr;
      }

      .billing-plan-grid.admin-pro,
      .billing-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .billing-info-card + .billing-info-card {
        border-left: 0;
      }

      .billing-info-card:nth-child(even) {
        border-left: 1px solid var(--line);
      }

      .billing-info-card:nth-child(n + 3) {
        border-top: 1px solid var(--line);
      }
    }

    @media (max-width: 720px) {
      .billing-plan-grid,
      .billing-plan-grid.admin-pro,
      .billing-info-grid {
        grid-template-columns: 1fr;
      }

      .billing-section-heading {
        display: grid;
      }

      .billing-cycle-toggle {
        width: 100%;
      }

      .billing-product-header {
        display: block;
      }

      .billing-product-count {
        display: block;
        margin-top: var(--billing-space-sm);
      }

      .billing-plans-card,
      .billing-terms-card,
      .billing-plan-card {
        padding: var(--billing-space-md);
      }

      .billing-info-card {
        padding: var(--billing-space-md) 0;
      }

      .billing-info-card:nth-child(even),
      .billing-info-card + .billing-info-card {
        border-left: 0;
      }

      .billing-info-card + .billing-info-card {
        border-top: 1px solid var(--line);
      }
    }

    .manual-payment-box {
      border: 1px solid #d8f0e0;
      border-radius: var(--radius-sm);
      background: #f7fcf9;
      padding: var(--billing-space-md);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: var(--billing-space-lg);
      margin-bottom: var(--billing-space-xl);
    }

    .manual-payment-line {
      display: flex;
      align-items: baseline;
      gap: var(--billing-space-sm);
      color: var(--muted);
      font-size: 14px;
      line-height: 1.35;
    }

    .manual-payment-line strong {
      color: var(--text);
      text-align: right;
    }

    @media (max-width: 720px) {
      .manual-payment-box,
      .manual-payment-line {
        display: grid;
        gap: var(--billing-space-xs);
      }

      .manual-payment-line strong {
        text-align: left;
      }
    }

    .payment-method-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 14px;
    }

    .payment-method-btn {
      min-height: 58px;
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      background: #fff;
      color: var(--text);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-size: 15px;
      font-weight: 900;
      cursor: pointer;
    }

    .payment-method-btn.active {
      border-color: #168a49;
      background: #f1fbf5;
      color: #106d39;
      box-shadow: inset 0 0 0 1px rgba(22, 138, 73, 0.18);
    }

    .payment-qr-panel {
      border: 1px solid #d8f0e0;
      border-radius: var(--radius-sm);
      background: #f7fcf9;
      padding: 14px;
      display: grid;
      grid-template-columns: 148px minmax(0, 1fr);
      gap: 14px;
      align-items: center;
      margin-bottom: 14px;
    }

    .payment-qr-box {
      width: 148px;
      aspect-ratio: 1;
      border-radius: var(--radius-sm);
      border: 1px solid #cfe8d8;
      background:
        linear-gradient(90deg, rgba(16, 109, 57, 0.16) 50%, transparent 0) 0 0 / 18px 18px,
        linear-gradient(rgba(16, 109, 57, 0.16) 50%, transparent 0) 0 0 / 18px 18px,
        #fbfefd;
      display: grid;
      place-items: center;
      overflow: hidden;
      color: #106d39;
      font-size: 12px;
      font-weight: 900;
      text-align: center;
      padding: 12px;
    }

    .payment-qr-box img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .payment-qr-copy {
      display: grid;
      gap: 6px;
      color: var(--muted);
      font-size: 14px;
      line-height: 1.4;
    }

    .payment-qr-copy strong {
      color: var(--text);
      font-size: 16px;
    }

    .payment-proof-preview {
      border: 1px dashed #cbd6df;
      border-radius: var(--radius-sm);
      background: #f8fafb;
      color: var(--muted);
      min-height: 72px;
      padding: 12px;
      display: grid;
      place-items: center;
      text-align: center;
      overflow: hidden;
    }

    .payment-proof-preview img {
      max-width: 100%;
      max-height: 180px;
      border-radius: var(--radius-sm);
      display: block;
    }

    .payment-success-card {
      border: 1px solid #d8f0e0;
      border-radius: var(--radius-sm);
      background: #f7fcf9;
      padding: 22px 16px;
      text-align: center;
      display: grid;
      gap: 8px;
    }

    .payment-success-icon {
      width: 54px;
      height: 54px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      margin: 0 auto;
      background: #ecfbf2;
      color: #106d39;
    }

    .payment-success-icon .material-symbols-rounded {
      font-size: 32px;
    }

    .payment-success-card strong {
      color: var(--text);
      font-size: 18px;
    }

    .plan-limit-card {
      border: 1px solid #d8f0e0;
      border-radius: var(--radius-sm);
      background: #f7fcf9;
      padding: 18px;
      display: grid;
      gap: 10px;
      text-align: center;
      margin-bottom: 16px;
    }

    .plan-limit-icon {
      width: 54px;
      height: 54px;
      border-radius: var(--radius-sm);
      background: #ecfbf2;
      color: #106d39;
      display: grid;
      place-items: center;
      margin: 0 auto;
    }

    .plan-limit-icon .material-symbols-rounded {
      font-size: 30px;
    }

    .plan-limit-card strong {
      color: var(--text);
      font-size: 18px;
    }

    .plan-limit-card span {
      color: var(--muted);
      line-height: 1.45;
    }

    .mini-btn[data-report-range] {
      cursor: pointer;
    }

    .mini-btn[data-report-range].active {
      border-color: #aee2c1;
      color: var(--green);
      background: #f5fcf8;
    }

    @media (max-width: 760px) {
      .billing-plan-grid {
        grid-template-columns: 1fr;
      }

      .payment-qr-panel {
        grid-template-columns: 1fr;
      }

      .payment-qr-box {
        width: min(100%, 220px);
        margin: 0 auto;
      }
    }


    .back-btn {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      border: none;
      background: #fff;
      display: grid;
      place-items: center;
      color: #415066;
      box-shadow: 0 8px 18px rgba(17,24,39,0.04);
      cursor: pointer;
      flex: none;
    }

    .page-sub {
      margin: 0 0 18px;
      color: var(--muted);
      font-size: 15px;
      line-height: 1.45;
    }

    .employee-strip {
      display: flex;
      align-items: center;
      gap: 14px;
      background: #fff;
      border: 1px solid #edf0f3;
      border-radius: 22px;
      box-shadow: var(--shadow);
      padding: 16px;
      margin-bottom: 18px;
    }


    #branchesPage .search-wrap {
      margin-bottom: 14px;
    }

    #branchesPage #branchPlanLimitNotice.show {
      margin-bottom: 16px;
    }

    #branchesPage .add-employee-btn {
      width: 58px;
      height: 58px;
      flex: none;
    }


    /* GLOBAL LOADING / LOCK STATE */
    .app-loading-overlay {
      position: fixed;
      inset: 0;
      z-index: 9999;
      display: none;
      align-items: center;
      justify-content: center;
      background: rgba(247, 250, 248, 0.72);
      backdrop-filter: blur(6px);
      padding: 22px;
    }

    .app-loading-overlay.show {
      display: flex;
    }

    .loading-card {
      width: min(84vw, 320px);
      background: #fff;
      border: 1px solid #edf0f3;
      border-radius: 24px;
      box-shadow: 0 18px 48px rgba(17, 24, 39, 0.14);
      padding: 22px;
      text-align: center;
    }

    .loading-spinner {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      border: 4px solid #eaf9f0;
      border-top-color: var(--green);
      margin: 0 auto 14px;
    }

    .loading-title {
      font-size: 16px;
      font-weight: 800;
      color: var(--text);
      margin-bottom: 4px;
    }

    .loading-sub {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.4;
    }

    /* EMPLOYEE EDIT REMOVED */
    .employee-card {
      cursor: default !important;
    }

    .employee-card:active {
      transform: none !important;
    }


    /* DELETE EMPLOYEE ONLY */
    .employee-delete-actions {
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid #eef1f4;
      display: grid;
      grid-template-columns: 1fr;
    }

    .employee-delete-btn {
      width: 100%;
      border: 1px solid #ffd4d4;
      min-height: 48px;
      border-radius: 16px;
      background: #fff7f7;
      color: #c53030;
      font-size: 14px;
      font-weight: 800;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      cursor: pointer;
    }

    .employee-delete-btn:active {
    }

    .delete-warning-box {
      background: #fff7f7;
      border: 1px solid #ffd4d4;
      color: #8a2b2b;
      border-radius: 18px;
      padding: 14px;
      margin-bottom: 16px;
      font-size: 13px;
      line-height: 1.45;
    }

    .delete-warning-box strong {
      color: #b42318;
    }


    /* EMPLOYEE ARCHIVE / DEACTIVATE */
    .employee-manage-actions {
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid #eef1f4;
      display: grid;
      grid-template-columns: 1fr;
    }

    .employee-manage-btn {
      width: 100%;
      border: 1px solid #d7f0df;
      min-height: 48px;
      border-radius: 16px;
      background: #eaf9f0;
      color: var(--green);
      font-size: 14px;
      font-weight: 800;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      cursor: pointer;
    }

    .employee-action-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
      margin-bottom: 16px;
    }

    .employee-action-note {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
      margin-top: -4px;
      margin-bottom: 12px;
    }


    /* EMPLOYEE STATUS FILTER */
    .employee-filter-tabs {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 8px;
      margin-bottom: 14px;
    }

    .employee-filter-tab {
      min-height: 42px;
      border-radius: 14px;
      border: 1px solid #e8ecef;
      background: #fff;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      cursor: pointer;
      box-shadow: 0 4px 14px rgba(17, 24, 39, 0.03);
    }

    .employee-filter-tab.active {
      background: #eaf9f0;
      color: var(--green);
      border-color: #bfe8ce;
    }


    /* ATTENDANCE REQUESTS */
    .request-summary-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      margin-bottom: 16px;
    }

    .request-card {
      background: #fff;
      border: 1px solid #edf0f2;
      border-radius: 22px;
      box-shadow: var(--shadow);
      padding: 16px;
      margin-bottom: 14px;
    }

    .request-card.pending {
      border-color: #ffe1ad;
      background: linear-gradient(180deg, #fffaf2 0%, #ffffff 100%);
    }

    .request-card.approved {
      border-color: #c8efd8;
      background: linear-gradient(180deg, #f5fcf8 0%, #ffffff 100%);
    }

    .request-card.declined {
      border-color: #ffd4d4;
      background: linear-gradient(180deg, #fff7f7 0%, #ffffff 100%);
    }

    .request-card-top {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 14px;
    }

    .request-meta {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      border-top: 1px solid #eef1f4;
      padding-top: 14px;
      margin-top: 12px;
    }

    .request-meta-box {
      background: #f8fbf9;
      border: 1px solid #eef3ef;
      border-radius: 16px;
      padding: 12px 10px;
    }

    .request-label {
      font-size: 12px;
      color: var(--muted);
      margin-bottom: 5px;
      line-height: 1.2;
    }

    .request-value {
      font-size: 14px;
      font-weight: 800;
      line-height: 1.25;
      word-break: break-word;
    }

    .request-reason {
      color: #4f5b6e;
      font-size: 13px;
      line-height: 1.45;
      background: #f8fbf9;
      border: 1px solid #eef3ef;
      border-radius: 16px;
      padding: 12px;
      margin-top: 12px;
    }

    .request-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-top: 14px;
    }


    /* ROBUST NATIVE DATE PICKER
       Keep the input technically visible so mobile/desktop browsers can open it. */
    #realDateInput.hidden {
      display: block !important;
      position: fixed;
      left: 18px;
      top: 86px;
      width: 1px;
      height: 1px;
      opacity: 0;
      border: 0;
      padding: 0;
      background: transparent;
      pointer-events: none;
      z-index: -1;
    }

    .branch-save-hint {
      margin-top: 10px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
      text-align: center;
    }


    /* STICKY / FLOATING BACK BUTTON HEADERS */
    .sheet-header {
      position: sticky;
      top: -14px;
      z-index: 60;
      background: rgba(255, 255, 255, 0.96);
      backdrop-filter: blur(12px);
      margin: -14px -18px 18px;
      padding: 14px 18px 12px;
      border-bottom: 1px solid rgba(232, 236, 239, 0.85);
    }

    .sheet-header .sheet-back,
    .page-title-row .back-btn {
      box-shadow: 0 10px 24px rgba(17, 24, 39, 0.12);
      background: #ffffff;
    }

    .sheet-header .sheet-back:active,
    .page-title-row .back-btn:active {
      background: #eaf9f0;
      color: var(--green);
    }

    /* Keep full-page back rows visible under the main app header. */
    .page-title-row:has(.back-btn) {
      position: sticky;
      top: calc(env(safe-area-inset-top) + 76px);
      z-index: 14;
      margin: -4px -18px 14px;
      padding: 10px 18px;
      background: rgba(247, 250, 248, 0.94);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid rgba(232, 236, 239, 0.85);
    }


    /* RESPONSIVE LAYOUT — mobile, tablet, desktop
       Keeps the same card-based composition, but prevents the admin app from
       being locked to a tiny phone width on larger screens. */
    @media (min-width: 700px) {
      body {
        align-items: flex-start;
        background: #eaf0ed;
      }

      .mobile-shell {
        max-width: min(100vw, 820px);
        min-height: 100svh;
        box-shadow: 0 20px 70px rgba(17, 24, 39, 0.08);
      }

      .app-header,
      .bottom-nav {
        max-width: min(100vw, 820px);
      }

      .page {
        padding: 24px;
        padding-bottom: calc(96px + var(--safe-bottom));
      }

      .stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }

      .report-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      #employeeCards,
      #attendanceCards,
      #branchCards,
      #requestCards {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
      }

      #employeeCards .employee-card,
      #attendanceCards .attendance-card,
      #branchCards .branch-time-card,
      #requestCards .request-card {
        margin-bottom: 0;
        height: 100%;
      }

      .overlay {
        align-items: center;
        padding: 24px;
      }

      .sheet {
        max-width: min(92vw, 680px);
        border-radius: 28px;
        padding: 16px 22px 22px;
      }

      .sheet-header {
        border-radius: 22px 22px 0 0;
      }
    }

    @media (min-width: 1024px) {
      .mobile-shell {
        max-width: min(100vw, 1180px);
      }

      .app-header,
      .bottom-nav {
        max-width: min(100vw, 1180px);
      }

      .page {
        padding: 28px 32px;
        padding-bottom: calc(104px + var(--safe-bottom));
      }

      .brand-inline h1 {
        font-size: 20px;
      }

      .greeting h2,
      .page-title-row h2 {
        font-size: 30px;
      }

      #employeeCards,
      #attendanceCards,
      #branchCards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
      }

      #requestCards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
      }

      .section-card,
      .chart-card,
      .stat-card,
      .mini-stat,
      .employee-card,
      .attendance-card,
      .branch-time-card,
      .request-card {
        box-shadow: 0 12px 38px rgba(17, 24, 39, 0.055);
      }

      .sheet {
        max-width: min(88vw, 760px);
      }
    }

    @media (min-width: 1280px) {
      .mobile-shell,
      .app-header,
      .bottom-nav {
        max-width: 1220px;
      }

      .page {
        padding-left: 36px;
        padding-right: 36px;
      }

      #employeeCards,
      #attendanceCards,
      #branchCards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
    }



    /* FULL-WIDTH DESKTOP/TABLET EXPANSION
       Remove the outer desktop gutter/card feel and let the layout breathe. */
    @media (min-width: 700px) {
      body {
        justify-content: flex-start;
        align-items: stretch;
        background:
          radial-gradient(circle at bottom left, rgba(39, 196, 106, 0.08), transparent 30%),
          radial-gradient(circle at bottom right, rgba(39, 196, 106, 0.08), transparent 30%),
          linear-gradient(180deg, #fbfffc 0%, #f7faf8 45%, #f5faf7 100%);
      }

      .mobile-shell {
        width: 100%;
        max-width: none;
        min-height: 100svh;
        box-shadow: none;
      }

      .app-header,
      .bottom-nav {
        width: 100%;
        max-width: none;
      }
    }

    @media (min-width: 1024px) {
      .page {
        padding-left: 40px;
        padding-right: 40px;
      }

      .overlay {
        padding-left: 36px;
        padding-right: 36px;
      }
    }

    @media (min-width: 1440px) {
      .page {
        padding-left: 48px;
        padding-right: 48px;
      }

      #employeeCards,
      #attendanceCards,
      #branchCards {
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }

      #requestCards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
    }



    /* STABLE BOTTOM NAV FIX
       Previousent the bottom navigation/divider from shifting between pages,
       especially on Reports where wider summary cards can create tiny overflow. */
    html,
    body {
      width: 100%;
      overflow-x: hidden;
    }

    .mobile-shell,
    .page,
    #reportsPage,
    #reportsPage * {
      min-width: 0;
    }

    .bottom-nav {
      left: 0;
      right: 0;
      margin-left: auto;
      margin-right: auto;
      transform: none;
      box-sizing: border-box;
    }

    #reportsPage .page-title-row,
    #reportsPage .report-summary,
    #reportsPage .chart-card,
    #reportsPage .section-card {
      max-width: 100%;
      overflow: hidden;
    }

    #reportsPage .mini-stat {
      min-width: 0;
    }

    #reportsPage .mini-stat-label,
    #reportsPage .mini-stat-value,
    #reportsPage .mini-stat-note {
      overflow-wrap: anywhere;
    }

    @media (max-width: 430px) {
      #reportsPage .report-summary {
        grid-template-columns: 1fr;
      }
    }


    /* TYPESYSTEM PASS: Track Right! */
    html {
      font-size: 16px;
      font-kerning: normal;
      text-rendering: optimizeLegibility;
    }

    body {
      line-height: var(--leading-body);
      font-feature-settings: "kern" 1, "liga" 1;
      -webkit-font-smoothing: antialiased;
      text-size-adjust: 100%;
    }

    h1,
    h2,
    h3,
    p {
      max-width: 68ch;
    }

    .brand-title {
      font-size: var(--type-display);
      line-height: var(--leading-tight);
      letter-spacing: 0;
      font-weight: 800;
      text-wrap: balance;
    }

    .brand-sub,
    .greeting p,
    .page-sub,
    .sheet-sub,
    .report-export-note,
    .settings-help,
    .form-help,
    .danger-zone-copy,
    .employee-action-note,
    .selfie-proof-help,
    .schedule-range-copy,
    .schedule-hint {
      font-size: var(--type-body);
      line-height: var(--leading-body);
      font-weight: 400;
    }

    .brand-inline h1 {
      font-size: var(--type-subhead);
      line-height: var(--leading-tight);
      letter-spacing: 0;
      font-weight: 800;
    }

    .greeting h2,
    .page-title-row h2 {
      font-size: var(--type-title);
      line-height: var(--leading-tight);
      letter-spacing: 0;
      font-weight: 800;
      text-wrap: balance;
    }

    .section-head h3,
    .sheet-title,
    .chart-title,
    .schedule-range-title,
    .employee-name,
    .loading-title {
      font-size: var(--type-subhead);
      line-height: var(--leading-tight);
      letter-spacing: 0;
      font-weight: 800;
    }

    .field label,
    .settings-mini-label,
    .notes-label,
    .stat-label,
    .mini-stat-label,
    .time-box-label,
    .branch-time-label,
    .setting-label,
    .detail-left,
    .selfie-proof-title,
    .schedule-table thead th {
      font-size: var(--type-small);
      line-height: var(--leading-ui);
      letter-spacing: 0;
      font-weight: 700;
    }

    input[type="email"],
    input[type="password"],
    input[type="text"],
    input[type="date"],
    input[type="time"],
    input[type="number"],
    select,
    textarea,
    .pill-btn,
    .pill-select select,
    .btn,
    .mini-btn,
    .link-btn,
    .employee-manage-btn,
    .branch-edit-btn {
      font-size: var(--type-ui);
      line-height: var(--leading-ui);
      font-weight: 650;
    }

    .btn {
      font-weight: 750;
    }

    .row-name,
    .attendance-card-name,
    .schedule-employee-name,
    .branch-time-name,
    .request-title,
    .status-toggle-title,
    .danger-zone-title,
    .setting-value,
    .detail-right {
      font-size: var(--type-body);
      line-height: var(--leading-ui);
      letter-spacing: 0;
      font-weight: 750;
    }

    .row-sub,
    .attendance-card-sub,
    .schedule-employee-sub,
    .branch-time-address,
    .request-meta,
    .status-toggle-sub,
    .mini-stat-note,
    .stat-note,
    .login-footer,
    .message,
    .notes-counter,
    .empty {
      font-size: var(--type-small);
      line-height: var(--leading-body);
      font-weight: 500;
    }

    .status-pill,
    .branch-status-pill,
    .verification-line,
    .employee-filter-tab,
    .nav-btn span.label {
      font-size: var(--type-caption);
      line-height: 1;
      letter-spacing: 0;
      font-weight: 750;
    }

    .stat-value,
    .mini-stat-value,
    .time-box-value,
    .branch-time-value,
    .row-time,
    .detail-right,
    .bar-label,
    input[type="date"],
    input[type="time"],
    input[type="number"] {
      font-variant-numeric: tabular-nums;
      font-feature-settings: "tnum" 1, "kern" 1;
    }

    .stat-value {
      font-size: 1.75rem;
      line-height: 1;
      letter-spacing: 0;
      font-weight: 800;
    }

    .mini-stat-value {
      font-size: var(--type-subhead);
      line-height: 1;
      letter-spacing: 0;
      font-weight: 800;
    }

    .page-title-row .pill-btn,
    .top-controls .pill-btn,
    .filter-row .pill-btn,
    .filter-row .pill-select {
      font-size: var(--type-body);
    }

    .schedule-table th,
    .schedule-table td {
      font-size: var(--type-small);
      line-height: var(--leading-ui);
    }

    @media (min-width: 1024px) {
      .brand-inline h1 {
        font-size: 1.1875rem;
      }

      .greeting h2,
      .page-title-row h2 {
        font-size: 1.625rem;
      }
    }

    /* EMIL DESIGN ENGINEERING PASS: quieter surfaces, intentional feedback */
    :root {
      --bg: #f6f8f7;
      --card: #ffffff;
      --text: #172033;
      --muted: #667085;
      --line: #e4e8ee;
      --green: #12864f;
      --green-soft: #eaf7ef;
      --orange: #c77721;
      --orange-soft: #fff4e7;
      --blue: #326fd1;
      --blue-soft: #edf4ff;
      --red: #c2413f;
      --red-soft: #fff0f0;
      --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 24px rgba(16, 24, 40, 0.05);
      --shadow-raised: 0 1px 2px rgba(16, 24, 40, 0.05), 0 16px 42px rgba(16, 24, 40, 0.10);
      --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
      --ease-color: cubic-bezier(0.2, 0, 0, 1);
      --radius-xl: 7px;
      --radius-lg: 7px;
      --radius-md: 7px;
      --radius-sm: 7px;
    }

    html,
    body {
      background: #eef2f0;
    }

    .mobile-shell {
      background: linear-gradient(180deg, #fbfcfb 0%, #f5f8f6 100%);
    }

    .login-card,
    .app-header,
    .bottom-nav,
    .section-card,
    .stat-card,
    .chart-card,
    .mini-stat,
    .employee-card,
    .attendance-card,
    .branch-time-card,
    .request-card,
    .schedule-range-card,
    .schedule-table-card,
    .detail-card,
    .employee-detail-card,
    .selfie-proof-card,
    .status-toggle-card,
    .danger-zone,
    .delete-warning-box,
    .request-meta-box,
    .request-reason,
    .branch-time-box,
    .employee-strip,
    .loading-card {
      border-radius: var(--radius-sm);
      border-color: var(--line);
      box-shadow: var(--shadow);
    }

    .login-card,
    .section-card,
    .stat-card,
    .chart-card,
    .mini-stat,
    .employee-card,
    .attendance-card,
    .branch-time-card,
    .request-card,
    .schedule-table-card,
    .detail-card,
    .employee-detail-card,
    .selfie-proof-card {
      background: rgba(255, 255, 255, 0.96);
    }

    .app-header,
    .bottom-nav,
    .sheet-header,
    .page-title-row:has(.back-btn) {
      background: rgba(250, 252, 251, 0.94);
      border-color: rgba(228, 232, 238, 0.9);
    }

    .sheet {
      border-radius: 16px 16px 0 0;
      border: 1px solid var(--line);
      box-shadow: var(--shadow-raised);
    }

    @media (min-width: 700px) {
      .sheet {
        border-radius: 16px;
      }
    }

    .big-logo,
    .mini-logo,
    .avatar,
    .avatar-chip,
    .stat-icon,
    .branch-icon,
    .branch-time-icon,
    .mini-circle,
    .employee-photo {
      border-radius: var(--radius-sm);
    }

    input[type="email"],
    input[type="password"],
    input[type="text"],
    input[type="date"],
    input[type="time"],
    input[type="number"],
    select,
    textarea,
    .pill-btn,
    .pill-select,
    .pill-input,
    .mini-btn,
    .employee-filter-tab,
    .employee-edit-btn,
    .branch-edit-btn,
    .employee-delete-btn,
    .employee-manage-btn,
    .back-btn,
    .sheet-back,
    .icon-btn,
    .btn,
    .add-employee-btn {
      border-radius: var(--radius-sm);
    }

    input[type="email"],
    input[type="password"],
    input[type="text"],
    input[type="date"],
    input[type="time"],
    input[type="number"],
    select,
    textarea {
      border-color: #dfe4ea;
      background: #ffffff;
    }

    input:focus,
    select:focus,
    textarea:focus {
      border-color: rgba(18, 134, 79, 0.55);
      box-shadow: 0 0 0 4px rgba(18, 134, 79, 0.11);
    }

    button:focus-visible,
    input:focus-visible,
    select:focus-visible,
    textarea:focus-visible,
    [tabindex]:focus-visible {
      outline: 3px solid rgba(18, 134, 79, 0.24);
      outline-offset: 2px;
    }

    .btn,
    .pill-btn,
    .mini-btn,
    .employee-filter-tab,
    .employee-edit-btn,
    .branch-edit-btn,
    .employee-delete-btn,
    .employee-manage-btn,
    .sheet-back,
    .back-btn,
    .icon-btn,
    .avatar-chip,
    .add-employee-btn,
    .list-row,
    .attendance-card,
    .branch-card,
    .branch-time-card {
      transition:
        transform 120ms var(--ease-out),
        background-color 160ms var(--ease-color),
        border-color 160ms var(--ease-color),
        color 160ms var(--ease-color),
        box-shadow 160ms var(--ease-color);
      will-change: transform;
    }

    .btn:active,
    .pill-btn:active,
    .mini-btn:active,
    .employee-filter-tab:active,
    .employee-edit-btn:active,
    .branch-edit-btn:active,
    .employee-delete-btn:active,
    .employee-manage-btn:active,
    .sheet-back:active,
    .back-btn:active,
    .icon-btn:active,
    .avatar-chip:active,
    .add-employee-btn:active,
    .list-row:active,
    .attendance-card:active,
    .branch-card:active,
    .branch-time-card:active {
      transform: scale(0.97);
      filter: none;
    }

    .btn:disabled,
    button:disabled {
      transform: none;
      box-shadow: none;
    }

    @media (hover: hover) and (pointer: fine) {
      .pill-btn:hover,
      .mini-btn:hover,
      .employee-filter-tab:hover,
      .employee-edit-btn:hover,
      .branch-edit-btn:hover,
      .employee-manage-btn:hover,
      .sheet-back:hover,
      .back-btn:hover,
      .icon-btn:hover,
      .avatar-chip:hover,
      .list-row:hover,
      .attendance-card:hover,
      .branch-card:hover,
      .branch-time-card:hover {
        border-color: rgba(18, 134, 79, 0.28);
        box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 12px 30px rgba(16, 24, 40, 0.08);
      }
    }

    .btn-primary,
    .btn-approve,
    .add-employee-btn {
      background: #12864f;
      box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 12px 24px rgba(18, 134, 79, 0.22);
    }

    .btn-primary:active,
    .btn-approve:active,
    .add-employee-btn:active {
      background: #0f7445;
      color: #ffffff;
      box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 18px rgba(18, 134, 79, 0.18);
    }

    .btn-danger {
      background: #b83b3b;
      box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 12px 24px rgba(184, 59, 59, 0.18);
    }

    .btn-danger:active {
      background: #9f3030;
      color: #ffffff;
      box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 18px rgba(184, 59, 59, 0.14);
    }

    .btn-outline,
    .btn-flag {
      border: 1px solid rgba(18, 134, 79, 0.32);
      background: #ffffff;
      color: #106d41;
      box-shadow: none;
    }

    .btn-outline:active,
    .btn-flag:active {
      background: #edf8f1;
      color: #0f5f39;
    }

    .status-pill,
    .branch-status-pill,
    .verification-line {
      border-radius: 999px;
      border: 1px solid currentColor;
      border-color: color-mix(in srgb, currentColor 18%, transparent);
    }

    .stat-card {
      padding: 16px;
    }

    .stat-head {
      align-items: flex-start;
    }

    .stat-icon {
      width: 42px;
      height: 42px;
    }

    .section-head {
      border-bottom: 1px solid #edf0f3;
      padding-bottom: 12px;
    }

    .nav-btn {
      border-radius: var(--radius-sm);
      position: relative;
    }

    .nav-btn.active {
      background: #edf8f1;
    }

    .nav-btn.active::before {
      content: "";
      position: absolute;
      top: 6px;
      left: 50%;
      width: 18px;
      height: 3px;
      border-radius: 999px;
      background: var(--green);
      transform: translateX(-50%);
    }

    .slider,
    .slider:before {
      transition: none;
    }

    .switch input:focus-visible + .slider {
      box-shadow: 0 0 0 4px rgba(18, 134, 79, 0.13);
    }

    .loading-spinner {
      border: 0;
      background:
        conic-gradient(from 0deg, var(--green) 0 82deg, #e5ece8 82deg 360deg);
      position: relative;
    }

    .loading-spinner::after {
      content: "";
      position: absolute;
      inset: 5px;
      border-radius: 50%;
      background: #ffffff;
    }

    @media (prefers-reduced-motion: reduce) {
      *,
      *::before,
      *::after {
        transition-duration: 0ms !important;
        animation: none !important;
        scroll-behavior: auto !important;
      }
    }

    .payroll-summary {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      margin-bottom: 16px;
    }

    .payroll-list {
      display: grid;
      grid-template-columns: 1fr;
      gap: 14px;
      margin-bottom: 16px;
    }

    .payroll-card {
      background: #fff;
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      box-shadow: var(--shadow);
      padding: 16px;
    }

    .payroll-card-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      padding-bottom: 12px;
      border-bottom: 1px solid #edf0f3;
      margin-bottom: 12px;
    }

    .payroll-net {
      text-align: right;
      flex: none;
    }

    .payroll-net-label {
      color: var(--muted);
      font-size: var(--type-caption);
      font-weight: 750;
      line-height: 1;
      margin-bottom: 6px;
    }

    .payroll-net-value {
      color: var(--green);
      font-size: var(--type-subhead);
      font-weight: 800;
      line-height: 1;
      font-variant-numeric: tabular-nums;
    }

    .payroll-metrics {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .payroll-metric {
      background: #f8fbf9;
      border: 1px solid #eef3ef;
      border-radius: var(--radius-sm);
      padding: 10px;
      min-width: 0;
    }

    .payroll-metric-label {
      color: var(--muted);
      font-size: var(--type-caption);
      font-weight: 750;
      line-height: 1.1;
      margin-bottom: 5px;
    }

    .payroll-metric-value {
      color: var(--text);
      font-size: var(--type-small);
      font-weight: 800;
      line-height: var(--leading-ui);
      font-variant-numeric: tabular-nums;
      overflow-wrap: anywhere;
    }

    .payroll-note {
      color: var(--muted);
      font-size: var(--type-small);
      line-height: var(--leading-body);
      margin: 12px 0 0;
    }

    .payroll-card {
      cursor: pointer;
    }

    .payroll-card-action {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-top: 12px;
      color: var(--green);
      font-size: var(--type-small);
      font-weight: 800;
    }

    .payroll-review-card {
      background: #f8fbf9;
      border: 1px solid #dceee4;
    }

    .payroll-review-title {
      color: var(--text);
      font-size: var(--type-body);
      font-weight: 850;
      line-height: var(--leading-ui);
      margin-bottom: 6px;
    }

    .payroll-review-copy,
    .payroll-detail-sub {
      color: var(--muted);
      font-size: var(--type-small);
      font-weight: 500;
      line-height: var(--leading-body);
      margin: 0;
    }

    .payroll-detail-total {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      margin: 14px 0;
    }

    .payroll-day-list {
      display: grid;
      gap: 10px;
      margin-top: 14px;
    }

    .payroll-day-row {
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      padding: 12px;
      background: #ffffff;
    }

    .payroll-day-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 10px;
    }

    .payroll-day-title {
      color: var(--text);
      font-size: var(--type-body);
      font-weight: 850;
      line-height: var(--leading-ui);
    }

    .payroll-day-meta {
      color: var(--muted);
      font-size: var(--type-small);
      font-weight: 600;
      line-height: var(--leading-body);
    }

    .payroll-day-net {
      color: var(--green);
      font-size: var(--type-body);
      font-weight: 850;
      white-space: nowrap;
    }

    .payroll-day-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .dashboard-payroll-alert {
      margin-bottom: 16px;
      cursor: pointer;
    }

    .salary-editor-card {
      margin-bottom: 16px;
    }

    .payroll-settings-overlay .sheet {
      max-width: min(94vw, 960px);
    }

    .payroll-settings-overlay .payroll-settings-card {
      margin-bottom: 0;
    }

    .salary-editor-list {
      display: grid;
      gap: 10px;
      margin-top: 14px;
    }

    .salary-editor-toggle {
      width: 100%;
      min-height: 52px;
      margin-top: 14px;
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      background: #ffffff;
      color: var(--text);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 0 14px;
      cursor: pointer;
      text-align: left;
      box-shadow: 0 8px 18px rgba(17, 24, 39, 0.03);
    }

    .salary-editor-toggle-main {
      min-width: 0;
    }

    .salary-editor-toggle-title {
      font-size: var(--type-body);
      font-weight: 850;
      line-height: 1.2;
    }

    .salary-editor-toggle-count {
      color: var(--muted);
      font-size: var(--type-small);
      font-weight: 650;
      line-height: 1.3;
      margin-top: 3px;
    }

    .salary-editor-toggle-icon {
      color: var(--green);
      flex: none;
      transition: transform 0.18s ease;
    }

    .salary-editor-toggle[aria-expanded="true"] .salary-editor-toggle-icon {
      transform: rotate(180deg);
    }

    .salary-editor-list.collapsed {
      display: none;
    }

    .deduction-settings {
      display: grid;
      gap: 12px;
      margin-top: 14px;
      padding-top: 14px;
      border-top: 1px solid var(--line);
    }

    .deduction-settings-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
    }

    .deduction-settings-title {
      color: var(--text);
      font-size: var(--type-body);
      font-weight: 850;
      line-height: 1.2;
    }

    .deduction-settings-copy {
      max-width: 62ch;
      margin-top: 4px;
      color: var(--muted);
      font-size: var(--type-small);
      font-weight: 600;
      line-height: 1.45;
    }

    .deduction-type-list,
    .deduction-employee-list {
      display: grid;
      gap: 8px;
    }

    .deduction-type-row {
      display: grid;
      grid-template-columns: minmax(130px, 1fr) minmax(150px, 0.9fr) minmax(110px, 0.65fr);
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    .deduction-type-name {
      color: var(--text);
      font-size: var(--type-small);
      font-weight: 750;
      line-height: 1.3;
    }

    .deduction-type-row select,
    .deduction-type-row input,
    .deduction-employee-controls input {
      width: 100%;
      height: 44px;
      min-width: 0;
      border-radius: var(--radius-sm);
      padding-left: 11px;
    }

    .deduction-type-row input:disabled,
    .deduction-type-row select:disabled,
    .deduction-employee-controls input:disabled {
      background: #f3f6f4;
      color: var(--muted);
      cursor: not-allowed;
    }

    .deduction-employee-list.collapsed {
      display: none;
    }

    .deduction-employee-row {
      display: grid;
      grid-template-columns: minmax(150px, 1fr) minmax(230px, 1fr);
      align-items: center;
      gap: 10px;
      border-top: 1px solid var(--line);
      padding-top: 10px;
    }

    .deduction-employee-controls {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .deduction-field-label {
      display: grid;
      gap: 5px;
      color: var(--muted);
      font-size: var(--type-caption);
      font-weight: 750;
      line-height: 1.2;
    }

    .salary-editor-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 10px;
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      background: #ffffff;
      padding: 12px;
    }

    .salary-editor-person {
      min-width: 0;
    }

    .salary-editor-controls {
      display: grid;
      grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr);
      gap: 10px;
    }

    .salary-editor-controls select,
    .salary-editor-controls input {
      height: 48px;
      padding-left: 12px;
      border-radius: var(--radius-sm);
    }

    .salary-bulk-row {
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
      margin-top: 14px;
      padding: 12px;
      border: 1px solid #dceee4;
      border-radius: var(--radius-sm);
      background: #f8fbf9;
    }

    .salary-bulk-controls {
      display: grid;
      grid-template-columns: minmax(110px, 1fr) minmax(110px, 1fr);
      gap: 10px;
    }

    .salary-bulk-controls select,
    .salary-bulk-controls input {
      height: 48px;
      padding-left: 12px;
      border-radius: var(--radius-sm);
    }

    @media (min-width: 760px) {
      .export-action-group {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
      }

      .business-code-actions {
        grid-template-columns: 1fr 1fr;
      }

      .salary-editor-row {
        grid-template-columns: minmax(180px, 1fr) minmax(260px, 0.95fr);
        align-items: center;
      }

      .salary-bulk-row {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
      }

      .salary-bulk-controls {
        grid-template-columns: minmax(120px, 160px) minmax(120px, 160px);
      }

      .payroll-settings-overlay .settings-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
      }

      .payroll-settings-overlay .settings-help,
      .payroll-settings-overlay .message {
        grid-column: 1 / -1;
      }
    }

    @media (min-width: 700px) {
      .payroll-summary {
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }

      .payroll-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (min-width: 1100px) {
      .payroll-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
    }

    .bottom-nav {
      grid-template-columns: repeat(8, 1fr);
    }

    .desktop-sidebar {
      display: none;
    }

    .desktop-brand,
    .desktop-nav,
    .desktop-sidebar-footer {
      min-width: 0;
    }

    @media (min-width: 1024px) {
      body {
        background: #eef2f0;
      }

      #appView.mobile-shell {
        display: grid;
        grid-template-columns: 248px minmax(0, 1fr);
        grid-template-rows: 64px 1fr;
        min-height: 100svh;
        background: #f6f8f7;
        overflow: visible;
      }

      #appView.hidden {
        display: none !important;
      }

      #appView .desktop-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        display: flex;
        flex-direction: column;
        width: 248px;
        height: 100svh;
        padding: 22px 16px;
        background: #ffffff;
        border-right: 1px solid var(--line);
        box-shadow: 1px 0 0 rgba(16, 24, 40, 0.02);
        z-index: 30;
      }

      .desktop-brand {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 0 8px 20px;
        border-bottom: 1px solid #edf0f3;
        margin-bottom: 16px;
      }

      .desktop-brand .mini-logo {
        width: 42px;
        height: 42px;
      }

      .desktop-brand .brand-logo-img {
        width: 78%;
        height: 78%;
      }

      .desktop-brand-title {
        color: var(--text);
        font-size: 1rem;
        font-weight: 850;
        line-height: 1.05;
      }

      .desktop-brand-title span {
        color: var(--green);
      }

      .desktop-brand-sub {
        color: var(--muted);
        font-size: var(--type-caption);
        font-weight: 650;
        line-height: 1.3;
        margin-top: 4px;
      }

      .desktop-nav {
        display: flex;
        flex-direction: column;
        gap: 4px;
      }

      .desktop-sidebar-footer {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-top: auto;
        padding-top: 16px;
        border-top: 1px solid #edf0f3;
      }

      .desktop-nav-btn {
        width: 100%;
        min-height: 42px;
        border: 1px solid transparent;
        border-radius: var(--radius-sm);
        background: transparent;
        color: #475467;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 10px;
        font-size: var(--type-small);
        font-weight: 750;
        line-height: 1;
        text-align: left;
        cursor: pointer;
      }

      .desktop-nav-btn .material-symbols-rounded {
        color: #7d8998;
        font-size: 20px;
      }

      .desktop-nav-btn.active {
        background: #edf8f1;
        border-color: rgba(18, 134, 79, 0.18);
        color: #0f7445;
      }

      .desktop-nav-btn.active .material-symbols-rounded {
        color: #12864f;
      }

      .desktop-nav-muted {
        color: #667085;
      }

      @media (hover: hover) and (pointer: fine) {
        .desktop-nav-btn:hover {
          background: #f7faf8;
          border-color: #e3ebe6;
          color: var(--text);
        }
      }

      #appView .app-header {
        position: fixed;
        top: 0;
        left: 248px;
        right: 0;
        grid-column: 2;
        grid-row: 1;
        display: block;
        width: calc(100% - 248px);
        min-width: 0;
        height: 64px;
        padding: 0 36px;
        background: #fbfcfb;
        border-bottom: 1px solid #e7ece9;
        backdrop-filter: none;
        z-index: 25;
      }

      #appView .header-row {
        width: min(100%, 1440px);
        height: 100%;
        margin: 0 auto;
        justify-content: space-between;
      }

      #appView .brand-inline {
        display: none;
      }

      #appView .desktop-header-context {
        display: block;
        min-width: 0;
      }

      #appView .header-actions {
        gap: 4px;
        min-height: 36px;
      }

      #appView .header-actions .icon-btn,
      #appView .header-actions .avatar-chip {
        height: 36px;
        border-radius: var(--radius-sm);
        box-shadow: none;
      }

      #appView .header-actions .icon-btn {
        width: 36px;
        border-color: transparent;
        background: transparent;
        color: #667085;
      }

      #appView #headerLogoutBtn {
        display: none;
      }

      #appView .avatar-chip {
        width: auto;
        min-width: 0;
        margin-left: 6px;
        padding: 0 4px 0 12px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        background: transparent;
        border-color: transparent;
        color: inherit;
        position: relative;
      }

      #appView .avatar-chip::before {
        content: "";
        position: absolute;
        top: 5px;
        bottom: 5px;
        left: 0;
        width: 1px;
        background: #e1e7e3;
      }

      #appView .avatar-chip.active {
        background: transparent;
        border-color: transparent;
        box-shadow: none;
      }

      @media (hover: hover) and (pointer: fine) {
        #appView .header-actions .icon-btn:hover {
          background: #eef4f0;
          border-color: transparent;
        }

        #appView .avatar-chip:hover {
          background: transparent;
          border-color: transparent;
          box-shadow: none;
        }
      }

      #appView .avatar-chip-initial {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: #e7f5ec;
        color: var(--green);
        display: grid;
        place-items: center;
        flex: none;
        font-size: 0.8rem;
        font-weight: 850;
      }

      #appView .desktop-profile-copy {
        display: block;
        min-width: 0;
        padding-right: 5px;
      }

      #appView .page {
        grid-column: 2;
        grid-row: 2;
        width: min(100%, 1440px);
        padding: 28px 36px 48px;
        margin: 0 auto;
      }

      #appView .bottom-nav {
        display: none;
      }

      .page-title-row,
      .greeting,
      .top-controls,
      .filter-row,
      .employee-filter-tabs,
      .schedule-toolbar {
        max-width: none;
      }

      .page-title-row {
        min-height: 44px;
        margin-bottom: 18px;
      }

      #appView .page > .page-title-row:first-child,
      #appView .page > .greeting:first-child {
        margin-bottom: 10px;
      }

      #appView .page > .page-sub {
        max-width: 68ch;
        margin-bottom: 22px !important;
      }

      .employee-directory-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
        margin-bottom: 16px;
      }

      .employee-directory-toolbar {
        grid-template-columns: minmax(320px, 1fr) minmax(190px, 240px) minmax(160px, 200px);
        align-items: end;
        gap: 12px;
        margin-bottom: 16px;
      }

      .employee-filter-row {
        grid-template-columns: minmax(440px, 1fr) auto;
        align-items: center;
        gap: 16px;
        margin-bottom: 16px;
      }

      .employee-filter-tabs {
        grid-template-columns: repeat(4, minmax(118px, max-content));
        justify-content: start;
        margin-bottom: 0;
      }

      .employee-directory-count {
        text-align: right;
        white-space: nowrap;
      }

      #employeeCards {
        display: block;
      }

      .employee-directory-list {
        display: grid;
        gap: 0;
        overflow: hidden;
        background: #ffffff;
        border: 1px solid var(--line);
        border-radius: var(--radius-md);
        box-shadow: 0 12px 38px rgba(17, 24, 39, 0.045);
      }

      .employee-directory-header,
      .employee-directory-row {
        display: grid;
        grid-template-columns: minmax(260px, 2fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(155px, 1fr) minmax(190px, auto);
        align-items: center;
        gap: 18px;
      }

      .employee-directory-header {
        padding: 12px 16px;
        background: #f8faf9;
        color: #667085;
        font-size: 12px;
        font-weight: 850;
        border-bottom: 1px solid #edf0f3;
      }

      .employee-directory-row.employee-card {
        margin: 0;
        padding: 14px 16px;
        border: 0;
        border-bottom: 1px solid #edf0f3;
        border-radius: 0;
        box-shadow: none;
      }

      .employee-directory-row.employee-card:last-child {
        border-bottom: 0;
      }

      .attendance-directory-list .employee-directory-header,
      .attendance-directory-list .employee-directory-row {
        grid-template-columns: minmax(260px, 2fr) minmax(170px, 1fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) minmax(150px, auto);
      }

      .attendance-directory-list .employee-directory-row.attendance-card {
        margin: 0;
        padding: 14px 16px;
        border: 0;
        border-bottom: 1px solid #edf0f3;
        border-radius: 0;
        box-shadow: none;
      }

      .attendance-directory-list .employee-directory-row.attendance-card:last-child {
        border-bottom: 0;
      }

      .employee-directory-row .employee-card-top {
        display: contents;
      }

      .attendance-directory-list .attendance-card-top {
        display: contents;
      }

      .employee-directory-row .employee-status {
        margin-left: 0;
      }

      .employee-directory-cell,
      .employee-directory-actions {
        padding-top: 0;
        border-top: 0;
      }

      .employee-directory-cell {
        display: block;
      }

      .employee-directory-cell > span:not(.status-pill) {
        display: none;
      }

      .employee-directory-cell strong {
        text-align: left;
      }

      .employee-directory-actions {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
      }

      .employee-directory-actions .employee-manage-btn {
        width: auto;
        min-height: 38px;
        padding: 0 12px;
        margin-top: 0 !important;
        white-space: nowrap;
      }

      .greeting {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 24px;
      }

      .greeting p {
        text-align: right;
        max-width: 360px;
      }

      .top-controls,
      .filter-row {
        grid-template-columns: repeat(2, minmax(220px, 320px));
        justify-content: start;
      }

      .dashboard-top-controls {
        grid-template-columns: repeat(3, minmax(220px, 320px));
      }

      #payrollBranchBtn {
        max-width: 360px;
      }

      .section-card,
      .chart-card,
      .schedule-range-card,
      .schedule-table-card {
        padding: 18px;
      }

      #payrollPage {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
        align-items: start;
        gap: 18px 22px;
      }

      #payrollPage > .page-title-row,
      #payrollPage > .page-sub,
      #payrollPage > .employee-directory-toolbar,
      #payrollPage > .payroll-summary {
        grid-column: 1 / -1;
      }

      #payrollPage.hidden,
      #settingsPage.hidden {
        display: none !important;
      }

      #settingsPage {
        max-width: 1120px;
      }

      #payrollPage > .employee-directory-toolbar {
        grid-template-columns: minmax(240px, 360px) minmax(190px, 230px) auto;
        justify-content: start;
      }

      #payrollPage > .payroll-summary {
        margin-bottom: 2px;
      }

      #payrollRows {
        grid-column: 1;
        grid-row: 5;
        margin-bottom: 0;
      }

      #payrollPage > .payroll-side-panel {
        grid-column: 2;
        grid-row: 5;
        display: grid;
        gap: 16px;
        position: sticky;
        top: 28px;
        align-self: start;
      }

      #payrollPage > .payroll-side-panel > .section-card {
        margin-bottom: 0;
      }

      #settingsPage .settings-form-grid,
      #payrollPage .settings-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
      }

      #settingsPage .settings-help,
      #settingsPage .message,
      #payrollPage .settings-help,
      #payrollPage .message {
        grid-column: 1 / -1;
      }

      #settingsPage .status-toggle-card,
      #payrollPage .status-toggle-card {
        min-height: 86px;
      }

      #employeeCards,
      #attendanceCards,
      #branchCards,
      #requestCards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .payroll-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
      }

      .overlay {
        padding-left: 284px;
      }
    }

    @media (min-width: 1440px) {
      #appView.mobile-shell {
        grid-template-columns: 264px minmax(0, 1fr);
      }

      #appView .app-header {
        left: 264px;
        width: calc(100% - 264px);
      }

      #appView .desktop-sidebar {
        width: 264px;
      }

      #appView .page {
        padding-left: 44px;
        padding-right: 44px;
      }

      #employeeCards,
      #attendanceCards,
      #branchCards {
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }

      #requestCards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      #payrollRows.payroll-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .overlay {
        padding-left: 300px;
      }
    }

    @media (min-width: 1680px) {
      #payrollRows.payroll-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
    }

    /* PAYROLL REVIEW LAYOUT: keep employee rows readable beside export tools */
    @media (min-width: 980px) {
      #payrollPage {
        grid-template-columns: minmax(620px, 1fr) minmax(320px, 380px);
      }

      #payrollRows.payroll-list {
        grid-template-columns: minmax(0, 1fr);
        min-width: 0;
        overflow: hidden;
      }

      #payrollPage > .payroll-side-panel {
        max-width: 380px;
      }

      .payroll-card {
        display: grid;
        grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
        gap: 14px 16px;
        align-items: start;
        min-width: 0;
        overflow: hidden;
      }

      .payroll-card-top {
        height: 100%;
        margin: 0;
        padding: 0 16px 0 0;
        border-bottom: 0;
        border-right: 1px solid #edf0f3;
      }

      .payroll-card .row-main {
        min-width: 0;
      }

      .payroll-card .row-name {
        overflow-wrap: normal;
        word-break: normal;
      }

      .payroll-card .row-sub {
        overflow-wrap: normal;
        word-break: normal;
      }

      .payroll-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        min-width: 0;
      }

      .payroll-metric {
        min-width: 0;
      }

      .payroll-note,
      .payroll-card-action {
        grid-column: 1 / -1;
      }
    }

    @media (max-width: 979px) {
      .payroll-card {
        display: block;
      }
    }

    /* IMPECCABLE TYPESET PASS: clearer hierarchy for dense admin work */
    :root {
      --type-caption: 0.75rem;
      --type-small: 0.875rem;
      --type-body: 1rem;
      --type-ui: 0.9375rem;
      --type-subhead: 1.125rem;
      --type-title: 1.625rem;
      --type-display: 2.125rem;
      --leading-tight: 1.12;
      --leading-ui: 1.3;
      --leading-body: 1.55;
    }

    body {
      font-weight: 400;
      letter-spacing: 0;
    }

    .brand-title,
    .greeting h2,
    .page-title-row h2,
    .section-head h3,
    .sheet-title,
    .chart-title,
    .schedule-range-title,
    .loading-title {
      color: var(--text);
      text-wrap: balance;
    }

    .greeting h2 {
      font-size: 1.875rem;
      font-weight: 800;
      line-height: 1.08;
    }

    .page-title-row h2 {
      font-size: var(--type-title);
      font-weight: 800;
      line-height: var(--leading-tight);
    }

    .section-head h3,
    .sheet-title,
    .chart-title,
    .schedule-range-title {
      font-size: var(--type-subhead);
      font-weight: 800;
      line-height: 1.18;
    }

    .page-sub,
    .report-export-note,
    .settings-help,
    .form-help,
    .schedule-range-copy,
    .schedule-hint,
    .payroll-note {
      color: var(--muted);
      font-size: var(--type-body);
      font-weight: 400;
      line-height: var(--leading-body);
    }

    .field label,
    .directory-filter span,
    .settings-mini-label,
    .setting-label,
    .stat-label,
    .mini-stat-label,
    .payroll-net-label,
    .payroll-metric-label,
    .employee-directory-header,
    .schedule-table thead th {
      color: #667085;
      font-size: var(--type-caption);
      font-weight: 750;
      letter-spacing: 0.01em;
      line-height: 1.2;
    }

    .row-name,
    .attendance-card-name,
    .schedule-employee-name,
    .branch-time-name,
    .request-title,
    .status-toggle-title,
    .setting-value,
    .detail-right {
      font-size: var(--type-body);
      font-weight: 750;
      line-height: var(--leading-ui);
    }

    .row-sub,
    .attendance-card-sub,
    .schedule-employee-sub,
    .branch-time-address,
    .request-meta,
    .status-toggle-sub,
    .mini-stat-note,
    .stat-note,
    .message,
    .empty,
    .employee-directory-count {
      font-size: var(--type-small);
      font-weight: 500;
      line-height: var(--leading-body);
    }

    input[type="email"],
    input[type="password"],
    input[type="text"],
    input[type="date"],
    input[type="time"],
    input[type="number"],
    select,
    textarea,
    .pill-btn,
    .pill-select select {
      font-size: var(--type-body);
      font-weight: 550;
      line-height: var(--leading-ui);
    }

    .btn,
    .mini-btn,
    .employee-manage-btn,
    .branch-edit-btn,
    .employee-filter-tab,
    .desktop-nav-btn {
      font-size: var(--type-small);
      font-weight: 750;
      line-height: 1;
    }

    button .material-symbols-rounded,
    .btn .material-symbols-rounded,
    .mini-btn .material-symbols-rounded,
    .pill-btn .material-symbols-rounded,
    .toolbar-action-btn .material-symbols-rounded,
    .desktop-nav-btn .material-symbols-rounded,
    .mobile-more-btn .material-symbols-rounded,
    .nav-btn .material-symbols-rounded {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
      line-height: 1;
    }

    .desktop-brand-title {
      font-size: 1.0625rem;
      font-weight: 850;
      line-height: 1.08;
    }

    .desktop-brand-sub,
    .status-pill,
    .branch-status-pill,
    .verification-line,
    .nav-btn span.label {
      font-size: var(--type-caption);
      font-weight: 750;
      line-height: 1;
    }

    .stat-value {
      font-size: 2rem;
      font-weight: 850;
      line-height: 0.95;
    }

    .mini-stat-value,
    .payroll-net-value {
      font-size: 1.25rem;
      font-weight: 850;
      line-height: 1;
    }

    .payroll-metric-value,
    .row-time,
    .detail-right,
    .setting-value,
    input[type="date"],
    input[type="time"],
    input[type="number"] {
      font-variant-numeric: tabular-nums;
      font-feature-settings: "tnum" 1, "kern" 1;
    }

    .payroll-metric-value {
      font-size: var(--type-small);
      font-weight: 800;
    }

    .directory-stat span {
      font-size: var(--type-caption);
      font-weight: 750;
      letter-spacing: 0.01em;
    }

    .directory-stat strong {
      font-size: 1.5rem;
      font-weight: 850;
      line-height: 1;
      font-variant-numeric: tabular-nums;
    }

    @media (min-width: 1024px) {
      .greeting h2 {
        font-size: 2rem;
      }

      .page-title-row h2 {
        font-size: 1.75rem;
      }

      .employee-directory-header {
        text-transform: uppercase;
        letter-spacing: 0.04em;
      }
    }

    /* IMPECCABLE TYPESET REFINEMENT: calmer weights, denser scan paths */
    :root {
      --type-caption: 0.75rem;
      --type-small: 0.8125rem;
      --type-body: 0.9375rem;
      --type-ui: 0.9375rem;
      --type-subhead: 1.125rem;
      --type-title: 1.5rem;
      --type-display: 2rem;
      --leading-tight: 1.12;
      --leading-ui: 1.28;
      --leading-body: 1.5;
    }

    body {
      font-family: var(--font-sans);
      font-weight: 400;
      letter-spacing: 0;
    }

    .greeting h2,
    .page-title-row h2,
    .brand-title {
      font-weight: 800;
      line-height: var(--leading-tight);
    }

    .greeting h2 {
      font-size: 1.75rem;
    }

    .page-title-row h2 {
      font-size: var(--type-title);
    }

    .section-head h3,
    .sheet-title,
    .chart-title,
    .schedule-range-title,
    .payroll-review-title {
      font-size: var(--type-subhead);
      font-weight: 750;
      line-height: 1.18;
    }

    .page-sub,
    .brand-sub,
    .settings-help,
    .form-help,
    .report-export-note,
    .payroll-review-copy,
    .payroll-note,
    .schedule-hint,
    .schedule-range-copy,
    .status-toggle-sub {
      max-width: 68ch;
      font-size: var(--type-body);
      font-weight: 400;
      line-height: var(--leading-body);
    }

    .field label,
    .settings-mini-label,
    .directory-filter span,
    .employee-directory-header,
    .stat-label,
    .mini-stat-label,
    .payroll-net-label,
    .payroll-metric-label,
    .time-box-label,
    .branch-time-label,
    .setting-label,
    .detail-left,
    .notes-label {
      font-size: var(--type-caption);
      font-weight: 700;
      letter-spacing: 0.015em;
      line-height: 1.2;
    }

    .row-name,
    .schedule-employee-name,
    .branch-time-name,
    .request-title,
    .status-toggle-title,
    .setting-value,
    .detail-right,
    .employee-directory-cell strong {
      font-size: var(--type-body);
      font-weight: 700;
      line-height: var(--leading-ui);
    }

    .row-sub,
    .schedule-employee-sub,
    .branch-time-address,
    .request-meta,
    .mini-stat-note,
    .stat-note,
    .message,
    .empty,
    .employee-directory-count,
    .desktop-brand-sub {
      font-size: var(--type-small);
      font-weight: 450;
      line-height: var(--leading-body);
    }

    input[type="email"],
    input[type="password"],
    input[type="text"],
    input[type="date"],
    input[type="time"],
    input[type="number"],
    select,
    textarea {
      font-size: var(--type-ui);
      font-weight: 500;
      line-height: var(--leading-ui);
    }

    .btn,
    .mini-btn,
    .employee-manage-btn,
    .branch-edit-btn,
    .employee-filter-tab,
    .desktop-nav-btn,
    .status-pill,
    .branch-status-pill,
    .verification-line {
      font-size: var(--type-small);
      font-weight: 700;
      letter-spacing: 0;
      line-height: 1;
    }

    .employee-directory-header {
      text-transform: none;
    }

    .employee-directory-row.employee-card,
    .attendance-directory-list .employee-directory-row.attendance-card {
      font-size: var(--type-body);
    }

    .stat-value,
    .mini-stat-value,
    .payroll-net-value,
    .payroll-metric-value,
    .directory-stat strong,
    .row-time,
    .employee-directory-cell strong,
    input[type="date"],
    input[type="time"],
    input[type="number"] {
      font-variant-numeric: tabular-nums;
      font-feature-settings: "tnum" 1, "kern" 1, "liga" 1;
    }

    .stat-value {
      font-size: 1.875rem;
      font-weight: 800;
    }

    .directory-stat strong,
    .payroll-net-value {
      font-size: 1.375rem;
      font-weight: 800;
    }

    @media (min-width: 1024px) {
      .greeting h2 {
        font-size: 1.875rem;
      }

      .page-title-row h2 {
        font-size: 1.625rem;
      }

      .employee-directory-header {
        text-transform: uppercase;
        letter-spacing: 0.035em;
      }
    }

    /* IMPECCABLE CONTROL PLACEMENT PASS: equal-height admin toolbars */
    .employee-directory-toolbar {
      align-items: stretch;
    }

    .employee-directory-toolbar .search-wrap,
    .employee-directory-toolbar .directory-filter,
    .employee-directory-toolbar .pill-btn,
    .employee-directory-toolbar .toolbar-action-btn {
      min-height: 58px;
      height: 58px;
    }

    .employee-directory-toolbar .search-wrap input {
      height: 58px;
    }

    .employee-directory-toolbar .directory-filter {
      position: relative;
      display: block;
      gap: 0;
    }

    .employee-directory-toolbar .directory-filter span {
      position: absolute;
      left: 14px;
      top: 8px;
      z-index: 1;
      color: #667085;
      font-size: 0.6875rem;
      letter-spacing: 0.01em;
      line-height: 1;
      pointer-events: none;
    }

    .employee-directory-toolbar .directory-filter select {
      height: 58px;
      min-height: 58px;
      border: 1px solid #dfe4ea;
      border-radius: var(--radius-sm);
      background: #ffffff;
      box-shadow: 0 3px 10px rgba(17, 24, 39, 0.02);
      padding: 20px 34px 0 14px;
      font-size: var(--type-body);
      font-weight: 650;
    }

    .payroll-period-settings-btn {
      justify-content: space-between;
      text-align: left;
      padding: 0 14px;
    }

    .payroll-period-button-copy {
      display: grid;
      gap: 4px;
      min-width: 0;
      flex: 1;
    }

    .payroll-period-button-label {
      color: #667085;
      font-size: 0.6875rem;
      font-weight: 850;
      letter-spacing: 0.01em;
      line-height: 1;
    }

    .payroll-period-button-copy strong {
      color: var(--text);
      font-size: var(--type-body);
      font-weight: 760;
      line-height: 1.1;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .toolbar-action-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      width: 100%;
      padding: 0 16px;
      white-space: nowrap;
    }

    .toolbar-action-btn .material-symbols-rounded {
      font-size: 20px;
      line-height: 1;
    }

    .schedule-settings-card {
      margin-bottom: 14px;
    }

    .payroll-settings-card {
      margin-bottom: 16px;
    }

    #payrollSettingsCard:focus {
      outline: none;
    }

    /* MOBILE MORE NAV: keep the bottom bar readable as admin sections grow */
    .mobile-more-menu {
      position: fixed;
      left: 8px;
      right: 8px;
      bottom: calc(84px + var(--safe-bottom));
      z-index: 19;
      display: none;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      max-width: calc(var(--phone-width) - 16px);
      margin: 0 auto;
      padding: 10px;
      border: 1px solid rgba(228, 232, 238, 0.92);
      border-radius: var(--radius-sm);
      background: rgba(250, 252, 251, 0.98);
      box-shadow: 0 18px 40px rgba(17, 24, 39, 0.14);
      backdrop-filter: blur(16px);
    }

    .mobile-more-menu.show {
      display: grid;
    }

    .mobile-more-btn {
      min-height: 46px;
      border: 1px solid transparent;
      border-radius: var(--radius-sm);
      background: transparent;
      color: #475467;
      display: inline-flex;
      align-items: center;
      justify-content: flex-start;
      gap: 9px;
      padding: 0 10px;
      font-size: var(--type-small);
      font-weight: 750;
      line-height: 1;
      cursor: pointer;
      text-align: left;
    }

    .mobile-more-btn .material-symbols-rounded {
      width: 22px;
      height: 22px;
      font-size: 21px;
      color: #667085;
    }

    .mobile-more-btn.active {
      border-color: rgba(18, 134, 79, 0.18);
      background: #edf8f1;
      color: #0f7445;
    }

    .mobile-more-btn.active .material-symbols-rounded {
      color: #12864f;
    }

    .bottom-nav {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    @media (min-width: 1024px) {
      .mobile-more-menu {
        display: none !important;
      }
    }

    /* IMPECCABLE ADAPT FINAL: keep payroll settings usable on phone widths */
    @media (max-width: 760px) {
      .payroll-settings-overlay {
        align-items: flex-end;
        padding: 0;
      }

      .payroll-settings-overlay .sheet {
        width: 100%;
        max-width: none;
        max-height: calc(100svh - 8px);
        border-radius: var(--radius-sm) var(--radius-sm) 0 0;
        padding: 12px 12px calc(16px + var(--safe-bottom));
      }

      .payroll-settings-overlay .sheet-header {
        top: -12px;
        margin: -12px -12px 14px;
        padding: 12px;
      }

      .payroll-settings-overlay .section-card,
      .payroll-rule-group {
        padding: 14px;
      }

      .payroll-settings-overlay .settings-form-grid,
      .salary-bulk-row,
      .salary-editor-row,
      .salary-editor-controls,
      .salary-bulk-controls,
      .deduction-type-row,
      .deduction-employee-row,
      .deduction-employee-controls {
        grid-template-columns: minmax(0, 1fr);
      }

      .salary-editor-controls select,
      .salary-editor-controls input,
      .salary-bulk-controls select,
      .salary-bulk-controls input {
        min-width: 0;
      }

      .salary-bulk-row .btn,
      .salary-editor-row .btn,
      .payroll-rule-actions .btn {
        width: 100%;
      }

      .pay-period-map {
        overflow-x: auto;
        overscroll-behavior-x: contain;
      }

      .pay-period-map-head {
        align-items: flex-start;
      }

      .pay-period-map-range {
        max-width: 28ch;
        text-align: left;
      }

      .pay-period-weekdays,
      .pay-period-days {
        min-width: 252px;
      }

      .pay-period-map-foot span {
        flex: 1 1 100%;
      }
    }

    @media (max-width: 430px) {
      .payroll-settings-overlay .sheet {
        max-height: calc(100svh - 4px);
        padding-left: 10px;
        padding-right: 10px;
      }

      .payroll-settings-overlay .sheet-header {
        margin-left: -10px;
        margin-right: -10px;
        padding-left: 10px;
        padding-right: 10px;
      }

      .payroll-settings-overlay .sheet-back {
        width: 40px;
        height: 40px;
      }

      .payroll-settings-overlay .sheet-title {
        margin-right: 40px !important;
      }
    }

    /* Payroll settings layout fix: keep rules readable inside the sheet. */
    .payroll-settings-overlay {
      padding: 18px;
      align-items: center;
    }

    .payroll-settings-overlay .sheet {
      width: min(920px, calc(100vw - 36px));
      max-width: 920px;
      max-height: calc(100svh - 36px);
      border-radius: var(--radius-sm);
      overflow-x: hidden;
    }

    .payroll-settings-overlay .settings-form-grid {
      grid-template-columns: minmax(0, 1fr) !important;
      gap: 14px;
    }

    .payroll-settings-overlay .payroll-rule-group,
    .payroll-settings-overlay .section-card,
    .payroll-settings-overlay .deduction-settings,
    .payroll-settings-overlay .deduction-type-list {
      min-width: 0;
      max-width: 100%;
    }

    .payroll-settings-overlay .deduction-type-row {
      grid-template-columns: minmax(112px, 0.9fr) minmax(130px, 1fr) minmax(96px, 0.7fr);
    }

    .payroll-settings-overlay .deduction-type-row select,
    .payroll-settings-overlay .deduction-type-row input {
      min-width: 0;
      max-width: 100%;
    }

    @media (max-width: 760px) {
      .payroll-settings-overlay {
        align-items: flex-end;
        padding: 0;
      }

      .payroll-settings-overlay .sheet {
        width: 100%;
        max-width: none;
        max-height: calc(100svh - 8px);
        border-radius: var(--radius-sm) var(--radius-sm) 0 0;
      }

      .payroll-settings-overlay .deduction-type-row {
        grid-template-columns: minmax(0, 1fr);
      }
    }

    /* IMPECCABLE ANIMATE PASS: stateful motion for admin flow */
    :root {
      --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
      --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
      --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
      --motion-fast: 120ms;
      --motion-ui: 180ms;
      --motion-panel: 240ms;
    }

    .page:not(.hidden) {
      animation: tr-page-enter var(--motion-ui) var(--ease-out-quint) both;
    }

    .section-card,
    .stat-card,
    .mini-stat,
    .employee-card,
    .attendance-card,
    .branch-card,
    .branch-time-card,
    .request-card,
    .payroll-card,
    .schedule-table-card,
    .danger-zone {
      transition:
        border-color var(--motion-ui) var(--ease-color),
        background-color var(--motion-ui) var(--ease-color),
        box-shadow var(--motion-ui) var(--ease-out-quart),
        transform var(--motion-fast) var(--ease-out-quart);
    }

    @media (hover: hover) and (pointer: fine) {
      .employee-directory-row:hover,
      .payroll-card:hover,
      .request-card:hover {
        transform: translateY(-1px);
      }
    }

    .desktop-nav-btn {
      position: relative;
      overflow: hidden;
      transition:
        background-color var(--motion-ui) var(--ease-color),
        border-color var(--motion-ui) var(--ease-color),
        color var(--motion-ui) var(--ease-color),
        transform var(--motion-fast) var(--ease-out-quart);
    }

    .desktop-nav-btn .material-symbols-rounded {
      transition:
        color var(--motion-ui) var(--ease-color),
        transform var(--motion-ui) var(--ease-out-quart);
    }

    .desktop-nav-btn.active .material-symbols-rounded {
      transform: translateX(1px);
    }

    .desktop-nav-btn:active {
      transform: scale(0.985);
    }

    .nav-btn.active::before {
      transition: transform var(--motion-ui) var(--ease-out-quint);
    }

    .overlay.show {
      animation: tr-backdrop-in var(--motion-panel) var(--ease-out-quart) both;
    }

    .overlay.show .sheet {
      animation: tr-sheet-in var(--motion-panel) var(--ease-out-expo) both;
    }

    .app-loading-overlay.show {
      animation: tr-backdrop-in var(--motion-ui) var(--ease-out-quart) both;
    }

    .app-loading-overlay.show .loading-card {
      animation: tr-panel-in var(--motion-panel) var(--ease-out-expo) both;
    }

    .loading-spinner {
      animation: tr-spin 820ms linear infinite;
    }

    .message.show {
      animation: tr-message-in var(--motion-ui) var(--ease-out-quint) both;
    }

    .slider,
    .slider:before {
      transition:
        background-color var(--motion-ui) var(--ease-color),
        box-shadow var(--motion-ui) var(--ease-color),
        transform var(--motion-ui) var(--ease-out-quint);
    }

    .switch input:checked + .slider:before {
      transform: translateX(22px);
    }

    .schedule-select {
      transition:
        background-color var(--motion-ui) var(--ease-color),
        border-color var(--motion-ui) var(--ease-color),
        box-shadow var(--motion-ui) var(--ease-color);
    }

    .schedule-select.schedule-dirty {
      animation: tr-dirty-pulse 420ms var(--ease-out-quart) both;
    }

    .payroll-card,
    .employee-directory-row {
      animation: tr-list-in var(--motion-ui) var(--ease-out-quint) both;
    }

    .payroll-net-value,
    .mini-stat-value,
    .stat-value {
      transition: color var(--motion-ui) var(--ease-color);
    }

    .payroll-rule-group,
    .pay-period-map,
    .status-toggle-card,
    .salary-bulk-row {
      transition:
        border-color var(--motion-ui) var(--ease-color),
        background-color var(--motion-ui) var(--ease-color),
        box-shadow var(--motion-ui) var(--ease-out-quart),
        transform var(--motion-fast) var(--ease-out-quart);
    }

    .payroll-rule-group-title .material-symbols-rounded,
    .pay-period-map-toggle {
      transition:
        color var(--motion-ui) var(--ease-color),
        transform var(--motion-ui) var(--ease-out-quint);
    }

    @media (hover: hover) and (pointer: fine) {
      .payroll-rule-group:hover,
      .pay-period-map:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 28px rgba(17, 24, 39, 0.065);
      }

      .payroll-rule-group:hover .payroll-rule-group-title .material-symbols-rounded {
        transform: translateY(-1px);
      }
    }

    button:active > .material-symbols-rounded,
    .btn:active > .material-symbols-rounded,
    .toolbar-action-btn:active > .material-symbols-rounded {
      transform: translateY(0.01em) scale(0.94);
    }

    @keyframes tr-page-enter {
      from {
        opacity: 0.78;
        transform: translateY(6px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes tr-list-in {
      from {
        opacity: 0;
        transform: translateY(5px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes tr-calendar-reveal {
      from {
        opacity: 0;
        transform: translateY(-4px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes tr-backdrop-in {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    @keyframes tr-sheet-in {
      from {
        opacity: 0;
        transform: translateY(12px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes tr-panel-in {
      from {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    @keyframes tr-message-in {
      from {
        opacity: 0;
        transform: translateY(-4px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes tr-dirty-pulse {
      0% { box-shadow: 0 0 0 0 rgba(199, 119, 33, 0); }
      45% { box-shadow: 0 0 0 4px rgba(199, 119, 33, 0.13); }
      100% { box-shadow: 0 0 0 0 rgba(199, 119, 33, 0); }
    }

    @keyframes tr-spin {
      to { transform: rotate(360deg); }
    }

    @media (prefers-reduced-motion: reduce) {
      *,
      *::before,
      *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
      }
    }

    /* Radius normalization: keep rectangular UI at 7px, preserve true circles. */
    *:not(.avatar):not(.avatar-chip):not(.employee-photo):not(.mini-circle):not(.big-logo):not(.loading-spinner),
    *::before,
    *::after {
      border-radius: 7px !important;
    }

    .avatar,
    .avatar-chip,
    .employee-photo,
    .mini-circle,
    .big-logo,
    .loading-spinner {
      border-radius: 50% !important;
    }

    .slider::before,
    .pay-period-day::after,
    .login-divider::before,
    .login-divider::after,
    .nav-btn.active::before {
      border-radius: 999px !important;
    }

    /* Desktop payroll layout: keep the side panel inside the content gutter. */
    @media (min-width: 1280px) {
      #appView #payrollPage {
        width: min(100%, 1440px);
        max-width: calc(100vw - 264px - 64px);
        padding-right: clamp(40px, 3vw, 56px);
        box-sizing: border-box;
        overflow: visible;
      }

      #payrollPage > .payroll-side-panel {
        min-width: 0;
        width: 100%;
      }

      #payrollPage > .payroll-side-panel > .section-card {
        min-width: 0;
        overflow: hidden;
      }
    }

    @media (min-width: 1280px) and (max-width: 1510px) {
      #payrollPage {
        grid-template-columns: minmax(0, 1fr) minmax(330px, 380px);
        column-gap: 20px;
      }

      #payrollPage .export-action-group {
        grid-template-columns: 1fr;
      }
    }

    /* OPERATIONAL CLARITY: shared product visual system */
    :root {
      --bg: oklch(97.2% 0.008 151);
      --card: oklch(99.4% 0.004 151);
      --surface-muted: oklch(96.2% 0.009 151);
      --surface-chrome: oklch(98.5% 0.006 151);
      --text: oklch(24% 0.02 157);
      --muted: oklch(50% 0.018 157);
      --line: oklch(89.5% 0.012 151);
      --line-strong: oklch(83.5% 0.018 151);
      --green: oklch(47% 0.118 151);
      --green-dark: oklch(39% 0.105 151);
      --green-soft: oklch(94.8% 0.027 151);
      --green-soft-2: oklch(97% 0.014 151);
      --orange: oklch(61% 0.125 68);
      --orange-soft: oklch(96.5% 0.035 78);
      --blue: oklch(52% 0.115 250);
      --blue-soft: oklch(96% 0.025 250);
      --red: oklch(52% 0.15 25);
      --red-soft: oklch(96.2% 0.03 25);
      --shadow: none;
      --shadow-raised: 0 18px 48px oklch(24% 0.02 157 / 0.14);
      --control-height: 42px;
    }

    html,
    body {
      background: var(--bg);
      color: var(--text);
    }

    body,
    button,
    input,
    select,
    textarea {
      letter-spacing: 0;
    }

    .mobile-shell {
      background: var(--bg);
    }

    .page-title-row h2,
    .greeting h2,
    .section-head h3,
    .dashboard-insight-title,
    .desktop-header-title,
    .notification-panel-title,
    .sheet h2,
    .sheet h3 {
      color: var(--text);
      letter-spacing: 0;
    }

    .greeting h2,
    .page-title-row h2 {
      font-weight: 760;
    }

    .greeting p,
    .page-sub,
    .dashboard-insight-copy,
    .desktop-header-subtitle,
    .row-sub,
    .stat-label,
    .stat-note {
      color: var(--muted);
    }

    .login-card,
    .section-card,
    .stat-card,
    .chart-card,
    .mini-stat,
    .employee-card,
    .attendance-card,
    .branch-time-card,
    .request-card,
    .schedule-range-card,
    .schedule-table-card,
    .detail-card,
    .employee-detail-card,
    .selfie-proof-card,
    .status-toggle-card,
    .danger-zone,
    .request-meta-box,
    .request-reason,
    .branch-time-box,
    .employee-strip,
    .loading-card {
      background: var(--card);
      border-color: var(--line);
      box-shadow: none;
    }

    .sheet,
    .notification-panel,
    .profile-menu,
    .modal-card,
    .loading-card {
      box-shadow: var(--shadow-raised);
    }

    input[type="email"],
    input[type="password"],
    input[type="text"],
    input[type="date"],
    input[type="time"],
    input[type="number"],
    select,
    textarea,
    .pill-select,
    .pill-input {
      min-height: 44px;
      border-color: var(--line-strong);
      background: var(--card);
      color: var(--text);
      box-shadow: none;
      font-weight: 560;
    }

    input::placeholder,
    textarea::placeholder {
      color: oklch(62% 0.014 157);
      opacity: 1;
    }

    input:focus,
    select:focus,
    textarea:focus {
      border-color: var(--green);
      box-shadow: 0 0 0 3px oklch(47% 0.118 151 / 0.14);
    }

    button:focus-visible,
    input:focus-visible,
    select:focus-visible,
    textarea:focus-visible,
    [tabindex]:focus-visible {
      outline: 2px solid var(--green);
      outline-offset: 2px;
    }

    .btn,
    .pill-btn,
    .mini-btn,
    .employee-filter-tab,
    .employee-edit-btn,
    .branch-edit-btn,
    .employee-delete-btn,
    .employee-manage-btn,
    .sheet-back,
    .back-btn,
    .icon-btn,
    .add-employee-btn,
    .dashboard-payroll-action {
      min-height: var(--control-height);
      font-weight: 690;
      box-shadow: none;
    }

    .btn-primary,
    .btn-approve,
    .add-employee-btn {
      background: var(--green);
      color: oklch(98.5% 0.006 151);
      box-shadow: none;
    }

    .btn-primary:hover:not(:disabled),
    .btn-approve:hover:not(:disabled),
    .add-employee-btn:hover:not(:disabled) {
      background: var(--green-dark);
      box-shadow: none;
    }

    .btn-outline,
    .btn-flag,
    .pill-btn,
    .mini-btn,
    .dashboard-payroll-action {
      border-color: var(--line-strong);
      background: var(--card);
      color: oklch(35% 0.025 157);
      box-shadow: none;
    }

    @media (hover: hover) and (pointer: fine) {
      .pill-btn:hover,
      .mini-btn:hover,
      .employee-filter-tab:hover,
      .employee-edit-btn:hover,
      .branch-edit-btn:hover,
      .employee-manage-btn:hover,
      .sheet-back:hover,
      .back-btn:hover,
      .icon-btn:hover,
      .avatar-chip:hover,
      .list-row:hover,
      .attendance-card:hover,
      .branch-card:hover,
      .branch-time-card:hover {
        border-color: var(--line-strong);
        background-color: var(--surface-muted);
        box-shadow: none;
        transform: none;
      }
    }

    .message {
      border: 1px solid var(--line);
      box-shadow: none;
      font-weight: 590;
    }

    .message.info {
      background: var(--blue-soft);
      border-color: oklch(86% 0.04 250);
      color: oklch(40% 0.08 250);
    }

    .message.success {
      background: var(--green-soft);
      border-color: oklch(84% 0.055 151);
      color: var(--green-dark);
    }

    .message.error {
      background: var(--red-soft);
      border-color: oklch(86% 0.055 25);
      color: oklch(44% 0.13 25);
    }

    .status-pill,
    .branch-status-pill,
    .verification-line,
    .device-status-pill {
      min-width: 0;
      min-height: 26px;
      padding: 5px 9px;
      border: 1px solid transparent;
      border-radius: 999px !important;
      font-size: 12px;
      font-weight: 680;
    }

    .pill-working,
    .branch-status-pill.active,
    .verification-line.verified {
      background: var(--green-soft);
      border-color: oklch(86% 0.045 151);
      color: var(--green-dark);
    }

    .pill-checked_out,
    .device-status-pill.offline {
      background: var(--surface-muted);
      border-color: var(--line);
      color: var(--muted);
    }

    .pill-late,
    .pill-working_late,
    .verification-line.pending {
      background: var(--orange-soft);
      border-color: oklch(88% 0.055 78);
      color: oklch(48% 0.105 68);
    }

    .pill-absent,
    .pill-late_checked_out,
    .verification-line.flagged,
    .verification-line.declined {
      background: var(--red-soft);
      border-color: oklch(87% 0.05 25);
      color: oklch(46% 0.13 25);
    }

    .record-list,
    .employee-directory-list,
    .attendance-directory-list {
      background: var(--card);
    }

    .list-row,
    .employee-directory-row.employee-card,
    .attendance-directory-list .employee-directory-row.attendance-card {
      border-color: var(--line);
    }

    .list-row {
      min-height: 68px;
      padding: 12px 4px;
    }

    .row-name {
      color: var(--text);
      font-weight: 670;
    }

    .row-time {
      color: var(--muted);
      font-variant-numeric: tabular-nums;
      font-weight: 560;
    }

    /* Dashboard composition */
    #dashboardPage .greeting {
      margin-bottom: 14px;
    }

    #dashboardPage .greeting h2 {
      font-size: 1.65rem;
      line-height: 1.18;
    }

    #dashboardPage .top-controls {
      gap: 8px;
      margin-bottom: 14px;
    }

    #dashboardPage .pill-btn {
      min-height: 40px;
      border-color: var(--line-strong);
      background: var(--card);
      color: oklch(36% 0.022 157);
      font-size: 13px;
    }

    #dashboardPage .dashboard-code-label {
      color: var(--muted);
      font-size: 10px;
      font-weight: 650;
    }

    #dashboardPage .dashboard-code-value {
      color: var(--text);
      font-weight: 720;
      font-variant-numeric: tabular-nums;
    }

    #dashboardPage .stat-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 0;
      overflow: hidden;
      margin-bottom: 16px;
      border: 1px solid var(--line);
      border-radius: 7px !important;
      background: var(--card);
    }

    #dashboardPage .stat-card {
      min-height: 106px;
      margin: 0;
      padding: 16px 18px;
      border: 0;
      border-right: 1px solid var(--line);
      border-radius: 0 !important;
      background: transparent;
      box-shadow: none;
    }

    #dashboardPage .stat-card:last-child {
      border-right: 0;
    }

    #dashboardPage .stat-head {
      gap: 8px;
      align-items: center;
    }

    #dashboardPage .stat-icon {
      width: 28px;
      height: 28px;
      border: 0;
      border-radius: 0 !important;
      background: transparent;
      box-shadow: none;
    }

    #dashboardPage .stat-icon .material-symbols-rounded {
      font-size: 20px;
    }

    #dashboardPage .stat-label,
    #dashboardPage .stat-note {
      font-size: 12px;
      font-weight: 580;
    }

    #dashboardPage .stat-value {
      margin-top: 12px;
      color: var(--text);
      font-size: 1.75rem;
      font-weight: 720;
      font-variant-numeric: tabular-nums;
      line-height: 1;
    }

    #dashboardPage .dashboard-insights-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.9fr);
      gap: 0;
      overflow: hidden;
      margin-bottom: 16px;
      border: 1px solid var(--line);
      border-radius: 7px !important;
      background: var(--card);
    }

    #dashboardPage .dashboard-insights-grid > .dashboard-insight-card {
      min-width: 0;
      margin: 0;
      border: 0;
      border-radius: 0 !important;
      background: transparent;
      box-shadow: none;
    }

    #dashboardPage .dashboard-insights-grid > .dashboard-insight-card + .dashboard-insight-card {
      border-left: 1px solid var(--line);
    }

    #dashboardPage .dashboard-insight-card {
      padding: 18px;
      border-color: var(--line);
      box-shadow: none;
    }

    #dashboardPage .dashboard-insight-head {
      gap: 16px;
      margin-bottom: 14px;
    }

    #dashboardPage .dashboard-insight-title {
      font-size: 15px;
      font-weight: 700;
    }

    #dashboardPage .dashboard-insight-copy {
      margin-top: 4px;
      font-size: 12px;
      font-weight: 520;
    }

    #dashboardPage .dashboard-insight-kicker {
      border-color: var(--line);
      background: var(--surface-muted);
      color: var(--muted);
      font-weight: 650;
    }

    #dashboardPage .dashboard-trend-visual,
    #dashboardPage .dashboard-trend-empty,
    #dashboardPage .team-performance-empty {
      border-color: var(--line);
      background: var(--surface-muted);
      box-shadow: none;
    }

    #dashboardPage .team-performance-range {
      border-color: var(--line-strong);
      background: var(--surface-muted);
    }

    #dashboardPage .team-performance-range button {
      color: var(--muted);
      font-weight: 650;
    }

    #dashboardPage .team-performance-range button.active {
      background: var(--card);
      color: var(--green-dark);
      box-shadow: 0 1px 2px oklch(24% 0.02 157 / 0.08);
    }

    #dashboardPage .dashboard-payroll-mini {
      gap: 0;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 7px !important;
      background: var(--surface-muted);
    }

    #dashboardPage .dashboard-payroll-mini-box {
      border: 0;
      border-right: 1px solid var(--line);
      border-radius: 0 !important;
      background: transparent;
      padding: 13px 14px;
    }

    #dashboardPage .dashboard-payroll-mini-box:last-child {
      border-right: 0;
    }

    #dashboardPage .dashboard-payroll-mini-box span {
      color: var(--muted);
      font-weight: 580;
    }

    #dashboardPage .dashboard-payroll-mini-box strong {
      color: var(--text);
      font-weight: 720;
      font-variant-numeric: tabular-nums;
    }

    #dashboardPage .dashboard-payroll-action {
      min-height: 36px;
      border-color: var(--line-strong);
      background: var(--card);
      color: var(--green-dark);
    }

    #dashboardPage > .section-card:last-child .section-head {
      padding-bottom: 12px;
      border-color: var(--line);
    }

    /* The onboarding checklist is intentionally quieter than live operations. */
    body #dashboardSetupTodo {
      margin-bottom: 22px;
      padding: 16px 18px;
      border: 1px solid var(--line);
      background: var(--surface-chrome);
      box-shadow: none;
    }

    body .dashboard-setup-todo-kicker {
      color: var(--green-dark);
      font-size: 10px;
      font-weight: 720;
      letter-spacing: 0;
    }

    body .dashboard-setup-todo-title {
      color: var(--text);
      font-size: 15px;
      font-weight: 700;
    }

    body .dashboard-setup-todo-copy,
    body .dashboard-setup-todo-item-copy {
      color: var(--muted);
      font-weight: 520;
    }

    body .dashboard-setup-todo-track {
      height: 5px;
      background: var(--line);
    }

    body .dashboard-setup-todo-fill {
      background: var(--green);
      box-shadow: none;
    }

    body .dashboard-setup-todo-list {
      gap: 0 18px;
      border-top: 1px solid var(--line);
    }

    body .dashboard-setup-todo-item,
    body .dashboard-setup-todo-item.is-complete {
      min-height: 62px;
      padding: 10px 0;
      border: 0;
      border-bottom: 1px solid var(--line);
      border-radius: 0 !important;
      background: transparent;
      box-shadow: none;
      transform: none;
    }

    body .dashboard-setup-todo-icon,
    body .dashboard-setup-todo-item.is-complete .dashboard-setup-todo-icon {
      width: 30px;
      height: 30px;
      border-color: var(--line-strong);
      background: var(--card);
      color: var(--green-dark);
    }

    body .dashboard-setup-todo-item-title {
      color: var(--text);
      font-size: 13px;
      font-weight: 670;
    }

    body .dashboard-setup-todo-status {
      color: var(--green-dark);
      font-weight: 650;
    }

    body .dashboard-setup-todo-action {
      min-height: 32px;
      border-color: var(--line-strong);
      background: var(--card);
      color: var(--green-dark);
      font-weight: 650;
    }

    @media (min-width: 1024px) {
      body {
        background: var(--bg);
      }

      #appView.mobile-shell {
        grid-template-columns: 232px minmax(0, 1fr);
        background: var(--bg);
      }

      #appView .desktop-sidebar {
        width: 232px;
        padding: 18px 14px;
        background: var(--surface-chrome);
        border-color: var(--line);
        box-shadow: none;
      }

      .desktop-brand {
        padding: 0 8px 16px;
        margin-bottom: 12px;
        border-color: var(--line);
      }

      .desktop-brand-title {
        font-weight: 720;
      }

      .desktop-brand-sub {
        color: var(--muted);
        font-weight: 540;
      }

      .desktop-nav,
      .desktop-sidebar-footer {
        gap: 2px;
      }

      .desktop-nav-btn {
        min-height: 40px;
        border: 0;
        color: oklch(42% 0.02 157);
        font-size: 13px;
        font-weight: 590;
      }

      .desktop-nav-btn .material-symbols-rounded {
        color: oklch(55% 0.018 157);
        font-size: 19px;
      }

      .desktop-nav-btn.active {
        border: 0;
        background: var(--green-soft);
        color: var(--green-dark);
        font-weight: 690;
      }

      #appView .app-header {
        left: 232px;
        width: calc(100% - 232px);
        height: 62px;
        padding: 0 32px;
        background: var(--surface-chrome);
        border-color: var(--line);
        box-shadow: none;
      }

      #appView .desktop-header-title {
        font-size: 14px;
        font-weight: 700;
      }

      #appView .desktop-header-subtitle {
        margin-top: 2px;
        font-size: 11px;
        font-weight: 520;
      }

      #appView .page {
        width: min(100%, 1380px);
        padding: 28px 32px 52px;
      }

      .employee-directory-list,
      .attendance-directory-list,
      .schedule-table-card {
        box-shadow: none;
      }
    }

    @media (min-width: 1280px) {
      #dashboardPage:not(.hidden) {
        display: grid;
        grid-template-columns: minmax(360px, 1fr) auto;
        column-gap: 24px;
        align-items: end;
      }

      #dashboardPage > #dashboardSetupTodo,
      #dashboardPage > .stat-grid,
      #dashboardPage > .dashboard-insights-grid,
      #dashboardPage > .section-card {
        grid-column: 1 / -1;
      }

      #dashboardPage > .greeting {
        grid-column: 1;
        display: block;
        align-self: end;
      }

      #dashboardPage > .greeting p {
        max-width: none;
        margin-top: 5px;
        text-align: left;
      }

      #dashboardPage > .dashboard-top-controls {
        grid-column: 2;
        grid-template-columns: 170px 160px 190px;
        align-self: end;
      }
    }

    @media (max-width: 1023px) {
      #dashboardPage .dashboard-insights-grid {
        grid-template-columns: 1fr;
      }

      #dashboardPage .dashboard-insights-grid > .dashboard-insight-card + .dashboard-insight-card {
        border-top: 1px solid var(--line);
        border-left: 0;
      }
    }

    @media (max-width: 700px) {
      .app-header,
      .bottom-nav {
        background: var(--surface-chrome);
        border-color: var(--line);
        box-shadow: none;
        backdrop-filter: none;
      }

      #dashboardPage .greeting {
        display: block;
      }

      #dashboardPage .greeting p {
        margin-top: 6px;
        text-align: left;
      }

      #dashboardPage .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      #dashboardPage .stat-card:nth-child(2) {
        border-right: 0;
      }

      #dashboardPage .stat-card:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
      }

      #dashboardPage .dashboard-payroll-mini {
        grid-template-columns: 1fr;
      }

      #dashboardPage .dashboard-payroll-mini-box {
        border-right: 0;
        border-bottom: 1px solid var(--line);
      }

      #dashboardPage .dashboard-payroll-mini-box:last-child {
        border-bottom: 0;
      }

      body .dashboard-setup-todo-list {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 430px) {
      #dashboardPage .top-controls,
      #dashboardPage .dashboard-top-controls {
        grid-template-columns: 1fr;
      }

      #dashboardPage .stat-card {
        min-height: 96px;
        padding: 14px;
      }

      #dashboardPage .dashboard-insight-card,
      #dashboardPage > .section-card,
      body #dashboardSetupTodo {
        padding: 15px;
      }

      body .dashboard-setup-todo-item,
      body .dashboard-setup-todo-item.is-complete {
        min-height: 54px;
        padding: 8px 0;
      }

      body .dashboard-setup-todo-item.is-complete .dashboard-setup-todo-item-copy {
        display: none;
      }

      .list-row {
        align-items: flex-start;
        flex-wrap: wrap;
      }

      .list-row .row-time,
      .list-row .status-pill {
        margin-left: 60px;
      }
    }
