/* ==========================================================================
   NICSY FASHION ERP - MODULE SPECIFIC STYLES
   ========================================================================== */

/* 1. Process Pipeline Flow Bar */
.pipeline-container {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 4px;
  margin-bottom: 24px;
}

.pipeline-step {
  flex: 1;
  min-width: 140px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  position: relative;
  transition: all var(--transition-fast);
}

.pipeline-step.active {
  border-color: var(--brand-primary);
  background: rgba(16, 185, 129, 0.08);
}

.pipeline-step .step-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.pipeline-step .step-qty {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

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

.pipeline-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* 2. Cut Matrix Grid in Cutting Entry */
.cut-matrix-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.cut-matrix-table th {
  background: var(--bg-surface-subtle);
  padding: 8px 12px;
  font-size: 12px;
  text-align: center;
  border: 1px solid var(--border-subtle);
}

.cut-matrix-table td {
  padding: 6px 8px;
  border: 1px solid var(--border-subtle);
  text-align: center;
}

.cut-matrix-table input.matrix-input {
  width: 70px;
  text-align: center;
  padding: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 600;
}

/* 3. Bundle Cards Grid */
.bundle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.bundle-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.bundle-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-2px);
}

.bundle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bundle-id {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--brand-primary);
}

.bundle-qty-badge {
  font-family: var(--font-mono);
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 12px;
}

.bundle-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

.bundle-barcode-sim {
  margin-top: 6px;
  padding: 6px 0;
  background: #ffffff;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.barcode-lines {
  height: 28px;
  width: 90%;
  background: repeating-linear-gradient(
    90deg,
    #000 0px, #000 2px,
    #fff 2px, #fff 4px,
    #000 4px, #000 7px,
    #fff 7px, #fff 8px,
    #000 8px, #000 11px
  );
}

.barcode-text {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #000;
  margin-top: 2px;
  letter-spacing: 2px;
  font-weight: 700;
}

/* 4. QC 3-Way Sorting Cards */
.qc-split-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 16px 0;
}

.qc-action-box {
  background: var(--bg-surface-subtle);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}

.qc-action-box.pass-box {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.05);
}

.qc-action-box.rework-box {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.05);
}

.qc-action-box.reject-box {
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.05);
}

.qc-box-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.qc-box-title.pass { color: var(--accent-emerald); }
.qc-box-title.rework { color: var(--accent-amber); }
.qc-box-title.reject { color: var(--accent-rose); }

/* 5. Karigar Passbook Ledger */
.passbook-balance-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.passbook-balance-val {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  color: var(--brand-primary);
}

.tx-credit {
  color: #34d399 !important;
  font-weight: 600;
}

.tx-debit {
  color: #fb7185 !important;
  font-weight: 600;
}

/* 6. Production Costing Breakdown Visualizer */
.costing-summary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.cost-bar-container {
  display: flex;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
  margin: 14px 0 10px;
  background: var(--bg-surface-subtle);
}

.cost-bar-segment {
  height: 100%;
  transition: width var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
}

.cost-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
}

.cost-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cost-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* 7. Printable Slips & Tickets (Thermal 80mm & A4) */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .app-sidebar, .app-header, .btn, .no-print {
    display: none !important;
  }
  .main-wrapper {
    margin-left: 0 !important;
  }
  .page-container {
    padding: 0 !important;
    max-width: 100% !important;
  }
  .printable-area {
    display: block !important;
    padding: 10px;
    color: #000000 !important;
  }
  .printable-area * {
    color: #000000 !important;
  }
}

.print-ticket-box {
  background: #ffffff;
  color: #000000;
  padding: 16px;
  border: 2px dashed #333;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  max-width: 380px;
  margin: 0 auto;
}

