    :root {
      --company-green: #3e7c59;
      --green-900: #173626;
      --green-700: #2f684a;
      --green-100: #e8f2ed;
      --ink: #17211b;
      --muted: #65736b;
      --line: #d9e2dc;
      --panel: #ffffff;
      --surface: #f6f8f5;
      --warning: #b47b20;
      --danger: #ad4d42;
      --blue: #406f93;
      --shadow: 0 14px 32px rgba(23, 54, 38, 0.08);
      --radius: 8px;
      --sidebar-width: 270px;
    }

    * {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      margin: 0;
      overflow-x: hidden;
      min-height: 100vh;
      color: var(--ink);
      background:
        linear-gradient(90deg, rgba(62, 124, 89, 0.07), transparent 34%),
        var(--surface);
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      line-height: 1.5;
    }

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

    button {
      cursor: pointer;
    }

    :focus-visible {
      outline: 3px solid rgba(62, 124, 89, 0.45);
      outline-offset: 3px;
    }

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

    .app-shell {
      display: grid;
      grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
      min-height: 100vh;
    }

    .sidebar {
      position: sticky;
      top: 0;
      display: flex;
      flex-direction: column;
      height: 100vh;
      padding: 24px 18px;
      color: #ffffff;
      background: var(--green-900);
      border-right: 1px solid rgba(255, 255, 255, 0.08);
    }

    .brand {
      display: grid;
      grid-template-columns: 44px 1fr;
      gap: 12px;
      align-items: center;
      padding: 0 6px 22px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .brand-mark {
      display: grid;
      place-items: center;
      width: 44px;
      height: 44px;
      border-radius: var(--radius);
      background: var(--company-green);
      font-weight: 800;
      letter-spacing: 0;
    }

    .brand-title {
      margin: 0;
      font-size: 1rem;
      font-weight: 800;
    }

    .brand-subtitle {
      margin: 2px 0 0;
      color: rgba(255, 255, 255, 0.68);
      font-size: 0.82rem;
    }

    .nav-label {
      margin: 22px 8px 10px;
      color: rgba(255, 255, 255, 0.56);
      font-size: 0.72rem;
      font-weight: 800;
      letter-spacing: 0.12em;
      text-transform: uppercase;
    }

    .section-nav {
      display: grid;
      gap: 6px;
    }

    .nav-button {
      display: grid;
      grid-template-columns: 12px 1fr;
      gap: 12px;
      align-items: center;
      width: 100%;
      padding: 12px 12px;
      color: rgba(255, 255, 255, 0.78);
      text-align: left;
      background: transparent;
      border: 0;
      border-radius: var(--radius);
    }

    .nav-button::before {
      content: "";
      width: 10px;
      height: 10px;
      border: 2px solid currentColor;
      border-radius: 50%;
    }

    .nav-button:hover,
    .nav-button[aria-selected="true"] {
      color: #ffffff;
      background: rgba(255, 255, 255, 0.1);
    }

    .nav-button[aria-selected="true"]::before {
      background: #ffffff;
      border-color: #ffffff;
      box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.13);
    }

    .sidebar-note {
      margin-top: auto;
      padding: 14px;
      color: rgba(255, 255, 255, 0.72);
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: var(--radius);
      font-size: 0.88rem;
    }

    .main {
      min-width: 0;
      padding: 32px;
    }

    .portal-section {
      min-width: 0;
    }

    .topbar {
      display: none;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 14px 16px;
      color: #ffffff;
      background: var(--green-900);
    }

    .mobile-select {
      min-width: 150px;
      padding: 9px 12px;
      color: var(--ink);
      background: #ffffff;
      border: 1px solid var(--line);
      border-radius: var(--radius);
    }

    .workspace {
      width: 100%;
      min-width: 0;
      max-width: 1120px;
      margin: 0 auto;
    }

    .page-kicker {
      margin: 0 0 6px;
      color: var(--green-700);
      font-size: 0.78rem;
      font-weight: 900;
      letter-spacing: 0.13em;
      text-transform: uppercase;
    }

    .section-header {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 24px;
      margin-bottom: 24px;
    }

    .section-title {
      margin: 0;
      max-width: 14ch;
      font-size: clamp(2rem, 4vw, 3.35rem);
      line-height: 1.04;
      letter-spacing: 0;
      overflow-wrap: anywhere;
    }

    .section-description {
      max-width: 660px;
      margin: 10px 0 0;
      color: var(--muted);
      font-size: 1rem;
    }

    .section-status {
      flex: 0 0 auto;
      padding: 8px 12px;
      color: var(--green-700);
      background: var(--green-100);
      border: 1px solid rgba(62, 124, 89, 0.2);
      border-radius: 999px;
      font-size: 0.84rem;
      font-weight: 800;
      white-space: nowrap;
    }

    .summary-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 14px;
      margin-bottom: 18px;
    }

    .summary-card {
      min-height: 142px;
      padding: 18px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
    }

    .card-label {
      margin: 0 0 18px;
      color: var(--muted);
      font-size: 0.78rem;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .card-value {
      margin: 0;
      font-size: 2rem;
      font-weight: 850;
      line-height: 1;
    }

    .card-note {
      margin: 10px 0 0;
      color: var(--muted);
      font-size: 0.92rem;
      overflow-wrap: break-word;
    }

    .placeholder-panel {
      display: grid;
      grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
      gap: 18px;
      padding: 20px;
      background: var(--panel);
      border: 1px dashed rgba(62, 124, 89, 0.5);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
    }

    .placeholder-panel h2,
    .placeholder-panel h3 {
      margin: 0;
    }

    .placeholder-panel p {
      margin: 8px 0 0;
      color: var(--muted);
    }

    .placeholder-list {
      display: grid;
      gap: 10px;
      margin: 0;
      padding: 0;
      list-style: none;
    }

    .placeholder-list li {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 11px 12px;
      background: #f9fbf8;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      color: var(--muted);
    }

    .tag {
      flex: 0 0 auto;
      padding: 3px 8px;
      color: var(--green-900);
      background: var(--green-100);
      border-radius: 999px;
      font-size: 0.76rem;
      font-weight: 800;
    }

    .data-zone {
      min-height: 310px;
      padding: 18px;
      background:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px),
        #fbfcfa;
      background-size: 28px 28px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
    }

    .data-zone-label {
      display: inline-flex;
      align-items: center;
      min-height: 30px;
      padding: 5px 10px;
      color: var(--green-900);
      background: #ffffff;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      font-size: 0.8rem;
      font-weight: 850;
    }

    .attendance-workspace {
      display: grid;
      gap: 18px;
    }

    .module-panel {
      min-width: 0;
      max-width: 100%;
      padding: 18px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
    }

    .module-header {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 16px;
    }

    .module-header > * {
      min-width: 0;
    }

    .module-title {
      margin: 0;
      font-size: 1.05rem;
      line-height: 1.25;
    }

    .module-copy {
      margin: 5px 0 0;
      color: var(--muted);
      font-size: 0.92rem;
    }

    .action-row,
    .form-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      align-items: flex-end;
    }

    .form-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(150px, 1fr));
    }

    .field {
      display: grid;
      gap: 6px;
      min-width: 0;
    }

    .field span {
      color: var(--muted);
      font-size: 0.76rem;
      font-weight: 850;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .field input,
    .field select,
    .field textarea {
      width: 100%;
      min-height: 40px;
      padding: 9px 10px;
      color: var(--ink);
      background: #ffffff;
      border: 1px solid var(--line);
      border-radius: var(--radius);
    }

    .field textarea {
      min-height: 86px;
      resize: vertical;
    }

    .button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 40px;
      padding: 9px 13px;
      color: #ffffff;
      background: var(--company-green);
      border: 1px solid var(--company-green);
      border-radius: var(--radius);
      font-weight: 850;
    }

    .button.secondary {
      color: var(--green-900);
      background: var(--green-100);
      border-color: rgba(62, 124, 89, 0.24);
    }

    .button.danger {
      color: #ffffff;
      background: var(--danger);
      border-color: var(--danger);
    }

    .button:disabled {
      cursor: not-allowed;
      opacity: 0.55;
    }

    .feedback {
      margin: 12px 0 0;
      padding: 10px 12px;
      border-radius: var(--radius);
      font-size: 0.9rem;
    }

    .feedback.error {
      color: #7b2d25;
      background: #faecea;
      border: 1px solid rgba(173, 77, 66, 0.25);
    }

    .feedback.success {
      color: var(--green-900);
      background: var(--green-100);
      border: 1px solid rgba(62, 124, 89, 0.24);
    }

    .submission-banner,
    .notice {
      margin: 12px 0;
      padding: 11px 12px;
      color: var(--green-900);
      background: var(--green-100);
      border: 1px solid rgba(62, 124, 89, 0.24);
      border-radius: var(--radius);
      font-size: 0.9rem;
      font-weight: 750;
    }

    .notice.warning {
      color: #7a5416;
      background: #fff5df;
      border-color: rgba(180, 123, 32, 0.28);
    }

    .table-wrap {
      overflow-x: auto;
      border: 1px solid var(--line);
      border-radius: var(--radius);
    }

    .data-table {
      width: 100%;
      min-width: 760px;
      border-collapse: collapse;
      background: #ffffff;
      font-size: 0.9rem;
    }

    .data-table th,
    .data-table td {
      padding: 10px 11px;
      text-align: left;
      border-bottom: 1px solid var(--line);
      vertical-align: middle;
    }

    .data-table th {
      color: var(--muted);
      background: #f9fbf8;
      font-size: 0.74rem;
      font-weight: 900;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      white-space: nowrap;
    }

    .sort-button {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      width: 100%;
      min-height: 30px;
      padding: 0;
      color: inherit;
      background: transparent;
      border: 0;
      font: inherit;
      letter-spacing: inherit;
      text-align: left;
      text-transform: inherit;
    }

    .sort-button:hover,
    .sort-button:focus-visible {
      color: var(--green-900);
    }

    .sort-arrow {
      display: inline-flex;
      justify-content: center;
      min-width: 12px;
      color: var(--company-green);
      font-size: 0.82rem;
    }

    .data-table tr:last-child td {
      border-bottom: 0;
    }

    .data-table input,
    .data-table select {
      width: 100%;
      min-width: 96px;
      min-height: 34px;
      padding: 6px 8px;
      color: var(--ink);
      background: #ffffff;
      border: 1px solid var(--line);
      border-radius: var(--radius);
    }

    .hours-input {
      max-width: 92px;
    }

    .table-filter {
      max-width: 320px;
      margin: 12px 0;
    }

    .table-summary {
      margin: 0 0 10px;
      color: var(--muted);
      font-size: 0.88rem;
      font-weight: 750;
    }

    .empty-state {
      padding: 18px;
      color: var(--muted);
      background: #f9fbf8;
      border: 1px dashed var(--line);
      border-radius: var(--radius);
      text-align: center;
    }

    .split-grid {
      display: grid;
      grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
      gap: 16px;
    }

    .split-grid > * {
      min-width: 0;
    }

    .leave-form {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-content: start;
    }

    .leave-form .full-span {
      grid-column: 1 / -1;
    }

    .leave-board {
      min-width: 0;
    }

    .leave-board .module-title {
      margin-bottom: 10px;
    }

    .leave-status-filter {
      max-width: 220px;
      margin-bottom: 12px;
    }

    .approval-grid {
      display: grid;
      gap: 16px;
    }

    .approval-subsection {
      min-width: 0;
    }

    .approval-subsection .module-title {
      margin-bottom: 10px;
    }

    .leave-list {
      display: grid;
      gap: 10px;
      margin: 0;
      padding: 0;
      list-style: none;
    }

    .records-export-grid {
      margin-bottom: 14px;
    }

    .records-list {
      display: grid;
      gap: 10px;
      margin: 0;
      padding: 0;
      list-style: none;
    }

    .record-item {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
      padding: 12px;
      background: #f9fbf8;
      border: 1px solid var(--line);
      border-radius: var(--radius);
    }

    .record-item strong {
      display: block;
    }

    .record-counts {
      color: var(--muted);
      font-size: 0.88rem;
    }

    #recordSnapshotArea {
      margin-top: 14px;
    }

    .leave-item {
      display: grid;
      gap: 10px;
      padding: 12px;
      background: #f9fbf8;
      border: 1px solid var(--line);
      border-radius: var(--radius);
    }

    .leave-item strong {
      display: block;
    }

    .leave-meta {
      color: var(--muted);
      font-size: 0.88rem;
    }

    .leave-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .mini-button {
      min-height: 32px;
      padding: 6px 10px;
      color: var(--green-900);
      background: #ffffff;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      font-weight: 800;
    }

    .payroll-total {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-top: 12px;
      padding: 14px;
      color: var(--green-900);
      background: var(--green-100);
      border-radius: var(--radius);
      font-weight: 900;
    }

    .payroll-table-area {
      margin-top: 14px;
    }

    [hidden] {
      display: none !important;
    }

    @media (max-width: 1100px) {
      .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 860px) {
      .app-shell {
        display: block;
      }

      .sidebar {
        display: none;
      }

      .topbar {
        position: sticky;
        top: 0;
        z-index: 10;
        display: flex;
      }

      .main {
        padding: 22px clamp(14px, 4vw, 24px) 30px;
      }

      .section-header {
        display: grid;
        gap: 14px;
      }

      .section-status {
        justify-self: start;
      }

      .summary-grid,
      .placeholder-panel {
        grid-template-columns: 1fr;
      }

      .data-zone {
        min-height: 220px;
      }

      .form-grid,
      .split-grid {
        grid-template-columns: 1fr;
      }

      .leave-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 560px) {
      .topbar {
        align-items: stretch;
        flex-direction: column;
      }

      .mobile-select {
        width: 100%;
      }

      .section-title {
        max-width: 100%;
        font-size: clamp(1.75rem, 9vw, 2.4rem);
      }

      .section-description {
        font-size: 0.95rem;
      }

      .summary-card {
        min-height: 118px;
      }

      .placeholder-panel {
        padding: 14px;
      }

      .placeholder-list li {
        align-items: flex-start;
        flex-direction: column;
      }

      .data-zone {
        min-height: 180px;
        padding: 14px;
      }

      .module-panel {
        padding: 14px;
      }

      .module-header {
        display: grid;
      }

      .action-row {
        align-items: stretch;
        flex-direction: column;
      }

      .button {
        width: 100%;
      }

      .leave-form {
        grid-template-columns: 1fr;
      }

      .record-item {
        grid-template-columns: 1fr;
      }
    }


