/* ================================================
   PILLOW CENTER - Standalone Page Styles
   These styles are scoped to the standalone pillow-center.html page
   via a body.pillow-standalone class. The index.html page also loads
   this file so NO global selectors (body, *, h1-h5, table, etc.)
   should be added here without scoping.
   ================================================ */

/* ================================================
   Standalone page styles — only apply on pillow-center.html
   via body.pillow-standalone. These do NOT affect index.html.
   ================================================ */
body.pillow-standalone {
  margin: 0; font-family: 'Inter', sans-serif; background-color: #f8f9fa;
  color: #1f2937; height: 100vh; display: flex; overflow: hidden;
}
body.pillow-standalone h1, body.pillow-standalone h2, body.pillow-standalone h3,
body.pillow-standalone h4, body.pillow-standalone h5 {
  font-family: 'Outfit', sans-serif; margin: 0; font-weight: 600;
}
body.pillow-standalone table { width: 100%; border-collapse: collapse; }
body.pillow-standalone th { text-align: left; padding: 12px 24px; font-size: 12px; color: #6b7280; font-weight: 600; background: #f9fafb; border-bottom: 1px solid #e5e7eb; }
body.pillow-standalone td { padding: 16px 24px; font-size: 14px; border-bottom: 1px solid #e5e7eb; color: #374151; }
body.pillow-standalone tr:last-child td { border-bottom: none; }
body.pillow-standalone tr:hover td { background: #f9fafb; }
body.pillow-standalone .sidebar { width: 260px; background-color: #1a1c23; color: #f3f4f6; display: flex; flex-direction: column; flex-shrink: 0; }
body.pillow-standalone .brand { height: 70px; display: flex; align-items: center; padding: 0 24px; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 20px; letter-spacing: 0.5px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
body.pillow-standalone .brand span { color: #8B1538; margin-left: 6px; }
body.pillow-standalone .nav-menu { padding: 20px 12px; flex: 1; }
body.pillow-standalone .nav-item { display: flex; align-items: center; padding: 12px 16px; color: #9ca3af; text-decoration: none; border-radius: 6px; margin-bottom: 4px; transition: all 0.2s; font-size: 14px; font-weight: 500; }
body.pillow-standalone .nav-item:hover { background-color: rgba(255, 255, 255, 0.05); color: white; }
body.pillow-standalone .nav-item.active { background-color: #8B1538; color: white; box-shadow: 0 4px 12px rgba(139, 21, 56, 0.4); }
body.pillow-standalone .nav-item i { width: 24px; margin-right: 12px; font-size: 16px; }
body.pillow-standalone .main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
body.pillow-standalone .top-header { height: 70px; background: white; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; flex-shrink: 0; }
body.pillow-standalone .page-title h1 { font-size: 20px; color: #111827; }
body.pillow-standalone .page-title p { font-size: 13px; color: #6b7280; margin-top: 2px; }
body.pillow-standalone .user-profile { display: flex; align-items: center; gap: 12px; }
body.pillow-standalone .avatar { width: 36px; height: 36px; border-radius: 50%; background: #8B1538; color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
body.pillow-standalone .module-tabs { padding: 0 30px; background: white; border-bottom: 1px solid #e5e7eb; display: flex; gap: 24px; }
body.pillow-standalone .tab { padding: 16px 4px; font-size: 14px; font-weight: 500; color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.2s; }
body.pillow-standalone .tab:hover { color: #8B1538; }
body.pillow-standalone .tab.active { color: #8B1538; border-bottom-color: #8B1538; font-weight: 600; }
body.pillow-standalone .view-section { display: none; height: 100%; flex-direction: column; overflow: hidden; }
body.pillow-standalone .view-section.active { display: flex; }
body.pillow-standalone .dashboard-container { padding: 30px; overflow-y: auto; max-width: 1400px; width: 100%; margin: 0 auto; }
body.pillow-standalone .kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
body.pillow-standalone .kpi-card { background: white; padding: 20px; border-radius: 12px; box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); border: 1px solid #e5e7eb; }
body.pillow-standalone .kpi-label { font-size: 12px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
body.pillow-standalone .kpi-value { font-size: 28px; font-weight: 700; color: #111827; margin-top: 8px; font-family: 'Outfit'; }
body.pillow-standalone .kpi-trend { font-size: 12px; display: flex; align-items: center; gap: 4px; margin-top: 8px; }
body.pillow-standalone .trend-up { color: #10b981; }
body.pillow-standalone .recent-table { background: white; border-radius: 12px; box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); border: 1px solid #e5e7eb; overflow: hidden; }
body.pillow-standalone .table-header { padding: 16px 24px; border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; }
body.pillow-standalone .table-title { font-weight: 600; font-size: 16px; }
body.pillow-standalone .status-badge { padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
body.pillow-standalone .status-draft { background: #eff6ff; color: #1e40af; }
body.pillow-standalone .status-production { background: #ecfdf5; color: #047857; }
body.pillow-standalone .status-pending { background: #fffbeb; color: #b45309; }
body.pillow-standalone .status-rejected { background: #fef2f2; color: #b91c1c; }
body.pillow-standalone .status-incoming { background: #f3f4f6; color: #4b5563; }
body.pillow-standalone .workspace { flex: 1; padding: 30px; overflow-y: auto; position: relative; background: #f8f9fa; }
body.pillow-standalone .grid-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 30px; max-width: 1600px; margin: 0 auto; height: 100%; }
body.pillow-standalone .card { background: #fff; border-radius: 20px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06); border: 1px solid rgba(0,0,0,0.02); overflow: hidden; display: flex; flex-direction: column; }
body.pillow-standalone .card-header { padding: 20px 24px; border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; background: white; }
body.pillow-standalone .card-title { font-size: 16px; font-weight: 600; color: #111827; display: flex; align-items: center; gap: 8px; }
body.pillow-standalone .step-badge { background: #f3f4f6; color: #4b5563; font-size: 11px; padding: 2px 8px; border-radius: 12px; font-weight: 600; text-transform: uppercase; }
body.pillow-standalone .card-body { padding: 24px; overflow-y: auto; }
body.pillow-standalone .project-context-box { background: #fff; border: 1px solid #e5e7eb; border-left: 4px solid #8B1538; padding: 20px; border-radius: 8px; margin-bottom: 24px; display: flex; gap: 24px; align-items: center; box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); }
body.pillow-standalone .stepper { display: flex; justify-content: space-between; margin-bottom: 24px; position: relative; margin-top: 10px; padding: 0 10px; }
body.pillow-standalone .stepper::after { content: ''; position: absolute; top: 50%; left: 0; width: 100%; height: 2px; background: #e5e7eb; z-index: 1; transform: translateY(-50%); }
body.pillow-standalone .step-node { width: 32px; height: 32px; border-radius: 50%; background: white; border: 2px solid #e5e7eb; z-index: 2; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: #6b7280; position: relative; cursor: pointer; transition: all 0.2s; }
body.pillow-standalone .step-node.active { border-color: #8B1538; background: #8B1538; color: white; box-shadow: 0 0 0 4px rgba(139,21,56,0.1); }
body.pillow-standalone .step-node.completed { border-color: #8B1538; background: white; color: #8B1538; }
body.pillow-standalone .step-label { position: absolute; top: 40px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 600; white-space: nowrap; color: #6b7280; }
body.pillow-standalone .step-node.active .step-label { color: #8B1538; }
body.pillow-standalone .style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 16px; }
body.pillow-standalone .style-option { border: 2px solid transparent; border-radius: 12px; cursor: pointer; transition: all 0.2s; position: relative; background: #fff; padding: 8px; text-align: center; }
body.pillow-standalone .style-option:hover { transform: translateY(-2px); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
body.pillow-standalone .style-option.selected { border-color: #8B1538; background: rgba(139,21,56,0.03); box-shadow: 0 0 0 2px rgba(139,21,56,0.1); }
body.pillow-standalone .style-img { width: 100%; height: 80px; object-fit: contain; margin-bottom: 8px; background: #f3f4f6; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 24px; overflow: hidden; }
body.pillow-standalone .style-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
body.pillow-standalone .style-thumb-bg { width: 100%; height: 80px; margin-bottom: 8px; background: #f3f4f6 center / contain no-repeat; border-radius: 8px; }
body.pillow-standalone .style-name { font-size: 11px; font-weight: 500; color: #4b5563; }
body.pillow-standalone .form-group { margin-bottom: 0; flex: 1; }
body.pillow-standalone .form-label { display: block; font-size: 12px; font-weight: 600; color: #374151; margin-bottom: 6px; }
body.pillow-standalone .form-input, body.pillow-standalone .form-select { width: 100%; padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; transition: all 0.2s; font-family: 'Inter', sans-serif; }
body.pillow-standalone .form-input:focus, body.pillow-standalone .form-select:focus { border-color: #8B1538; box-shadow: 0 0 0 3px rgba(139,21,56,0.1); }
body.pillow-standalone .row { display: flex; gap: 20px; margin-bottom: 20px; }
body.pillow-standalone .col { flex: 1; }
body.pillow-standalone .fabric-selector { border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; background: #f9fafb; }
body.pillow-standalone .fabric-search-container { display: flex; gap: 12px; margin-bottom: 16px; }
body.pillow-standalone .fabric-result-card { background: white; border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px; display: flex; gap: 16px; align-items: center; box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); }
body.pillow-standalone .fabric-result-thumb { width: 60px; height: 60px; border-radius: 4px; background-color: #f8f9fa; display: flex; align-items: center; justify-content: center; color: #6b7280; font-size: 20px; flex-shrink: 0; }
body.pillow-standalone .preview-panel { position: sticky; top: 0; height: 100%; display: flex; flex-direction: column; }
body.pillow-standalone .preview-image-container { background: #f3f4f6; border-bottom: 1px solid #e5e7eb; height: 300px; display: flex; align-items: center; justify-content: center; position: relative; background-image: radial-gradient(#e5e7eb 1px, transparent 1px); background-size: 20px 20px; }
body.pillow-standalone .ai-badge { position: absolute; top: 16px; right: 16px; background: white; padding: 6px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); color: #8B1538; display: flex; align-items: center; gap: 6px; }
body.pillow-standalone .pricing-section { padding: 24px; background: white; flex: 1; }
body.pillow-standalone .line-item { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 14px; color: #4b5563; }
body.pillow-standalone .line-item.sub { padding-left: 12px; font-size: 13px; color: #6b7280; border-left: 2px solid #e5e7eb; }
body.pillow-standalone .line-item.total { margin-top: 20px; padding-top: 20px; border-top: 1px solid #e5e7eb; font-weight: 700; font-size: 18px; color: #111827; }
body.pillow-standalone .action-buttons { padding: 24px; background: white; border-top: 1px solid #e5e7eb; display: flex; gap: 12px; flex-direction: column; }
body.pillow-standalone .btn { border: none; border-radius: 8px; padding: 12px 20px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
body.pillow-standalone .btn-primary { background: #8B1538; color: white; box-shadow: 0 4px 6px -1px rgba(139,21,56,0.3); }
body.pillow-standalone .btn-primary:hover { background: #ab1f48; transform: translateY(-1px); }
body.pillow-standalone .btn-outline { background: white; border: 1px solid #d1d5db; color: #374151; }
body.pillow-standalone .btn-outline:hover { background: #f9fafb; border-color: #9ca3af; }
body.pillow-standalone .btn-magic { background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%); color: white; position: relative; overflow: hidden; }
body.pillow-standalone .btn-magic::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transform: translateX(-100%); animation: shimmer 3s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
body.pillow-standalone .badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
body.pillow-standalone .badge-info { background: #eff6ff; color: #1d4ed8; }
body.pillow-standalone .moq-alert { margin-top: 8px; padding: 10px; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 6px; font-size: 12px; color: #92400e; display: flex; gap: 8px; align-items: flex-start; }
body.pillow-standalone .workflow-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
body.pillow-standalone .cfa-grid { display: flex; flex-direction: column; gap: 16px; }
body.pillow-standalone .cfa-card { background: white; border-radius: 12px; border: 1px solid #e5e7eb; box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); overflow: hidden; display: flex; min-height: 140px; transition: transform 0.2s, box-shadow 0.2s; }
body.pillow-standalone .cfa-card:hover { transform: translateY(-2px); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
body.pillow-standalone .cfa-image { width: 140px; flex-shrink: 0; background: #e5e7eb; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
body.pillow-standalone .cfa-image img { width: 100%; height: 100%; object-fit: cover; }
body.pillow-standalone .cfa-status { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; background: rgba(255,255,255,0.95); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
body.pillow-standalone .status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
body.pillow-standalone .cfa-content { padding: 20px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
body.pillow-standalone .cfa-meta { font-size: 12px; color: #6b7280; display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
body.pillow-standalone .cfa-title { font-weight: 600; font-size: 16px; margin-bottom: 4px; color: #111827; }
body.pillow-standalone .cfa-subtitle { font-size: 13px; color: #4b5563; margin-bottom: 12px; }
body.pillow-standalone .cfa-tracking { align-self: flex-start; background: #f9fafb; padding: 6px 10px; border-radius: 6px; font-size: 12px; color: #374151; display: flex; align-items: center; gap: 8px; }
body.pillow-standalone .cfa-actions { width: 200px; flex-shrink: 0; padding: 20px; border-left: 1px solid #e5e7eb; display: flex; flex-direction: column; gap: 12px; justify-content: center; background: #fafafa; }
body.pillow-standalone .process-steps { display: flex; flex-direction: column; gap: 32px; max-width: 900px; margin: 0 auto; position: relative; }
body.pillow-standalone .process-steps::before { content: ''; position: absolute; top: 20px; bottom: 20px; left: 24px; width: 2px; background: #e5e7eb; z-index: 0; }
body.pillow-standalone .process-step { display: flex; gap: 24px; position: relative; z-index: 1; }
body.pillow-standalone .step-icon { width: 50px; height: 50px; border-radius: 50%; background: white; border: 2px solid #8B1538; color: #8B1538; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; box-shadow: 0 0 0 4px #f8f9fa; }
body.pillow-standalone .step-content { flex: 1; background: white; padding: 24px; border-radius: 12px; box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); border: 1px solid #e5e7eb; }
body.pillow-standalone .step-header { display: flex; justify-content: space-between; margin-bottom: 12px; }
body.pillow-standalone .step-title { font-weight: 700; font-family: 'Outfit'; font-size: 18px; color: #111827; }
body.pillow-standalone .step-desc { color: #4b5563; font-size: 14px; line-height: 1.5; }
body.pillow-standalone .step-actions { margin-top: 16px; padding-top: 16px; border-top: 1px solid #f3f4f6; display: flex; gap: 12px; }

/* ================================================
   PILLOW CENTER - Scoped Styles (pc- prefix)
   All rules scoped under #tab-pillow-center
   Uses PRIMOS design system variables from variables.css
   ================================================ */

/* --- Sub-tab Navigation --- */
#tab-pillow-center .pc-module-tabs {
  padding: 0 var(--space-6);
  background: var(--color-gray-50);
  border-bottom: 1px solid var(--color-gray-200);
  display: flex;
  gap: var(--space-6);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#tab-pillow-center .pc-tab {
  padding: var(--space-4) var(--space-1);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

#tab-pillow-center .pc-tab:hover {
  color: var(--color-primary);
}

#tab-pillow-center .pc-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

/* --- View System --- */
#tab-pillow-center .pc-view {
  display: none;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

#tab-pillow-center .pc-view.active {
  display: flex;
}

/* --- Dashboard --- */
#tab-pillow-center .pc-dashboard-container {
  padding: var(--space-6);
  overflow-y: auto;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

#tab-pillow-center .pc-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
}

#tab-pillow-center .pc-dashboard-header h2 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--color-gray-900);
}

/* --- KPI Cards --- */
#tab-pillow-center .pc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

#tab-pillow-center .pc-kpi-card {
  background: white;
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-gray-200);
}

#tab-pillow-center .pc-kpi-label {
  font-size: var(--font-size-xs);
  color: var(--color-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

#tab-pillow-center .pc-kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-top: var(--space-2);
}

#tab-pillow-center .pc-kpi-value.pc-kpi-warning {
  color: var(--color-warning);
}

#tab-pillow-center .pc-kpi-trend {
  font-size: var(--font-size-xs);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
  color: var(--color-gray-500);
}

#tab-pillow-center .pc-kpi-trend.pc-trend-up {
  color: var(--color-success);
}

#tab-pillow-center .pc-kpi-trend.pc-trend-down {
  color: var(--color-danger);
}

/* --- Recent Table --- */
#tab-pillow-center .pc-recent-table {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-gray-200);
  overflow: hidden;
}

#tab-pillow-center .pc-table-header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#tab-pillow-center .pc-table-title {
  font-weight: 600;
  font-size: var(--font-size-base);
}

#tab-pillow-center .pc-search-input {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  width: 200px;
  background: var(--color-gray-50);
  transition: border-color var(--transition-fast);
}

#tab-pillow-center .pc-search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(139, 21, 56, 0.1);
}

#tab-pillow-center .pc-table {
  width: 100%;
  border-collapse: collapse;
}

#tab-pillow-center .pc-table th {
  text-align: left;
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-xs);
  color: var(--color-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  background: var(--color-gray-50);
  border-bottom: 1px solid var(--color-gray-200);
}

#tab-pillow-center .pc-table td {
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-sm);
  border-bottom: 1px solid var(--color-gray-100);
  vertical-align: middle;
}

#tab-pillow-center .pc-table tbody tr:hover {
  background: var(--color-gray-50);
}

#tab-pillow-center .pc-table .pc-project-name {
  font-weight: 600;
  color: var(--color-gray-900);
}

#tab-pillow-center .pc-table .pc-project-detail {
  font-size: 11px;
  color: var(--color-gray-500);
}

#tab-pillow-center .pc-empty-state {
  text-align: center;
  padding: var(--space-8) !important;
  color: var(--color-gray-400);
  font-style: italic;
}

/* --- Status Badges --- */
#tab-pillow-center .pc-status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

#tab-pillow-center .pc-status-draft {
  background: var(--color-gray-100);
  color: var(--color-gray-600);
}

#tab-pillow-center .pc-status-awaiting_cfa {
  background: var(--color-warning-light, #fef3c7);
  color: var(--color-warning-dark, #92400e);
}

#tab-pillow-center .pc-status-in_production {
  background: var(--color-info-light, #dbeafe);
  color: var(--color-info-dark, #1e40af);
}

#tab-pillow-center .pc-status-complete {
  background: var(--color-success-light, #d1fae5);
  color: var(--color-success-dark, #065f46);
}

/* --- Buttons --- */
#tab-pillow-center .pc-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

#tab-pillow-center .pc-btn-primary {
  background: var(--color-primary);
  color: white;
}

#tab-pillow-center .pc-btn-primary:hover {
  background: var(--color-primary-hover);
}

#tab-pillow-center .pc-btn-secondary {
  background: white;
  color: var(--color-gray-700);
  border: 1px solid var(--color-gray-300);
}

#tab-pillow-center .pc-btn-secondary:hover {
  background: var(--color-gray-50);
  border-color: var(--color-gray-400);
}

#tab-pillow-center .pc-btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-xs);
}

#tab-pillow-center .pc-btn-outline:hover {
  background: var(--color-primary);
  color: white;
}

/* --- Empty View States --- */
#tab-pillow-center .pc-empty-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-10);
  text-align: center;
  flex: 1;
  min-height: 300px;
}

#tab-pillow-center .pc-empty-icon {
  font-size: 48px;
  margin-bottom: var(--space-4);
}

#tab-pillow-center .pc-empty-view h3 {
  font-size: var(--font-size-xl);
  color: var(--color-gray-700);
  margin-bottom: var(--space-2);
}

#tab-pillow-center .pc-empty-view p {
  color: var(--color-gray-500);
  font-size: var(--font-size-sm);
  max-width: 400px;
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
  #tab-pillow-center .pc-module-tabs {
    padding: 0 var(--space-4);
    gap: var(--space-4);
  }

  #tab-pillow-center .pc-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  #tab-pillow-center .pc-dashboard-container {
    padding: var(--space-4);
  }

  #tab-pillow-center .pc-dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  #tab-pillow-center .pc-table-header {
    flex-direction: column;
    gap: var(--space-3);
    align-items: flex-start;
  }

  #tab-pillow-center .pc-search-input {
    width: 100%;
  }

  #tab-pillow-center .pc-table th:nth-child(3),
  #tab-pillow-center .pc-table td:nth-child(3),
  #tab-pillow-center .pc-table th:nth-child(4),
  #tab-pillow-center .pc-table td:nth-child(4) {
    display: none;
  }
}

@media (max-width: 480px) {
  #tab-pillow-center .pc-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================================
   PILLOWMAKER - Configurator Styles
   ================================================ */

/* --- Workspace & Grid Layout --- */
#tab-pillow-center .pc-workspace {
  padding: var(--space-6);
  overflow-y: auto;
  flex: 1;
}

#tab-pillow-center .pc-grid-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--space-6);
  max-width: 1400px;
  margin: 0 auto;
}

/* --- Cards --- */
#tab-pillow-center .pc-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-gray-200);
  display: flex;
  flex-direction: column;
}

#tab-pillow-center .pc-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-gray-200);
}

#tab-pillow-center .pc-card-title {
  font-weight: 600;
  font-size: var(--font-size-base);
  color: var(--color-gray-900);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

#tab-pillow-center .pc-card-body {
  padding: var(--space-6);
  flex: 1;
}

/* --- Context Box --- */
#tab-pillow-center .pc-context-box {
  background: var(--color-gray-50);
  border: 1px solid var(--color-gray-200);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
}

#tab-pillow-center .pc-context-row {
  display: flex;
  gap: var(--space-5);
  align-items: flex-end;
}

/* --- Stepper --- */
#tab-pillow-center .pc-stepper {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  margin-bottom: var(--space-6);
  position: relative;
  padding: var(--space-4) 0;
}

#tab-pillow-center .pc-stepper::before {
  content: '';
  position: absolute;
  top: calc(var(--space-4) + 14px);
  left: 15%;
  right: 15%;
  height: 2px;
  background: var(--color-gray-200);
}

#tab-pillow-center .pc-step-node {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-gray-200);
  color: var(--color-gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

#tab-pillow-center .pc-step-node.active {
  background: var(--color-primary);
  color: white;
}

#tab-pillow-center .pc-step-node.completed {
  background: var(--color-success);
  color: white;
}

#tab-pillow-center .pc-step-label {
  position: absolute;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--color-gray-500);
  white-space: nowrap;
  font-weight: 500;
}

#tab-pillow-center .pc-step-node.active .pc-step-label {
  color: var(--color-primary);
}

/* --- Section Headings --- */
#tab-pillow-center .pc-section-heading {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-gray-700);
  margin: 0 0 var(--space-3) 0;
}

/* --- Shape Selector --- */
#tab-pillow-center .pc-shape-selector {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

#tab-pillow-center .pc-shape-btn {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-md);
  background: white;
  color: var(--color-gray-700);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

#tab-pillow-center .pc-shape-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

#tab-pillow-center .pc-shape-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* --- Style Grid --- */
#tab-pillow-center .pc-style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

#tab-pillow-center .pc-style-option {
  border: 2px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  padding: var(--space-2);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  background: white;
}

#tab-pillow-center .pc-style-option:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

#tab-pillow-center .pc-style-option.selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary);
  background: rgba(139, 21, 56, 0.03);
}

#tab-pillow-center .pc-style-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gray-50);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
  overflow: hidden;
}

#tab-pillow-center .pc-style-img-wrap img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

#tab-pillow-center .pc-style-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-gray-700);
}

/* --- Form Elements --- */
#tab-pillow-center .pc-form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

#tab-pillow-center .pc-form-label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-gray-600);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

#tab-pillow-center .pc-form-input,
#tab-pillow-center .pc-form-select {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  color: var(--color-gray-900);
  background: white;
  transition: border-color var(--transition-fast);
}

#tab-pillow-center .pc-form-input:focus,
#tab-pillow-center .pc-form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(139, 21, 56, 0.1);
}

#tab-pillow-center .pc-form-row {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

/* --- Divider --- */
#tab-pillow-center .pc-divider {
  border-top: 1px solid var(--color-gray-200);
  margin: var(--space-5) 0;
}

/* --- Fabric Selection --- */
#tab-pillow-center .pc-fabric-selection {
  background: var(--color-gray-50);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

#tab-pillow-center .pc-fabric-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: white;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  color: var(--color-gray-800);
}

#tab-pillow-center .pc-fabric-chip i {
  color: var(--color-primary);
}
#tab-pillow-center .pc-fabric-chip-thumb {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

#tab-pillow-center .pc-fabric-chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--color-gray-400);
  padding: 0 2px;
  line-height: 1;
}

#tab-pillow-center .pc-fabric-chip-remove:hover {
  color: var(--color-danger);
}

/* --- CFA Filter Buttons --- */
#tab-pillow-center .pc-filter-btn {
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-full);
  background: white;
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--color-gray-600);
  cursor: pointer;
  transition: all var(--transition-fast);
}

#tab-pillow-center .pc-filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

#tab-pillow-center .pc-filter-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* --- CFA Status Badges --- */
#tab-pillow-center .pc-status-pending {
  background: var(--color-warning-light, #fef3c7);
  color: var(--color-warning-dark, #92400e);
}

#tab-pillow-center .pc-status-in_progress {
  background: var(--color-info-light, #dbeafe);
  color: var(--color-info-dark, #1e40af);
}

#tab-pillow-center .pc-status-completed {
  background: var(--color-success-light, #d1fae5);
  color: var(--color-success-dark, #065f46);
}

#tab-pillow-center .pc-status-overdue {
  background: #fee2e2;
  color: #991b1b;
}

#tab-pillow-center .pc-status-quote_sent {
  background: #e0e7ff;
  color: #3730a3;
}

#tab-pillow-center .pc-status-quote_signed {
  background: #dbeafe;
  color: #1e40af;
}

#tab-pillow-center .pc-status-po_received {
  background: #d1fae5;
  color: #065f46;
}

/* --- Preview Panel (Right Column) --- */
#tab-pillow-center .pc-preview-panel {
  position: sticky;
  top: var(--space-6);
  align-self: start;
}

#tab-pillow-center .pc-preview-image-container {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background:
    radial-gradient(circle, var(--color-gray-200) 1px, transparent 1px);
  background-size: 16px 16px;
  border-bottom: 1px solid var(--color-gray-200);
}

#tab-pillow-center .pc-configurator-badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  background: rgba(139, 21, 56, 0.9);
  color: white;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

#tab-pillow-center .pc-preview-img {
  max-height: 240px;
  max-width: 90%;
  object-fit: contain;
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.15));
}

