/* ═══════════════════════════════════════════════════════════════════════
   GARMENTS MANUFACTURING — CUSTOMER PORTAL
   A fashion-forward, catalog-style portal for garment buyers/designers
   ═══════════════════════════════════════════════════════════════════════ */

/* ── TOKENS ───────────────────────────────────────────────────────────── */
:root {
  --portal-forest: #060D0B;
  --portal-pine: #0C1F18;
  --portal-fern: #1A4A38;
  --portal-sage: #26705C;
  --portal-leaf: #2DC780;
  --portal-mint: #6DDBA8;
  --portal-pale: #C4EED8;
  --portal-cream: #F8FAF9;
  --portal-white: #ffffff;
  --portal-text: #1a1a1a;
  --portal-muted: #64748b;
  --portal-subtle: #94a3b8;
  --portal-border: #e2e8f0;
  --portal-bg: #f8fafc;

  --portal-radius: 16px;
  --portal-radius-sm: 10px;
  --portal-radius-xs: 6px;
  --portal-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --portal-shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --portal-shadow-lg: 0 12px 40px rgba(0,0,0,.1), 0 4px 12px rgba(0,0,0,.05);
  --portal-ease: .25s cubic-bezier(.4,0,.2,1);
}

/* ── PAGE LAYOUT ─────────────────────────────────────────────────────── */
.portal-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.portal-hero {
  text-align: center;
  padding: 2.5rem 0 2rem;
}

.portal-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--portal-forest);
  margin: 0 0 .35rem;
  line-height: 1.15;
}

.portal-subtitle {
  font-size: 1.05rem;
  color: var(--portal-muted);
  font-weight: 400;
  margin: 0;
}

.portal-loading {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--portal-muted);
  font-size: .95rem;
}

.portal-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--portal-subtle);
  font-size: 1rem;
  background: var(--portal-white);
  border-radius: var(--portal-radius);
  border: 2px dashed var(--portal-border);
}

/* ── FILTERS ─────────────────────────────────────────────────────────── */
.lookbook-filters {
  margin-bottom: 2rem;
}

.filter-group {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.portal-select, .portal-input {
  padding: .6rem 1rem;
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-sm);
  font-size: .875rem;
  color: var(--portal-text);
  background: var(--portal-white);
  outline: none;
  transition: border-color var(--portal-ease), box-shadow var(--portal-ease);
  min-width: 160px;
}

.portal-select:focus, .portal-input:focus {
  border-color: var(--portal-leaf);
  box-shadow: 0 0 0 3px rgba(45,199,128,.12);
}

.portal-input { flex: 1; min-width: 200px; }

/* ── STATUS TABS ─────────────────────────────────────────────────────── */
.status-tabs {
  display: flex;
  gap: .5rem;
  padding-bottom: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.status-tab {
  padding: .5rem 1.25rem;
  border: 1px solid var(--portal-border);
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--portal-muted);
  background: var(--portal-white);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--portal-ease);
}

.status-tab:hover { border-color: var(--portal-sage); color: var(--portal-sage); }
.status-tab.active {
  background: var(--portal-fern);
  color: var(--portal-white);
  border-color: var(--portal-fern);
}

/* ═══════════════════════════════════════════════════════════════════════
   LOOKBOOK — Big image grid
   ═══════════════════════════════════════════════════════════════════════ */
.lookbook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
  padding-bottom: 3rem;
}

.lookbook-card {
  display: block;
  background: var(--portal-white);
  border-radius: var(--portal-radius);
  overflow: hidden;
  box-shadow: var(--portal-shadow);
  transition: transform var(--portal-ease), box-shadow var(--portal-ease);
  text-decoration: none;
  color: inherit;
}

.lookbook-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--portal-shadow-lg);
}

.lookbook-card-image {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f1f5f9;
}

.lookbook-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.4,0,.2,1);
}

.lookbook-card:hover .lookbook-card-image img {
  transform: scale(1.04);
}

