*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

.app {
  min-height: 100vh;
}

.sidebar {
  background: var(--bg-sidebar);
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  padding: 24px 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 8px;
  flex-shrink: 0;
}

.sidebar-brand-logo {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: var(--primary-text);
  flex-shrink: 0;
}

.sidebar-brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.sidebar-clock {
  padding: 12px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 8px;
  flex-shrink: 0;
}

.sidebar-clock-time {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.sidebar-clock-date {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  text-transform: capitalize;
  margin-top: 2px;
}

.sidebar-section-title {
  padding: 16px 20px 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
}

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

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
  white-space: nowrap;
}

.sidebar-link:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-inverse);
  text-decoration: none;
}

.sidebar-link.active {
  background: rgba(215, 240, 106, 0.12);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-link-icon {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-spacer { flex: 1; }

.sidebar-footer {
  padding: 12px 8px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.sidebar-footer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  margin-bottom: 8px;
}

.sidebar-icon-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-icon-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-inverse);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.sidebar-user:hover {
  background: rgba(255,255,255,0.06);
}

.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary-text);
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-inverse);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  font-size: 0.8125rem;
  transition: all var(--transition);
  margin-top: 4px;
}

.sidebar-logout:hover {
  background: rgba(220, 38, 38, 0.15);
  color: #f87171;
  text-decoration: none;
}

.sidebar-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1100;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  color: var(--text-main);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}

.main {
  margin-left: var(--sidebar-w);
  padding: 32px;
  min-height: 100vh;
}

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

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-soft);
  margin-top: 2px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.card h2, .card h3 {
  margin-bottom: 16px;
  color: var(--text-main);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}

.btn:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-text);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--primary-strong);
  border-color: var(--primary-strong);
  box-shadow: 0 4px 12px rgba(215, 240, 106, 0.3);
}

.btn-secondary {
  background: var(--bg-hover);
  border-color: var(--border);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-secondary.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-text);
  font-weight: 600;
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.btn-warning {
  background: var(--warning);
  border-color: var(--warning);
  color: #fff;
}

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

.btn-success {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #15803d;
  border-color: #15803d;
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--bg-hover);
}

.btn-block { width: 100%; }
.btn-large { padding: 14px 28px; font-size: 1.05rem; }
.btn-small { padding: 6px 14px; font-size: 0.8125rem; }
.btn-icon { margin-right: 4px; }

.btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-main);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-family: var(--font);
  background: var(--bg-input);
  color: var(--text-main);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(215, 240, 106, 0.2);
}

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

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  align-items: end;
}

.inline-form { display: inline; }

.flex-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.flex-end {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

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

.form-flex-1 { flex: 1; min-width: 200px; }
.form-flex-2 { flex: 2; min-width: 300px; }

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.alert-success {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid var(--success);
}

.alert-error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.alert-warning {
  background: var(--warning-soft);
  color: #92400e;
  border: 1px solid var(--warning);
}

[data-theme="dark"] .alert-warning {
  color: var(--warning);
}

.alert-info {
  background: var(--info-soft);
  color: #0c4a6e;
  border: 1px solid var(--info);
}

[data-theme="dark"] .alert-info {
  color: var(--info);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
}

.badge-active,
.badge-success {
  background: var(--success-soft);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-soft);
  color: #92400e;
}

[data-theme="dark"] .badge-warning {
  background: var(--warning-soft);
  color: var(--warning);
  font-weight: 600;
}

.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge-info {
  background: var(--info-soft);
  color: #0c4a6e;
}

[data-theme="dark"] .badge-info {
  background: var(--info-soft);
  color: var(--info);
}

.badge-secondary {
  background: var(--bg-hover);
  color: var(--text-soft);
}

.badge-admin {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}

[data-theme="dark"] .badge-admin {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}

