/* ==========================================================================
   AbayaFlow - Luxury Multi-Workshop & Couture Production Stylesheet
   Direction: RTL | Aesthetic: Haute Couture Gold, Obsidian & Sand Pearl
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Tajawal:wght@400;500;700;800&display=swap');

:root {
  --font-main: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Cairo', sans-serif;

  /* Luxury Atelier Palette */
  --gold-primary: #C5A880;
  --gold-dark: #9D7E54;
  --gold-light: #E8D9C5;
  --gold-hover: #B38E5D;
  --gold-soft-bg: rgba(197, 168, 128, 0.08);
  
  --bg-sand: #FAF8F5;
  --bg-card: #FFFFFF;
  --bg-dark: #121212;
  --bg-dark-card: #1C1C1C;
  --bg-dark-subtle: #242424;

  --text-primary: #1F1F1F;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  
  --border-color: #E5DFD5;
  --border-focus: #C5A880;

  --badge-blue: #EFF6FF;
  --badge-blue-text: #1D4ED8;
  --badge-emerald: #ECFDF5;
  --badge-emerald-text: #047857;
  --badge-purple: #F5F3FF;
  --badge-purple-text: #6D28D9;
  --badge-amber: #FFFBEB;
  --badge-amber-text: #B45309;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(179, 142, 93, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-sand);
  color: var(--text-primary);
  direction: rtl;
  text-align: right;
  line-height: 1.6;
  min-height: 100vh;
}

/* ==========================================================================
   TOP SIMULATION PERSONA BAR
   ========================================================================== */
.persona-topbar {
  background: #111111;
  color: #FFFFFF;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 2px solid var(--gold-dark);
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  position: sticky;
  top: 0;
  z-index: 100;
}

.persona-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.persona-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #222;
  border: 2px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.persona-details h4 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}

.persona-details p {
  font-size: 12px;
  color: var(--gold-light);
  margin: 0;
}

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

.persona-select {
  background: #1F1F1F;
  color: #FFFFFF;
  border: 1px solid var(--gold-dark);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 13px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.persona-select:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 2px rgba(197, 168, 128, 0.3);
}

.btn-reset-demo {
  background: transparent;
  color: #EF4444;
  border: 1px solid #EF4444;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reset-demo:hover {
  background: #EF4444;
  color: #FFF;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.app-header {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-color);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

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

.brand-logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #141414, #2A2A2A);
  color: var(--gold-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 1px solid var(--gold-primary);
  box-shadow: 0 2px 8px rgba(197, 168, 128, 0.2);
}

.brand-title h1 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: #111111;
  letter-spacing: -0.5px;
  margin: 0;
}

.brand-title p {
  font-size: 12px;
  color: var(--gold-dark);
  font-weight: 600;
  margin: 0;
}

