.att-page {
  padding: 20px;
  background: #f4f7f8;
  min-height: calc(100vh - 58px);
}

.att-header,
.att-panel,
.att-kpis > div {
  background: #fff;
  border: 1px solid #dfe8ec;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(28, 45, 56, .05);
}

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

.att-header h2 {
  margin: 0;
  color: #1f2933;
  font-size: 24px;
  font-weight: 850;
}

.att-header p,
.att-panel p {
  margin: 4px 0 0;
  color: #6b7c86;
  font-size: 13px;
}

.att-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.att-actions input {
  width: 160px;
}

.att-payroll-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d8e2e7;
  border-radius: 8px;
  background: #fff;
  color: #40545e;
  font-size: 13px;
  font-weight: 700;
}

.att-payroll-toggle input {
  width: auto;
}

.att-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.att-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.att-kpis > div {
  padding: 13px;
}

.att-kpis span {
  display: block;
  color: #647681;
  font-size: 13px;
}

.att-kpis strong {
  display: block;
  color: #22313f;
  font-size: 25px;
  margin-top: 5px;
}

.att-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.att-ops {
  margin-bottom: 14px;
}

.att-live {
  margin-top: 14px;
}

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

.att-ops-grid label span,
.att-manual-form label span {
  display: block;
  margin-bottom: 5px;
  color: #40545e;
  font-size: 12px;
  font-weight: 800;
}

.att-device-state {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #d8e2e7;
  border-radius: 8px;
  background: #f8fbfc;
  color: #40545e;
  font-size: 13px;
  font-weight: 700;
}

.att-manual-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.att-span-2 {
  grid-column: span 2;
}

.att-group-note {
  padding: 10px 12px;
  border: 1px solid #cde7ef;
  border-radius: 8px;
  background: #f2fbfd;
  color: #315864;
  font-size: 13px;
}

.att-panel {
  padding: 16px;
}

.att-panel-head {
  margin-bottom: 12px;
}

.att-panel h3 {
  margin: 0;
  color: #26333b;
  font-size: 17px;
  font-weight: 850;
}

.att-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 8px;
  background: #e7f5f2;
  color: #197465;
  font-size: 12px;
}

.att-chip.late {
  background: #fff3d6;
  color: #9a6700;
}

.att-chip.absent {
  background: #fdecec;
  color: #b42318;
}

.att-chip.present {
  background: #e7f5f2;
  color: #197465;
}

.att-chip.out {
  background: #eef2f6;
  color: #465b69;
}

.att-chip.after-closing {
  margin-inline-start: 6px;
  background: #fff3d6;
  color: #8a5200;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .att-header {
    align-items: stretch;
    flex-direction: column;
  }

  .att-actions {
    justify-content: flex-start;
  }

  .att-grid {
    grid-template-columns: 1fr;
  }

  .att-ops-grid,
  .att-manual-form {
    grid-template-columns: 1fr;
  }

  .att-span-2 {
    grid-column: auto;
  }
}

#groupCloseModal .modal-dialog,
#manualPunchModal .modal-dialog {
  max-width: 620px;
  margin-inline: auto;
}

#groupCloseModal .modal-content,
#manualPunchModal .modal-content {
  border-radius: 12px;
  overflow: hidden;
}

#groupCloseModal .modal-header,
#manualPunchModal .modal-header {
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #e0e9ed;
  background: #f8fbfc;
}

#groupCloseModal .modal-title,
#manualPunchModal .modal-title {
  font-size: 16px;
  font-weight: 900;
  color: #22313f;
}

#groupCloseModal .modal-body,
#manualPunchModal .modal-body {
  padding: 16px;
}

#groupCloseModal .modal-footer,
#manualPunchModal .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid #e0e9ed;
}

#groupCloseModal .modal-footer > *,
#manualPunchModal .modal-footer > * {
  margin: 0;
}

#groupCloseModal .form-control,
#groupCloseModal .form-select,
#manualPunchModal .form-control,
#manualPunchModal .form-select {
  min-height: 40px;
}