.lookbook-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--portal-subtle);
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.lookbook-state {
  position: absolute;
  top: .75rem;
  left: .75rem;
  padding: .25rem .75rem;
  border-radius: 100px;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.state-commercial { background: rgba(147,197,253,.85); color: #1e3a5f; }
.state-design { background: rgba(96,165,250,.85); color: #1e3a5f; }
.state-approval { background: rgba(253,224,71,.85); color: #713f12; }
.state-production-ready { background: rgba(74,222,128,.85); color: #14532d; }
.state-draft { background: rgba(226,232,240,.9); color: #475569; }
.state-planned { background: rgba(147,197,253,.85); color: #1e3a5f; }
.state-released { background: rgba(196,167,231,.85); color: #3b0764; }
.state-in-progress { background: rgba(253,186,116,.85); color: #7c2d12; }
.state-completed { background: rgba(74,222,128,.85); color: #14532d; }

.lookbook-card-body {
  padding: 1.25rem;
}

.lookbook-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 .15rem;
  color: var(--portal-text);
  letter-spacing: -.01em;
}

.lookbook-card-code {
  font-size: .8rem;
  color: var(--portal-muted);
  margin: 0 0 .65rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.lookbook-card-meta {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}

.meta-tag {
  padding: .2rem .6rem;
  background: var(--portal-cream);
  border-radius: 100px;
  font-size: .7rem;
  font-weight: 600;
  color: var(--portal-muted);
}

.variant-dots {
  display: flex;
  gap: .35rem;
  margin-top: .25rem;
}

.variant-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--portal-white);
  box-shadow: 0 0 0 1px var(--portal-border);
}

/* ═══════════════════════════════════════════════════════════════════════
   FICHAS TECNICAS — List cards
   ═══════════════════════════════════════════════════════════════════════ */
.fichas-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 3rem;
}

.ficha-card {
  display: flex;
  background: var(--portal-white);
  border-radius: var(--portal-radius);
  overflow: hidden;
  box-shadow: var(--portal-shadow);
  transition: transform var(--portal-ease), box-shadow var(--portal-ease);
  text-decoration: none;
  color: inherit;
}

.ficha-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--portal-shadow-md);
}

.ficha-card-image {
  width: 140px;
  min-height: 120px;
  flex-shrink: 0;
  overflow: hidden;
  background: #f1f5f9;
}

.ficha-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ficha-card-body {
  padding: 1.25rem;
  flex: 1;
  min-width: 0;
}

.ficha-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .25rem;
}

.ficha-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--portal-text);
}

.ficha-card-code {
  font-size: .8rem;
  color: var(--portal-muted);
  margin: 0 0 .5rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.ficha-card-details {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: .8rem;
  color: var(--portal-muted);
}

.ficha-card-details strong {
  color: var(--portal-text);
}

/* ═══════════════════════════════════════════════════════════════════════
   FICHA / SAMPLE / PRODUCTION DETAIL
   ═══════════════════════════════════════════════════════════════════════ */
.ficha-hero {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  padding: 1.5rem 0 2rem;
}

.ficha-hero-image {
  width: 380px;
  flex-shrink: 0;
  border-radius: var(--portal-radius);
  overflow: hidden;
  box-shadow: var(--portal-shadow-md);
  background: #f1f5f9;
}

.ficha-hero-image img {
  width: 100%;
  display: block;
}

.ficha-hero-info {
  flex: 1;
  min-width: 0;
  padding-top: .5rem;
}

.ficha-detail-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.03em;
  margin: .5rem 0 .25rem;
  color: var(--portal-forest);
}

.ficha-detail-code {
  font-size: .95rem;
  color: var(--portal-muted);
  margin: 0 0 1.25rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.ficha-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .75rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.meta-label {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--portal-subtle);
}

.meta-value {
  font-size: .9rem;
  font-weight: 600;
  color: var(--portal-text);
}

.meta-link {
  color: var(--portal-fern);
  text-decoration: underline;
  text-decoration-color: rgba(26,74,56,.3);
}

.meta-link:hover { text-decoration-color: var(--portal-fern); }

/* Sections */
.ficha-section {
  padding: 2rem 0;
  border-top: 1px solid var(--portal-border);
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--portal-forest);
  margin: 0 0 1.25rem;
  letter-spacing: -.01em;
}

/* ── Variants grid ─────────────────────────────────────────────────── */
.variants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.variant-card {
  text-align: center;
  padding: 1rem;
  background: var(--portal-cream);
  border-radius: var(--portal-radius-sm);
  transition: transform var(--portal-ease);
}

.variant-card:hover { transform: translateY(-2px); }

.variant-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--portal-radius-xs);
  margin-bottom: .5rem;
}

