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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #f5f5f5;
  color: #1a1a1a;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  flex: 1;
  width: 100%;
}

header {
  text-align: center;
  margin-bottom: 32px;
  padding-top: 20px;
}

header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.subtitle {
  color: #666;
  font-size: 14px;
}

.error-message,
.success-message {
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  animation: slideIn 0.3s ease;
}

.error-message {
  background: #fee;
  color: #c00;
  border: 1px solid #fcc;
}

.success-message {
  background: #efe;
  color: #060;
  border: 1px solid #cfc;
}

.hidden {
  display: none !important;
}

/* Order Confirmation Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: white;
  border-radius: 20px;
  padding: 40px 30px;
  max-width: 450px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.4s ease;
}

.modal-icon {
  font-size: 80px;
  color: #16a34a;
  margin-bottom: 20px;
}

.modal-icon.customer-icon {
  color: #2563eb;
}

.modal-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 20px;
}

.order-details {
  margin-bottom: 30px;
}

.order-id {
  font-size: 16px;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 12px;
}

.order-id span {
  font-weight: 700;
  letter-spacing: 0.5px;
}

.order-message {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

.modal-btn {
  width: 100%;
  padding: 16px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s;
}

.modal-btn:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

.name-input-container {
  margin-bottom: 24px;
}

.name-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #ddd;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  transition: all 0.3s;
}

.name-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.name-input.error {
  border-color: #dc2626;
}

.name-error {
  color: #dc2626;
  font-size: 13px;
  font-weight: 500;
  margin-top: 8px;
  text-align: left;
}

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

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

/* Shop Selection */
.shop-selection {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shop-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 16px;
}

.shop-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.shop-card:active {
  transform: translateY(0);
}

.shop-card[style*="pointer-events: none"] {
  cursor: not-allowed;
}

.shop-card[style*="pointer-events: none"]:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.shop-icon {
  font-size: 48px;
  background: #f0f7ff;
  width: 80px;
  height: 80px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-name {
  flex: 1;
  font-size: 20px;
  font-weight: 600;
}

.shop-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #16a34a;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #16a34a;
  border-radius: 50%;
  transition: background 0.3s;
}

/* Selected Shop Header */
.selected-shop-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.back-btn {
  background: white;
  border: 1px solid #ddd;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.back-btn:hover:not(:disabled) {
  background: #f5f5f5;
}

.back-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.selected-shop-name {
  font-size: 18px;
  font-weight: 600;
  color: #2563eb;
}

/* File Upload */
.file-upload-area {
  background: white;
  border: 2px dashed #ddd;
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  transition: all 0.3s;
  margin-bottom: 24px;
}

.file-upload-area:hover {
  border-color: #2563eb;
  background: #f8faff;
}