.nav-tabs {
  display: flex;
  gap: 8px;
  list-style: none;
  background: var(--bg-sand);
  padding: 5px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.nav-tab-btn {
  background: transparent;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.nav-tab-btn:hover {
  color: var(--text-primary);
}

.nav-tab-btn.active {
  background: #FFFFFF;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(197, 168, 128, 0.4);
}

.nav-tab-btn .badge-count {
  background: var(--gold-soft-bg);
  color: var(--gold-dark);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 12px;
  font-weight: 700;
}

/* ==========================================================================
   MAIN CONTAINER & SECTIONS
   ========================================================================== */
.main-content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 32px;
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
  animation: fadeIn 0.3s ease forwards;
}

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

/* Notification banner for context */
.context-alert {
  background: #FFFFFF;
  border-right: 4px solid var(--gold-primary);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.context-alert-text {
  font-size: 13px;
  color: var(--text-primary);
}

.context-alert-text strong {
  color: var(--gold-dark);
}

/* ==========================================================================
   STORE ORDER FORM (شاشة إدخال الطلب للمحل)
   ========================================================================== */
.order-form-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

@media (max-width: 992px) {
  .order-form-container {
    grid-template-columns: 1fr;
  }
}

.card {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: #111111;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

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

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

.form-label .required {
  color: #EF4444;
  margin-right: 3px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 14px;
  background: #FFFFFF;
  color: var(--text-primary);
  transition: all 0.2s ease;
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(197, 168, 128, 0.2);
}

.workshop-highlight-box {
  background: var(--gold-soft-bg);
  border: 1px dashed var(--gold-primary);
  padding: 14px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  font-size: 12px;
  color: #644a24;
}

/* Measurements Grid in Inches */
.measurements-container {
  background: #FCFBF9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

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

.measurements-unit-badge {
  background: var(--gold-primary);
  color: #FFFFFF;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.measurements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.measurement-item {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
  transition: all 0.2s ease;
}

.measurement-item:focus-within {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 2px rgba(197, 168, 128, 0.25);
}

.measurement-item label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.measurement-item input {
  width: 100%;
  text-align: center;
  font-weight: 800;
  font-size: 16px;
  color: #111111;
  border: none;
  outline: none;
  background: transparent;
}

/* Photo Upload Box */
.photo-uploader {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  background: #FAFAFA;
  transition: all 0.2s ease;
}

.photo-uploader:hover {
  border-color: var(--gold-primary);
  background: var(--gold-soft-bg);
}

.photo-previews {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.photo-preview-item {
  position: relative;
  width: 80px;
  height: 100px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-remove-photo {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(239, 68, 68, 0.9);
  color: #FFF;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold-primary));
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(197, 168, 128, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-hover), var(--gold-dark));
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--gold-primary);
  color: var(--gold-dark);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* ==========================================================================
   WORKSHOP KANBAN BOARD (لوحة تحكم المشغل)
   ========================================================================== */
.kanban-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  background: #FFFFFF;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.workshop-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  background: #111;
  color: var(--gold-primary);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--gold-dark);
}

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

.kanban-board-wrapper {
  overflow-x: auto;
  padding-bottom: 16px;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(6, 290px);
  gap: 16px;
  min-width: 1740px;
}

.kanban-column {
  background: #F4F2EE;
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  max-height: 780px;
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold-light);
}

.kanban-column-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #111111;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kanban-column-count {
  background: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.kanban-column-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex-grow: 1;
  padding: 2px;
}

/* Kanban Order Card */
.order-card {
  background: #FFFFFF;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
}

.order-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  border-color: var(--gold-primary);
}

.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.order-number {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-dark);
}

.order-store-tag {
  font-size: 11px;
  background: var(--gold-soft-bg);
  color: #7A5B30;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.order-customer {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  margin-bottom: 4px;
}

.order-model {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.order-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid #F0ECE6;
  padding-top: 8px;
  margin-bottom: 10px;
}

.tailor-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  background: #F3F4F6;
  color: #374151;
}

.tailor-badge.assigned {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.order-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/* ==========================================================================
   ACTIVITY LOGS TIMELINE (سجل النشاطات)
   ========================================================================== */
.activity-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.activity-item {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: all 0.2s ease;
}

.activity-item:hover {
  border-color: var(--gold-primary);
}

.activity-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gold-soft-bg);
  color: var(--gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  border: 1px solid var(--gold-light);
}

.activity-content {
  flex-grow: 1;
}

.activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.activity-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #111;
}

.activity-time {
  font-size: 12px;
  color: var(--text-light);
}

.activity-description {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.activity-meta-tags {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* ==========================================================================
   MODAL DIALOGS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-container {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  max-width: 750px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  animation: modalPop 0.25s ease forwards;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FAF8F5;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: #111;
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: #FAF8F5;
}

/* ==========================================================================
   TOAST NOTIFICATION (Crash-proof Feedback)
   ========================================================================== */
#toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #1F1F1F;
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border-right: 4px solid var(--gold-primary);
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideToast 0.3s ease forwards;
  min-width: 280px;
}

.toast.error {
  border-right-color: #EF4444;
}

.toast.success {
  border-right-color: #10B981;
}

@keyframes slideToast {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}


/* ==========================================================================
   MULTI-STEP ORDER WIZARD & BATCH QUANTITIES (المعالج المتعدد الخطوات)
   ========================================================================== */

/* Progress Stepper Bar */
.wizard-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  background: #FFFFFF;
  padding: 18px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow-x: auto;
}