.badge-user {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

[data-theme="dark"] .badge-user {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.table-responsive { overflow-x: auto; }

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

.entries-table th,
.data-table th,
.table th {
  background: var(--bg-main);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border);
}

.entries-table td,
.data-table td,
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  font-size: 0.9375rem;
}

.entries-table tbody tr:hover,
.data-table tbody tr:hover,
.table tbody tr:hover {
  background: var(--bg-hover);
}

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

.entries-table tfoot {
  font-weight: 700;
  background: var(--bg-main);
}

.no-data {
  text-align: center;
  color: var(--text-soft);
  padding: 48px 24px;
  font-size: 0.9375rem;
}

.no-data-card {
  background: var(--bg-card);
  padding: 48px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  color: var(--text-soft);
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-overlay);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.modal.active { display: flex; }

.modal-content {
  background: var(--bg-card);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  color: var(--text-main);
  margin: 0;
  font-size: 1.125rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-soft);
  padding: 4px;
  border-radius: 6px;
  transition: all var(--transition);
}

.modal-close:hover {
  color: var(--text-main);
  background: var(--bg-hover);
}

.modal-subtitle {
  margin: 4px 0 0 0;
  font-size: 0.8125rem;
  color: var(--text-soft);
}

.form-section-title {
  margin: 0 0 10px 0;
  font-size: 0.875rem;
  color: var(--text-main);
  font-weight: 600;
}

.tabs-container { margin-bottom: 24px; }

.tabs,
.view-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-card);
  padding: 6px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  border: 1px solid var(--border);
  flex-wrap: wrap;
}

.tabs .tab,
.view-tabs .tab {
  padding: 10px 20px;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font);
  font-size: 0.875rem;
  color: var(--text-soft);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  text-align: center;
}

.view-tabs .tab { flex: 1; }

.tabs .tab:hover,
.view-tabs .tab:hover {
  color: var(--text-main);
  background: var(--bg-hover);
}

.tabs .tab.active,
.view-tabs .tab.active {
  color: var(--primary-text);
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(215, 240, 106, 0.3);
}

.tabs .tab.active:hover,
.view-tabs .tab.active:hover {
  background: var(--primary-strong);
}

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

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}

.toast {
  background: var(--bg-card);
  color: var(--text-main);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s ease-out;
  border-left: 4px solid var(--primary);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }

.toast-icon { font-size: 1.25rem; flex-shrink: 0; }
.toast-content { flex: 1; font-size: 0.9375rem; }

.toast-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-soft);
  padding: 0;
  line-height: 1;
}

.toast-close:hover { color: var(--text-main); }

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--bg-main);
}

.login-card {
  background: var(--bg-card);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border);
}

.login-card h1 {
  text-align: center;
  color: var(--primary);
  margin-bottom: 8px;
  font-size: 1.75rem;
}

.subtitle {
  text-align: center;
  color: var(--text-soft);
  margin-bottom: 28px;
  font-size: 0.9375rem;
}

.login-info {
  margin-top: 20px;
  padding: 14px;
  background: var(--bg-main);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--text-soft);
  border: 1px solid var(--border);
}

.login-info p { margin: 4px 0; }

