:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --accent: #10b981;
  --accent-hover: #059669;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --warning: #f59e0b;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px -2px rgba(0,0,0,0.08), 0 2px 6px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
  --radius: 12px;
}

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

body {
  background: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Common Header */
.top-nav {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: var(--text-main);
  text-decoration: none;
}

.brand-icon {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-green { background: #dcfce7; color: #15803d; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-purple { background: #f3e8ff; color: #7e22ce; }
.badge-gray { background: #f1f5f9; color: #475569; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}
.btn-success {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16,185,129,0.25);
}
.btn-success:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: var(--danger-hover);
}
.btn-outline {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-main);
}
.btn-outline:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* Mobile Client Container */
.mobile-wrapper {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  min-height: calc(100vh - 65px);
}

.shop-card {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #fff;
  padding: 18px;
  border-radius: 16px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-md);
}

.shop-card h1 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}

.shop-card p {
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Upload Dropzone */
.dropzone {
  border: 2px dashed #3b82f6;
  background: #ffffff;
  padding: 30px 16px;
  border-radius: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.dropzone:hover, .dropzone.dragover {
  background: #eff6ff;
  border-color: #1d4ed8;
  transform: scale(1.01);
}
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.drop-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  background: #eff6ff;
  color: #2563eb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

/* File Selected Preview */
.file-preview-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  box-shadow: var(--shadow-sm);
}
.file-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #fee2e2;
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
}
.file-meta h4 {
  font-size: 13px;
  font-weight: 700;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-meta p {
  font-size: 11px;
  color: var(--text-muted);
}

/* Option Groups & Steppers */
.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 20px 0 10px;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.option-box {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.option-box.active {
  border-color: var(--primary);
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
}
.option-box-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}
.option-box-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 12px;
}
.stepper-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.stepper-btn:hover {
  background: #e2e8f0;
}
.stepper-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

/* Bill Estimation Box */
.bill-summary {
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 14px 18px;
  margin: 20px 0 16px;
  box-shadow: var(--shadow-sm);
}
.bill-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.bill-total {
  border-top: 1px dashed var(--border);
  padding-top: 8px;
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}
.bill-total-price {
  font-size: 20px;
  color: #16a34a;
}

/* Token Screen / Live Tracker */
.token-card {
  background: #fff;
  border-radius: 20px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
  margin-top: 20px;
  border: 1px solid var(--border);
}
.token-number {
  font-size: 54px;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin: 12px 0 4px;
  letter-spacing: -1px;
}
.token-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.tracker-timeline {
  margin: 30px 0 10px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tracker-step {
  display: flex;
  align-items: center;
  gap: 14px;
}
.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}
.step-circle.active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(37,99,235,0.2);
  animation: pulse 1.5s infinite;
}
.step-circle.done {
  background: #10b981;
  color: #fff;
}
.step-text h5 {
  font-size: 13px;
  font-weight: 700;
}
.step-text p {
  font-size: 11px;
  color: var(--text-muted);
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ================= Dashboard Desktop Styles ================= */
.dashboard-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.dashboard-main {
  padding: 24px 30px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}
.stat-val {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
}
.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Order Queue Cards */
.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.queue-title {
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.job-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.job-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}
.job-card.status-pending {
  border-left: 6px solid #2563eb;
  background: #fafcff;
}
.job-card.status-printing {
  border-left: 6px solid #f59e0b;
  background: #fffdfa;
}
.job-card.status-completed {
  border-left: 6px solid #10b981;
  opacity: 0.85;
}
.job-card.status-cancelled {
  border-left: 6px solid #ef4444;
  opacity: 0.6;
}

.job-token-badge {
  background: #1e293b;
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
  min-width: 75px;
}

.job-info-col {
  flex: 1;
  margin: 0 20px;
}
.job-customer-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.job-customer-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}
.job-file-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.job-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.job-actions-col {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-box {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 540px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-body {
  padding: 22px;
}
.modal-footer {
  padding: 14px 22px;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Print CSS */
@media print {
  body {
    background: #fff !important;
  }
  .no-print {
    display: none !important;
  }
}
