:root {
  --ink: #172026;
  --muted: #63707a;
  --line: #d9e1e7;
  --panel: #ffffff;
  --surface: #f5f7f9;
  --brand: #116466;
  --brand-dark: #0a3f40;
  --accent: #d9a441;
  --danger: #b42318;
  --ok: #167a4a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  background: #101820;
  color: #fff;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #101820;
  background: var(--accent);
  font-weight: 800;
}

.brand small {
  color: #aab7c1;
  display: block;
  margin-top: 3px;
}

nav {
  display: grid;
  gap: 8px;
}

.nav {
  width: 100%;
  border: 0;
  color: #d7e0e7;
  background: transparent;
  text-align: left;
  padding: 11px 12px;
  border-radius: 7px;
  cursor: pointer;
}

.nav:hover,
.nav.active {
  background: #1d2a33;
  color: #fff;
}

main {
  padding: 18px 22px;
  overflow: auto;
}

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

.export-menu {
  position: relative;
}

.export-menu summary {
  list-style: none;
  cursor: pointer;
}

.export-menu summary::-webkit-details-marker {
  display: none;
}

.export-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: min(980px, calc(100vw - 330px));
  max-height: 520px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 16px 36px rgba(16, 24, 32, 0.18);
}

.export-menu-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.export-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 9px 16px;
  margin-bottom: 12px;
}

.export-columns label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 30px;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  color: #172026;
  font-weight: 800;
}

.export-columns input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.export-order {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  background: #dfe7ec;
  color: #18313d;
  font-size: 12px;
  font-weight: 950;
}

.export-order:empty {
  visibility: hidden;
}

.commission-import {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: #f8fbfc;
}

.commission-import h2 {
  margin-bottom: 10px;
  font-size: 18px;
}

.commission-result {
  margin: 10px 0 0;
}

.commission-unmatched {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.commission-unmatched span {
  padding: 5px 8px;
  border: 1px solid #e1b7b2;
  background: #fff2f0;
  font-size: 12px;
}

.punch-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 2px solid #f0b429;
  background: #fff8df;
}

.punch-edit-actions,
.row-actions {
  display: flex;
  gap: 7px;
  align-items: end;
}

.row-actions .btn {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.badge.punch-in {
  background: #dff5e8;
  color: #08713d;
}

.badge.punch-out {
  background: #ffe3df;
  color: #b42318;
}

.employee-app-preview {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(320px, 430px);
  gap: 28px;
  align-items: start;
}

.employee-app-controls {
  position: sticky;
  top: 18px;
}

.phone-shell {
  width: min(100%, 390px);
  min-height: 760px;
  padding: 12px 14px 24px;
  border: 10px solid #182229;
  border-radius: 38px;
  background: #f4f7f9;
  box-shadow: 0 22px 48px rgba(15, 31, 43, 0.25);
}

.phone-status {
  display: flex;
  justify-content: space-between;
  padding: 2px 10px 12px;
  font-size: 12px;
  font-weight: 900;
}

.employee-mobile-head {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0d7779, #155968);
  color: #fff;
}

.employee-mobile-head h2,
.employee-mobile-head p {
  margin: 0;
}

.employee-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #f4c54d;
  color: #10222d;
  font-size: 25px;
  font-weight: 950;
}

.mobile-status-card {
  display: grid;
  gap: 3px;
  margin: 14px 0;
  padding: 14px;
  border-left: 6px solid #c2382b;
  border-radius: 14px;
  background: #fff;
}

.mobile-status-card.checked-in {
  border-left-color: #15915a;
}

.mobile-status-card strong {
  font-size: 20px;
}

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

.mobile-punch {
  min-height: 58px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  font-size: 17px;
  font-weight: 950;
  cursor: pointer;
}

.mobile-punch.in {
  background: #12814f;
}

.mobile-punch.out {
  background: #c52b20;
}

.mobile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

.mobile-grid > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 31, 43, 0.08);
}

.mobile-grid span,
.mobile-line span {
  color: #64717a;
  font-size: 12px;
}

.mobile-section {
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
}

.mobile-section h3 {
  margin: 0 0 10px;
}

.mobile-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #e6ecef;
}

.mobile-line strong {
  text-align: right;
  font-size: 12px;
}

.mobile-line.total {
  color: #0d7779;
  font-size: 16px;
}

.phone-home {
  width: 110px;
  height: 5px;
  margin: 18px auto 0;
  border-radius: 99px;
  background: #182229;
}

