/* ==================================================
   ATTENDANCE MODULE — MODERN UI (FIXED)
   ================================================== */

.report-filters {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: end;
  margin-bottom: 22px; padding: 18px 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1.5px solid #e2e8f0; border-radius: 14px;
  box-shadow: 0 4px 15px rgba(11,37,69,0.04);
}
.report-filter-group { display: flex; flex-direction: column; gap: 6px; }
.report-filter-group label {
  font-size: 11px; color: #64748b; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.8px;
}
.report-filter-group select,
.report-filter-group input {
  padding: 11px 14px; border: 1.5px solid #e2e8f0; border-radius: 10px;
  font-size: 13.5px; background: #fff; font-family: inherit; outline: none;
  color: #0b2545; font-weight: 600; min-width: 150px;
}
.report-filter-group select:focus,
.report-filter-group input:focus {
  border-color: #e63946;
  box-shadow: 0 0 0 3px rgba(230,57,70,0.1);
}

/* Summary Cards */
.att-summary-row {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 22px;
}
.att-summary-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1.5px solid #e2e8f0; border-radius: 14px;
  padding: 16px 14px; display: flex; align-items: center; gap: 12px;
  transition: all 0.3s; position: relative; overflow: hidden;
}
.att-summary-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; }
.att-summary-card.total::before { background: linear-gradient(180deg, #0b2545, #1e3a8a); }
.att-summary-card.present::before { background: linear-gradient(180deg, #10b981, #059669); }
.att-summary-card.late::before { background: linear-gradient(180deg, #f59e0b, #d97706); }
.att-summary-card.absent::before { background: linear-gradient(180deg, #ef4444, #dc2626); }
.att-summary-card.hours::before { background: linear-gradient(180deg, #8b5cf6, #7c3aed); }
.att-summary-card:hover { transform: translateY(-4px); box-shadow: 0 12px 25px rgba(11,37,69,0.08); }
.att-summary-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.att-summary-card.total .att-summary-icon { background: rgba(11,37,69,0.08); }
.att-summary-card.present .att-summary-icon { background: rgba(16,185,129,0.12); }
.att-summary-card.late .att-summary-icon { background: rgba(245,158,11,0.12); }
.att-summary-card.absent .att-summary-icon { background: rgba(239,68,68,0.1); }
.att-summary-card.hours .att-summary-icon { background: rgba(139,92,246,0.12); }
.att-summary-info .label {
  font-size: 10.5px; color: #94a3b8; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 3px;
}
.att-summary-info .value { font-size: 22px; font-weight: 800; color: #0b2545; line-height: 1; }
.att-summary-info .value.green { color: #10b981; }
.att-summary-info .value.orange { color: #f59e0b; }
.att-summary-info .value.red { color: #ef4444; }
.att-summary-info .value.purple { color: #8b5cf6; }

/* Legend */
.att-legend {
  display: flex; gap: 12px; flex-wrap: wrap; padding: 14px 18px;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border: 1.5px solid #e2e8f0; border-radius: 12px;
  margin-bottom: 18px; font-size: 12.5px; font-weight: 700;
  color: #334155; align-items: center;
}
.att-legend-title {
  color: #94a3b8; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.6px; font-weight: 800; margin-right: 4px;
}
.att-legend span:not(.att-legend-title):not(.att-dot) {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 12px; background: #fff;
  border-radius: 20px; border: 1px solid #e2e8f0;
}
.att-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.att-dot.present { background: #10b981; }
.att-dot.late { background: #f59e0b; }
.att-dot.absent { background: #ef4444; }
.att-dot.off { background: #cbd5e1; }

/* Table Container */
.att-excel-box {
  overflow: auto; border: 1.5px solid #e2e8f0; border-radius: 14px;
  background: #fff; max-height: 620px;
  box-shadow: 0 4px 20px rgba(11,37,69,0.06);
}

/* Table */
.att-excel-table {
  border-collapse: separate; border-spacing: 3px;
  font-size: 12px; width: 100%; min-width: 1200px; padding: 4px;
}
.att-excel-table th,
.att-excel-table td {
  border-radius: 6px; padding: 6px 4px; text-align: center;
  vertical-align: middle; min-width: 42px; transition: all 0.15s;
}
.att-excel-table thead th {
  background: linear-gradient(180deg, #0b2545 0%, #1e3a8a 100%);
  color: #fff; font-weight: 700; font-size: 11px;
  position: sticky; top: 0; z-index: 5;
  text-transform: uppercase; letter-spacing: 0.3px;
  padding: 10px 6px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.att-excel-table thead th.staff-name-header {
  background: #071a33; min-width: 200px; text-align: left;
  position: sticky; left: 0; z-index: 10;
  padding-left: 14px; font-size: 11.5px;
}
.att-excel-table tbody td.staff-name-cell {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  font-weight: 700; text-align: left;
  position: sticky; left: 0; z-index: 2;
  color: #0b2545; min-width: 200px;
  padding: 10px 14px; border: 2px solid #cbd5e1;
}
.att-staff-name { font-size: 13.5px; font-weight: 800; color: #0b2545; margin-bottom: 2px; }
.att-staff-meta { font-size: 10.5px; color: #64748b; font-weight: 600; }

/* ==================================================
   DAY CELLS — FIXED (No background change on hover)
   ================================================== */
.att-cell {
  cursor: pointer;
  font-weight: 800;
  position: relative;
  padding: 6px 4px !important;
  border: 2px solid transparent;
  min-width: 44px;
  height: 46px;
  vertical-align: middle;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  /* Background colors neeche classes se aayenge */
}

/* Hover — sirf border + shadow, BACKGROUND CHANGE NAHI */
.att-cell:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(11, 37, 69, 0.3);
  z-index: 3;
  border-color: #0b2545 !important;
  /* ⚠️ YAHAN KOI background NAHI — taaki original color bana rahe */
}

/* Active (selected) cell */
.att-cell.active {
  border-color: #0b2545 !important;
  box-shadow: 0 0 0 3px #f4a261;
}

/* ===== STATUS COLORS ===== */
.att-cell.att-present,
.att-present {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #fff !important;
}
.att-cell.att-late,
.att-late {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
  color: #78350f !important;
}
.att-cell.att-absent,
.att-absent {
  background: linear-gradient(135deg, #f87171 0%, #dc2626 100%) !important;
  color: #fff !important;
}
.att-cell.att-off,
.att-off {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%) !important;
  color: #475569 !important;
}

/* Empty cell (no record) */
.att-cell.empty {
  background: #f8fafc !important;
  color: #94a3b8 !important;
  border: 1.5px dashed #cbd5e1 !important;
}
.att-cell.empty.weekend-col {
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
}

/* Empty cell hover — sirf border */
.att-cell.empty:hover {
  background: #f8fafc !important;
  border-color: #0b2545 !important;
}

/* Today cell */
.att-cell.today-cell {
  border: 2.5px solid #0b2545 !important;
  box-shadow: 0 0 0 2px #f4a261;
}

.att-mark { display: block; font-size: 14px; font-weight: 900; line-height: 1; margin-bottom: 2px; }
.att-day-num { display: block; font-size: 9px; font-weight: 700; opacity: 0.85; line-height: 1; }

/* Header today column */
.att-excel-table th.today-col {
  background: linear-gradient(180deg, #e63946 0%, #c92a37 100%) !important;
}

/* Summary columns */
.att-excel-table th.summary-col {
  background: linear-gradient(180deg, #2a9d8f 0%, #21867a 100%);
  min-width: 55px; font-size: 10.5px;
}
.att-excel-table td.summary-cell {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  font-weight: 800; color: #065f46; font-size: 14px;
  border: 1.5px solid #86efac; min-width: 55px;
}
.att-excel-table td.summary-cell.has-late {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  color: #92400e; border-color: #fdba74;
}
.att-excel-table td.summary-cell.has-absent {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #991b1b; border-color: #fca5a5;
}
.att-excel-table td.summary-cell.hours-sum {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  color: #6d28d9; border-color: #c4b5fd;
}

/* Empty state */
.att-empty-state { text-align: center; padding: 60px 20px; color: #94a3b8; }
.att-empty-state .icon { font-size: 64px; margin-bottom: 16px; opacity: 0.6; }
.att-empty-state h4 { color: #0b2545; font-size: 18px; margin-bottom: 8px; font-weight: 700; }

/* Edit modal info */
.att-edit-info {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-left: 4px solid #3b82f6;
  padding: 14px 18px; border-radius: 10px;
  margin-bottom: 18px; font-size: 13.5px;
  color: #1e40af; font-weight: 600;
}

/* Disabled inputs */
.admin-form-group input:disabled {
  background: #f1f5f9 !important;
  cursor: not-allowed;
  opacity: 0.7;
}

/* ===== QUICK ACTION BUTTONS ===== */
.att-quick-actions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.att-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  min-height: 70px;
}
.att-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}
.att-action-icon { font-size: 20px; }
.att-action-label { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.3px; }
.att-action-btn.present.active {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-color: #10b981;
  box-shadow: 0 4px 12px rgba(16,185,129,0.25);
}
.att-action-btn.present.active .att-action-label { color: #065f46; }
.att-action-btn.late.active {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: #f59e0b;
  box-shadow: 0 4px 12px rgba(245,158,11,0.25);
}
.att-action-btn.late.active .att-action-label { color: #92400e; }
.att-action-btn.absent.active {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-color: #ef4444;
  box-shadow: 0 4px 12px rgba(239,68,68,0.25);
}
.att-action-btn.absent.active .att-action-label { color: #991b1b; }
.att-action-btn.off.active {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  border-color: #64748b;
  box-shadow: 0 4px 12px rgba(100,116,139,0.25);
}
.att-action-btn.off.active .att-action-label { color: #334155; }
.att-action-btn.reset.active {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59,130,246,0.25);
}
.att-action-btn.reset.active .att-action-label { color: #1e40af; }

/* Responsive */
@media (max-width: 1100px) { .att-summary-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) {
  .report-filters { flex-direction: column; align-items: stretch; }
  .att-summary-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .att-summary-row { grid-template-columns: 1fr; }
  .att-quick-actions { grid-template-columns: repeat(2, 1fr); }
}

/* PRINT */
@media print {
  .admin-sidebar, .admin-topbar, .report-filters, .att-legend,
  .admin-box-head button, .admin-toast, .admin-nav-item { display: none !important; }
  .admin-content-area { padding: 0 !important; overflow: visible !important; }
  .att-summary-row { display: none; }
  .att-excel-box { border: none !important; max-height: none !important; overflow: visible !important; }
  
}
 
/* Week Off (Sunday) — blue */
td.att-cell.att-off {
  background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%) !important;
  color: #1e3a8a !important;
  font-weight: 700;
}



/* Sunday column header + empty Sunday cells — blue */
.att-excel-table th.weekend {
  background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%) !important;
  color: #1e3a8a !important;
  font-weight: 800 !important;
}
.att-excel-table td.weekend-col,
.att-cell.empty.weekend-col {
  background: #eff6ff !important;
  color: #1e3a8a !important;
}





/* ===== Table polish: summary columns + staff name ===== */
.att-excel-table thead th.summary-col {
  background: linear-gradient(180deg, #0b2545 0%, #1e3a8a 100%) !important;
  color: #ffffff !important;
}
.att-excel-table td.summary-cell,
.att-excel-table td.summary-cell.has-late,
.att-excel-table td.summary-cell.has-absent,
.att-excel-table td.summary-cell.hours-sum {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #94a3b8 !important;
}
.att-excel-table td.summary-cell.present-sum { color: #059669 !important; }
.att-excel-table td.summary-cell.has-late { color: #d97706 !important; }
.att-excel-table td.summary-cell.has-absent { color: #dc2626 !important; }
.att-excel-table td.summary-cell.hours-sum { color: #1e3a8a !important; }
.att-excel-table tbody td.staff-name-cell {
  background: linear-gradient(90deg, #f1f5f9 0%, #ffffff 70%) !important;
  border: none !important;
  border-left: 3px solid #1e3a8a !important;
}
.att-excel-table tbody tr:hover td.staff-name-cell {
  background: linear-gradient(90deg, #e2e8f0 0%, #f8fafc 70%) !important;
}