.clock-card {
  background: var(--bg-card);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.current-time {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.current-date {
  font-size: 1rem;
  color: var(--text-soft);
  margin-bottom: 24px;
  text-transform: capitalize;
}

.clock-form { margin-top: 20px; }

.lunch-timer {
  background: linear-gradient(135deg, var(--info), #0284c7);
  color: #fff;
  padding: 20px;
  border-radius: var(--radius);
  margin: 20px 0;
  transition: all 0.3s ease;
}

[data-theme="dark"] .lunch-timer {
  background: linear-gradient(135deg, #1e40af, #0c4a6e);
}

.lunch-timer-label {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.9;
}

.lunch-timer-display {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.lunch-alert {
  margin-top: 12px;
  padding: 10px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  animation: pulse 1.5s ease-in-out infinite;
}

.lunch-timer.blink {
  animation: blink-red 1s ease-in-out infinite;
}

.lunch-time-display { display: inline-block; }

.work-duration-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: var(--primary-text);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  margin-bottom: 24px;
}

.work-duration-label {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
}

.work-duration-time {
  font-size: 3rem;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 6px;
}

.work-duration-subtitle {
  font-size: 0.8125rem;
  opacity: 0.8;
}

.entries-section,
.admin-filters,
.report-section,
.hours-summary,
.daily-hours-section,
.weekly-hours-section,
.users-summary {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  border: 1px solid var(--border);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.entries-section h2,
.admin-filters h2,
.hours-summary h2,
.users-summary h2 {
  margin-bottom: 20px;
  color: var(--text-main);
}

.report-header {
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.report-header h3 { margin-bottom: 6px; }
.report-header p { color: var(--text-soft); font-size: 0.9375rem; }

.total-hours {
  margin-top: 12px;
  font-size: 1.125rem;
  color: var(--primary);
  font-weight: 600;
}

.report-actions {
  margin-top: 24px;
  text-align: center;
}

.filter-form { display: flex; flex-direction: column; }

.table-filters {
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.filter-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: end;
}

.filter-group {
  flex: 1;
  min-width: 180px;
}

.filter-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text-main);
  font-size: 0.8125rem;
}

.filter-group input,
.filter-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  background: var(--bg-input);
  color: var(--text-main);
  font-family: var(--font);
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.summary-card {
  background: var(--bg-main);
  padding: 20px;
  border-radius: var(--radius-sm);
  text-align: center;
  border: 1px solid var(--border);
}

.card-label {
  font-size: 0.8125rem;
  color: var(--text-soft);
  margin-bottom: 6px;
}

.card-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
}

.daily-hours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
}

.daily-card {
  background: var(--bg-main);
  padding: 14px;
  border-radius: var(--radius-sm);
  text-align: center;
  border: 2px solid transparent;
}

.daily-card.today {
  border-color: var(--primary);
  background: rgba(215, 240, 106, 0.08);
}

.day-name {
  font-size: 0.8125rem;
  color: var(--text-soft);
  text-transform: uppercase;
  margin-bottom: 2px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.day-date {
  font-size: 0.8125rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

.day-hours {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--border);
}

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

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon.primary { background: rgba(215, 240, 106, 0.15); color: #7a8a20; }
[data-theme="dark"] .stat-icon.primary { background: rgba(215, 240, 106, 0.1); color: var(--primary); }
.stat-icon.success { background: var(--success-soft); color: var(--success); }
.stat-icon.warning { background: var(--warning-soft); color: var(--warning); }
.stat-icon.info { background: var(--info-soft); color: var(--info); }

.stat-content { flex: 1; }
.stat-label { font-size: 0.8125rem; color: var(--text-soft); margin-bottom: 2px; }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--text-main); }
.stat-subtitle { font-size: 0.75rem; color: var(--text-soft); margin-top: 2px; }

.progress-container {
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

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

.progress-label { font-weight: 600; color: var(--text-main); }
.progress-value { font-weight: 700; color: var(--primary); }

.progress-bar-container {
  width: 100%;
  height: 10px;
  background: var(--bg-main);
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-strong));
  border-radius: 5px;
  transition: width 0.3s ease;
}

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

.progress-time-display {
  margin-top: 12px;
  text-align: center;
  padding: 10px;
  background: var(--bg-main);
  border-radius: var(--radius-sm);
}

.progress-current-time { font-size: 0.9375rem; font-weight: 600; color: var(--text-main); }
.progress-detail { font-size: 0.875rem; color: var(--text-soft); }
.progress-detail strong { color: var(--text-main); }

.user-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

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

.user-card.card-active { border-color: var(--success); background: var(--success-soft); }
.user-card.card-lunch { border-color: var(--warning); background: var(--warning-soft); }

.user-card.card-lunch-caution {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.user-card.card-lunch-warning {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.15);
}

.user-card.card-lunch-overtime {
  border-color: var(--danger);
  background: var(--danger-soft);
  animation: pulse-danger 2s ease-in-out infinite;
}

.user-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 12px;
}