@media (max-width: 900px) {
  .employee-app-preview {
    grid-template-columns: 1fr;
  }

  .employee-app-controls {
    position: static;
  }

  .phone-shell {
    margin: 0 auto;
  }
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 26px;
}

h2 {
  font-size: 20px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e8f4ef;
  color: var(--ok);
  border: 1px solid #bee3d0;
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 700;
}

.status-pill span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ok);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel {
  padding: 16px;
  overflow-x: auto;
}

.card {
  padding: 16px;
}

.metric {
  min-height: 116px;
}

.metric strong {
  display: block;
  font-size: 30px;
  margin: 8px 0 4px;
}

.metric span,
.muted {
  color: var(--muted);
}

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

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
}

.check-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.check-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-weight: 600;
}

.check-row input {
  width: auto;
}

.btn {
  border: 0;
  border-radius: 7px;
  padding: 10px 14px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  background: var(--brand-dark);
}

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

.btn.secondary {
  background: #e9eef2;
  color: var(--ink);
}

.btn.danger {
  background: var(--danger);
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

.scroll-sync {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 8px 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafb;
}

.scroll-sync div {
  height: 1px;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

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

.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  background: #edf3f4;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.payroll-register {
  margin-top: 16px;
  border: 2px solid #1f4e78;
  background: #fff;
}

.payroll-register-title {
  padding: 11px 14px;
  border-bottom: 2px solid #1f4e78;
  background: #1f4e78;
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
}

.payroll-register-wrap {
  max-height: 68vh;
}

.payroll-register-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.payroll-register-table th,
.payroll-register-table td {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
  padding: 6px 6px;
  border-right: 1px solid #8b8b8b;
  border-bottom: 1px solid #8b8b8b;
  color: #000;
  white-space: nowrap;
  text-align: center;
}

.payroll-register-table th {
  height: 48px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.12;
  vertical-align: middle;
}

.payroll-register-table thead {
  position: sticky;
  top: 0;
  z-index: 3;
}

.payroll-register-table thead tr:nth-child(2) th {
  background: #d9eaf7;
  color: #000;
  font-size: 11px;
  font-weight: 950;
  text-align: center;
}

.payroll-register-table [data-column="sr"] {
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  text-align: center;
}

.payroll-register-table [data-column="employeeId"] {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  text-align: center;
}

.payroll-register-table [data-column="employee"] {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}

.payroll-register-table [data-column="branch"],
.payroll-register-table [data-column="type"],
.payroll-register-table [data-column="pfStatus"] {
  width: 76px;
  min-width: 76px;
  max-width: 76px;
  white-space: normal;
  text-align: center;
}

.payroll-register-table [data-column="age"],
.payroll-register-table [data-column="monthDays"],
.payroll-register-table [data-column="weekOffs"] {
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  text-align: center;
}

.payroll-register-table [data-column="worked"],
.payroll-register-table [data-column="requiredHours"],
.payroll-register-table [data-column="weekOffWorked"],
.payroll-register-table [data-column="extraPaid"] {
  width: 92px;
  min-width: 92px;
  max-width: 92px;
  white-space: normal;
}

.payroll-register-table .payroll-group-head th {
  padding: 6px 8px;
  color: #000;
  font-size: 11px;
  font-weight: 950;
  text-align: center;
}

.payroll-group-head th[data-group="EMPLOYEE DETAILS"] {
  background: #9dc3e6;
}

.payroll-group-head th[data-group="ATTENDANCE"] {
  background: #a9d18e;
}

.payroll-group-head th[data-group="SALARY CALCULATION"] {
  background: #ffe699;
}

.payroll-group-head th[data-group="EMPLOYEE DEDUCTION"] {
  background: #f4b183;
}

.payroll-group-head th[data-group="SALARY COMPONENTS"] {
  background: #d9b3ff;
}

.payroll-group-head th[data-group="EMPLOYER DEDUCTION"] {
  background: #ff9999;
}

.payroll-group-head th[data-group="PERSONAL ACCOUNT"] {
  background: #f8cbad;
}

.payroll-register-table tbody tr:nth-child(even) td {
  background: #f3f8fc;
}

.payroll-register-table tbody tr:hover td {
  background: #fff2cc;
}

.payroll-register-table [data-column="sr"] {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #d9eaf7;
}

.payroll-register-table [data-column="employeeId"] {
  position: sticky;
  left: 48px;
  z-index: 1;
  background: #eaf3f8;
  font-weight: 800;
}

.payroll-register-table [data-column="employee"] {
  position: sticky;
  left: 120px;
  z-index: 1;
  background: #eaf3f8;
  font-weight: 800;
}

.payroll-register-table thead [data-column="sr"],
.payroll-register-table thead [data-column="employeeId"],
.payroll-register-table thead [data-column="employee"] {
  z-index: 5;
}

.payroll-total-row td {
  position: static !important;
  background: #d9ead3 !important;
  color: #000;
  font-weight: 950;
  border-top: 2px solid #1f4e78;
}

.attendance-manager {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(600px, 1fr);
  gap: 16px;
  align-items: start;
}

.attendance-employee-panel {
  position: sticky;
  top: 16px;
  overflow: hidden;
}

.attendance-employee-panel h2 {
  margin-bottom: 12px;
}

.attendance-employee-panel > input {
  width: 100%;
  min-height: 42px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  padding: 9px 11px;
}

.attendance-employee-list {
  display: grid;
  gap: 5px;
  max-height: calc(100vh - 240px);
  overflow-y: auto;
  padding-right: 4px;
}

.attendance-employee {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 1px 10px;
  align-items: center;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.attendance-employee:hover,
.attendance-employee.active {
  border-color: #a8d4d4;
  background: #e8f4f4;
}

.attendance-employee > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #d9a441;
  color: #101820;
  font-weight: 950;
}

.attendance-employee strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attendance-employee small {
  color: var(--muted);
}

.attendance-workspace {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.attendance-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px 150px;
  gap: 12px;
  align-items: end;
}

.attendance-day-total {
  display: grid;
  gap: 3px;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #e8f4ef;
  color: var(--ok);
}

.attendance-day-total span {
  font-size: 12px;
}

.attendance-day-total strong {
  font-size: 20px;
}

.attendance-log {
  overflow: hidden;
}

.attendance-log-head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  margin: -16px -16px 16px;
  padding: 17px 18px;
  background: #e4f2ff;
}

