/* ===================================
   HRM Report System - Stylesheet
   Premium Light Theme
   =================================== */

/* --- CSS Variables --- */
:root {
  --bg-primary: #f0f4f8;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-glass: rgba(0, 0, 0, 0.02);
  --bg-input: #f8fafc;

  --border-color: #e2e8f0;
  --border-focus: #3b82f6;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-green: #10b981;
  --accent-purple: #8b5cf6;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;
  --accent-teal: #0d9488;

  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --gradient-green: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
  --gradient-auth: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

  --sidebar-width: 260px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.1);

  --transition: all 0.2s ease;
  --transition-slow: all 0.3s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-blue-hover);
}

/* --- Auth Pages --- */
.auth-body {
  background: var(--gradient-auth);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.auth-body::before {
  content: '';
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  top: -250px;
  right: -250px;
  pointer-events: none;
}

.auth-body::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  bottom: -200px;
  left: -100px;
  pointer-events: none;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: #ffffff;
  border: none;
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.admin-logo {
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

.auth-logo svg {
  width: 28px;
  height: 28px;
  color: white;
}

.auth-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.auth-position {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* --- Forms --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-wrapper {
  position: relative;
}

.input-wrapper svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.input-wrapper input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: #ffffff;
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
}

input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: #ffffff;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

select option {
  background: #ffffff;
  color: var(--text-primary);
}

textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.7;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  align-items: end;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
  color: white;
}

.btn-outline {
  background: #ffffff;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
  border-color: #cbd5e1;
}

.btn-danger {
  background: #ffffff;
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: #fef2f2;
  border-color: var(--accent-red);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

.btn-sm svg {
  width: 15px;
  height: 15px;
}

.btn-google {
  background: #ffffff;
  color: #3c4043;
  border: 1px solid #dadce0;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-google:hover {
  background: #f8f9fa;
  border-color: #d2e3fc;
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.15);
  transform: translateY(-1px);
  color: #1a73e8;
}

.btn-google:active {
  background: #eef0f2;
  transform: translateY(0);
}

/* --- Alert --- */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.alert svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
}