.variant-color-swatch {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto .5rem;
  border: 3px solid var(--portal-white);
  box-shadow: var(--portal-shadow);
}

.variant-info { display: flex; flex-direction: column; gap: .15rem; }
.variant-name { font-size: .85rem; font-weight: 600; color: var(--portal-text); }
.variant-pantone { font-size: .72rem; color: var(--portal-muted); font-family: monospace; }

/* ── Table ─────────────────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; }

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}

.portal-table th {
  text-align: left;
  padding: .65rem .85rem;
  background: var(--portal-cream);
  font-weight: 700;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--portal-muted);
  border-bottom: 2px solid var(--portal-border);
}

.portal-table td {
  padding: .65rem .85rem;
  border-bottom: 1px solid var(--portal-border);
  color: var(--portal-text);
}

.portal-table tbody tr:hover { background: rgba(45,199,128,.03); }

/* ── Fabric / Composition ──────────────────────────────────────────── */
.fabric-info {
  background: var(--portal-cream);
  border-radius: var(--portal-radius-sm);
  padding: 1.5rem;
}

.fabric-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 .25rem;
  color: var(--portal-text);
}

.fabric-weight {
  font-size: .85rem;
  color: var(--portal-muted);
  margin: 0 0 1rem;
}

.composition-chart {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

.composition-bar {
  position: relative;
  height: 28px;
  background: var(--portal-border);
  border-radius: 100px;
  overflow: hidden;
}

.composition-bar-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, var(--portal-fern), var(--portal-leaf));
  border-radius: 100px;
  min-width: 4px;
}

.composition-label {
  position: absolute;
  top: 50%;
  left: .75rem;
  transform: translateY(-50%);
  font-size: .72rem;
  font-weight: 600;
  color: var(--portal-white);
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
  z-index: 1;
}

/* Washcare */
.washcare-row {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.washcare-icon {
  width: 36px;
  height: 36px;
  padding: 4px;
  background: var(--portal-white);
  border-radius: var(--portal-radius-xs);
  box-shadow: var(--portal-shadow);
}

/* Certifications */
.certifications-row {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: .75rem;
}

.cert-badge {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .75rem;
  background: var(--portal-white);
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 600;
  box-shadow: var(--portal-shadow);
}

.cert-logo {
  height: 20px;
  width: auto;
}

/* ── Operations ────────────────────────────────────────────────────── */
.operations-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.operation-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1rem;
  background: var(--portal-cream);
  border-radius: var(--portal-radius-xs);
}

.op-number {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--portal-fern);
  color: var(--portal-white);
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.op-name { font-size: .88rem; font-weight: 600; color: var(--portal-text); }
.op-ws { font-size: .78rem; color: var(--portal-muted); margin-left: auto; }

/* ── Sample Timeline ───────────────────────────────────────────────── */
.sample-timeline {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.sample-timeline-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  background: var(--portal-cream);
  border-radius: var(--portal-radius-sm);
  text-decoration: none;
  color: inherit;
  transition: background var(--portal-ease);
  border: 2px solid transparent;
}

.sample-timeline-item:hover { background: var(--portal-pale); }
.sample-timeline-item.current { border-color: var(--portal-leaf); background: rgba(45,199,128,.06); }

.sample-version {
  font-size: .75rem;
  font-weight: 700;
  color: var(--portal-fern);
  font-family: monospace;
}

.sample-date {
  font-size: .72rem;
  color: var(--portal-muted);
}