.attendance-log-head h2,
.attendance-log-head p {
  margin-bottom: 2px;
}

.attendance-log-head span {
  color: var(--muted);
  font-size: 13px;
}

.attendance-entry-form {
  display: none;
  grid-template-columns: 110px 140px minmax(160px, 1fr) minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #a8d4d4;
  background: #f1fafa;
}

.attendance-entry-form.open {
  display: grid;
}

.attendance-timeline {
  position: relative;
  display: grid;
  gap: 0;
  padding: 4px 0;
}

.attendance-timeline::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 12px;
  width: 2px;
  background: #d8ebf7;
}

.attendance-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 34px 78px 130px minmax(150px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 62px;
  border-bottom: 1px solid #edf1f3;
}

.attendance-dot {
  z-index: 1;
  width: 13px;
  height: 13px;
  margin-left: 6px;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #75bce5;
  background: #1684c5;
}

.attendance-dot.in {
  background: #14945b;
  box-shadow: 0 0 0 2px #a8e5c8;
}

.attendance-dot.out {
  background: #d9362b;
  box-shadow: 0 0 0 2px #ffc4bf;
}

.attendance-type {
  font-weight: 900;
}

.attendance-type.in {
  color: #078b4b;
}

.attendance-type.out {
  color: #d92d20;
}

.attendance-time {
  font-size: 16px;
  font-weight: 850;
}

.attendance-method {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attendance-break {
  margin: 0 0 0 34px;
  padding: 7px 12px;
  border-radius: 7px;
  color: #526776;
  background: #f0f2f4;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.attendance-empty {
  display: grid;
  gap: 5px;
  padding: 48px 20px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 12px 14px;
  background: #101820;
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(16, 24, 32, 0.22);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.account-sheet h2 {
  margin-bottom: 2px;
  font-size: 20px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(110px, 1fr));
  gap: 6px;
  margin: 8px 0;
}

.account-title,
.account-value {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 7px 8px;
  min-height: 34px;
}

.account-title {
  background: #fff4b8;
  font-weight: 800;
  font-size: 13px;
}

.account-value {
  background: #dbeaf5;
}

.account-value.strong {
  background: #bff4de;
  font-weight: 900;
}

.account-table input {
  min-width: 92px;
  padding: 6px 7px;
}

.account-table input[readonly] {
  background: #eef4f8;
  color: var(--muted);
}

.totals label {
  background: #fff;
}

.account-sheet {
  padding: 12px;
}

.account-sheet .toolbar {
  margin-bottom: 8px;
}

.account-sheet .toolbar p {
  margin-bottom: 0;
}

.account-sheet label {
  gap: 3px;
  font-size: 12px;
}

.account-sheet input,
.account-sheet select {
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 5px;
}

.account-sheet .scroll-sync {
  display: none;
}

.account-sheet .table-wrap {
  margin: 6px 0 8px;
}

.account-sheet table th,
.account-sheet table td {
  padding: 6px 8px;
}

.account-sheet .btn {
  padding: 9px 14px;
}

.excel-account {
  max-width: 1540px;
}

.account-picker,
.month-control {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  gap: 4px;
  align-items: stretch;
}

.account-picker {
  min-width: 310px;
}

.account-lockbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 4px 0 8px;
  padding: 7px 10px;
  border: 1px solid #cfd8e3;
  background: #eef4f8;
  font-weight: 800;
}

