/* ===== Attendance Overview Page Styles ===== */

/* ===== Page Header ===== */
.attendance-overview .page-header {
  margin-bottom: 2rem;
  padding: 2rem 0 1rem 0;
}

.attendance-overview .header-content {
  max-width: 800px;
}

.attendance-overview .page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: #4a4a4a;
  background: linear-gradient(135deg, #8bc34a, #6a9e34);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

html.dark-mode .attendance-overview .page-title {
  background: linear-gradient(135deg, #ecf0f1, #a8d85f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.attendance-overview .page-subtitle {
  font-size: 1.1rem;
  color: #546e7a;
  margin: 0;
  font-weight: 400;
}

html.dark-mode .attendance-overview .page-subtitle {
  color: #95a5a6;
}

/* ===== Navigation Tabs ===== */
.attendance-overview .inner-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  background: white;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

html.dark-mode .attendance-overview .inner-tabs {
  background: #2a2a2a;
}

/* Tab Button - Flat color secondary UI control */
.attendance-overview .tab-button {
  flex: 1;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Sora', system-ui, sans-serif;
  color: #495057;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.attendance-overview .tab-button:hover {
  background: white;
  color: #4a6e1a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.attendance-overview .tab-button.active {
  background: linear-gradient(135deg, #8bc34a, #7ab82d);
  color: white;
  box-shadow: 0 3px 10px rgba(139, 195, 74, 0.3);
  transform: translateY(-1px);
}

.attendance-overview .tab-button.active:hover {
  box-shadow: 0 4px 12px rgba(139, 195, 74, 0.4);
}

html.dark-mode .attendance-overview .tab-button {
  background: linear-gradient(135deg, #1e1e1e, #2a2a2a);
  color: #d1d5db;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

html.dark-mode .attendance-overview .tab-button:hover {
  background: #1a1a1a;
  color: #a5d461;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

html.dark-mode .attendance-overview .tab-button.active {
  background: linear-gradient(135deg, #8bc34a, #7ab82d);
  color: white;
  box-shadow: 0 3px 10px rgba(139, 195, 74, 0.3);
}

html.dark-mode .attendance-overview .tab-button.active:hover {
  box-shadow: 0 4px 12px rgba(139, 195, 74, 0.4);
}

.attendance-overview .tab-button i {
  font-size: 1.125rem;
}

/* ===== Main Content Wrapper ===== */
.attendance-overview-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ===== Section Headers ===== */
.attendance-overview .section-header {
  margin-bottom: 1rem;
}

.attendance-overview .section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--header-color);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

html.dark-mode .attendance-overview .section-title {
  color: #ecf0f1;
}

/* ===== Stats Section ===== */
.attendance-overview .stats-section {
  animation: fadeInUp 0.4s ease-out;
}

.attendance-overview .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.attendance-overview .stat-card {
  background: white;
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
}

.attendance-overview .stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: rgba(139, 195, 74, 0.2);
}

html.dark-mode .attendance-overview .stat-card {
  background: #2a2a2a;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

html.dark-mode .attendance-overview .stat-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-color: rgba(139, 195, 74, 0.3);
}

.attendance-overview .stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.attendance-overview .total-icon {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.15));
  color: #3b82f6;
}

.attendance-overview .checked-in-icon {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.15));
  color: #22c55e;
}

.attendance-overview .checked-out-icon {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.15));
  color: #f59e0b;
}

.attendance-overview .absent-icon {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.15));
  color: #ef4444;
}

.attendance-overview .stat-info {
  flex: 1;
  min-width: 0;
}

.attendance-overview .stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: var(--header-color);
}

html.dark-mode .attendance-overview .stat-value {
  color: #ecf0f1;
}

.attendance-overview .stat-label {
  font-size: 0.95rem;
  color: #64748b;
  font-weight: 500;
}

html.dark-mode .attendance-overview .stat-label {
  color: #94a3b8;
}

/* ===== Filters Section ===== */
.attendance-overview .filters-section {
  animation: fadeInUp 0.4s ease-out 0.1s backwards;
}

.attendance-overview .filters-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 2px solid rgba(139, 195, 74, 0.1);
}

html.dark-mode .attendance-overview .filters-card {
  background: #2a2a2a;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  border-color: rgba(139, 195, 74, 0.2);
}

.attendance-overview .filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.attendance-overview .filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.attendance-overview .filter-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #475569;
}

html.dark-mode .attendance-overview .filter-label {
  color: #cbd5e1;
}

.attendance-overview .filter-label i {
  font-size: 0.85rem;
  color: #8bc34a;
}

html.dark-mode .attendance-overview .filter-label i {
  color: #8bc34a;
}

.attendance-overview .filter-input,
.attendance-overview .filter-select {
  width: 100%;
  padding: var(--input-padding-y, 0.75rem) var(--input-padding-x, 1rem);
  min-height: var(--input-height, 44px);
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: 'Sora', system-ui, sans-serif;
  transition: all 0.2s ease;
  background: white;
  color: var(--text-color);
  box-sizing: border-box;
}

