.att-wrap{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.att-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  flex-wrap:wrap;
}

.att-top h3{
  margin:0 0 4px;
}

.att-btn{
  border:0 !important;
  border-radius:10px;
  padding:10px 14px;
  cursor:pointer;
  font-weight:600;
  background:#e5e7eb !important;
  color:#111827 !important;
}

.att-btn-primary{
  background:#111827 !important;
  color:#fff !important;
}

.att-btn-success{
  background:#dcfce7 !important;
  color:#166534 !important;
}

.att-btn-danger{
  background:#fee2e2 !important;
  color:#991b1b !important;
}

.att-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.att-tab{
  border:1px solid #e5e7eb !important;
  background:#fff !important;
  color:#111827 !important;
  border-radius:999px;
  padding:8px 12px;
  cursor:pointer;
}

.att-tab.active{
  background:#111827 !important;
  color:#fff !important;
}

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

.att-kpi{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:14px;
}

.att-kpi span{
  display:block;
  font-size:12px;
  color:#64748b;
}

.att-kpi strong{
  display:block;
  margin-top:4px;
  font-size:20px;
}

.att-table-wrap{
  overflow:auto;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:14px;
}

.att-table{
  width:100%;
  border-collapse:collapse;
}

.att-table th,
.att-table td{
  padding:12px;
  border-bottom:1px solid #f1f5f9;
  text-align:left;
  white-space:nowrap;
}

.att-table th{
  font-size:12px;
  color:#64748b;
}

.att-status{
  display:inline-flex;
  padding:5px 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}

.att-status-draft{
  background:#f3f4f6;
  color:#475569;
}

.att-status-submitted{
  background:#fef3c7;
  color:#92400e;
}

.att-status-approved{
  background:#dcfce7;
  color:#166534;
}

.att-status-rejected,
.att-status-cancelled{
  background:#fee2e2;
  color:#991b1b;
}

.att-empty{
  padding:32px;
  text-align:center;
  color:#64748b;
}

.att-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:9999;
  background:rgba(15,23,42,.45);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}

.att-modal{
  width:min(760px,100%);
  max-height:92vh;
  overflow:auto;
  background:#fff;
  border-radius:16px;
  padding:20px;
}

.att-modal-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}

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

.att-grid label{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:13px;
  font-weight:600;
}

.att-grid input,
.att-grid select,
.att-grid textarea{
  width:100%;
  box-sizing:border-box;
  border:1px solid #d1d5db;
  border-radius:10px;
  padding:10px 12px;
  background:#fff;
  color:#111827;
}

.att-full{
  grid-column:1/-1;
}

.att-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
  margin-top:18px;
}

.att-error{
  margin-top:10px;
  padding:10px 12px;
  background:#fee2e2;
  color:#991b1b;
  border-radius:10px;
}

#attendanceBadge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 6px;
  margin-left:8px;
  border-radius:999px;
  background:#dc2626 !important;
  color:#fff !important;
  font-size:11px;
  font-weight:700;
}

#attendanceBadge.hidden{
  display:none !important;
}

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

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

  .att-full{
    grid-column:auto;
  }
}

.att-team-toolbar{
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom:12px;
}

.att-team-toolbar input{
  padding:10px 12px;
  border:1px solid #d1d5db;
  border-radius:10px;
  background:#fff;
}

.att-team-legend{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-bottom:12px;
  font-size:12px;
  color:#475569;
}

.att-team-scroll{
  overflow:auto;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#fff;
}

.att-team-table{
  border-collapse:collapse;
  min-width:max-content;
  width:100%;
}

.att-team-table th,
.att-team-table td{
  border-right:1px solid #f1f5f9;
  border-bottom:1px solid #f1f5f9;
  text-align:center;
}

.att-team-table th{
  min-width:42px;
  padding:7px 5px;
  background:#f8fafc;
  font-size:11px;
}

.att-team-table th span,
.att-team-table th small{
  display:block;
}

.att-team-person{
  position:sticky;
  left:0;
  z-index:2;
  min-width:190px !important;
  max-width:190px;
  text-align:left !important;
  padding:10px !important;
  background:#fff;
}

thead .att-team-person{
  z-index:3;
  background:#f8fafc;
}

.att-team-person small{
  display:block;
  margin-top:2px;
  color:#64748b;
}

.att-team-day{
  width:42px;
  min-width:42px;
  height:42px;
  cursor:default;
  font-size:11px;
  font-weight:700;
}

.att-team-day span{
  display:flex;
  width:30px;
  height:30px;
  align-items:center;
  justify-content:center;
  margin:auto;
  border-radius:8px;
}

.att-day-present span{
  background:#dcfce7;
  color:#166534;
}

.att-day-remote span{
  background:#dbeafe;
  color:#1d4ed8;
}

.att-day-leave span{
  background:#fef3c7;
  color:#92400e;
}

.att-day-sick span{
  background:#ffedd5;
  color:#9a3412;
}

.att-day-absence span{
  background:#fee2e2;
  color:#991b1b;
}

.att-day-holiday span{
  background:#ede9fe;
  color:#6d28d9;
}

.att-sunday{
  background:#f8fafc !important;
}

.att-team-day.att-sunday{
  cursor:default !important;
}

@media(max-width:800px){
  .att-team-person{
    min-width:150px !important;
    max-width:150px;
  }
}