/* --- App Layout --- */
.app-body {
  background: var(--bg-primary);
  min-height: 100vh;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-width);
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-color);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-brand svg {
  width: 24px;
  height: 24px;
  color: var(--accent-blue);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: white;
  flex-shrink: 0;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: white;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.user-role {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-item:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.nav-item.active {
  background: #eff6ff;
  color: var(--accent-blue);
}

.nav-item.logout {
  color: var(--text-muted);
}

.nav-item.logout:hover {
  color: var(--accent-red);
  background: #fef2f2;
}

.sidebar-footer {
  padding: 8px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* --- Main Content --- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px;
  max-width: 100%;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.content-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.content-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- Stats Grid --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stats-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.stats-grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition-slow);
  box-shadow: var(--shadow-xs);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.stat-icon.blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.stat-icon.green {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.stat-icon.purple {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.stat-icon.orange {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* --- Filter Bar --- */
.filter-bar {
  margin-bottom: 24px;
}

.filter-form {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}

.filter-group label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group select {
  padding: 8px 36px 8px 12px;
  font-size: 0.85rem;
}

.filter-actions-group {
  min-width: auto;
}

/* --- Report Cards --- */
.reports-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.report-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition-slow);
  box-shadow: var(--shadow-xs);
}

.report-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.report-week {
  display: flex;
  align-items: center;
  gap: 8px;
}

.week-badge {
  background: #eff6ff;
  color: var(--accent-blue);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
}

.week-year {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.report-date-range {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.report-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-line;
}

.report-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.report-updated {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.report-actions {
  display: flex;
  gap: 8px;
}

.inline-form {
  display: inline;
}

/* --- Table --- */
.table-container {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

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

.data-table thead {
  background: var(--bg-primary);
}

.data-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 14px 16px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.employee-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 500;
}

.content-preview {
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-muted {
  color: var(--text-muted);
}

/* --- Form Card --- */
.form-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-xs);
}

.report-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.date-range-display {
  height: 42px;
  display: flex;
  align-items: center;
}

.date-badge {
  background: #f0fdfa;
  color: var(--accent-teal);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid #99f6e4;
}

/* --- Detail Card --- */
.detail-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.meta-item {
  padding: 16px 20px;
  border-right: 1px solid var(--border-color);
}

.meta-item:last-child {
  border-right: none;
}

.meta-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.meta-value {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.92rem;
}

.detail-content {
  padding: 24px;
}

.detail-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.content-body {
  color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 0.95rem;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state svg {
  width: 64px;
  height: 64px;
  color: #cbd5e1;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  gap: 12px;
  flex-wrap: wrap;
}

.page-info {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.page-links {
  display: flex;
  gap: 4px;
}

.page-link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  background: #ffffff;
}

.page-link:hover {
  background: var(--bg-primary);
  border-color: #cbd5e1;
  color: var(--text-primary);
}

.page-link.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
}

/* --- Error Page --- */
.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  text-align: center;
  padding: 20px;
}

.error-page h1 {
  font-size: 5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.error-page p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 24px;
}

/* --- Status Badges --- */
.status-badge {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
}

.status-active {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.status-inactive {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.slug-link {
  background: var(--bg-primary);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--accent-blue);
  font-family: 'SFMono-Regular', Consolas, monospace;
  border: 1px solid var(--border-color);
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-card {
  animation: fadeIn 0.4s ease;
}

.stat-card {
  animation: fadeIn 0.3s ease backwards;
}
.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: 0.05s; }
.stat-card:nth-child(3) { animation-delay: 0.1s; }
.stat-card:nth-child(4) { animation-delay: 0.15s; }

.report-card {
  animation: fadeIn 0.3s ease backwards;
}
.report-card:nth-child(1) { animation-delay: 0s; }
.report-card:nth-child(2) { animation-delay: 0.05s; }
.report-card:nth-child(3) { animation-delay: 0.1s; }
.report-card:nth-child(4) { animation-delay: 0.15s; }
.report-card:nth-child(5) { animation-delay: 0.2s; }

/* --- Project Badge --- */
.project-badge {
  background: #f0fdf4;
  color: #15803d;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid #bbf7d0;
}

/* --- Checkbox Group (Members) --- */
.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 8px;
  padding: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  max-height: 300px;
  overflow-y: auto;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.88rem;
}

.checkbox-label:hover {
  background: #ffffff;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--accent-blue);
  cursor: pointer;
}

.checkbox-text {
  color: var(--text-primary);
  font-weight: 500;
}

.checkbox-text small {
  font-weight: 400;
}

/* --- Member List & Tags --- */
.member-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.member-count {
  font-weight: 600;
  color: var(--accent-blue);
  font-size: 0.85rem;
}

.member-names {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.member-tag {
  background: #eff6ff;
  color: var(--accent-blue);
  padding: 2px 8px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* --- Report Sections --- */
.report-section {
  margin-bottom: 8px;
}

.report-section strong {
  color: var(--text-primary);
  font-size: 0.82rem;
}

.report-section p {
  margin-top: 4px;
}

.detail-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.detail-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.detail-section h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

/* --- Action Buttons --- */
.action-buttons {
  display: flex;
  gap: 8px;
}

/* --- Input Disabled --- */
.input-disabled {
  background: var(--bg-primary) !important;
  color: var(--text-secondary) !important;
  cursor: not-allowed;
  border-color: var(--border-color) !important;
}

/* --- Row Inactive --- */
.row-inactive {
  opacity: 0.6;
}

.row-inactive td {
  color: var(--text-muted) !important;
}

/* --- Required --- */
.required {
  color: var(--accent-red);
}

/* --- Form Row 2-column --- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: end;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .stats-grid-4,
  .stats-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .main-content {
    margin-left: 0;
    padding: 20px;
  }
  .content-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .stats-grid,
  .stats-grid-4,
  .stats-grid-5 {
    grid-template-columns: 1fr !important;
  }
  .filter-form {
    flex-direction: column;
  }
  .filter-group {
    min-width: 100%;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .report-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .report-footer {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  .data-table {
    font-size: 0.8rem;
  }
  .data-table th,
  .data-table td {
    padding: 10px 8px;
  }
  .detail-meta {
    grid-template-columns: 1fr;
  }
  .meta-item {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .pagination {
    flex-direction: column;
    align-items: center;
  }
}

/* ===================================
   SCHEDULE STYLES
   =================================== */

/* --- Week Navigation --- */
.week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
}

.week-current {
  text-align: center;
}

.week-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.week-range {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* --- Schedule Card --- */
.schedule-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}

/* --- Schedule Grid (View) --- */
.schedule-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.schedule-header-row,
.schedule-row {
  display: grid;
  grid-template-columns: 100px repeat(auto-fill, minmax(80px, 1fr));
  gap: 2px;
}

.schedule-header-row {
  margin-bottom: 4px;
}

.schedule-session-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 12px;
}

.session-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.session-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.schedule-day-header {
  text-align: center;
  padding: 8px 4px;
}

.day-name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.work-mode-indicator {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 20px;
  margin-top: 2px;
}

.work-mode-offline {
  background: #fef3c7;
  color: #92400e;
}

.work-mode-online {
  background: #dbeafe;
  color: #1e40af;
}

/* --- Schedule Cells --- */
.schedule-cell {
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: var(--transition);
}

.cell-active {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.cell-active.cell-offline {
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.cell-active.cell-online {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.cell-empty {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
}

.cell-check {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-green);
}

.cell-mode {
  font-size: 0.75rem;
}

.mode-chip {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
}

.mode-chip.mode-offline {
  background: #fef3c7;
}

.mode-chip.mode-online {
  background: #dbeafe;
}

.mode-chip.mode-pending {
  background: #fffbeb;
  color: #b45309;
}

.cell-empty-mark {
  color: var(--text-muted);
  font-size: 1rem;
}

/* --- Schedule Stats --- */
.schedule-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 16px 24px;
  margin-top: 16px;
  background: linear-gradient(135deg, #f0f9ff 0%, #f0fdf4 100%);
  border-radius: var(--radius-sm);
  border: 1px solid #e0f2fe;
}

.stat-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.stat-item .stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-blue);
}

.stat-item .stat-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.stat-divider {
  width: 1px;
  height: 24px;
  background: var(--border-color);
}

.register-stats {
  transition: var(--transition);
}

.stats-flash {
  transform: scale(1.02);
  border-color: var(--accent-blue);
}

/* --- Registration Grid --- */
.register-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.register-header-row,
.register-row {
  display: grid;
  grid-template-columns: 100px repeat(auto-fill, minmax(80px, 1fr));
  gap: 4px;
}

.register-header-row {
  margin-bottom: 6px;
}

.register-day-header {
  text-align: center;
  padding: 8px 4px;
}

.register-label-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 12px;
}

.register-cell {
  position: relative;
  cursor: pointer;
}

.register-cell input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 0;
  height: 0;
}

.register-cell .cell-visual {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px 8px;
  text-align: center;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  background: var(--bg-primary);
}

.register-cell:hover .cell-visual {
  border-color: #93c5fd;
  background: #f0f9ff;
}

.register-cell input:checked + .cell-visual {
  border-color: var(--accent-blue);
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.cell-checkbox-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.cell-checkbox-icon svg {
  width: 14px;
  height: 14px;
  color: white;
  opacity: 0;
  transition: var(--transition);
}

.register-cell input:checked + .cell-visual .cell-checkbox-icon {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  animation: checkPop 0.25s ease;
}

.register-cell input:checked + .cell-visual .cell-checkbox-icon svg {
  opacity: 1;
}

@keyframes checkPop {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* --- Countdown Bar --- */
.countdown-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: var(--accent-blue);
}

.countdown-bar strong {
  font-family: 'Inter', monospace;
  font-weight: 700;
  font-size: 1rem;
}

.countdown-expired {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
  color: var(--accent-red) !important;
}

/* --- Registration Closed --- */
.registration-closed {
  text-align: center;
  padding: 40px 20px;
}

.closed-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.registration-closed h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.registration-closed p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

/* --- Employee Type Badges --- */
.badge-fulltime {
  background: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.badge-parttime {
  background: #f5f3ff !important;
  color: #7c3aed !important;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

/* --- Employee Type Selector --- */
.employee-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.type-option {
  cursor: pointer;
}

.type-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.type-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  background: var(--bg-primary);
}

.type-option:hover .type-card {
  border-color: #93c5fd;
}

.type-option input:checked + .type-card {
  border-color: var(--accent-blue);
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.type-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.type-icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

.type-fulltime {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.type-parttime {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.type-info {
  display: flex;
  flex-direction: column;
}

.type-info strong {
  font-size: 0.9rem;
}

.type-info span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* --- Work Mode Config --- */
.workday-mode-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.workday-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
}

.workday-mode-row:last-child {
  border-bottom: none;
}

.workday-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

.workday-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.work-mode-toggle {
  display: flex;
  gap: 6px;
  transition: var(--transition);
}

.mode-option {
  cursor: pointer;
}

.mode-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.mode-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  border: 2px solid var(--border-color);
  transition: var(--transition);
}

.mode-option:hover .mode-badge {
  border-color: #93c5fd;
}

.mode-option input:checked + .mode-offline {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.mode-option input:checked + .mode-online {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1e40af;
}

/* --- Toggle Switch --- */
.toggle-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  margin-top: 2px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #cbd5e1;
  border-radius: 26px;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-blue);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* --- Schedule Matrix Table --- */
.schedule-matrix td {
  vertical-align: middle;
}

.schedule-matrix-cell {
  padding: 8px 4px !important;
}

.matrix-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.matrix-full {
  background: #dcfce7;
  color: #166534;
}

.matrix-morning {
  background: #dbeafe;
  color: #1e40af;
}

.matrix-afternoon {
  background: #fef3c7;
  color: #92400e;
}

.matrix-empty {
  background: var(--bg-primary);
  color: var(--text-muted);
}

.matrix-mode-icon {
  display: block;
  font-size: 0.8rem;
  margin-top: 2px;
}

.matrix-wfh-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 4px;
  margin-top: 2px;
}

.matrix-wfh-badge.pending {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.matrix-wfh-badge.approved {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.today-col {
  background-color: #f0fdf4 !important;
  border-bottom: 2px solid #22c55e !important;
}

.today-col-cell {
  background-color: #f8fafc !important;
  border-left: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
}

/* --- Pending WFH --- */
.pending-wfh-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pending-wfh-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  gap: 12px;
}

.wfh-info {
  flex: 1;
  font-size: 0.85rem;
}

.wfh-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.pending-request-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.pending-request-item:last-child {
  border-bottom: none;
}

/* --- Remote Request Form --- */
.remote-request-form .form-row {
  align-items: end;
}

/* --- Responsive Schedule --- */
@media (max-width: 768px) {
  .schedule-header-row,
  .schedule-row,
  .register-header-row,
  .register-row {
    grid-template-columns: 70px repeat(auto-fill, minmax(60px, 1fr));
  }

  .schedule-stats {
    flex-wrap: wrap;
    gap: 12px;
  }

  .schedule-cell {
    min-height: 48px;
    padding: 8px 4px;
  }

  .register-cell .cell-visual {
    min-height: 48px;
    padding: 12px 4px;
  }

  .week-nav {
    flex-direction: column;
    gap: 8px;
  }

  .employee-type-selector {
    grid-template-columns: 1fr;
  }

  .pending-wfh-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .wfh-actions {
    width: 100%;
  }

  .countdown-bar {
    flex-direction: column;
    text-align: center;
  }
}

/* --- Registration Status Bar --- */
.registration-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}

.registration-status-bar .status-icon {
  font-size: 1.1rem;
}

.status-registered {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.status-approved {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.status-pending {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.status-rejected {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.status-open {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.status-not_yet {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.status-not_registered {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.employee-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