.account-lockbar.locked-month {
  border-color: #f2a900;
  background: #fff2cc;
}

.account-lockbar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 0;
}

.account-lockbar input {
  width: auto;
}

.admin-extra-deduction {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  padding: 6px;
  border: 1px dashed #7f1d1d;
  background: #fff1f2;
}

.admin-extra-deduction label {
  display: grid;
  grid-template-columns: 150px 160px;
  align-items: center;
  gap: 8px;
  background: #fecaca;
  color: #111;
}

.admin-extra-deduction input {
  margin-top: 0;
  min-height: 24px;
  text-align: right;
}

.admin-extra-deduction span {
  font-size: 12px;
  font-weight: 800;
  color: #7f1d1d;
}

.icon-btn {
  border: 1px solid #111;
  border-radius: 0;
  background: #e8edf2;
  padding: 0 9px;
  min-height: 28px;
  font-weight: 900;
  cursor: pointer;
}

.icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.excel-head,
.excel-strip,
.excel-footer {
  display: grid;
  grid-template-columns: 120px 2fr 1.7fr 1fr 1.1fr;
  gap: 4px;
  margin-bottom: 4px;
}

.excel-strip {
  grid-template-columns: 120px 1fr 1fr 0.75fr 120px 1fr;
}

.excel-footer {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  margin-top: 4px;
}

.excel-account label {
  background: #fff5a8;
  border: 1px solid #111;
  border-radius: 0;
  padding: 4px;
  font-size: 12px;
  font-weight: 800;
}

.excel-account label input,
.excel-account label select {
  margin-top: 3px;
  min-height: 28px;
  padding: 4px 6px;
  border-radius: 0;
  border: 0;
  background: #f7fbff;
  font-weight: 800;
}

.excel-account label.locked,
.excel-account label.locked input,
.excel-account input[readonly] {
  background: #e9eef2;
  color: #4d5b66;
  cursor: not-allowed;
}

.excel-head .name-box,
.excel-head .month-box,
.excel-strip label {
  background: #92d050;
}

.excel-head .identity-box,
.excel-head .identity-box input {
  background: #cfe2ff !important;
  color: #071b33 !important;
  font-weight: 950 !important;
  cursor: default;
}

.excel-strip .basic-box,
.excel-strip .basic-box input {
  background: #d9ead3 !important;
  color: #073b1a !important;
  font-weight: 950 !important;
  cursor: default;
}

.excel-strip .dob-box,
.excel-strip .dob-box input,
.excel-strip .age-box,
.excel-strip .age-box input {
  background: #e2f0d9 !important;
  color: #173b0b !important;
  font-weight: 900 !important;
  cursor: default;
}

.excel-head .cutting-box {
  background: #ffff00;
  color: #d00000;
  font-weight: 900;
}

.excel-head .cutting-box input {
  font-weight: 900;
}

.excel-strip .processed-box {
  text-align: center;
}

.excel-strip .processed-box input {
  width: 22px;
  min-height: 22px;
  margin: 4px auto 0;
  display: block;
}

.excel-ledger {
  display: grid;
  grid-template-columns: minmax(430px, 0.8fr) minmax(560px, 1.2fr);
  gap: 0;
  border: 1px solid #111;
  border-bottom: 0;
}

.branch-ledger,
.salary-ledger {
  background: #d9e8f5;
}

.ledger-row {
  display: grid;
  grid-template-columns: 42px minmax(120px, 1fr) 82px 88px 72px;
  min-height: 28px;
}

.ledger-row > span,
.ledger-row > input,
.salary-ledger label {
  border-right: 1px solid #111;
  border-bottom: 1px solid #111;
}

.ledger-row > span {
  padding: 4px 6px;
}

.ledger-row > input {
  min-width: 0;
  border-top: 0;
  border-left: 0;
  border-radius: 0;
  padding: 4px 6px;
  background: #d9e8f5;
}