/* ── Sample status badges ──────────────────────────────────────────── */
.sample-status {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 100px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.status-sent { background: #fef3c7; color: #92400e; }
.status-in-production { background: #dbeafe; color: #1e40af; }
.status-approved { background: #d1fae5; color: #065f46; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-rejected--internally- { background: #fce7f3; color: #9d174d; }
.status-requested { background: #e0e7ff; color: #3730a3; }
.status-on-hold { background: #f1f5f9; color: #475569; }

/* ═══════════════════════════════════════════════════════════════════════
   SAMPLES — Cards
   ═══════════════════════════════════════════════════════════════════════ */
.samples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  padding-bottom: 3rem;
}

.sample-card {
  display: block;
  background: var(--portal-white);
  border-radius: var(--portal-radius);
  overflow: hidden;
  box-shadow: var(--portal-shadow);
  transition: transform var(--portal-ease), box-shadow var(--portal-ease);
  text-decoration: none;
  color: inherit;
}

.sample-card:hover { transform: translateY(-3px); box-shadow: var(--portal-shadow-md); }
.sample-card.needs-action { border: 2px solid #f59e0b; }

.sample-card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f1f5f9;
}

.sample-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.action-badge {
  position: absolute;
  top: .65rem;
  right: .65rem;
  padding: .3rem .75rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius: 100px;
}

.sample-card-body { padding: 1rem 1.25rem; }

.sample-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.sample-card-title {
  font-size: .95rem;
  font-weight: 700;
  margin: 0;
}

.sample-version-badge {
  padding: .15rem .5rem;
  background: var(--portal-cream);
  border-radius: 100px;
  font-size: .68rem;
  font-weight: 700;
  color: var(--portal-fern);
  font-family: monospace;
  flex-shrink: 0;
}

.sample-card-code {
  font-size: .78rem;
  color: var(--portal-muted);
  margin: .15rem 0 .5rem;
  font-family: monospace;
}

/* ── Review section ────────────────────────────────────────────────── */
.review-actions-section {
  background: #fffbeb;
  border: 2px solid #f59e0b;
  border-radius: var(--portal-radius);
  padding: 1.5rem !important;
  margin-bottom: 1rem;
}

.review-prompt {
  font-size: .9rem;
  color: #92400e;
  margin: 0 0 1rem;
}

.review-actions {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.review-buttons {
  display: flex;
  gap: .75rem;
}

.sample-detail-header {
  display: flex;
  align-items: center;
  gap: .75rem;
}

/* ═══════════════════════════════════════════════════════════════════════
   PRODUCTION STATUS
   ═══════════════════════════════════════════════════════════════════════ */
.production-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 3rem;
}

.production-card {
  display: flex;
  background: var(--portal-white);
  border-radius: var(--portal-radius);
  overflow: hidden;
  box-shadow: var(--portal-shadow);
  transition: transform var(--portal-ease), box-shadow var(--portal-ease);
  text-decoration: none;
  color: inherit;
}

.production-card:hover { transform: translateY(-2px); box-shadow: var(--portal-shadow-md); }

.production-card-image {
  width: 120px;
  min-height: 100px;
  flex-shrink: 0;
  overflow: hidden;
  background: #f1f5f9;
}

.production-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.production-card-body {
  padding: 1.25rem;
  flex: 1;
  min-width: 0;
}

.production-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .15rem;
}

.production-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.production-card-code {
  font-size: .78rem;
  color: var(--portal-muted);
  margin: 0 0 .75rem;
  font-family: monospace;
}

.production-progress { margin-top: .5rem; }

.progress-bar {
  height: 8px;
  background: var(--portal-border);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar-sm { height: 6px; }

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--portal-leaf), var(--portal-mint));
  border-radius: 100px;
  transition: width .5s ease;
  min-width: 0;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: .35rem;
  font-size: .72rem;
  color: var(--portal-muted);
}

.production-card-footer {
  display: flex;
  gap: 1.5rem;
  margin-top: .5rem;
  font-size: .78rem;
  color: var(--portal-muted);
}

/* ── Pipeline Stepper ──────────────────────────────────────────────── */
.pipeline {
  display: flex;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  padding: 1rem 0;
}

.pipeline-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  position: relative;
  flex: 1;
  min-width: 90px;
}

.pipeline-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: all var(--portal-ease);
}