.stepper-item {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  cursor: pointer;
  z-index: 2;
  flex: 1;
  min-width: 140px;
}

.stepper-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -20px;
  right: calc(100% - 10px);
  height: 2px;
  background: var(--border-color);
  z-index: 1;
}

.stepper-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FAF8F5;
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 14px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.stepper-label {
  display: flex;
  flex-direction: column;
}

.stepper-step-num {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
}

.stepper-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Stepper States */
.stepper-item.active .stepper-circle {
  background: #111111;
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  box-shadow: 0 0 0 4px rgba(197, 168, 128, 0.25);
}

.stepper-item.active .stepper-title {
  color: #111111;
  font-weight: 800;
}

.stepper-item.completed .stepper-circle {
  background: var(--gold-primary);
  border-color: var(--gold-dark);
  color: #FFFFFF;
}

.stepper-item.completed .stepper-title {
  color: var(--gold-dark);
}

/* Wizard Screen Container */
.wizard-content-wrapper {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  margin-bottom: 24px;
  min-height: 480px;
}

.wizard-step-pane {
  display: none;
}

.wizard-step-pane.active {
  display: block;
  animation: fadeInStep 0.25s ease forwards;
}

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

.wizard-step-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.wizard-step-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: #111111;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wizard-step-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Navigation Footer */
.wizard-nav-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  gap: 16px;
}

/* Priority Selector Chips */
.priority-options-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.priority-chip {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  background: #FAF8F5;
}

.priority-chip:hover {
  border-color: var(--gold-primary);
}

.priority-chip.selected {
  border-color: var(--gold-primary);
  background: #FFFFFF;
  box-shadow: 0 4px 12px rgba(197, 168, 128, 0.15);
}

.priority-chip input {
  display: none;
}

.priority-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.priority-vip {
  background: #FEE2E2;
  color: #B91C1C;
  border: 1px solid #FCA5A5;
}