.branch-name-input {
  font-weight: 700;
}

.add-row-btn {
  width: 100%;
  min-height: 30px;
  border: 0;
  border-right: 1px solid #111;
  border-bottom: 1px solid #111;
  background: #fff5a8;
  font-weight: 900;
  text-align: left;
  padding: 5px 8px;
  cursor: pointer;
}

.ledger-head {
  background: #9dc3e6;
  font-weight: 800;
}

.salary-ledger {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: start;
}

.salary-ledger label {
  display: grid;
  grid-template-columns: minmax(120px, 0.85fr) minmax(96px, 1fr);
  align-items: center;
  gap: 6px;
  border-radius: 0;
  background: #d9e8f5;
}

.salary-ledger label input {
  margin-top: 0;
  min-height: 24px;
  text-align: right;
}

.salary-ledger label.salary-hot {
  background: #f05ce8;
}

.salary-ledger label.salary-tax {
  background: #ffc000;
}

.salary-ledger label.salary-total {
  background: #9fd67a;
}

.salary-ledger label.salary-grace {
  background: #fff2cc;
}

.salary-ledger label.salary-before {
  background: #b7e1cd;
}

.salary-ledger label.salary-cutting {
  background: #f4b183;
}

.salary-ledger label.salary-spacer {
  background: #d9e8f5;
}

.salary-ledger label.salary-spacer input {
  visibility: hidden;
}

.salary-ledger label.salary-after {
  background: #8eaadb;
}

.salary-ledger label.salary-final,
.excel-footer label {
  background: #f4b183;
}

.salary-ledger label.salary-total,
.salary-ledger label.salary-cutting,
.salary-ledger label.salary-before,
.salary-ledger label.salary-after,
.salary-ledger label.salary-final,
.salary-ledger label.salary-total input,
.salary-ledger label.salary-cutting input,
.salary-ledger label.salary-before input,
.salary-ledger label.salary-after input,
.salary-ledger label.salary-final input,
.salary-ledger label.salary-grace,
.salary-ledger label.salary-grace input,
.excel-account label.balance-strong,
.excel-account label.balance-strong input {
  color: #000 !important;
  font-weight: 900 !important;
  text-shadow: 0 0 0 #000;
}

.excel-head .cutting-box,
.excel-head .cutting-box input {
  color: #000 !important;
  font-weight: 900 !important;
  text-shadow: 0 0 0 #000;
}

.charge-notes {
  border-left: 1px solid #111;
  border-right: 1px solid #111;
  margin-top: 0;
}

.charge-row {
  display: grid;
  grid-template-columns: 160px minmax(320px, 1fr) 130px 130px 120px;
  background: #fff;
}

.charge-row > span,
.charge-row > input,
.charge-row > select {
  border-right: 1px solid #111;
  border-bottom: 1px solid #111;
  min-height: 28px;
  padding: 4px 6px;
  background: #fff;
  font-weight: 800;
}

.charge-row > input,
.charge-row > select {
  border-top: 0;
  border-left: 0;
  border-radius: 0;
}

.charge-row > input[type="date"],
.charge-row > select {
  cursor: pointer;
}

.charge-row > input[readonly],
.charge-row > input:disabled,
.charge-row > select:disabled {
  background: #fff !important;
  color: #0f1f2d !important;
  cursor: default;
  opacity: 1;
}

.charge-head {
  background: #e9eef2;
}

.charge-head > span {
  background: #e9eef2;
}

.account-branch-list {
  border: 1px solid var(--line);
  border-bottom: 0;
}

.account-branch-row {
  display: grid;
  grid-template-columns: 70px minmax(240px, 1fr);
}

.account-branch-row > span,
.account-branch-row > input {
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  font-weight: 800;
}

.account-branch-row.branch-head > span {
  background: #eef4f8;
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 14px;
  }

  nav {
    display: flex;
    overflow-x: auto;
  }

  .nav {
    min-width: max-content;
  }

  main {
    padding: 18px;
  }

  .grid.cols-4,
  .grid.cols-2,
  .form-grid,
  .account-grid,
  .punch-pad,
  .attendance-manager,
  .attendance-toolbar,
  .attendance-entry-form {
    grid-template-columns: 1fr;
  }

  .attendance-employee-panel {
    position: static;
  }

  .attendance-employee-list {
    max-height: 300px;
  }

  .attendance-timeline-item {
    grid-template-columns: 30px 68px 1fr auto;
  }

  .attendance-method {
    display: none;
  }

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