/* Modern Attendance Monitor - Clean & Minimal Design */

/* Icon Styling - Better Alignment */
i[data-lucide] {
  width: 1em;
  height: 1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header h1,
.test-form-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header h1 i[data-lucide],
.test-form-header h2 i[data-lucide] {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.btn,
.btn-quick,
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn i[data-lucide],
.btn-quick i[data-lucide],
.filter-btn i[data-lucide] {
  width: 16px;
  height: 16px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-group label i[data-lucide] {
  width: 14px;
  height: 14px;
  color: var(--accent-blue);
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon i[data-lucide] {
  width: 20px;
  height: 20px;
}

.student-id,
.time-badge,
.date-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.student-id i[data-lucide] {
  width: 16px;
  height: 16px;
  color: var(--accent-purple);
}

.time-badge i[data-lucide],
.date-badge i[data-lucide] {
  width: 14px;
  height: 14px;
}

.device-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.device-status i[data-lucide] {
  width: 14px;
  height: 14px;
}

.school-id-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.school-id-info i[data-lucide] {
  width: 16px;
  height: 16px;
  color: var(--accent-cyan);
}

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-cyan: #06b6d4;
  --accent-orange: #f97316;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --primary: #818cf8;
  --primary-dark: #6366f1;
  --primary-light: #a5b4fc;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --border: #334155;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  padding: 24px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

* {
  transition: background-color 0.3s ease, border-color 0.3s ease,
    color 0.3s ease;
}

.container {
  max-width: 1440px;
  margin: 0 auto;
}

/* Header */
.header {
  background: var(--bg-secondary);
  padding: 24px 32px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  transition: var(--transition);
  position: relative;
}

.theme-toggle {
  position: absolute;
  top: 24px;
  right: 24px;
  padding: 8px;
  border: 1.5px solid var(--border);
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
  border-color: var(--primary);
  transform: rotate(15deg);
}

.theme-toggle i[data-lucide] {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

.header:hover {
  box-shadow: var(--shadow-md);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header h1 {
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.5px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-right: 50px;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  transition: var(--transition);
}

.status-badge.connected {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.status-badge.disconnected {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-badge.connected .status-dot {
  background: var(--success);
}

.status-badge.disconnected .status-dot {
  background: var(--error);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.95);
  }
}

.device-status {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.device-status i[data-lucide] {
  width: 14px;
  height: 14px;
}

.device-status.connected {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}

.device-status.disconnected {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.live-indicator.active {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.live-indicator::before {
  content: "●";
  animation: blink 1.5s infinite;
}

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

/* Test Form */
.test-form-container {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.test-form-container:hover {
  box-shadow: var(--shadow-md);
}

.test-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 16px;
  cursor: pointer;
}

.test-form-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-collapse {
  padding: 6px 10px;
  border: 1.5px solid var(--border);
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.btn-collapse:hover {
  background: var(--bg-tertiary);
  border-color: var(--primary);
}

.btn-collapse i[data-lucide] {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  transition: transform 0.3s ease;
}

.test-form-container.collapsed .btn-collapse i[data-lucide] {
  transform: rotate(180deg);
}

.test-form-content {
  max-height: 2000px;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease,
    margin-top 0.3s ease;
  opacity: 1;
  margin-top: 24px;
}

.test-form-container.collapsed .test-form-content {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  padding-top: 0;
}

.test-form-container.collapsed .test-form-header {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 20px;
}

.test-form-header h2 {
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.3px;
}

.quick-fill-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-quick {
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 36px; /* Minimum touch target size */
}

.btn-quick:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
  transform: translateY(-1px);
}

.school-id-info {
  padding: 12px 16px;
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-size: 13px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.test-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
}

.form-group input,
.form-group select {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: var(--transition);
  font-family: inherit;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input[type="datetime-local"] {
  cursor: pointer;
}

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

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 44px; /* Minimum touch target size */
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

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

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown 0.3s ease-out;
}

@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: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-info {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Controls */
.controls {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: var(--transition);
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.filter-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 36px; /* Minimum touch target size */
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

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

.stat-card {
  background: var(--bg-secondary);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

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

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

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

.stat-card h3 {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.stat-card:nth-child(1) .stat-icon {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
}

.stat-card:nth-child(2) .stat-icon {
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-purple);
}

.stat-card:nth-child(3) .stat-icon {
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
}

.stat-card:nth-child(4) .stat-icon {
  background: rgba(236, 72, 153, 0.1);
  color: var(--accent-pink);
}

.stat-card .value {
  color: var(--text-primary);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -1px;
}

.stat-card .sub-value {
  color: var(--text-tertiary);
  font-size: 12px;
}

/* Data Container */
.data-container {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  max-height: 650px;
  overflow-y: auto;
}

.data-container::-webkit-scrollbar {
  width: 6px;
}

.data-container::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 10px;
}

.data-container::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

.data-container::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

.data-header {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1.5fr 1fr;
  gap: 20px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-item {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1.5fr 1fr;
  gap: 20px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.data-item:hover {
  background: var(--bg-tertiary);
  transform: translateX(4px);
}

.data-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.new-event {
  animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(16, 185, 129, 0.05) !important;
  border-left: 3px solid var(--success);
  box-shadow: var(--shadow-sm);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.student-id {
  font-weight: 600;
  color: var(--primary);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.time {
  color: var(--text-secondary);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.time-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.time-badge.in-time {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.time-badge.out-time {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.time-badge.in-premises {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
  font-weight: 600;
}

.date-badge {
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-tertiary);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state p {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Responsive */
/* Tablet and below */
@media (max-width: 1024px) {
  .container {
    padding: 0 8px;
  }

  .header {
    padding: 20px 24px;
  }

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

/* Mobile and small tablets */
@media (max-width: 768px) {
  body {
    padding: 12px;
    font-size: 14px;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .header {
    flex-direction: column;
    text-align: left;
    padding: 16px;
    gap: 12px;
    position: relative;
  }

  .theme-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    padding: 6px;
  }

  .header-left {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-right: 0;
  }

  .header-right {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-right: 0;
  }

  .header h1 {
    font-size: 20px;
    width: 100%;
  }

  .status-badge {
    font-size: 11px;
    padding: 5px 10px;
  }

  .device-status {
    font-size: 11px;
    padding: 5px 10px;
    width: 100%;
  }

  .live-indicator {
    font-size: 10px;
    padding: 3px 8px;
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 14px;
  }

  .btn-secondary {
    width: 100%;
  }

  .data-header,
  .data-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .data-header {
    display: none;
  }

  .data-item {
    padding: 12px;
    border-left: 3px solid var(--primary);
    margin-bottom: 12px;
  }

  .student-id,
  .time,
  .date-badge {
    font-size: 13px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-card .value {
    font-size: 24px;
  }

  .stat-card h3 {
    font-size: 11px;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .data-container {
    max-height: 500px;
    padding: 12px;
    border-radius: var(--radius-md);
  }

  .controls {
    flex-direction: column;
    padding: 16px;
    gap: 12px;
  }

  .search-box {
    width: 100%;
  }

  .search-box input {
    font-size: 14px;
    padding: 10px 12px 10px 36px;
  }

  .filter-buttons {
    width: 100%;
    flex-wrap: wrap;
  }

  .filter-btn {
    flex: 1;
    min-width: calc(33.333% - 6px);
    font-size: 12px;
    padding: 8px 12px;
  }

  .test-form-container {
    padding: 16px;
    margin-bottom: 16px;
  }

  .test-form-header {
    padding-bottom: 16px;
    gap: 12px;
  }

  .test-form-header h2 {
    font-size: 18px;
  }

  .test-form {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .form-group {
    gap: 6px;
  }

  .form-group label {
    font-size: 12px;
  }

  .form-group input,
  .form-group select {
    font-size: 14px;
    padding: 10px 12px;
  }

  .form-actions {
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
  }

  .quick-fill-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn-quick {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
    font-size: 12px;
  }

  .school-id-info {
    font-size: 12px;
    padding: 10px 12px;
  }

  .alert {
    font-size: 12px;
    padding: 10px 12px;
  }

  .empty-state {
    padding: 40px 16px;
  }

  .empty-state p {
    font-size: 14px;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  body {
    padding: 8px;
    font-size: 13px;
  }

  .header {
    padding: 12px;
    gap: 10px;
  }

  .header h1 {
    font-size: 18px;
    gap: 8px;
  }

  .header h1 i[data-lucide] {
    width: 20px;
    height: 20px;
  }

  .theme-toggle {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
  }

  .status-badge {
    font-size: 10px;
    padding: 4px 8px;
  }

  .device-status {
    font-size: 10px;
    padding: 4px 8px;
  }

  .live-indicator {
    font-size: 9px;
    padding: 2px 6px;
  }

  .stat-card {
    padding: 12px;
  }

  .stat-card .value {
    font-size: 20px;
  }

  .stat-card .sub-value {
    font-size: 11px;
  }

  .stat-icon {
    width: 32px;
    height: 32px;
  }

  .data-container {
    padding: 8px;
    max-height: 400px;
  }

  .data-item {
    padding: 10px;
    gap: 6px;
  }

  .student-id {
    font-size: 12px;
  }

  .time-badge {
    font-size: 11px;
    padding: 4px 8px;
  }

  .date-badge {
    font-size: 11px;
    padding: 4px 8px;
  }

  .controls {
    padding: 12px;
  }

  .search-box input {
    font-size: 13px;
    padding: 8px 10px 8px 32px;
  }

  .filter-btn {
    font-size: 11px;
    padding: 6px 10px;
    min-width: calc(33.333% - 4px);
  }

  .test-form-container {
    padding: 12px;
  }

  .test-form-header {
    padding-bottom: 12px;
  }

  .test-form-header h2 {
    font-size: 16px;
  }

  .test-form {
    gap: 12px;
  }

  .form-group label {
    font-size: 11px;
  }

  .form-group input,
  .form-group select {
    font-size: 13px;
    padding: 8px 10px;
  }

  .btn {
    padding: 10px 14px;
    font-size: 13px;
  }

  .btn-quick {
    padding: 8px 12px;
    font-size: 11px;
  }

  .school-id-info {
    font-size: 11px;
    padding: 8px 10px;
  }

  .alert {
    font-size: 11px;
    padding: 8px 10px;
  }
}

/* Extra small devices */
@media (max-width: 360px) {
  body {
    padding: 6px;
  }

  .header {
    padding: 10px;
  }

  .header h1 {
    font-size: 16px;
  }

  .stat-card {
    padding: 10px;
  }

  .stat-card .value {
    font-size: 18px;
  }

  .data-container {
    padding: 6px;
  }

  .test-form-container {
    padding: 10px;
  }
}