.status-badge {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-online {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid var(--success);
}

.status-lunch {
  background: var(--warning-soft);
  color: var(--warning);
  border: 1px solid var(--warning);
}

.status-lunch-caution,
.status-lunch-warning,
.status-lunch-overtime {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.gps-status-indicator {
  background: none;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.gps-status-indicator:hover { background: rgba(255,255,255,0.08); }
.gps-status-indicator.gps-ok { color: var(--success); }
.gps-status-indicator.gps-ok .gps-icon { animation: pulse-success 2s ease-in-out infinite; }
.gps-status-indicator.gps-warning { color: var(--warning); }
.gps-status-indicator.gps-warning:hover { background: var(--warning); color: #fff; }
.gps-status-indicator.gps-warning .gps-icon { animation: pulse-warning 1.5s ease-in-out infinite; }
.gps-status-indicator.gps-error { color: var(--danger); }
.gps-status-indicator.gps-error:hover { background: var(--danger); color: #fff; }
.gps-status-indicator.gps-error .gps-icon { animation: shake 0.5s ease-in-out; }
.gps-status-indicator.gps-checking { color: var(--info); }

.gps-status-indicator.gps-checking::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: var(--info);
  opacity: 0.15;
  animation: pulse-bg 1.5s ease-in-out infinite;
}

.gps-status-indicator.gps-checking .gps-icon {
  animation: rotate-pulse 1.5s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

.theme-toggle {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
}

.theme-toggle:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-inverse);
}

.gps-modal-overlay,
.gps-loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.gps-modal-overlay.active,
.gps-loading-overlay.active {
  display: flex;
}

.gps-modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease-out;
}

.gps-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.gps-modal-icon { font-size: 2rem; }
.gps-modal-title { font-size: 1.25rem; font-weight: 600; color: var(--text-main); margin: 0; }
.gps-modal-body { margin-bottom: 20px; }
.gps-modal-message { font-size: 0.9375rem; color: var(--text-soft); line-height: 1.6; margin-bottom: 12px; }

.gps-modal-status {
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin: 12px 0;
  font-size: 0.8125rem;
}

.gps-modal-status.success { background: var(--success-soft); color: var(--success); border: 1px solid var(--success); }
.gps-modal-status.error { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); }
.gps-modal-status.testing { background: var(--info-soft); color: #1e40af; border: 1px solid var(--info); }

[data-theme="dark"] .gps-modal-status.testing { color: var(--info); }

.gps-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.gps-modal-actions .btn { flex: 1; min-width: 120px; }

.gps-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
}

.gps-loading-content {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease-out;
  max-width: 400px;
  width: 90%;
}

.gps-loading-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

.gps-loading-title { font-size: 1.125rem; font-weight: 600; color: var(--text-main); margin-bottom: 8px; }
.gps-loading-message { font-size: 0.9375rem; color: var(--text-soft); line-height: 1.5; margin-bottom: 12px; }

.gps-loading-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--primary);
  font-weight: 500;
}

.gps-loading-dots { display: inline-flex; gap: 4px; }

.gps-loading-dots span {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.gps-loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.gps-loading-dots span:nth-child(2) { animation-delay: -0.16s; }

.alert-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 100000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
  backdrop-filter: blur(2px);
}

.alert-modal-overlay.active { display: flex; }

.alert-modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: slideUp 0.3s ease-out;
}

.alert-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.alert-modal-icon { font-size: 2rem; flex-shrink: 0; }
.alert-modal-icon.success { color: var(--success); }
.alert-modal-icon.error { color: var(--danger); }
.alert-modal-icon.warning { color: var(--warning); }
.alert-modal-icon.info { color: var(--info); }