/* --- Pricing Section --- */
#tab-pillow-center .pc-pricing-section {
  padding: var(--space-5) var(--space-6);
}

#tab-pillow-center .pc-pricing-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: var(--space-3);
}

#tab-pillow-center .pc-pricing-subtitle {
  font-weight: 400;
  font-size: 12px;
  color: var(--color-gray-500);
}

#tab-pillow-center .pc-line-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) 0;
  font-size: var(--font-size-sm);
  color: var(--color-gray-700);
}

#tab-pillow-center .pc-line-item.pc-line-sub {
  font-size: 12px;
  color: var(--color-gray-500);
  padding-left: var(--space-3);
}

#tab-pillow-center .pc-line-item.pc-line-total {
  border-top: 2px solid var(--color-gray-300);
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  font-weight: 600;
  color: var(--color-gray-900);
}

#tab-pillow-center .pc-line-item.pc-line-price {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 18px;
  margin-top: var(--space-2);
}

#tab-pillow-center .pc-line-qty-total {
  text-align: right;
  font-size: 13px;
  color: var(--color-gray-500);
  font-weight: 500;
  padding-top: var(--space-1);
}

/* --- Action Buttons --- */
#tab-pillow-center .pc-action-buttons {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-gray-200);
}

#tab-pillow-center .pc-action-row {
  display: flex;
  gap: var(--space-3);
}