.nav-button {
  text-decoration: none;
}

.nav-button[aria-current="page"] {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-button[aria-current="page"]::before {
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.13);
}

.sub-nav {
  display: grid;
  gap: 4px;
  margin: 0 0 8px 36px;
}

.sub-nav a {
  display: block;
  padding: 7px 10px;
  color: rgba(255, 255, 255, 0.66);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
}

.sub-nav a:hover,
.sub-nav a[aria-current="location"] {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.page-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 18px;
}

.page-subnav a {
  padding: 8px 11px;
  color: var(--green-900);
  background: var(--green-100);
  border: 1px solid rgba(62, 124, 89, 0.24);
  border-radius: var(--radius);
  font-size: 0.86rem;
  font-weight: 850;
  text-decoration: none;
}

.page-subnav a:hover,
.page-subnav a:focus-visible {
  background: #ffffff;
}

.portal-section {
  scroll-margin-top: 22px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.filter-row .table-filter {
  flex: 1 1 220px;
}

.table-group-row td {
  color: var(--green-900);
  background: var(--green-100);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.department-manager {
  margin-bottom: 18px;
  padding: 14px;
  background: #f9fbf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.department-form {
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 10px 0 12px;
}

.master-subtitle {
  margin: 4px 0 10px;
}

.master-list-area {
  margin-top: 14px;
}

.attendance-table {
  min-width: 1120px;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 38, 30, 0.72);
}

.auth-card {
  width: min(100%, 460px);
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(16, 28, 21, 0.28);
}

.auth-form {
  margin-top: 14px;
}

.auth-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.session-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px 12px;
  color: var(--green-900);
  background: var(--green-100);
  border: 1px solid rgba(62, 124, 89, 0.24);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.user-table-wrap {
  margin-top: 14px;
}

.auth-overlay {
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: auto;
  padding: 24px;
  background: #15251c;
}

.auth-card {
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 28px;
}

.auth-title {
  margin: 0;
  color: var(--green-900);
  font-size: 1.5rem;
  line-height: 1.15;
  font-weight: 900;
}

.inline-reset-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  background: #f9fbf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.password-reset-row td {
  background: #ffffff;
}

