/* 
   ATTENDANCE SYSTEM - MAIN STYLES
  */

:root {
  /* Light Mode Colors */
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border-color: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --accent-primary: #4f46e5;
  --accent-hover: #4338ca;
  --accent-light: #eef2ff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
}

[data-theme="dark"] {
  /* Dark Mode Colors */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  --accent-primary: #6366f1;
  --accent-hover: #818cf8;
  --accent-light: #312e81;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --info: #60a5fa;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  fill: var(--text-primary);
}

/* Container Styles */
.container-custom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.card-custom {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.card-custom:hover {
  box-shadow: var(--shadow-lg);
}

/* Typography */
.heading-primary {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.heading-secondary {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.heading-tertiary {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.text-muted-custom {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Buttons */
.btn-custom {
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-primary-custom {
  background: var(--accent-primary);
  color: white;
}

.btn-primary-custom:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.btn-secondary-custom {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary-custom:hover {
  background: var(--border-color);
  transform: translateY(-2px);
}

.btn-success-custom {
  background: var(--success);
  color: white;
}

.btn-success-custom:hover {
  background: #059669;
  transform: translateY(-2px);
}

.btn-danger-custom {
  background: var(--danger);
  color: white;
}

.btn-danger-custom:hover {
  background: #dc2626;
  transform: translateY(-2px);
}

.btn-warning-custom {
  background: var(--warning);
  color: white;
}

.btn-warning-custom:hover {
  background: #d97706;
}

.btn-sm-custom {
  padding: 8px 16px;
  font-size: 0.875rem;
}

/* Form Elements */
.form-group-custom {
  margin-bottom: 20px;
}

.form-label-custom {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.form-control-custom {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-control-custom:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-select-custom {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
}

textarea.form-control-custom {
  resize: vertical;
  min-height: 100px;
}

/* Alert Messages */
.alert-custom {
  padding: 16px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-left: 4px solid var(--success);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-left: 4px solid var(--danger);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border-left: 4px solid var(--warning);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
  border-left: 4px solid var(--info);
}

/* Navigation Header */
.nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.nav-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Event/List Items */
.list-item-custom {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
}

.list-item-custom:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.list-item-content {
  flex: 1;
}

.list-item-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.list-item-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.list-item-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Table Styles */
.table-custom {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 20px;
}

.table-custom thead {
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--border-color);
}

.table-custom th {
  padding: 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table-custom tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s ease;
}

.table-custom tbody tr:hover {
  background: var(--bg-secondary);
}

.table-custom td {
  padding: 16px;
  color: var(--text-primary);
}

/* Status Badges */
.status-badge {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
}

.status-approved {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.status-pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.status-rejected {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

/* Scanner Section */
.scanner-section {
  background: var(--bg-secondary);
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
  text-align: center;
}

.scanner-container {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  margin: 20px auto;
  max-width: 500px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .heading-primary {
    font-size: 1.5rem;
  }
  
  .card-custom {
    padding: 20px;
  }
  
  .nav-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .nav-actions {
    width: 100%;
  }
  
  .btn-custom {
    width: 100%;
    justify-content: center;
  }
  
  .list-item-custom {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .table-custom {
    font-size: 0.85rem;
  }
  
  .table-custom th,
  .table-custom td {
    padding: 10px 8px;
  }
  
  .theme-toggle {
    top: 10px;
    right: 10px;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 576px) {
  .container-custom {
    padding: 15px;
  }
  
  .list-item-meta {
    flex-direction: column;
    gap: 8px;
  }
  
  .btn-sm-custom {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}

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

.fade-in {
  animation: fadeIn 0.5s ease;
}

/* Utility Classes */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.text-center { text-align: center; }
.text-right { text-align: right; }

.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.w-100 { width: 100%; }
.hidden { display: none; }