#tab-pillow-center .pc-action-buttons .pc-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Responsive: Pillowmaker --- */
@media (max-width: 1024px) {
  #tab-pillow-center .pc-grid-layout {
    grid-template-columns: 1fr;
  }

  #tab-pillow-center .pc-preview-panel {
    position: static;
  }
}

@media (max-width: 768px) {
  #tab-pillow-center .pc-workspace {
    padding: var(--space-4);
  }

  #tab-pillow-center .pc-context-row {
    flex-direction: column;
    gap: var(--space-3);
  }

  #tab-pillow-center .pc-shape-selector {
    flex-direction: column;
  }

  #tab-pillow-center .pc-form-row {
    flex-direction: column;
    gap: var(--space-3);
  }

  #tab-pillow-center .pc-style-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  }

  #tab-pillow-center .pc-stepper {
    gap: var(--space-5);
  }
}

/* ============================================
   MULTI-FABRIC SECTIONS (Front/Back/Welt)
   ============================================ */

#tab-pillow-center .pc-fabric-section {
  margin-bottom: var(--space-3);
}

#tab-pillow-center .pc-fabric-section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-gray-600);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 0 0 var(--space-3) 0;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

#tab-pillow-center .pc-back-fabric-toggle {
  margin: var(--space-3) 0;
  padding: var(--space-2) 0;
}