.print-ticket-box h3 {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

.print-ticket-box p.center {
  text-align: center;
  font-size: 10.5px;
  margin-bottom: 10px;
}

.ticket-divider {
  border-top: 1px dashed #000;
  margin: 8px 0;
}

.ticket-row {
  display: flex;
  justify-content: space-between;
  margin: 4px 0;
}

.ticket-row.bold {
  font-weight: 700;
}

/* ==========================================================================
   ROLE-BASED & MULTI-USER PORTAL STYLES
   ========================================================================== */
.role-badge-super_admin {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.role-badge-manager {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.role-badge-line_manager {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.35);
}

.role-badge-line_master {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.role-badge-employee {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.35);
}

.role-badge-karigar {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

/* Karigar Portal Header & KPI Cards */
.portal-hero {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(99, 102, 241, 0.08) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.portal-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.portal-kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}

.portal-kpi-val {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  margin-top: 4px;
}

/* WhatsApp Report Cards */
.wa-report-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.2s, border-color 0.2s;
}

.wa-report-card:hover {
  border-color: #25D366;
  transform: translateY(-2px);
}

/* Manager Approval Queue Items */
.approval-item-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.approval-item-card.pending {
  border-left: 4px solid var(--accent-amber);
}

.approval-item-card.approved {
  border-left: 4px solid var(--accent-emerald);
}

.approval-item-card.rejected {
  border-left: 4px solid var(--accent-rose);
}

/* ==========================================================================
   Flexible Operations Stepper Cards (Interactive WIP Flow Cards)
   ========================================================================== */
.stepper-step-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm, 6px);
  padding: 10px 8px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  position: relative;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mouse Over Highlight */
.stepper-step-card:hover {
  background: var(--bg-surface-elevated, #283548) !important;
  border-color: var(--accent-blue, #38bdf8) !important;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.28), 0 2px 6px rgba(0, 0, 0, 0.3) !important;
  z-index: 2;
}

.stepper-step-card:hover .stepper-step-code {
  color: var(--accent-blue, #38bdf8) !important;
}

.stepper-step-card:hover .stepper-step-op-num {
  color: var(--text-primary) !important;
}

/* Selected Active State */
.stepper-step-card.selected,
.stepper-step-card.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(6, 95, 70, 0.35) 100%) !important;
  border: 2px solid var(--brand-primary, #10b981) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3), 0 8px 20px rgba(16, 185, 129, 0.25) !important;
  transform: translateY(-2px);
  z-index: 3;
}

.stepper-step-card.selected .stepper-step-code,
.stepper-step-card.active .stepper-step-code {
  color: #10b981 !important;
  font-weight: 800;
}

.stepper-step-card.selected .stepper-step-op-num,
.stepper-step-card.active .stepper-step-op-num {
  color: #34d399 !important;
  font-weight: 700;
}

/* Hover on Selected Card */
.stepper-step-card.selected:hover,
.stepper-step-card.active:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28) 0%, rgba(6, 95, 70, 0.45) 100%) !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.4), 0 10px 24px rgba(16, 185, 129, 0.35) !important;
  transform: translateY(-4px) scale(1.03);
}

/* Completed Operation Card */
.stepper-step-card.is-done {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.35);
}

.stepper-step-card.is-done:hover {
  border-color: var(--accent-emerald, #10b981) !important;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.25), 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

/* Sub-elements inside stepper card */
.stepper-step-op-num {
  font-size: 9.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.15s ease;
}

.stepper-step-code {
  font-size: 14px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--brand-primary);
  margin: 2px 0;
  transition: color 0.15s ease;
}

.stepper-step-progress {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2px 0 4px;
}

.stepper-step-badge {
  font-size: 9px;
  padding: 2px 4px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 4px;
}

/* ==========================================================================
   Mobile-App Model Optimizations for Modules
   ========================================================================== */

/* Digital Passbook / Wallet Hero Card */
.passbook-hero-banner {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #134e4a 100%);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}

.passbook-hero-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.passbook-balance-val {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 800;
  color: #34d399;
  letter-spacing: -0.5px;
}

/* Bundle Grid Responsive Mobile */
.bundle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.bundle-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.bundle-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-blue);
}

@media (max-width: 768px) {
  .bundle-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .passbook-hero-banner {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 14px !important;
    padding: 16px !important;
  }

  .passbook-balance-val {
    font-size: 26px !important;
  }

  .passbook-hero-banner .btn {
    width: 100%;
    min-height: 44px;
  }
}


