/* ===================================================
   ABSENSI APP — Design System
   Premium dark mode with glassmorphism
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
  /* Colors */
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-glass-hover: rgba(255, 255, 255, 0.08);
  --bg-glass-strong: rgba(255, 255, 255, 0.1);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-primary: #10b981;
  --accent-primary-glow: rgba(16, 185, 129, 0.3);
  --accent-primary-dim: rgba(16, 185, 129, 0.15);
  --accent-secondary: #3b82f6;
  --accent-secondary-glow: rgba(59, 130, 246, 0.3);
  --accent-danger: #ef4444;
  --accent-danger-glow: rgba(239, 68, 68, 0.3);
  --accent-warning: #f59e0b;
  --accent-warning-glow: rgba(245, 158, 11, 0.3);
  --accent-info: #6366f1;
  --accent-info-glow: rgba(99, 102, 241, 0.3);

  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(16, 185, 129, 0.4);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --gradient-bg: radial-gradient(ellipse at top, #1e293b 0%, #0a0e1a 50%);
  --gradient-hero: radial-gradient(circle at 30% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
                   radial-gradient(circle at 70% 80%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow-green: 0 0 30px rgba(16, 185, 129, 0.2);
  --shadow-glow-blue: 0 0 30px rgba(59, 130, 246, 0.2);
  --shadow-glow-red: 0 0 30px rgba(239, 68, 68, 0.2);

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Borders */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50%;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--gradient-bg);
  min-height: 100vh;
}

a { color: var(--accent-secondary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ── Glass Card ── */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  transition: all var(--transition-base);
}

.glass-card:hover {
  background: var(--bg-glass-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-glow-green);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.35);
}

.btn-secondary {
  background: var(--gradient-secondary);
  color: white;
  box-shadow: var(--shadow-glow-blue);
}

.btn-secondary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.35);
}

.btn-danger {
  background: var(--gradient-danger);
  color: white;
  box-shadow: var(--shadow-glow-red);
}

.btn-danger:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.35);
}

.btn-ghost {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-glass-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: var(--font-size-xs);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: var(--font-size-lg);
  border-radius: var(--radius-lg);
}

.btn-full { width: 100%; }

/* Button loading spinner */
.btn .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ── Forms ── */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-dim);
}

.form-input::placeholder, .form-textarea::placeholder {
  color: var(--text-muted);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 18px;
  padding-right: 2.5rem;
}

.form-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

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

.form-error {
  font-size: var(--font-size-xs);
  color: var(--accent-danger);
  margin-top: var(--spacing-xs);
}

/* ── Status Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.25rem 0.75rem;
  font-size: var(--font-size-xs);
  font-weight: 600;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: var(--accent-primary-dim);
  color: var(--accent-primary);
}

.badge-warning {
  background: var(--accent-warning-glow);
  color: var(--accent-warning);
}

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

.badge-info {
  background: var(--accent-info-glow);
  color: var(--accent-info);
}

.badge-neutral {
  background: var(--bg-glass-strong);
  color: var(--text-secondary);
}

/* ── Tables ── */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

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

th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: 0.75rem 1rem;
  font-size: var(--font-size-sm);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

tr:hover td {
  background: var(--bg-glass);
}

tr:last-child td {
  border-bottom: none;
}

/* ── Stat Cards ── */
.stat-card {
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

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

.stat-value {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  line-height: 1;
  margin-bottom: var(--spacing-xs);
}

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Navigation ── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-xl);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.navbar-brand span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.navbar-user-info {
  text-align: right;
}

.navbar-user-name {
  font-size: var(--font-size-sm);
  font-weight: 600;
}

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

/* Bottom Nav (Mobile) */
.bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  z-index: 100;
  padding: var(--spacing-sm) 0;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--spacing-sm);
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
  border: none;
  background: none;
  font-family: var(--font-family);
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
  color: var(--accent-primary);
}

.bottom-nav-item .nav-icon {
  font-size: 1.25rem;
}

/* ── Tabs (Admin) ── */
.tabs {
  display: flex;
  gap: var(--spacing-xs);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--spacing-xl);
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 0.75rem 1.25rem;
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-secondary);
}

.tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

.modal-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
}

.modal-actions {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: flex-end;
  margin-top: var(--spacing-xl);
}