#tab-pillow-center .pc-welt-section {
  border-color: var(--color-gray-300);
  background: linear-gradient(135deg, var(--color-gray-50) 0%, rgba(139, 21, 56, 0.02) 100%);
}

/* --- Material Type Badges (Fabric Library) --- */
#tab-pillow-center .fl-material-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 2px 8px;
  border-radius: 10px;
}

#tab-pillow-center .fl-material-welt {
  background: #fef3c7;
  color: #92400e;
}

#tab-pillow-center .fl-material-trim {
  background: #e0e7ff;
  color: #3730a3;
}

/* ============================================
   FABRIC LIBRARY VIEW
   ============================================ */

/* --- Filter Bar --- */
#tab-pillow-center .fl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 20px;
  background: var(--color-gray-50, #f9fafb);
  border-bottom: 1px solid var(--color-gray-200, #e5e7eb);
  align-items: center;
}

#tab-pillow-center .fl-search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
}

#tab-pillow-center .fl-search-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-gray-400, #9ca3af);
  font-size: 13px;
  pointer-events: none;
}

#tab-pillow-center .fl-search-wrap input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border: 1px solid var(--color-gray-200, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  font-size: 13px;
  background: #fff;
  color: var(--color-gray-900, #111827);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

#tab-pillow-center .fl-search-wrap input:focus {
  outline: none;
  border-color: var(--color-primary, #8B1538);
  box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.08);
}