.alert-modal-title { font-size: 1.25rem; font-weight: 600; color: var(--text-main); margin: 0; }

.alert-modal-body {
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 20px;
  white-space: pre-line;
  font-size: 0.9375rem;
}

.alert-modal-body ul { margin: 8px 0; padding-left: 20px; }
.alert-modal-body li { margin: 4px 0; }

.alert-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.alert-modal-footer .btn { min-width: 100px; }

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.location-link {
  color: var(--text-link);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  transition: all var(--transition);
  padding: 2px 6px;
  border-radius: 4px;
}

.location-link:hover {
  background: var(--bg-hover);
  text-decoration: underline;
}

.next-day-entry {
  background-color: var(--warning-soft) !important;
  border-left: 3px solid var(--warning) !important;
}

.multi-day-entry-alert {
  background-color: var(--danger-soft) !important;
  border-left: 3px solid var(--danger) !important;
}

details summary {
  cursor: pointer;
  color: var(--text-link);
  list-style: none;
}

details summary::-webkit-details-marker { display: none; }

details pre {
  margin-top: 8px;
  padding: 8px;
  background: var(--bg-main);
  border-radius: 4px;
  font-size: 0.75rem;
  overflow-x: auto;
}

.toggle-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.toggle-switch {
  position: relative;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border);
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

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

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

.timeline-day-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.timeline-alert-warning {
  border-left: 4px solid var(--warning);
  background: linear-gradient(to right, var(--warning-soft), var(--bg-card));
}

.timeline-alert-danger {
  border-left: 4px solid var(--danger);
  background: linear-gradient(to right, var(--danger-soft), var(--bg-card));
}

.timeline-date-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.timeline-date-day { font-size: 0.8125rem; font-weight: 600; color: var(--text-soft); }
.timeline-date-full { font-size: 1rem; font-weight: 700; color: var(--text-main); }

.timeline-summary-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding: 14px;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

[data-theme="dark"] .timeline-summary-row { background: rgba(255,255,255,0.03); }

.timeline-summary-item { display: flex; flex-direction: column; gap: 2px; }

.timeline-summary-item .summary-label {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.timeline-summary-item .summary-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
}

.timeline-title { font-size: 0.8125rem; font-weight: 600; color: var(--text-soft); margin-bottom: 14px; }

.timeline-vertical { position: relative; padding-left: 0; }

.timeline-item {
  display: flex;
  gap: 14px;
  margin-bottom: 10px;
  position: relative;
}

.timeline-item-last { margin-bottom: 0; }

.timeline-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 36px;
  flex-shrink: 0;
}

.timeline-clock-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-main);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  z-index: 2;
  flex-shrink: 0;
}

.timeline-clock-icon.timeline-clock-lunch { border-color: var(--warning); color: var(--warning); }
.timeline-clock-icon.timeline-clock-saida { border-color: var(--danger); color: var(--danger); }

.timeline-clock-icon.timeline-clock-ongoing {
  border-color: var(--info);
  color: var(--info);
  animation: pulse-ring 2s ease-in-out infinite;
}

.timeline-line {
  width: 2px;
  flex-grow: 1;
  background: linear-gradient(to bottom, var(--border), rgba(0,0,0,0.1));
  margin-top: 4px;
  min-height: 20px;
}

[data-theme="dark"] .timeline-line { background: linear-gradient(to bottom, var(--border), rgba(255,255,255,0.05)); }
.timeline-item-last .timeline-line { display: none; }

.timeline-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.timeline-card:hover { box-shadow: var(--shadow); }
.timeline-card-ongoing { border-style: dashed; opacity: 0.7; }

