/* Modern Clean Aesthetic for Mobile Upload & Desktop Admin */
:root {
  --primary: #1890FF;
  --primary-hover: #40A9FF;
  --primary-light: #E6F7FF;
  --success: #52C41A;
  --success-light: #F6FFED;
  --warning: #FA8C16;
  --warning-light: #FFF7E6;
  --danger: #F5222D;
  --danger-light: #FFF1F0;
  --text-main: #1F2937;
  --text-muted: #6B7280;
  --bg-main: #F3F4F6;
  --bg-card: #FFFFFF;
  --border: #E5E7EB;
  --radius-lg: 14px;
  --radius-md: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  max-width: 540px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px 14px;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  font-size: 24px;
  background: var(--primary-light);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.brand-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-lang {
  background: #FFFFFF;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.btn-lang:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* SOP Guide Card */
.sop-guide-card {
  background: #FFFFFF;
  border: 1.5px solid #BFDBFE;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(24, 144, 255, 0.08);
}

.sop-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.sop-badge {
  width: 22px;
  height: 22px;
  background: var(--primary);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.sop-text {
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.45;
}

.sop-text strong {
  display: block;
  font-size: 13px;
  color: #1E40AF;
  margin-bottom: 2px;
}

.sop-divider {
  height: 1px;
  background: #E5E7EB;
  margin: 10px 0;
}

/* Order ID Highlight Box */
.order-highlight-box {
  background: #F0F7FF;
  border: 1.5px solid #91D5FF;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.font-order {
  font-family: Consolas, -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #1E40AF;
  padding-right: 90px;
}

.btn-paste-clip {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: #FFFFFF;
  border: 1px solid #BFDBFE;
  color: #1890FF;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s;
}

.btn-paste-clip:hover {
  background: #E6F7FF;
}

/* Notice Card */
.notice-card {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.notice-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.notice-text strong {
  display: block;
  font-size: 13px;
  color: #1E40AF;
  margin-bottom: 2px;
}

.notice-text p {
  font-size: 11px;
  color: #3B82F6;
  line-height: 1.4;
}

/* Main Card */
.main-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  flex: 1;
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-label .required {
  color: var(--danger);
  margin-right: 2px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  font-size: 15px;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  height: 44px;
  padding: 8px 12px 8px 38px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-main);
  background: #FAFAFA;
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.12);
}

.field-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* Dropzone / File Picker */
.upload-dropzone {
  border: 2px dashed #93C5FD;
  background: #F8FAFC;
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.icon-pulse {
  margin-bottom: 12px;
  animation: float 2.5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.btn-select-files {
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-select-files:active {
  transform: scale(0.97);
}

.dropzone-tip {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
}

/* File List Preview */
.file-list-section {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 8px;
}

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

.list-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.btn-clear-all {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 12px;
  cursor: pointer;
}

.file-items-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 14px;
}

.file-item-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F9FAFB;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
}

.file-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  background: #E5E7EB;
  flex-shrink: 0;
}

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

.file-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.badge-size {
  background: #EEF2F6;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  color: #374151;
}

.btn-remove-file {
  background: none;
  border: none;
  color: #9CA3AF;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
}

.btn-remove-file:hover {
  color: var(--danger);
}

/* Upload Summary & Action */
.upload-summary {
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.summary-info strong {
  font-size: 15px;
  color: var(--primary);
}

.btn-upload-submit {
  width: 100%;
  height: 48px;
  background: #52C41A;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(82, 196, 26, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-upload-submit:active {
  transform: scale(0.98);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: popIn 0.25s ease-out;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.spinner-wrapper {
  margin-bottom: 14px;
}

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

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

.modal-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-main);
}

.modal-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.progress-bar-container {
  margin-bottom: 10px;
}

.progress-bar-track {
  width: 100%;
  height: 10px;
  background: #E5E7EB;
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1890FF, #52C41A);
  border-radius: 5px;
  transition: width 0.15s ease;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.progress-details {
  font-size: 11px;
  color: var(--text-muted);
}

/* Success Card */
.success-card .success-icon-animated {
  width: 60px;
  height: 60px;
  background: var(--success-light);
  border: 2px solid var(--success);
  color: var(--success);
  font-size: 32px;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.text-success {
  color: var(--success);
}

.success-info-box {
  background: #F9FAFB;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin: 14px 0 18px;
  text-align: left;
}

.info-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 6px;
}

.info-row:last-child {
  margin-bottom: 0;
}

.btn-primary-block {
  width: 100%;
  height: 44px;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(24, 144, 255, 0.3);
}

/* Footer */
.footer {
  text-align: center;
  padding: 16px 0 8px;
  font-size: 11px;
  color: #9CA3AF;
}

.admin-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.admin-link:hover {
  text-decoration: underline;
}