#tab-pillow-center .fl-filter-select {
  padding: 9px 32px 9px 12px;
  border: 1px solid var(--color-gray-200, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  font-size: 13px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--color-gray-700, #374151);
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  min-width: 140px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

#tab-pillow-center .fl-filter-select:focus {
  outline: none;
  border-color: var(--color-primary, #8B1538);
  box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.08);
}

#tab-pillow-center .fl-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 12px;
  background: var(--color-gray-50, #f9fafb);
  border-bottom: 1px solid var(--color-gray-200, #e5e7eb);
}

#tab-pillow-center .fl-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--color-primary, #8B1538);
  color: #fff;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

#tab-pillow-center .fl-filter-tag button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  transition: color 0.15s;
}

#tab-pillow-center .fl-filter-tag button:hover {
  color: #fff;
}

#tab-pillow-center .fl-result-count {
  padding: 8px 20px;
  font-size: 12px;
  color: var(--color-gray-500, #6b7280);
  background: var(--color-gray-50, #f9fafb);
  border-bottom: 1px solid var(--color-gray-200, #e5e7eb);
}

/* --- Stacked Card List --- */
#tab-pillow-center .fl-list {
  display: flex;
  flex-direction: column;
}

#tab-pillow-center .fl-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-gray-100, #f3f4f6);
  background: #fff;
  transition: background 0.12s;
}

