* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: #f9fafb;
  padding: 12px;
  min-height: 100vh;
}

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

.status-bar {
  margin-bottom: 10px;
}

.offline-indicator {
  background-color: #fef3c7;
  border: 1px solid #f59e0b;
  color: #92400e;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
}

.title {
  font-size: 22px;
  font-weight: 600;
  color: #1f2937;
  text-align: center;
  margin-bottom: 20px;
}

.card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 16px;
  margin-bottom: 16px;
}

.keyboard-shortcuts {
  background-color: #f8fafc;
}

.keyboard-shortcuts kbd {
  background-color: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11px;
  margin: 0 2px;
}

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

@media (min-width: 768px) {
  .form-grid {
	grid-template-columns: 2fr 1fr;
  }
}

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

.form-label {
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
}

.form-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  color: #1f2937;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: #2dd4bf;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.1);
}

.form-input.border-danger {
  border-color: #ef4444;
}

.error-text {
  font-size: 12px;
  color: #ef4444;
  margin-top: 4px;
  text-align: center;
}

.success-text {
  font-size: 12px;
  color: #10b981;
  margin-top: 4px;
  text-align: center;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}

.app-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  flex: 1;
  min-width: 100px;
  text-align: center;
}

.app-btn-primary {
  background-color: #2dd4bf;
  color: #ffffff;
}

.app-btn-primary:hover {
  background-color: #14b8a6;
}

.app-btn-secondary {
  background-color: #3b82f6;
  color: #ffffff;
}

.app-btn-secondary:hover {
  background-color: #2563eb;
}

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

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

.app-btn-outline {
  background-color: transparent;
  border: 1px solid #3b82f6;
  color: #3b82f6;
}

.app-btn-outline:hover {
  background-color: #3b82f6;
  color: #ffffff;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
  min-width: auto;
}

.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 4px;
}

.basic-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  font-size: 14px;
  table-layout: auto;
}

.basic-table th,
.basic-table td {
  padding: 10px 12px;
  text-align: center;
  vertical-align: middle;
  border: 1px solid #e5e7eb;
  white-space: nowrap;
}

.basic-table .action-col {
  width: auto;
  padding: 10px 4px;
}

.basic-table th {
  cursor: pointer;
  font-size: 13px;
  transition: background-color 0.2s ease;
}

.table-header {
  background: linear-gradient(90deg, #2dd4bf, #14b8a6);
  color: #ffffff;
  font-weight: 600;
}

.table-row-even {
  background-color: #ffffff;
}

.table-row-odd {
  background-color: #f9fafb;
}

.table-empty {
  padding: 30px 10px;
  color: #6b7280;
  font-size: 14px;
  text-align: center;
}

.table-footer {
  background-color: #f3f4f6;
  font-weight: 600;
  color: #1f2937;
}

.price-edit-cell {
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s;
}

.price-edit-cell:hover {
  background-color: #f0f9ff;
}

.price-edit-input {
  width: 100%;
  padding: 4px;
  border: 2px solid #3b82f6;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
}

.modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 12px;
}

.modal-content {
  background-color: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.modal-header {
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #ef4444;
}

.modal-body {
  padding: 16px;
}

.modal-footer {
  padding: 14px 16px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.screenshot-container {
  display: none;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background: #ffffff;
  padding: 24px;
  box-sizing: border-box;
  position: absolute;
  top: -9999px;
  left: -9999px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.screenshot-header {
  text-align: center;
  margin-bottom: 20px;
}

.screenshot-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 6px;
}

.screenshot-time {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
}

.screenshot-mode {
  font-size: 13px;
  color: #3b82f6;
  font-weight: 500;
}

.screenshot-table-container {
  overflow-x: auto;
  padding: 0;
}

.screenshot-table {
  width: 100%;
  margin: 0 auto;
}

.screenshot-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: #6b7280;
}

.footer-copyright {
  margin-bottom: 3px;
}

.footer-reminder {
  font-weight: 500;
  color: #3b82f6;
}

.screenshot-preview-container {
  max-height: calc(90vh - 120px);
  overflow-y: auto;
  padding: 0;
}

.screenshot-preview-container img {
  border-radius: 8px;
}

.sortable {
  position: relative;
  padding: 10px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sortable:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.sorted {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.basic-table tbody td:nth-last-child(2),
.screenshot-table tbody td:nth-last-child(2) {
  color: #ef4444;
  font-weight: 600;
}

#wmForShot {
  opacity: 0;
}

@media print,
print * {
  #wmForShot {
	opacity: 1;
  }
}

@media (min-width: 768px) {
  body {
	padding: 16px;
  }

  .card {
	padding: 24px;
	margin-bottom: 24px;
  }

  .title {
	font-size: 24px;
	margin-bottom: 24px;
  }

  .app-btn {
	padding: 12px 20px;
	font-size: 16px;
	min-width: 120px;
  }

  .btn-group {
	gap: 12px;
	margin-bottom: 24px;
  }

  .basic-table th,
  .basic-table td {
	padding: 12px 16px;
	font-size: 16px;
  }

  .basic-table th {
	font-size: 14px;
  }

  .table-empty {
	padding: 40px;
	font-size: 16px;
  }

  .modal-header {
	padding: 16px 24px;
  }

  .modal-title {
	font-size: 18px;
  }

  .modal-body {
	padding: 24px;
  }

  .modal-footer {
	padding: 16px 24px;
	gap: 12px;
  }
}