/* ── Toast / Notification ── */
.toast-container {
  position: fixed;
  top: var(--spacing-lg);
  right: var(--spacing-lg);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.toast {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 3.7s;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  max-width: 360px;
  box-shadow: var(--shadow-lg);
}

.toast-success {
  background: rgba(16, 185, 129, 0.9);
  color: white;
}

.toast-error {
  background: rgba(239, 68, 68, 0.9);
  color: white;
}

.toast-info {
  background: rgba(59, 130, 246, 0.9);
  color: white;
}

/* ── Clock-In/Out Button ── */
.clock-btn {
  width: 180px;
  height: 180px;
  border-radius: var(--radius-full);
  border: 3px solid;
  font-family: var(--font-family);
  font-size: var(--font-size-lg);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

.clock-btn::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: var(--radius-full);
  border: 2px solid;
  opacity: 0;
  transition: all var(--transition-base);
}

.clock-btn-in {
  background: var(--gradient-primary);
  border-color: var(--accent-primary);
  color: white;
  box-shadow: var(--shadow-glow-green);
}

.clock-btn-in::before {
  border-color: var(--accent-primary);
}

.clock-btn-in:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 0 50px rgba(16, 185, 129, 0.4);
}

.clock-btn-in:hover:not(:disabled)::before {
  opacity: 0.5;
}

.clock-btn-out {
  background: var(--gradient-danger);
  border-color: var(--accent-danger);
  color: white;
  box-shadow: var(--shadow-glow-red);
}

.clock-btn-out::before {
  border-color: var(--accent-danger);
}

.clock-btn-out:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 0 50px rgba(239, 68, 68, 0.4);
}

.clock-btn-out:hover:not(:disabled)::before {
  opacity: 0.5;
}

.clock-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.clock-btn .clock-icon {
  font-size: 2rem;
}

.clock-btn .clock-label {
  font-size: var(--font-size-sm);
  opacity: 0.9;
}

/* Pulse animation for active clock button */
.clock-btn-in:not(:disabled) {
  animation: pulseGreen 2s ease-in-out infinite;
}

/* ── Location Status ── */
.location-status {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
}

.location-status.in-radius {
  background: var(--accent-primary-dim);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-primary);
}

.location-status.out-radius {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--accent-danger);
}

.location-status.loading {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.location-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.location-dot.active {
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
  animation: blink 1.5s ease-in-out infinite;
}

.location-dot.inactive {
  background: var(--accent-danger);
}

.location-dot.loading {
  background: var(--text-muted);
  animation: blink 1s ease-in-out infinite;
}

/* ── Utility ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-xl);
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.gap-xl { gap: var(--spacing-xl); }

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

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: var(--font-size-sm); }
.text-xs { font-size: var(--font-size-xs); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--accent-primary); }
.text-danger { color: var(--accent-danger); }
.text-warning { color: var(--accent-warning); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

.hidden { display: none !important; }

.w-full { width: 100%; }

.empty-state {
  text-align: center;
  padding: var(--spacing-2xl);
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  opacity: 0.5;
}

/* ── Login Page ── */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
  background: var(--gradient-bg);
  position: relative;
  overflow: hidden;
}

.login-wrapper::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  pointer-events: none;
}

.login-wrapper::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.login-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.login-logo {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
}

.login-title {
  font-size: var(--font-size-2xl);
  font-weight: 800;
}

.login-title span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  margin-top: var(--spacing-xs);
}

/* ── Dashboard Layout ── */
.dashboard-wrapper {
  min-height: 100vh;
  padding-bottom: 80px; /* Space for bottom nav */
}

.page-header {
  margin-bottom: var(--spacing-xl);
}

.greeting {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.greeting-name {
  font-size: var(--font-size-2xl);
  font-weight: 700;
}

.date-display {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-top: var(--spacing-xs);
}

/* Clock area */
.clock-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-xl) 0;
}

.current-time {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Today status */
.today-status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.today-status-item {
  text-align: center;
  padding: var(--spacing-md);
  background: var(--bg-glass);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.today-status-label {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--spacing-xs);
}

.today-status-value {
  font-size: var(--font-size-lg);
  font-weight: 700;
}

/* ── Admin Dashboard ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.stat-card .stat-icon {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
}

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulseGreen {
  0%, 100% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.2); }
  50% { box-shadow: 0 0 40px rgba(16, 185, 129, 0.4); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .container {
    padding: var(--spacing-md);
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

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

  .today-status {
    grid-template-columns: repeat(3, 1fr);
  }

  .clock-btn {
    width: 150px;
    height: 150px;
    font-size: var(--font-size-base);
  }

  .clock-btn .clock-icon {
    font-size: 1.5rem;
  }

  .tabs {
    gap: 0;
  }

  .tab-btn {
    padding: 0.6rem 0.8rem;
    font-size: var(--font-size-xs);
  }

  .navbar {
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .modal {
    padding: var(--spacing-lg);
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .login-card {
    padding: var(--spacing-lg);
  }

  .current-time {
    font-size: var(--font-size-3xl);
  }
}
