body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f3f4f6;
  color: #0f172a;
}

/* Core content layout */

.content {
  max-width: 1400px;
  margin: 24px auto;
  padding: 0 24px 32px;
  box-sizing: border-box;
}

/* Generic buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  background-color: #2563eb;
  color: #ffffff;
  gap: 6px;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    transform 0.08s ease;
}

.btn:hover {
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.24);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
}

.btn-primary {
  background-color: #2563eb;
  color: #ffffff;
}

.btn-secondary {
  background-color: #e5e7eb;
  color: #111827;
}

.btn-danger {
  background-color: #dc2626;
  color: #ffffff;
}

.btn-ghost {
  background-color: transparent;
  border: 1px solid #9ca3af;
  color: #4b5563;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid #2563eb;
  color: #2563eb;
}

.btn-lg {
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 999px;
}

.btn-compact {
  padding: 5px 10px;
  font-size: 11px;
  border-radius: 999px;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}

/* Banner (flash messages) */

.banner {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  background-color: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* QR dashboard header */

.qr-dashboard {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.qr-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 16px;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    #eff6ff,
    #e0f2fe
  );
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.15);
}

.qr-header-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qr-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #0f172a;
}

.qr-subtitle {
  margin: 0;
  font-size: 13px;
  color: #4b5563;
}

.qr-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Empty state */

.empty-state {
  margin-top: 8px;
  padding: 26px 22px;
  border-radius: 18px;
  background-color: #ffffff;
  text-align: center;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.empty-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.empty-text {
  margin: 0 0 14px;
  font-size: 13px;
  color: #6b7280;
}

/* QR table card */

.qr-table-card {
  margin-top: 4px;
  padding: 16px 16px 14px;
  border-radius: 18px;
  background-color: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.10);
  box-sizing: border-box;
}

.qr-table-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}

.qr-table-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #111827;
}

.qr-table-subtitle {
  margin: 0;
  font-size: 12px;
  color: #6b7280;
}

/* Table */

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.qr-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  font-size: 13px;
}

.qr-table thead tr {
  background-color: #f9fafb;
}

.qr-table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 12px;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
}

.qr-table td {
  padding: 9px 12px;
  font-size: 12px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
  color: #111827;
}

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

.qr-table tbody tr:hover {
  background-color: #f9fafb;
}

/* URL truncation */

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

/* QR thumbnail */

.qr-thumb {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background-color: #ffffff;
}

.qr-missing {
  font-size: 11px;
  color: #9ca3af;
}

/* Stats + actions */

.stats-cell {
  min-width: 120px;
}

.stat-count {
  font-weight: 600;
  font-size: 12px;
  color: #111827;
}

.stat-muted {
  font-size: 11px;
  color: #9ca3af;
}

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

/* Top actions (legacy support) */

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

/* Responsive */

@media (max-width: 768px) {
  .content {
    margin: 16px auto;
    padding: 0 14px 24px;
  }

  .qr-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 14px 12px;
    border-radius: 14px;
  }

  .qr-title {
    font-size: 20px;
  }

  .qr-subtitle {
    font-size: 12px;
  }

  .qr-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .btn-lg {
    width: auto;
    padding: 8px 14px;
    font-size: 13px;
  }

  .qr-table-card {
    padding: 12px 10px 10px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.10);
  }

  .qr-table th,
  .qr-table td {
    padding: 7px 8px;
    font-size: 11px;
  }

  .qr-thumb {
    width: 46px;
    height: 46px;
  }

  .actions {
    gap: 4px;
  }

  .btn-compact {
    padding: 4px 7px;
    font-size: 10px;
  }
}

/* Desktop layout scaling */

@media (min-width: 1024px) {
  .content {
    max-width: 1600px;
    margin: 24px auto;
    padding: 20px;
  }

  .qr-table,
  .settings-card,
  .profile-card {
    font-size: 14px;
  }

  .qr-table th {
    font-size: 12px;
    padding: 10px 8px;
  }

  .qr-table td {
    padding: 9px 8px;
  }

  .profile-title,
  .settings-title {
    font-size: 24px;
  }
}