.file-upload-label {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.file-upload-label svg {
  color: #2563eb;
}

.file-upload-label span {
  color: #2563eb;
  font-weight: 600;
  font-size: 16px;
}

.file-upload-label small {
  color: #666;
  font-size: 12px;
}

.files-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.file-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.file-header {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.file-preview {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-preview canvas,
.file-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.file-preview-loading {
  font-size: 12px;
  color: #666;
  text-align: center;
}

.file-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.file-name {
  font-weight: 600;
  font-size: 14px;
  color: #1a1a1a;
  word-break: break-word;
}

.file-meta {
  font-size: 12px;
  color: #666;
}

.remove-btn {
  background: #fee;
  color: #c00;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  height: fit-content;
  transition: opacity 0.3s;
}

.remove-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.print-settings {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.setting-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.setting-row label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.setting-row input {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

.setting-row input:focus {
  outline: none;
  border-color: #2563eb;
}

.setting-row input.error {
  border-color: #c00;
}

.setting-row input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f5f5f5;
}

.setting-row small {
  color: #666;
  font-size: 11px;
}

.error-text {
  color: #c00 !important;
  font-weight: 600 !important;
}

.input-with-button {
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-with-button input {
  flex: 1;
}

.all-btn {
  padding: 10px 16px;
  border: 1px solid #2563eb;
  background: white;
  color: #2563eb;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.all-btn:hover:not(:disabled) {
  background: #2563eb;
  color: white;
}

.all-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.all-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #ddd;
  color: #999;
}

.overlap-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.toggle-btn {
  padding: 10px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.toggle-btn.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.toggle-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.copies-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.copy-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.copy-btn:active:not(:disabled) {
  background: #f5f5f5;
}

.copy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.copy-value {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
}

.submit-btn {
  width: 100%;
  padding: 16px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s;
}

.submit-btn:hover:not(:disabled) {
  background: #1d4ed8;
}

.submit-btn:disabled {
  background: #ddd;
  cursor: not-allowed;
  color: #999;
}

.loader {
  width: 18px;
  height: 18px;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #3B82F6 0%, #2563eb 100%);
  color: white;
  padding: 32px 20px 20px;
  margin-top: 60px;
  box-shadow: 0 -4px 20px rgba(59, 130, 246, 0.15);
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.logo-icon i {
  font-size: 24px;
  color: white;
}

.logo-text {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: white;
}

.footer-tagline {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.85;
  letter-spacing: 0.3px;
  margin-left: 60px;
}

.footer-right {
  display: flex;
  gap: 40px;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 200px;
}

.footer-heading {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin-bottom: 2px;
  letter-spacing: 0.5px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  opacity: 0.95;
  white-space: nowrap;
}

.footer-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
  opacity: 1;
}

.footer-link i {
  font-size: 13px;
  width: 14px;
  flex-shrink: 0;
}

.footer-address {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  opacity: 0.95;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.footer-address i {
  font-size: 13px;
  width: 14px;
  flex-shrink: 0;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

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

.footer-brand-text {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.85;
  letter-spacing: 0.3px;
}

.footer-copyright {
  font-size: 12px;
  opacity: 0.8;
  font-weight: 400;
}

@media (max-width: 480px) {
  .container {
    padding: 16px;
  }
  
  header h1 {
    font-size: 24px;
  }
  
  .shop-card {
    padding: 20px;
  }
  
.shop-icon {
  font-size: 32px;
  background: #e0f2fe;
  width: 80px;
  height: 80px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}
  
  .file-upload-area {
    padding: 32px 16px;
  }

  .file-preview {
    width: 60px;
    height: 60px;
  }

  .modal-content {
    padding: 32px 24px;
  }

  .modal-icon {
    font-size: 64px;
  }

  .modal-content h2 {
    font-size: 20px;
  }

  .footer {
    padding: 24px 16px 16px;
    margin-top: 40px;
  }

  .footer-content {
    gap: 16px;
  }

  .footer-main {
    flex-direction: column;
    gap: 24px;
  }

  .footer-left {
    width: 100%;
    align-items: center;
    text-align: center;
  }

  .footer-tagline {
    margin-left: 0;
  }

  .logo-icon {
    width: 40px;
    height: 40px;
  }

  .logo-icon i {
    font-size: 20px;
  }

  .logo-text {
    font-size: 28px;
  }

  .footer-right {
    width: 100%;
    flex-direction: column;
    gap: 20px;
  }

  .footer-section {
    width: 100%;
    text-align: center;
    align-items: center;
  }

  .footer-heading {
    font-size: 13px;
  }

  .footer-links {
    width: 100%;
  }

  .footer-link {
    width: 100%;
    justify-content: flex-start;
    font-size: 12px;
    padding: 8px 12px;
  }

  .footer-address {
    width: 100%;
    justify-content: center;
    font-size: 12px;
    padding: 8px 12px;
  }

  .footer-bottom {
    padding-top: 12px;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }

  .footer-brand-text,
  .footer-copyright {
    font-size: 11px;
  }
}