.stage-pending .pipeline-dot {
  background: var(--portal-border);
  border: 2px solid var(--portal-subtle);
}

.stage-active .pipeline-dot {
  background: var(--portal-leaf);
  border: 3px solid var(--portal-pale);
  box-shadow: 0 0 0 4px rgba(45,199,128,.2);
}

.stage-completed .pipeline-dot {
  background: var(--portal-fern);
  border: 2px solid var(--portal-fern);
  color: var(--portal-white);
}

.pipeline-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--portal-white);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.7); }
}

.pipeline-line {
  position: absolute;
  top: 15px;
  left: calc(50% + 16px);
  width: calc(100% - 32px);
  height: 2px;
  background: var(--portal-border);
  z-index: 0;
}

.stage-completed .pipeline-line { background: var(--portal-fern); }
.stage-active .pipeline-line { background: linear-gradient(90deg, var(--portal-leaf), var(--portal-border)); }

.pipeline-label {
  font-size: .68rem;
  font-weight: 600;
  color: var(--portal-muted);
  text-align: center;
  line-height: 1.2;
}

.stage-active .pipeline-label { color: var(--portal-leaf); font-weight: 700; }
.stage-completed .pipeline-label { color: var(--portal-fern); }

/* ── Batch summary cards ───────────────────────────────────────────── */
.batch-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .75rem;
}

.summary-card {
  text-align: center;
  padding: 1.25rem;
  background: var(--portal-cream);
  border-radius: var(--portal-radius-sm);
}

.summary-number {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--portal-fern);
  letter-spacing: -.02em;
}