#tab-pillow-center .fl-card:last-child {
  border-bottom: none;
}

#tab-pillow-center .fl-card:hover {
  background: var(--color-gray-50, #f9fafb);
}

#tab-pillow-center .fl-swatch {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--color-gray-100, #f3f4f6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

#tab-pillow-center .fl-swatch img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}

#tab-pillow-center .fl-swatch i {
  font-size: 18px;
  color: var(--color-gray-400, #9ca3af);
}

#tab-pillow-center .fl-info {
  flex: 1;
  min-width: 0;
}

#tab-pillow-center .fl-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-gray-900, #111827);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#tab-pillow-center .fl-vendor {
  font-size: 12px;
  color: var(--color-gray-500, #6b7280);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#tab-pillow-center .fl-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

#tab-pillow-center .fl-meta-item {
  font-size: 12px;
  color: var(--color-gray-500, #6b7280);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

#tab-pillow-center .fl-meta-item i {
  font-size: 11px;
}

#tab-pillow-center .fl-price {
  font-weight: 600;
  color: var(--color-primary, #8B1538);
}
#tab-pillow-center .fl-edit-btn {
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
  color: #6b7280;
  opacity: 0;
  transition: opacity 0.15s, background 0.12s;
}
#tab-pillow-center .fl-card:hover .fl-edit-btn {
  opacity: 1;
}
#tab-pillow-center .fl-edit-btn:hover {
  background: #f3f4f6;
  color: #1f2937;
}