@media (max-width: 640px) {
  .auth-overlay {
    padding: 16px;
  }

  .auth-card {
    width: 100%;
    padding: 22px;
  }

  .inline-reset-form {
    grid-template-columns: 1fr;
  }
}

.auth-card {
  overflow-x: hidden;
  overflow-y: auto;
}

.auth-form {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.auth-form .field,
.auth-form .full-span,
.auth-form .button {
  grid-column: 1 / -1;
  width: 100%;
}

.auth-form .button {
  margin-top: 2px;
  justify-content: center;
}

.dashboard-grid .summary-card {
  color: inherit;
  text-decoration: none;
}

.dashboard-card-link {
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.dashboard-card-link:hover,
.dashboard-card-link:focus-visible {
  border-color: rgba(62, 124, 89, 0.48);
  transform: translateY(-1px);
}

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

.record-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  color: var(--green-900);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
}

.record-row:hover,
.record-row:focus-visible {
  border-color: rgba(62, 124, 89, 0.42);
}

.record-row span {
  display: grid;
  gap: 2px;
}

.record-row small,
.account-summary span {
  color: var(--muted);
  font-size: 0.82rem;
}

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

.account-summary p {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 12px;
  background: #f9fbf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.settings-password-form {
  margin-top: 14px;
}

@media (max-width: 760px) {
  .account-summary {
    grid-template-columns: 1fr;
  }

  .record-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