.timeline-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.tag-entrada { background: var(--success-soft); color: var(--success); }
.tag-intervalo { background: var(--warning-soft); color: #92400e; }
[data-theme="dark"] .tag-intervalo { color: var(--warning); }
.tag-saida { background: var(--danger-soft); color: var(--danger); }
.tag-andamento { background: var(--info-soft); color: #1e40af; }
[data-theme="dark"] .tag-andamento { color: var(--info); }

.location-verified { background: var(--success-soft); color: var(--success); }
.location-unverified { background: var(--warning-soft); color: #92400e; }
[data-theme="dark"] .location-unverified { color: var(--warning); }

.timeline-time {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-left: auto;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.timeline-time-pulse { animation: time-blink 1.5s ease-in-out infinite; }

.timeline-card-location {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.location-icon { color: var(--text-soft); flex-shrink: 0; margin-top: 2px; }

.location-details { display: flex; flex-direction: column; gap: 2px; }

.location-coords {
  font-size: 0.75rem;
  color: var(--text-soft);
  font-family: var(--font-mono);
}

.timeline-date-change {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--warning);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.timeline-days-diff { color: var(--danger); font-weight: 700; }
.timeline-next-day { color: var(--warning); }

.timeline-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.timeline-footer-left,
.timeline-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.timeline-edited-badge,
.timeline-original-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

.timeline-edited-badge { background: var(--warning-soft); color: var(--warning); }
.timeline-original-badge { background: var(--success-soft); color: var(--success); }
.timeline-editor { color: var(--text-soft); font-weight: 400; }

.timeline-notes {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  color: var(--text-soft);
  padding: 4px 10px;
  background: var(--bg-hover);
  border-radius: 6px;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-actions .btn-small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 0.8125rem;
}

.timeline-actions .btn-small svg { flex-shrink: 0; }

.timeline-total-summary {
  background: var(--bg-card);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 24px;
  box-shadow: var(--shadow);
}

.total-summary-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.total-summary-label { font-size: 1rem; font-weight: 600; color: var(--text-main); }
.total-summary-value { font-size: 1.75rem; font-weight: 700; color: var(--primary); }

.clt-info-box {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.clt-info-box-icon { font-size: 1.125rem; flex-shrink: 0; }
.clt-info-box-content { flex: 1; }
.clt-info-box-title { font-weight: 600; font-size: 0.8125rem; margin-bottom: 2px; }
.clt-info-box-text { font-size: 0.8125rem; opacity: 0.9; }

.clt-regular { background: var(--success-soft); border: 1px solid var(--success); color: var(--success); }
.clt-atencao { background: var(--warning-soft); border: 1px solid var(--warning); color: #b45309; }
[data-theme="dark"] .clt-atencao { color: var(--warning); }
.clt-irregular { background: var(--danger-soft); border: 1px solid var(--danger); color: #b91c1c; }
[data-theme="dark"] .clt-irregular { color: var(--danger); }

.clt-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.clt-badge-regular { background: var(--success-soft); color: var(--success); }
.clt-badge-warning { background: var(--warning-soft); color: #b45309; }
[data-theme="dark"] .clt-badge-warning { color: var(--warning); }
.clt-badge-error { background: var(--danger-soft); color: #b91c1c; }
[data-theme="dark"] .clt-badge-error { color: var(--danger); }

.clt-interval-reminder {
  background: linear-gradient(135deg, var(--info-soft), rgba(99, 102, 241, 0.1));
  border: 1px solid var(--info);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 14px 0;
}

.clt-interval-reminder-title {
  font-weight: 600;
  font-size: 0.8125rem;
  color: #1e40af;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

[data-theme="dark"] .clt-interval-reminder-title { color: var(--info); }

.clt-interval-reminder-text { font-size: 0.8125rem; color: var(--text-soft); line-height: 1.5; }
.clt-interval-reminder-highlight { font-weight: 600; color: #1e40af; }
[data-theme="dark"] .clt-interval-reminder-highlight { color: var(--info); }

.clt-countdown {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e40af;
  background: var(--info-soft);
  padding: 4px 10px;
  border-radius: 8px;
  display: inline-block;
  margin-top: 6px;
}

[data-theme="dark"] .clt-countdown { color: var(--info); }

.text-center { text-align: center; }
.text-muted { color: var(--text-soft); }
.text-danger { color: var(--danger); font-weight: 700; }
.text-small { font-size: 0.75rem; }
.text-xs { font-size: 0.8125rem; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-card { margin-bottom: 16px; }
.ml-badge { margin-left: 8px; }
.mt-info { margin-top: 16px; }

.user-badge-you { color: var(--text-soft); font-size: 0.8125rem; }
.user-created-date { font-size: 0.75rem; color: var(--text-soft); margin: 0; }
.hours-total-small { font-size: 0.8125rem; color: var(--text-soft); }
.logout-link-container { text-align: center; margin-top: 20px; }
.logout-link { color: var(--text-soft); font-size: 0.8125rem; text-decoration: none; }
.logout-link:hover { color: var(--text-main); text-decoration: underline; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.main-content { padding-bottom: 24px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(400px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes pulse-danger { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); } 50% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); } }
@keyframes pulse-ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4); } 50% { box-shadow: 0 0 0 6px rgba(14, 165, 233, 0); } }
@keyframes pulse-success { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.7; transform: scale(1.1); } }
@keyframes pulse-warning { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes rotate-pulse { 0% { transform: rotate(0deg) scale(1); } 50% { transform: rotate(180deg) scale(1.15); } 100% { transform: rotate(360deg) scale(1); } }
@keyframes pulse-bg { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.25; } }
@keyframes blink-red { 0%, 100% { opacity: 1; box-shadow: 0 0 20px rgba(220, 38, 38, 0.5); } 50% { opacity: 0.7; box-shadow: 0 0 40px rgba(220, 38, 38, 0.8); } }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); opacity: 0.5; } 40% { transform: scale(1); opacity: 1; } }
@keyframes time-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: block; }
  .sidebar-overlay.open { display: block; }

  .main { margin-left: 0; padding: 60px 16px 24px; }

  .page-title { font-size: 1.25rem; }

  .dashboard-stats { grid-template-columns: 1fr; }
  .summary-cards { grid-template-columns: 1fr; }
  .daily-hours-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-row { flex-direction: column; }
  .filter-group { width: 100%; }

  .modal-content, .gps-modal, .alert-modal { width: 95%; padding: 20px; }

  .entries-table, .data-table, .table { font-size: 0.8125rem; }
  .entries-table th, .data-table th, .table th,
  .entries-table td, .data-table td, .table td { padding: 8px 10px; }

  .tabs, .view-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 4px;
  }

  .tabs .tab, .view-tabs .tab {
    padding: 8px 14px;
    font-size: 0.8125rem;
  }

  .toast-container { left: 10px; right: 10px; max-width: none; }

  .work-duration-time { font-size: 2.5rem; }

  .timeline-day-container { padding: 14px; }
  .timeline-summary-row { flex-direction: column; gap: 10px; }
  .timeline-time { font-size: 1.125rem; width: 100%; margin-left: 0; margin-top: 6px; }
  .timeline-marker { width: 28px; }
  .timeline-clock-icon { width: 28px; height: 28px; }
  .timeline-clock-icon svg { width: 12px; height: 12px; }
  .timeline-card { padding: 10px 12px; }
  .timeline-footer { flex-direction: column; align-items: flex-start; }
  .total-summary-content { flex-direction: column; text-align: center; }
  .total-summary-value { font-size: 1.5rem; }

  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .btn { padding: 8px 14px; font-size: 0.8125rem; }
  .btn-large { padding: 10px 20px; font-size: 0.9375rem; }
  .current-time { font-size: 2rem; }
  .card-value { font-size: 1.5rem; }
}