#tab-pillow-center .fl-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-gray-400, #9ca3af);
}

#tab-pillow-center .fl-empty i {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

#tab-pillow-center .fl-empty p {
  font-size: 15px;
  margin: 0;
}

/* --- Mobile stacked adjustments --- */
@media (max-width: 600px) {
  #tab-pillow-center .fl-filters {
    flex-direction: column;
    gap: 8px;
  }

  #tab-pillow-center .fl-filter-select {
    width: 100%;
    min-width: 0;
  }

  #tab-pillow-center .fl-search-wrap {
    min-width: 0;
  }

  #tab-pillow-center .fl-card {
    padding: 12px 14px;
    gap: 10px;
  }

  #tab-pillow-center .fl-meta {
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
  }
}

/* ============================================
   ADD FABRIC MODAL
   ============================================ */
.fabric-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}

.fabric-modal {
  background: white;
  border-radius: 16px;
  width: 640px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.2s ease;
}

.fabric-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.fabric-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}

.fabric-modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.fabric-modal-body {
  padding: 24px;
}

.fabric-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 16px 16px;
}

/* ================================================
   Multi-pillow order line items
   ================================================ */
#tab-pillow-center .pc-order-line-item {
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #fff;
  transition: border-color 0.2s;
}
#tab-pillow-center .pc-order-line-item:hover {
  border-color: #8B1538;
}
#tab-pillow-center .pc-order-line-item.pc-line-item-editing {
  border-color: #8B1538;
  box-shadow: 0 0 0 2px rgba(139,21,56,0.15);
}
#tab-pillow-center .pc-oli-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
}
#tab-pillow-center .pc-oli-price {
  color: #8B1538;
  font-weight: 700;
}
#tab-pillow-center .pc-oli-details {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
}
#tab-pillow-center .pc-oli-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}
#tab-pillow-center .pc-order-line-item:hover .pc-oli-actions {
  opacity: 1;
}
#tab-pillow-center .pc-oli-actions button {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  cursor: pointer;
  color: #374151;
}
#tab-pillow-center .pc-oli-actions button:hover {
  background: #e5e7eb;
}
#tab-pillow-center .pc-oli-actions button.pc-oli-remove:hover {
  background: #fde8e8;
  color: #b91c1c;
  border-color: #f87171;
}
#tab-pillow-center .pc-order-total-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0 0;
  margin-top: 4px;
  border-top: 2px solid #1f2937;
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
}

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

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