.priority-urgent {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.priority-normal {
  background: #F3F4F6;
  color: #4B5563;
}

/* ==========================================================================
   STEP 2: MEDIA UPLOADER SLOTS (Front, Back, Detail, Camera)
   ========================================================================== */
.photo-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.photo-slot-card {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  background: #FAF8F5;
  transition: all 0.25s ease;
  position: relative;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.photo-slot-card:hover {
  border-color: var(--gold-primary);
  background: #FFFFFF;
}

.photo-slot-card.has-photo {
  border-style: solid;
  border-color: var(--gold-primary);
  background: #FFFFFF;
  padding: 8px;
}

.photo-slot-preview-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.photo-slot-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: #111111;
  margin-top: 10px;
}

.photo-slot-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.photo-slot-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.btn-slot-upload {
  background: #111;
  color: #FFF;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-slot-camera {
  background: var(--gold-dark);
  color: #FFF;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   STEP 3: FABRICS & MATERIALS SELECTION
   ========================================================================== */
.fabrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.fabric-card-opt {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  background: #FAF8F5;
  transition: all 0.2s ease;
}

.fabric-card-opt:hover {
  border-color: var(--gold-primary);
}

.fabric-card-opt.selected {
  border-color: var(--gold-dark);
  background: #FFFFFF;
  border-width: 2px;
  box-shadow: 0 4px 12px rgba(197, 168, 128, 0.15);
}

.fabric-card-opt h5 {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: #111;
  margin-bottom: 4px;
}

.fabric-card-opt p {
  font-size: 11px;
  color: var(--text-muted);
}

/* ==========================================================================
   STEP 4: QUANTITY & SIZE MATRIX (جدول الكميات والمقاسات)
   ========================================================================== */
.size-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.size-counter-card {
  background: #FFFFFF;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
}

.size-counter-card:hover, .size-counter-card.has-qty {
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-sm);
}

.size-counter-card.has-qty {
  background: linear-gradient(180deg, #FFFFFF, #FAF8F5);
}

.size-number-badge {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 900;
  color: #111;
  background: #FAF8F5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  border: 1px solid var(--border-color);
}

.size-counter-card.has-qty .size-number-badge {
  background: #111;
  color: var(--gold-primary);
  border-color: var(--gold-dark);
}

.size-inch-guide {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.counter-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-counter {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #FAF8F5;
  border: 1px solid var(--border-color);
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-counter:hover {
  background: var(--gold-primary);
  color: #FFF;
  border-color: var(--gold-dark);
}

.input-size-qty {
  width: 50px;
  height: 34px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  color: #111;
  outline: none;
}

.input-size-qty:focus {
  border-color: var(--gold-primary);
}

/* Total Batch Counter Card */
.total-batch-banner {
  background: linear-gradient(135deg, #1A1A1A, #282828);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--gold-dark);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.total-batch-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
}

.total-batch-count {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 900;
  color: var(--gold-primary);
}

.total-batch-breakdown {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.batch-pill-tag {
  background: rgba(197, 168, 128, 0.15);
  color: #E8D9C5;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  border: 1px solid rgba(197, 168, 128, 0.3);
}

/* Custom Size Row Builder */
.custom-sizes-section {
  background: #FAF8F5;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-top: 20px;
}

.custom-size-row {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #FFFFFF;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 10px;
}

/* ==========================================================================
   STEP 5: REVIEW & SUMMARY SCREEN
   ========================================================================== */
.review-summary-card {
  border: 2px solid var(--gold-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 24px;
}

.review-summary-header {
  background: linear-gradient(135deg, #111, #222);
  color: #FFFFFF;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--gold-dark);
}

.review-summary-body {
  padding: 24px;
  background: #FFFFFF;
}

.summary-spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.summary-spec-item {
  font-size: 13px;
}

.summary-spec-label {
  font-weight: bold;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.summary-spec-value {
  font-weight: 700;
  color: #111;
  font-size: 14px;
}

/* ==========================================================================
   PRINTABLE JOB TICKET (أمر الشغل للقص والخياطة)
   ========================================================================== */
.job-ticket-print-wrapper {
  display: none;
}

@media print {
  body * {
    visibility: hidden;
  }
  #printableJobTicketArea, #printableJobTicketArea * {
    visibility: visible;
  }
  #printableJobTicketArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 16px;
    background: #FFF;
    color: #000;
  }
  #printableJobTicketArea img {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    max-height: 140px !important;
    display: inline-block !important;
    visibility: visible !important;
  }
  .no-print {
    display: none !important;
  }
}

.job-ticket-box {
  background: #FFFFFF;
  border: 2px solid #000;
  border-radius: 8px;
  padding: 24px;
  max-width: 800px;
  margin: 0 auto;
  color: #000;
  font-family: 'Tajawal', sans-serif;
}

.job-ticket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #000;
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.job-ticket-title {
  font-family: 'Cairo', sans-serif;
  font-size: 22px;
  font-weight: 900;
}

.job-ticket-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  text-align: center;
}

.job-ticket-table th, .job-ticket-table td {
  border: 1px solid #000;
  padding: 8px;
  font-size: 13px;
}

.job-ticket-table th {
  background: #EEE;
  font-weight: 900;
}


/* Online Sync Badge for made.fiisa3.com */
.online-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.3s ease;
}

.online-badge-pill.connected {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.online-badge-pill.disconnected {
  background: #FFFBEB;
  color: #B45309;
  border: 1px solid #FDE68A;
}

/* ==========================================================================
   AUTHENTICATION & LOGIN GATEWAY OVERLAY
   ========================================================================== */
.login-gateway-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(13, 12, 11, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.login-gateway-overlay.active {
  display: flex;
}

body.login-locked {
  overflow: hidden;
}

.login-gateway-modal {
  background: #171615;
  border: 1.5px solid var(--gold-dark);
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  max-height: 94vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  padding: 28px 24px;
  color: #F3F4F6;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dark) #171615;
}

.login-gateway-header {
  text-align: center;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(197, 168, 128, 0.2);
  padding-bottom: 18px;
}

.login-brand-icon {
  font-size: 38px;
  margin-bottom: 6px;
  display: inline-block;
  filter: drop-shadow(0 2px 8px rgba(197, 168, 128, 0.4));
}

.login-brand-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 900;
  color: var(--gold-light);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.login-brand-subtitle {
  font-size: 14px;
  color: #A3A3A3;
  margin-bottom: 10px;
}

.login-secure-badge {
  display: inline-block;
  background: rgba(197, 168, 128, 0.12);
  color: var(--gold-primary);
  border: 1px solid rgba(197, 168, 128, 0.3);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 700;
}

.login-error-alert {
  background: rgba(220, 38, 38, 0.18);
  border: 1px solid #DC2626;
  color: #FCA5A5;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.login-accounts-section {
  margin-bottom: 20px;
}

.login-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 10px;
}

.btn-demo-guide-link {
  background: none;
  border: none;
  color: var(--gold-primary);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.btn-demo-guide-link:hover {
  color: #FFFFFF;
}

.login-accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
  background: #11100F;
  border-radius: 12px;
  border: 1px solid #292622;
}

.login-account-card {
  background: #1E1C1A;
  border: 1.5px solid #2F2B26;
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.login-account-card:hover {
  background: #25221F;
  border-color: var(--gold-dark);
}

.login-account-card.active {
  background: rgba(197, 168, 128, 0.15);
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px rgba(197, 168, 128, 0.25);
}

.account-card-avatar {
  font-size: 22px;
}

.account-card-name {
  font-size: 12px;
  font-weight: 800;
  color: #FFFFFF;
  display: block;
}

.account-card-role {
  font-size: 10px;
  color: #A3A3A3;
  display: block;
}

.account-card-scope {
  font-size: 9px;
  color: var(--gold-dark);
  background: rgba(0,0,0,0.3);
  padding: 2px 6px;
  border-radius: 6px;
  margin-top: 2px;
}

/* Active User Display */
.login-active-user-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #211F1C;
  border: 1px solid var(--gold-dark);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 18px;
}

.active-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #111;
  border: 1.5px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.active-user-info strong {
  display: block;
  font-size: 14px;
  color: #FFFFFF;
}

.active-user-info span {
  display: block;
  font-size: 11px;
  color: var(--gold-light);
}

/* PIN Input & Numpad */
.pin-input-group {
  margin-bottom: 14px;
  text-align: center;
}

.pin-input-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 6px;
}

.login-pin-input {
  width: 100%;
  max-width: 280px;
  height: 52px;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 10px;
  color: var(--gold-light);
  background: #0E0D0C;
  border: 2px solid var(--gold-dark);
  border-radius: 12px;
  outline: none;
  transition: all 0.2s ease;
  margin: 0 auto;
}

.login-pin-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 16px rgba(197, 168, 128, 0.35);
}

.login-numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 280px;
  margin: 0 auto 18px auto;
}

.numpad-btn {
  height: 48px;
  background: #252320;
  border: 1px solid #3A352F;
  border-radius: 10px;
  color: #FFFFFF;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.numpad-btn:active {
  background: var(--gold-dark);
  color: #000;
  transform: scale(0.96);
}

.numpad-btn.numpad-action {
  font-size: 16px;
  color: var(--gold-light);
  background: #1B1917;
}

.btn-login-submit {
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 800;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #111111;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-login-submit:hover {
  background: linear-gradient(135deg, #DFCAAA, var(--gold-primary));
  box-shadow: 0 6px 20px rgba(197, 168, 128, 0.35);
}

/* Demo Drawer */
.demo-guide-drawer {
  display: none;
  margin-top: 18px;
  padding: 16px;
  background: #11100F;
  border: 1px solid rgba(197, 168, 128, 0.3);
  border-radius: 12px;
}

.demo-guide-drawer.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.demo-guide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.demo-guide-header h4 {
  font-size: 14px;
  color: var(--gold-light);
  margin: 0;
}

.btn-close-demo {
  background: none;
  border: none;
  color: #9CA3AF;
  font-size: 16px;
  cursor: pointer;
}

.demo-guide-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
}

.demo-guide-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1B1917;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #2B2722;
  font-size: 12px;
}

.demo-user-meta strong {
  display: block;
  color: #FFF;
  font-size: 12px;
}

.demo-user-meta span {
  display: block;
  color: #A3A3A3;
  font-size: 11px;
}

.pin-code-badge {
  background: var(--gold-dark);
  color: #000;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 800;
}

/* Topbar Lock / Logout Button */
.persona-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-lock-session {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #F87171;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-lock-session:hover {
  background: #DC2626;
  color: #FFFFFF;
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION BAR
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
}

/* ==========================================================================
   MOBILE KANBAN STAGE FILTER TABS
   ========================================================================== */
.mobile-kanban-stage-tabs {
  display: none;
}

/* ==========================================================================
   COMPREHENSIVE MOBILE RESPONSIVENESS (iOS & Android)
   ========================================================================== */
@media (max-width: 768px) {
  /* Prevent horizontal spill */
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  body {
    /* Leave safe room for bottom nav */
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  /* Top Bar */
  .persona-topbar {
    padding: 8px 12px;
    flex-wrap: nowrap;
  }

  .persona-avatar {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .persona-details h4 {
    font-size: 12px;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .persona-details p {
    font-size: 10px;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .btn-lock-session {
    padding: 5px 10px;
    font-size: 11px;
  }

  .btn-reset-demo {
    display: none; /* Keep top bar clean on mobile */
  }

  /* Header */
  .app-header {
    padding: 12px 14px;
  }

  .brand-logo-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .brand-title h1 {
    font-size: 16px;
  }

  .brand-title p {
    font-size: 11px;
  }

  .online-badge-pill {
    font-size: 10px;
    padding: 3px 8px;
    margin-right: 0 !important;
    margin-top: 6px;
  }

  /* Hide Desktop Nav Tabs, Mobile Bottom Nav handles it */
  .app-header nav {
    display: none;
  }

  /* Mobile Bottom Nav Bar */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(58px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #111111;
    border-top: 1.5px solid var(--gold-dark);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
  }

  .mob-nav-btn {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #8E8E93;
    cursor: pointer;
    position: relative;
    padding: 4px 2px;
    touch-action: manipulation;
  }

  .mob-nav-btn.active {
    color: var(--gold-primary);
  }

  .mob-icon {
    font-size: 18px;
    line-height: 1.2;
  }

  .mob-label {
    font-size: 10px;
    font-weight: 700;
    margin-top: 2px;
  }

  .mob-badge {
    position: absolute;
    top: 4px;
    right: 22%;
    background: #DC2626;
    color: #FFF;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
  }

  .mob-nav-btn.btn-lock {
    color: #F87171;
  }

  /* Content area */
  .main-content {
    padding: 10px;
  }

  .context-alert {
    padding: 10px 12px;
    font-size: 12px;
    margin-bottom: 12px;
  }

  /* Stepper on Mobile */
  .wizard-stepper {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 8px 4px 12px;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .wizard-stepper::-webkit-scrollbar {
    display: none;
  }

  .stepper-item {
    min-width: 105px;
    flex-shrink: 0;
    padding: 8px 10px;
    border-radius: 8px;
  }

  .stepper-circle {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .stepper-step-num {
    font-size: 9px;
  }

  .stepper-step-title {
    font-size: 11px;
  }

  /* Step Form Cards */
  .wizard-step-card {
    padding: 16px 14px;
  }

  .step-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .step-header h3 {
    font-size: 16px;
  }

  /* Batch Quantities Matrix on Mobile */
  .size-matrix-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .size-counter-card {
    padding: 12px 8px;
  }

  .size-number-badge {
    font-size: 20px;
  }

  .size-inch-guide {
    font-size: 10px;
  }

  .counter-controls {
    gap: 6px;
    margin-top: 8px;
  }

  .btn-counter {
    width: 44px;
    height: 44px;
    font-size: 20px;
    touch-action: manipulation;
  }

  .input-size-qty {
    height: 44px;
    font-size: 18px;
    min-width: 44px;
  }

  /* Footer Wizard Buttons on Mobile */
  .wizard-nav-footer {
    flex-direction: column-reverse;
    gap: 10px;
    margin-top: 20px;
  }

  .wizard-nav-footer .btn {
    width: 100%;
    min-height: 48px;
    font-size: 15px;
    justify-content: center;
  }

  /* Mobile Kanban Stage Tabs */
  .mobile-kanban-stage-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    margin-bottom: 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-kanban-stage-tabs::-webkit-scrollbar {
    display: none;
  }

  .stage-pill {
    white-space: nowrap;
    padding: 7px 14px;
    border-radius: 20px;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    touch-action: manipulation;
  }

  .stage-pill.active {
    background: var(--gold-primary);
    color: #FFFFFF;
    border-color: var(--gold-dark);
  }

  /* Kanban Columns Mobile Snap */
  .kanban-board-wrapper {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 16px;
    -webkit-overflow-scrolling: touch;
  }

  .kanban-column {
    width: 84vw;
    min-width: 280px;
    scroll-snap-align: center;
    flex-shrink: 0;
  }

  /* Summary Grid */
  .summary-spec-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Modals on Mobile */
  .order-modal-content {
    width: 96%;
    max-height: 90vh;
    padding: 16px 14px;
    border-radius: 14px;
  }

  .login-gateway-modal {
    padding: 20px 14px;
    border-radius: 16px;
    max-height: 95vh;
  }

  .login-accounts-grid {
    grid-template-columns: repeat(2, 1fr);
    max-height: 180px;
  }

  /* 1-Column Responsive Grids on Mobile */
  .wizard-two-column-grid,
  .modal-two-column-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* Prevent Safari Auto-Zoom on Form Focus (strictly 16px font-size) */
  input, select, textarea, .form-input, .form-select {
    font-size: 16px !important;
  }

  /* Photo Slot Buttons for Touch */
  .photo-slot-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
  }

  .btn-slot-upload, .btn-slot-camera {
    flex: 1;
    min-height: 44px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 12px !important;
    touch-action: manipulation !important;
  }

  /* Custom Sizes Row Wrap */
  .custom-size-row {
    flex-wrap: wrap;
    gap: 8px;
    background: #FAF8F5;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #E5DFD5;
    margin-bottom: 8px;
  }

  .custom-size-row > div:first-child {
    width: 100%;
    flex: none !important;
  }

  /* Activity History Filter Bar on Mobile */
  #logSearchInput, #logActionFilter, #btnRefreshLogs {
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Dashboard Overview Cards: 2 Columns on Mobile */
  #section-dashboard-overview > div:first-of-type {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  /* Modal Container on Mobile */
  .modal-container {
    width: 95% !important;
    max-height: 92vh !important;
    padding: 14px !important;
    margin: auto;
  }

  .modal-footer {
    flex-direction: column-reverse !important;
    gap: 8px !important;
    padding: 12px 14px !important;
  }

  .modal-footer .btn {
    width: 100% !important;
    min-height: 46px !important;
    justify-content: center !important;
  }
}

/* ==========================================================================
   ORDER SUBMISSION PROGRESS OVERLAY & PROGRESS BAR
   ========================================================================== */
.order-progress-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(13, 12, 11, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.order-progress-box {
  background: #171615;
  border: 1.5px solid var(--gold-dark);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  color: #FFFFFF;
}

.order-progress-spinner {
  font-size: 42px;
  margin-bottom: 12px;
  display: inline-block;
  animation: pulseSpin 1.8s infinite ease-in-out;
}

@keyframes pulseSpin {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.15) rotate(15deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.order-progress-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--gold-light);
  margin-bottom: 6px;
}

.order-progress-subtitle {
  font-size: 13px;
  color: #9CA3AF;
  margin-bottom: 24px;
  min-height: 38px;
  line-height: 1.5;
}

.progress-track-wrapper {
  background: #252320;
  border-radius: 12px;
  height: 12px;
  overflow: hidden;
  border: 1px solid #3A352F;
  margin-bottom: 12px;
  position: relative;
}

.progress-bar-fill {
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-primary), #E8D9C5);
  height: 100%;
  border-radius: 12px;
  transition: width 0.35s ease;
  box-shadow: 0 0 12px rgba(197, 168, 128, 0.5);
}

.progress-percentage-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #DFCAAA;
  font-weight: 700;
}