.summary-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--portal-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.card-success .summary-number { color: #059669; }
.card-warning .summary-number { color: #d97706; }
.card-danger .summary-number { color: #dc2626; }

/* ═══════════════════════════════════════════════════════════════════════
   SUSTAINABILITY
   ═══════════════════════════════════════════════════════════════════════ */
.portfolio-summary {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 2rem;
  background: var(--portal-white);
  border-radius: var(--portal-radius);
  box-shadow: var(--portal-shadow-md);
  margin-bottom: 2rem;
}

.portfolio-grade {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
}

.grade-letter {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--portal-white);
}

.grade-a .grade-letter { background: linear-gradient(135deg, #059669, #10b981); }
.grade-b .grade-letter { background: linear-gradient(135deg, #0d9488, #14b8a6); }
.grade-c .grade-letter { background: linear-gradient(135deg, #d97706, #f59e0b); }
.grade-d .grade-letter { background: linear-gradient(135deg, #ea580c, #f97316); }
.grade-f .grade-letter { background: linear-gradient(135deg, #dc2626, #ef4444); }
.grade-na .grade-letter, .grade-n\/a .grade-letter { background: #94a3b8; }

.grade-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--portal-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.portfolio-stats {
  display: flex;
  gap: 2rem;
}

.portfolio-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--portal-forest);
}

.stat-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--portal-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.sustainability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  padding-bottom: 3rem;
}

.sustainability-card {
  background: var(--portal-white);
  border-radius: var(--portal-radius);
  overflow: hidden;
  box-shadow: var(--portal-shadow);
}

.sust-card-top {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f1f5f9;
}

.sust-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sust-grade {
  position: absolute;
  top: .75rem;
  right: .75rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--portal-white);
  box-shadow: var(--portal-shadow-md);
}

.grade-a { background: linear-gradient(135deg, #059669, #10b981); }
.grade-b { background: linear-gradient(135deg, #0d9488, #14b8a6); }
.grade-c { background: linear-gradient(135deg, #d97706, #f59e0b); }
.grade-d { background: linear-gradient(135deg, #ea580c, #f97316); }
.grade-f { background: linear-gradient(135deg, #dc2626, #ef4444); }
.grade-na, .grade-n\/a { background: #94a3b8; }

.sust-card-body {
  padding: 1.25rem;
}

.sust-card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 .1rem;
}

.sust-card-code {
  font-size: .78rem;
  color: var(--portal-muted);
  margin: 0 0 .75rem;
  font-family: monospace;
}

.sust-scores {
  display: flex;
  gap: .75rem;
  margin-bottom: .75rem;
}

.sust-score-item {
  flex: 1;
  text-align: center;
  padding: .5rem;
  background: var(--portal-cream);
  border-radius: var(--portal-radius-xs);
}

.score-label {
  display: block;
  font-size: .62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--portal-muted);
  margin-bottom: .15rem;
}

.score-value {
  font-size: 1rem;
  font-weight: 800;
  color: var(--portal-fern);
}

/* Mini composition bars (sustainability) */
.sust-compositions {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  margin-bottom: .75rem;
}

.mini-comp-bar {
  position: relative;
  height: 20px;
  background: var(--portal-border);
  border-radius: 100px;
  overflow: hidden;
}

.mini-comp-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  border-radius: 100px;
  min-width: 4px;
}

.comp-natural .mini-comp-fill { background: linear-gradient(90deg, #059669, #34d399); }
.comp-semi-synthetic .mini-comp-fill { background: linear-gradient(90deg, #d97706, #fbbf24); }
.comp-synthetic .mini-comp-fill { background: linear-gradient(90deg, #dc2626, #f87171); }

.mini-comp-bar span {
  position: absolute;
  top: 50%;
  left: .5rem;
  transform: translateY(-50%);
  font-size: .62rem;
  font-weight: 600;
  color: var(--portal-white);
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
}

.sust-passport-link {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--portal-fern);
  text-decoration: underline;
  text-decoration-color: rgba(26,74,56,.3);
}

.sust-passport-link:hover { text-decoration-color: var(--portal-fern); }

/* ═══════════════════════════════════════════════════════════════════════
   COMMENTS
   ═══════════════════════════════════════════════════════════════════════ */
.comments-thread {
  margin-bottom: 1rem;
}

.comment-item {
  padding: 1rem;
  background: var(--portal-cream);
  border-radius: var(--portal-radius-sm);
  margin-bottom: .5rem;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .35rem;
  font-size: .82rem;
}

.comment-time {
  font-size: .72rem;
  color: var(--portal-subtle);
}

.comment-body {
  font-size: .88rem;
  line-height: 1.5;
  color: var(--portal-text);
}

.no-comments {
  color: var(--portal-subtle);
  font-size: .88rem;
  padding: 1rem;
  text-align: center;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.portal-textarea {
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-sm);
  font-size: .88rem;
  font-family: inherit;
  color: var(--portal-text);
  resize: vertical;
  outline: none;
  transition: border-color var(--portal-ease), box-shadow var(--portal-ease);
}

.portal-textarea:focus {
  border-color: var(--portal-leaf);
  box-shadow: 0 0 0 3px rgba(45,199,128,.12);
}

/* ═══════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════ */
.portal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .6rem 1.5rem;
  border: none;
  border-radius: var(--portal-radius-sm);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--portal-ease);
  text-decoration: none;
  font-family: inherit;
}

.portal-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.portal-btn-primary {
  background: var(--portal-fern);
  color: var(--portal-white);
}

.portal-btn-primary:hover { background: var(--portal-sage); }

.portal-btn-success {
  background: #059669;
  color: var(--portal-white);
}

.portal-btn-success:hover { background: #047857; }

.portal-btn-danger {
  background: #dc2626;
  color: var(--portal-white);
}

.portal-btn-danger:hover { background: #b91c1c; }

.portal-btn-outline {
  background: transparent;
  border: 2px solid var(--portal-fern);
  color: var(--portal-fern);
}

.portal-btn-outline:hover {
  background: var(--portal-fern);
  color: var(--portal-white);
}

/* ── Sustainability link at bottom ─────────────────────────────────── */
.ficha-sustainability-link {
  padding: 2rem 0 3rem;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .portal-title { font-size: 1.75rem; }

  .lookbook-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
  }

  .ficha-hero {
    flex-direction: column;
    gap: 1.25rem;
  }

  .ficha-hero-image {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }

  .ficha-detail-title { font-size: 1.5rem; }

  .ficha-card {
    flex-direction: column;
  }

  .ficha-card-image {
    width: 100%;
    height: 160px;
  }

  .production-card { flex-direction: column; }
  .production-card-image { width: 100%; height: 140px; }

  .pipeline { flex-wrap: wrap; gap: .5rem; }
  .pipeline-stage { min-width: 70px; }
  .pipeline-line { display: none; }

  .portfolio-summary {
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
  }

  .portfolio-stats { gap: 1.25rem; }

  .sustainability-grid {
    grid-template-columns: 1fr;
  }

  .review-buttons {
    flex-direction: column;
  }

  .batch-summary-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .variants-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

@media (max-width: 480px) {
  .lookbook-grid {
    grid-template-columns: 1fr;
  }

  .samples-grid {
    grid-template-columns: 1fr;
  }

  .filter-group {
    flex-direction: column;
  }

  .portal-select, .portal-input {
    width: 100%;
    min-width: unset;
  }
}


/* ═══════════════════════════════════════════════════════════════════════
   SEASONS — Split card: visual half + info half
   ═══════════════════════════════════════════════════════════════════════ */
.seasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(520px, 1fr));
  gap: 2rem;
  padding-bottom: 3rem;
}

.season-card-v2 {
  display: flex;
  background: var(--portal-white);
  border-radius: var(--portal-radius);
  overflow: hidden;
  box-shadow: var(--portal-shadow);
  transition: transform .35s cubic-bezier(.4,0,.2,1), box-shadow .35s cubic-bezier(.4,0,.2,1);
  text-decoration: none;
  color: inherit;
  min-height: 280px;
}

.season-card-v2:hover {
  transform: translateY(-6px);
  box-shadow: var(--portal-shadow-lg);
}

/* ── Visual half ──────────────────────────────────────────────────── */
.season-v2-visual {
  position: relative;
  width: 50%;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fall / Winter gradient */
.season-fw .season-v2-visual {
  background:
    linear-gradient(160deg,
      #1a1a2e 0%,
      #16213e 30%,
      #0f3460 60%,
      #1a1a2e 100%
    );
}

/* Spring / Summer gradient */
.season-ss .season-v2-visual {
  background:
    linear-gradient(160deg,
      #fef9ef 0%,
      #fde8d0 25%,
      #f5c6a0 55%,
      #e8a87c 100%
    );
}

.season-v2-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.4,0,.2,1);
}

.season-card-v2:hover .season-v2-img {
  transform: scale(1.06);
}

.season-v2-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.season-fw .season-v2-overlay {
  background: linear-gradient(135deg, rgba(26,26,46,.4), rgba(15,52,96,.2));
}

.season-ss .season-v2-overlay {
  background: linear-gradient(135deg, rgba(254,249,239,.3), rgba(245,198,160,.15));
}

/* Year — big bold number */
.season-v2-year {
  position: relative;
  z-index: 2;
  font-size: 8rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.06em;
  user-select: none;
}

.season-fw .season-v2-year {
  color: rgba(255,255,255,.92);
  text-shadow:
    0 2px 20px rgba(0,0,0,.3),
    0 0 60px rgba(15,52,96,.4);
}

.season-ss .season-v2-year {
  color: rgba(30,30,30,.85);
  text-shadow:
    0 2px 20px rgba(255,255,255,.5),
    0 0 40px rgba(245,198,160,.3);
}

/* Prefix badge — SS / FW */
.season-v2-prefix {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 2;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: .35rem .9rem;
  border-radius: 100px;
}

.season-fw .season-v2-prefix {
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15);
}

.season-ss .season-v2-prefix {
  background: rgba(0,0,0,.06);
  color: rgba(30,30,30,.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,.08);
}

/* ── Info half ────────────────────────────────────────────────────── */
.season-v2-body {
  flex: 1;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.season-v2-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--portal-subtle);
  margin-bottom: .5rem;
  display: block;
}

.season-v2-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--portal-forest);
  margin: 0 0 .35rem;
  line-height: 1.15;
}

.season-v2-desc {
  font-size: .85rem;
  color: var(--portal-muted);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.season-v2-count {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  margin-bottom: .75rem;
}

.season-v2-number {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--portal-fern);
  letter-spacing: -.02em;
  line-height: 1;
}

.season-v2-unit {
  font-size: .82rem;
  font-weight: 600;
  color: var(--portal-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.season-state-chips {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}

.season-stat-chip {
  padding: .15rem .55rem;
  background: var(--portal-cream);
  border-radius: 100px;
  font-size: .68rem;
  font-weight: 600;
  color: var(--portal-muted);
}

/* ── Season Detail Hero ───────────────────────────────────────────────── */
.season-hero {
  position: relative;
  border-radius: var(--portal-radius);
  overflow: hidden;
  margin-bottom: 2rem;
  min-height: 200px;
}

.season-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(.6);
}

.season-hero-content {
  position: relative;
  z-index: 1;
  padding: 3rem 2.5rem;
  color: var(--portal-white);
}

.season-hero-content .portal-title {
  color: var(--portal-white);
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.season-hero-content .portal-subtitle {
  color: rgba(255,255,255,.8);
}

.season-hero-stats {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.hero-stat {
  font-size: .9rem;
  font-weight: 700;
  color: var(--portal-white);
}

.hero-stat-chip {
  padding: .2rem .65rem;
  border-radius: 100px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,.15);
  color: var(--portal-white);
}

/* ── Quick stats on style cards ───────────────────────────────────────── */
.style-quick-stats {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: .4rem;
}

.quick-stat {
  font-size: .72rem;
  color: var(--portal-muted);
  font-weight: 500;
}

.quick-stat .sample-status {
  font-size: .62rem;
  vertical-align: middle;
}


/* ═══════════════════════════════════════════════════════════════════════
   COMMAND CENTER — Quick links on ficha detail
   ═══════════════════════════════════════════════════════════════════════ */
.command-center {
  padding: 1.5rem 0;
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.command-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--portal-white);
  border-radius: var(--portal-radius-sm);
  box-shadow: var(--portal-shadow);
  border: 2px solid transparent;
  transition: all var(--portal-ease);
  text-decoration: none;
  color: inherit;
}

.command-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--portal-shadow-md);
}

.command-samples:hover { border-color: #f59e0b; }
.command-production:hover { border-color: var(--portal-leaf); }
.command-sustainability:hover { border-color: #059669; }

.command-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  flex-shrink: 0;
}

.command-samples .command-icon { background: #fef3c7; color: #d97706; }
.command-production .command-icon { background: var(--portal-pale); color: var(--portal-fern); }
.command-sustainability .command-icon { background: #d1fae5; color: #059669; }

.command-info h3 {
  font-size: .9rem;
  font-weight: 700;
  margin: 0 0 .15rem;
  color: var(--portal-text);
}

.command-detail {
  font-size: .75rem;
  color: var(--portal-muted);
  display: block;
  margin-bottom: .25rem;
}

.command-info .sample-status {
  font-size: .62rem;
}

/* ── Responsive additions ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .seasons-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .season-card-v2 {
    flex-direction: column;
    min-height: auto;
  }

  .season-v2-visual {
    width: 100%;
    min-height: 200px;
  }

  .season-v2-year { font-size: 5.5rem; }
  .season-v2-title { font-size: 1.3rem; }
  .season-v2-body { padding: 1.5rem; }

  .season-hero-content { padding: 2rem 1.5rem; }

  .command-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .season-v2-year { font-size: 4rem; }
  .season-v2-visual { min-height: 160px; }
}


/* ── Season Chip (compact badge for detail pages) ────────────────────── */

.season-chip {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  line-height: 1;
}
.season-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  text-decoration: none;
}
.season-chip-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.season-chip-label {
  padding: 6px 10px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* FW variant */
.season-chip.chip-fw .season-chip-visual {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  color: rgba(255,255,255,0.95);
}
.season-chip.chip-fw .season-chip-label {
  background: #1e293b;
  color: rgba(255,255,255,0.7);
}

/* SS variant */
.season-chip.chip-ss .season-chip-visual {
  background: linear-gradient(135deg, #f5d5c0 0%, #e8c4a8 100%);
  color: #2d1810;
}
.season-chip.chip-ss .season-chip-label {
  background: #fce8d8;
  color: #6b4c3b;
}