.attendance-overview .filter-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.attendance-overview .filter-select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2376a12b' d='M6 3L1 8h10z'/%3E%3C/svg%3E");
}

.attendance-overview .filter-input:focus,
.attendance-overview .filter-select:focus {
  outline: none;
  border-color: #8bc34a;
  box-shadow: 0 0 0 3px rgba(139, 195, 74, 0.1);
}

html.dark-mode .attendance-overview .filter-input,
html.dark-mode .attendance-overview .filter-select {
  background: #1e1e1e;
  border-color: #3a3a3a;
  color: #e0e0e0;
}

html.dark-mode .attendance-overview .filter-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23b0b0b0' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

html.dark-mode .attendance-overview .filter-select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238bc34a' d='M6 3L1 8h10z'/%3E%3C/svg%3E");
}

html.dark-mode .attendance-overview .filter-input:focus,
html.dark-mode .attendance-overview .filter-select:focus {
  border-color: #8bc34a;
  box-shadow: 0 0 0 3px rgba(139, 195, 74, 0.15);
}

.attendance-overview .filter-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.attendance-overview .action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: 'Sora', system-ui, sans-serif;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.attendance-overview .primary-btn {
  background: linear-gradient(135deg, #8bc34a, #7ab82d);
  color: white;
  box-shadow: 0 4px 12px rgba(139, 195, 74, 0.3);
}

.attendance-overview .primary-btn:hover {
  background: linear-gradient(135deg, #8bc34a, #7ab82d);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 195, 74, 0.4);
}

/* ===== Data Sections (Summary & Work Hours) ===== */
.attendance-overview .data-section {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  animation: fadeInUp 0.4s ease-out;
}

html.dark-mode .attendance-overview .data-section {
  background: #2a2a2a;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.attendance-overview .data-section h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--header-color);
  margin: 0 0 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

html.dark-mode .attendance-overview .data-section h4 {
  color: #ecf0f1;
}

/* ===== Chart Section ===== */
.attendance-overview .chart-section {
  animation: fadeInUp 0.4s ease-out 0.2s backwards;
}

.attendance-overview .chart-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 2px solid rgba(139, 195, 74, 0.1);
}

html.dark-mode .attendance-overview .chart-card {
  background: #2a2a2a;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  border-color: rgba(139, 195, 74, 0.2);
}

.attendance-overview .chart-container {
  position: relative;
  height: 400px;
  margin-top: 1rem;
}

.attendance-overview .chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ===== Status Section ===== */
.attendance-overview .status-section {
  animation: fadeInUp 0.4s ease-out 0.3s backwards;
}

.attendance-overview .status-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

html.dark-mode .attendance-overview .status-card {
  background: #2a2a2a;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.attendance-overview .loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: #94a3b8;
}

.attendance-overview .loading-state i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #8bc34a;
}

html.dark-mode .attendance-overview .loading-state i {
  color: #8bc34a;
}

.attendance-overview .loading-state p {
  margin: 0;
  font-size: 0.95rem;
}

/* ===== Tables ===== */
/* Tables now use standardized component styles from /css/components/table.css */

/* Status badges */
.attendance-overview .status-badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.attendance-overview .status-in {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.attendance-overview .status-out {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.attendance-overview .status-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.attendance-overview .status-unknown {
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
}

html.dark-mode .attendance-overview .status-in {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

html.dark-mode .attendance-overview .status-out {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

html.dark-mode .attendance-overview .status-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

html.dark-mode .attendance-overview .status-unknown {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Responsive Design ===== */
@media (max-width: 968px) {
  .attendance-overview .filters-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
  }
}

@media (max-width: 768px) {
  .attendance-overview .page-title {
    font-size: 2rem;
  }

  .attendance-overview .stats-grid {
    grid-template-columns: 1fr;
  }

  .attendance-overview .filters-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .attendance-overview .filter-actions {
    flex-direction: column;
  }

  .attendance-overview .action-btn {
    width: 100%;
    justify-content: center;
  }

  .attendance-overview .chart-container {
    height: 300px;
  }

  .attendance-overview .modern-table {
    font-size: 0.85rem;
  }

  .attendance-overview .modern-table thead th,
  .attendance-overview .modern-table tbody td {
    padding: 0.75rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .attendance-overview .page-title {
    font-size: 1.75rem;
  }

  .attendance-overview .page-subtitle {
    font-size: 1rem;
  }

  .attendance-overview .stat-card {
    padding: 1.25rem;
  }

  .attendance-overview .stat-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }

  .attendance-overview .stat-value {
    font-size: 1.75rem;
  }

  .attendance-overview .filters-card,
  .attendance-overview .chart-card,
  .attendance-overview .status-card,
  .attendance-overview .data-section {
    padding: 1.5rem;
  }
}
