.admin-body { background: #f4f6f8; }

.admin-section {
  background: #fff;
  margin: 14px 20px;
  padding: 18px 22px;
  border-radius: 10px;
  border: 1px solid #e3e6ea;
}

.admin-section .section-title {
  font-size: 15px; font-weight: 600;
  margin: 0 0 14px; color: #333;
}

/* KPI cards */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.sum-card {
  background: #fafbfc;
  border: 1px solid #e3e6ea;
  border-radius: 8px;
  padding: 14px 16px;
}
.sum-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}
.sum-value {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
}
.sum-sub {
  font-size: 11px;
  color: #888;
  margin-top: 6px;
}

/* Comparison cards */
.compare-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.compare-card {
  background: #fafbfc;
  border: 1px solid #e3e6ea;
  border-radius: 8px;
  padding: 14px 16px;
}
.compare-label {
  font-size: 12px; color: #666; margin-bottom: 6px;
}
.compare-amount {
  font-size: 20px; font-weight: 700;
}
.compare-amount.up { color: #c53929; }
.compare-amount.down { color: #1e7a3a; }
.compare-amount.flat { color: #555; }
.compare-detail {
  font-size: 12px; color: #777; margin-top: 4px;
}

/* Payroll table */
.payroll-table, .staff-settings-table, .special-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.payroll-table th, .payroll-table td,
.staff-settings-table th, .staff-settings-table td,
.special-table th, .special-table td {
  border: 1px solid #d8dbe0;
  padding: 8px 10px;
  text-align: right;
}
.payroll-table th, .staff-settings-table th, .special-table th {
  background: #f0f3f6;
  font-weight: 600;
  text-align: center;
}
.payroll-table td:nth-child(1),
.payroll-table td:nth-child(2),
.staff-settings-table td:nth-child(1),
.staff-settings-table td:nth-child(2) {
  text-align: left;
}
.payroll-table td:nth-child(1),
.staff-settings-table td:nth-child(1) {
  width: 36px; text-align: center; color: #999;
}
.payroll-table tfoot td {
  background: #f7f9fb;
  font-weight: 700;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}
.section-header .section-title { margin: 0; }
.header-right-inline { display: flex; align-items: center; gap: 10px; }
.confirm-status {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
}
.confirm-status.confirmed {
  background: #d6ecdd; color: #1e7a3a;
}
.confirm-status.pending {
  background: #fde7c6; color: #a05c00;
}

.editable {
  cursor: pointer;
  position: relative;
}
.editable:hover {
  background: #fff7e0;
}
.editable.overridden {
  background: #fff3d0;
  color: #8b5a00;
}
.editable.overridden::after {
  content: " ✎";
  font-size: 10px;
  color: #c97b00;
}
.editable input {
  width: 90%;
  padding: 4px 6px;
  border: 1px solid #1f4f5b;
  border-radius: 4px;
  text-align: right;
  font-size: 13px;
  font-family: inherit;
}
.reset-btn {
  border: none;
  background: transparent;
  color: #c97b00;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  font-family: inherit;
}
.reset-btn:hover { color: #8b5a00; }
.payslip-btn {
  border: 1px solid #cfd4da;
  background: #fff;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  text-decoration: none;
  color: #222;
}
.payslip-btn:hover { background: #f6f7f9; }

/* Punch table in admin */
.punch-date-picker {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.punch-date-picker label { font-size: 13px; color: #555; }
.punch-date-picker input[type=date] {
  padding: 6px 8px; max-width: 160px;
}
.punch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.punch-table th, .punch-table td {
  border: 1px solid #d8dbe0;
  padding: 6px 8px;
  text-align: center;
}
.punch-table th {
  background: #f0f3f6;
  font-weight: 600;
}
.punch-table td:nth-child(2) { text-align: left; }
.punch-table td:nth-child(1) { width: 36px; color: #999; }
.punch-table input[type=time] {
  width: 90px;
  padding: 4px 6px;
  border: 1px solid #cfd4da;
  border-radius: 4px;
  font-family: inherit;
}
.punch-table .save-btn {
  border: 1px solid #1f4f5b;
  background: #1f4f5b;
  color: #fff;
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
}
.punch-table .save-btn:hover { background: #163942; }
.break-edit-wrap {
  display: flex; flex-direction: column;
  gap: 4px; align-items: stretch;
}
.break-edit-row {
  display: flex; align-items: center; gap: 4px;
  justify-content: center;
}
.break-edit-row .sep { color: #888; font-size: 12px; }
.break-edit-row .br-del {
  border: 1px solid #c97b00;
  background: #fff;
  color: #c97b00;
  border-radius: 4px;
  padding: 2px 6px;
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
}
.break-edit-row .br-del:hover { background: #fff5e0; }
.br-add {
  align-self: center;
  border: 1px dashed #999;
  background: transparent;
  color: #555;
  border-radius: 4px;
  padding: 3px 10px;
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
}
.br-add:hover { background: #f4f4f4; }

/* Staff settings inputs */
.staff-settings-table input[type=number] {
  width: 100px;
  padding: 6px 8px;
  border: 1px solid #cfd4da;
  border-radius: 6px;
  text-align: right;
  font-family: inherit;
}
.staff-settings-table td:nth-child(4) {
  text-align: center;
}
.staff-settings-table td:nth-child(5) {
  text-align: center; width: 180px;
}
.staff-settings-table td:nth-child(6) {
  text-align: center; width: 80px;
}
.account-info {
  background: #fafbfc;
  border: 1px solid #e3e6ea;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 14px 0;
}
.account-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}
.account-row:last-child { border-bottom: none; }
.account-label { font-size: 13px; color: #555; }
.account-value { font-weight: 600; }
.account-value.password {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 18px;
  letter-spacing: 1px;
  color: #b3261e;
  user-select: all;
}
.acct-issue-btn {
  border: 1px solid #1f4f5b;
  background: #fff;
  color: #1f4f5b;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
}
.acct-issue-btn:hover { background: #f0f5f6; }
.acct-revoke-btn {
  border: 1px solid #b3261e;
  background: #fff;
  color: #b3261e;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  margin-left: 4px;
}
.acct-revoke-btn:hover { background: #fff5f5; }
.acct-status-ok {
  color: #1e7a3a;
  font-size: 12px;
}
.acct-status-none {
  color: #888;
  font-size: 12px;
}

/* Rules grid */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.rules-status {
  margin-left: 10px;
  font-size: 13px;
  color: #1e7a3a;
}

/* Special days */
.special-add {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.special-add input, .special-add select {
  padding: 8px 10px;
  border: 1px solid #cfd4da;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
}
.special-add #sp-date { width: 150px; }
.special-add #sp-label { flex: 1; min-width: 140px; }
.special-add #sp-type { width: 170px; }
.special-add #sp-value { width: 110px; }
.special-table td:nth-child(1) { text-align: center; width: 130px; }
.special-table td:nth-child(2) { text-align: left; }
.special-table td:nth-child(3) { text-align: center; width: 130px; }
.special-table td:nth-child(4) { width: 110px; }
.special-table td:nth-child(5) { width: 80px; text-align: center; }
.del-btn {
  background: none; border: none; color: #b3261e;
  cursor: pointer; font-size: 13px;
  font-family: inherit;
}
.del-btn:hover { text-decoration: underline; }

@media print {
  body { display: none !important; }
}
