/* ==========================================================================
   PUNCA APPAREL - SALES ADMIN PORTAL STYLESHEET
   Focused Calculator & Margin Analyzer with Compact Left Bar & Live Vendor Input
   ========================================================================== */

:root {
  /* Color Palette */
  --primary-blue: #3b82f6;
  --primary-indigo: #4f46e5;
  --primary-deep: #2563eb;
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #3b82f6 60%, #2563eb 100%);
  --badge-gradient: linear-gradient(90deg, #4f46e5 0%, #3b82f6 100%);
  
  --bg-app: #f4f6fa;
  --bg-card: #ffffff;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-sub: #94a3b8;
  --text-light: #f8fafc;
  
  --border-light: #e2e8f0;
  --border-card: #e5e9f2;
  
  --color-blue: #3b82f6;
  --color-emerald: #10b981;
  --color-orange: #f97316;
  --color-red: #ef4444;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px -1px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 20px -3px rgba(37, 99, 235, 0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition-fast: 0.18s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  box-sizing: border-box;
  overflow-x: clip;
  max-width: 100vw;
  width: 100%;
}

*, *::before, *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  max-width: 100vw;
  width: 100%;
  position: relative;
}

/* ==========================================================================
   TOP NAVBAR (SLIM & FOCUSED)
   ========================================================================== */
.top-navbar {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-light);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.nav-left {
  display: flex;
  align-items: center;
}

.brand-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-logo-img {
  height: 38px;
  width: auto;
  max-width: 145px;
  object-fit: contain;
  display: block;
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--primary-deep);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 900;
  font-size: 1.1rem;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #0f172a;
  line-height: 1.1;
}

.brand-sub {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--primary-deep);
}

.brand-tag {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  background: #eff6ff;
  color: var(--primary-deep);
  border-radius: var(--radius-full);
  border: 1px solid #bfdbfe;
}

.nav-center-title {
  display: flex;
  align-items: center;
}

.nav-menu-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #f1f5f9;
  padding: 0.25rem 0.35rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  flex-wrap: nowrap;
}

.nav-tab-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-muted);
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1.2;
}

.nav-tab-link:hover {
  color: var(--text-main);
  background: #ffffff;
}

.nav-tab-link.active {
  background: var(--primary-deep);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.nav-tab-link .tab-icon {
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.app-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 700;
  color: #334155;
}

.dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-emerald);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-reset-top {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-reset-top:hover {
  border-color: #cbd5e1;
  color: var(--text-main);
  background: #ffffff;
}

.admin-profile-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  padding: 0.25rem 0.75rem 0.25rem 0.35rem;
  border-radius: var(--radius-full);
}

.admin-avatar-small {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-info-inline {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.admin-name-inline {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
}

.admin-status-online {
  font-size: 0.65rem;
  font-weight: 700;
  color: #16a34a;
  background: #dcfce7;
  padding: 0.05rem 0.35rem;
  border-radius: var(--radius-full);
}


/* ==========================================================================
   HERO TOP BANNER (CLEAN & NON-OVERLAPPING)
   ========================================================================== */
.hero-top-banner {
  background: var(--primary-gradient);
  padding: 1.25rem 1.75rem;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
}

.banner-inner-container {
  max-width: 1360px;
  margin: 0 auto;
}

.header-portal-badge {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.2);
  gap: 1rem;
}

.badge-content {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.badge-icon {
  display: flex;
  align-items: center;
  color: #bfdbfe;
  flex-shrink: 0;
}

.badge-text {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
  line-height: 1.2;
}

.badge-sub-text {
  font-size: 0.78rem;
  color: #dbeafe;
  margin-top: 0.2rem;
}

.btn-header-poster {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-header-poster:hover {
  background: #ffffff;
  color: var(--primary-deep);
}


/* ==========================================================================
   MAIN CALCULATOR LAYOUT (2 COLUMNS)
   ========================================================================== */
.main-body-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 1.75rem 1.75rem 4rem;
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 1024px) {
  .calculator-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.calc-form-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-card);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.step-title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.step-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-deep);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.calc-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.section-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}


/* ==========================================================================
   COMPACT FABRIC SELECTION (INSIDE LEFT COLUMN)
   ========================================================================== */
.fabric-compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.fabric-compact-card {
  position: relative;
  background: #ffffff;
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fabric-compact-card:hover {
  border-color: #93c5fd;
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.08);
}

.fabric-compact-card.selected {
  border-color: var(--primary-deep);
  background: #f0f7ff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.compact-swatch-box {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  outline: 2px solid #cbd5e1;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.fabric-compact-card:hover .compact-swatch-box {
  transform: scale(1.08);
}

.compact-swatch-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compact-info-box {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.compact-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.compact-fabric-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}

.compact-price-pill {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--primary-deep);
  background: #ffffff;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  border: 1px solid #bfdbfe;
  white-space: nowrap;
}

.compact-fabric-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 0.2rem;
  white-space: normal;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compact-gsm-pill {
  font-size: 0.65rem;
  font-weight: 700;
  color: #475569;
  background: #e2e8f0;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  display: inline-block;
  margin-top: 0.25rem;
}

.compact-radio-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.fabric-compact-card.selected .compact-radio-circle {
  border-color: var(--primary-deep);
  background: var(--primary-deep);
}

.compact-radio-circle::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--transition-fast);
}

.fabric-compact-card.selected .compact-radio-circle::after {
  opacity: 1;
  transform: scale(1);
}

/* ==========================================================================
   PRODUCT TYPE RADIO CARDS (JERSEY)
   ========================================================================== */
.product-type-section {
  margin-bottom: 0.95rem;
}

.product-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.35rem;
}

@media (max-width: 680px) {
  .product-type-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
}

.product-type-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.65rem 0.65rem 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.product-type-card:hover {
  border-color: #93c5fd;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.08);
}

.product-type-card.selected {
  border-color: var(--primary-deep);
  background: #f8faff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.15);
}

.product-type-radio-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.product-type-img-box {
  width: 100%;
  height: 115px;
  background: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 0.55rem;
  position: relative;
  border: 1px solid #f1f5f9;
}

.product-type-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform var(--transition-fast);
}

.product-type-card:hover .product-type-img-box img {
  transform: scale(1.05);
}

.product-type-badge-default {
  position: absolute;
  top: 6px;
  left: 6px;
  background: #0284c7;
  color: #ffffff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
}

.product-type-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}

.product-type-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.2rem 0.1rem 0;
}

.product-type-header-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.product-type-radio-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.product-type-card.selected .product-type-radio-dot {
  border-color: var(--primary-deep);
  background: var(--primary-deep);
}

.product-type-radio-dot::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--transition-fast);
}

.product-type-card.selected .product-type-radio-dot::after {
  opacity: 1;
  transform: scale(1);
}

.product-type-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}

.product-type-card.selected .product-type-name {
  color: var(--primary-deep);
}

.product-type-sub {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.25;
}

/* ==========================================================================
   FORM CONTROLS (LEFT COLUMN)
   ========================================================================== */
.calc-divider {
  border: none;
  border-top: 1px dashed var(--border-light);
  margin: 1.35rem 0;
}

.calc-field-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

@media (max-width: 600px) {
  .calc-field-row {
    flex-direction: column;
  }
}

.flex-1 { flex: 1; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
}

.required { color: var(--color-red); }

.form-group select,
.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-main);
  outline: none;
  transition: border var(--transition-fast);
}

.form-group select:focus,
.form-group input:focus {
  border-color: var(--primary-deep);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.qty-stepper-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.stepper-btn {
  background: #f1f5f9;
  border: none;
  width: 44px;
  height: 40px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.stepper-btn:hover {
  background: #e2e8f0;
}

.qty-stepper-wrap input {
  flex: 1;
  text-align: center;
  border: none;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 0.5rem;
  outline: none;
}

.tier-detector-badge {
  font-size: 0.75rem;
  color: var(--primary-deep);
  margin-top: 0.35rem;
  font-weight: 600;
}

.calc-checkbox-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.custom-checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  background: #f8fafc;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.custom-checkbox-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}

.custom-checkbox-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
  accent-color: var(--primary-deep);
}

.checkbox-details {
  flex: 1;
}

.cb-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}

.cb-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cb-qty-sub {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cb-qty-sub input,
.cb-qty-sub select {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}

.jumbo-inputs {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.jumbo-inputs input {
  width: 48px;
}

.jumbo-grid-compact {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.25rem;
}

.jumbo-item-box {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #f8fafc;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
}

.jumbo-item-box input {
  width: 46px;
  padding: 0.2rem 0.35rem;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  font-size: 0.75rem;
  text-align: center;
  font-weight: 700;
  background: #ffffff;
}

.discount-card {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.promo-card {
  border-color: #fed7aa;
  background: #fffbeb;
  transition: all var(--transition-fast);
}

.promo-card:hover {
  border-color: #f97316;
  background: #fff7ed;
}

.promo-card input[type="checkbox"] {
  accent-color: #ea580c;
}

.promo-badge-tag {
  display: inline-block;
  background: #ffedd5;
  color: #c2410c;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.text-success {
  color: #15803d !important;
}


/* ==========================================================================
   BAR KANAN: HARGA KONSUMEN & MARGIN VENDOR (WITH VENDOR INPUT)
   ========================================================================== */
.calc-summary-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 4.5rem;
}

/* CARD A: PENAWARAN HARGA KONSUMEN */
.calc-summary-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-card);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.summary-top-tag {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.65rem;
}

.tag-status {
  background: #dcfce7;
  color: #166534;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.summary-fabric-spotlight {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: var(--radius-md);
  margin-bottom: 1.15rem;
}

.swatch-thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* SELLING PRICE EDIT BOX (LIVE EDITABLE) */
.selling-price-edit-box {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 0.85rem;
  margin-bottom: 1.15rem;
  transition: all var(--transition-fast);
}

.selling-price-edit-box:focus-within {
  border-color: var(--primary-deep);
  background: #f0f7ff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.selling-label-row {
  margin-bottom: 0.45rem;
}

.selling-input-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
}

.btn-reset-selling {
  background: #ffffff;
  border: 1px solid #bfdbfe;
  color: var(--primary-deep);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-reset-selling:hover {
  background: #dbeafe;
}

.selling-input-wrap {
  display: flex;
  align-items: center;
  border: 2px solid var(--primary-deep);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #ffffff;
}

.rp-prefix-selling {
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary-deep);
  background: #eff6ff;
  border-right: 1.5px solid var(--primary-deep);
}

.selling-input-wrap input {
  border: none;
  padding: 0.55rem 0.75rem;
  width: 100%;
  font-size: 1.15rem;
  font-weight: 900;
  color: #0f172a;
  outline: none;
  font-family: inherit;
}

.selling-input-wrap input:focus {
  background: #fafffc;
}

.selling-hint-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  display: block;
}

.summary-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.825rem;
  color: var(--text-muted);
}

.breakdown-row strong {
  color: #0f172a;
}

.breakdown-discount {
  color: #16a34a;
}

.summary-total-box {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1.15rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
}

.total-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.05em;
}

.total-amount {
  font-size: 1.75rem;
  font-weight: 900;
  color: #38bdf8;
  margin: 0.25rem 0;
  letter-spacing: -0.02em;
}

.total-sub-notes {
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  color: #cbd5e1;
  gap: 0.15rem;
}

.summary-timeline-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.15rem;
}

.timeline-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.825rem;
}

.time-icon {
  font-size: 1.25rem;
}

.ready-date-badge {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--primary-deep);
}

.summary-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.btn-whatsapp-copy {
  background-color: #22c55e;
  color: #ffffff;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-whatsapp-copy:hover {
  background-color: #16a34a;
  transform: translateY(-1px);
}

.btn-preview-offer {
  background: #f1f5f9;
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 0.55rem;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-preview-offer:hover {
  background: #e2e8f0;
}


/* ==========================================================================
   CARD B: ANALISIS MODAL VENDOR & MARGIN (WITH INPUT IN BOTTOM RIGHT)
   ========================================================================== */
.calc-margin-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 2px solid #86efac;
  padding: 1.5rem;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.12);
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 60%);
}

.margin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #bbf7d0;
}

.margin-header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.margin-icon {
  font-size: 1.4rem;
}

.margin-card-title {
  font-size: 1rem;
  font-weight: 800;
  color: #065f46;
}

.margin-badge-internal {
  font-size: 0.62rem;
  font-weight: 800;
  background: #047857;
  color: #ffffff;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
}

/* VENDOR PRICE INPUT IN BOTTOM RIGHT (AS REQUESTED) */
.margin-vendor-input-box {
  background: #ffffff;
  border: 1.5px solid #86efac;
  border-radius: var(--radius-md);
  padding: 0.85rem;
  margin-bottom: 1.15rem;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.08);
}

.vendor-input-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 0.45rem;
}

.btn-reset-hpp {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #15803d;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-reset-hpp:hover {
  background: #dcfce7;
}

.vendor-input-wrap-right {
  display: flex;
  align-items: center;
  border: 2px solid #10b981;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #ffffff;
}

.rp-prefix-right {
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: #065f46;
  background: #dcfce7;
  border-right: 1.5px solid #10b981;
}

.vendor-input-wrap-right input {
  border: none;
  padding: 0.55rem 0.75rem;
  width: 100%;
  font-size: 1.15rem;
  font-weight: 900;
  color: #047857;
  outline: none;
  font-family: inherit;
}

.vendor-input-wrap-right input:focus {
  background: #fafffc;
}

.vendor-hint-text {
  font-size: 0.7rem;
  color: #047857;
  margin-top: 0.35rem;
  display: block;
}

.margin-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.metric-box {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.metric-vendor {
  border: 1px solid #fed7aa;
}

.metric-profit {
  border: 1.5px solid #86efac;
  background: #f0fdf4;
}

.metric-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.metric-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: #c2410c;
}

.metric-value-profit {
  font-size: 1.25rem;
  font-weight: 900;
  color: #15803d;
}

.metric-sub {
  font-size: 0.65rem;
  color: var(--text-sub);
  margin-top: 0.2rem;
}

.margin-percent-box {
  background: #ffffff;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.85rem;
}

.percent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.percent-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #1e293b;
}

.percent-value {
  font-size: 1.25rem;
  font-weight: 900;
  color: #15803d;
}

.progress-bar-wrap {
  width: 100%;
  height: 9px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.percent-footer-status {
  font-size: 0.72rem;
  font-weight: 700;
  color: #047857;
}

.vendor-guideline-note {
  font-size: 0.7rem;
  color: #065f46;
  line-height: 1.4;
  background: rgba(16, 185, 129, 0.08);
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
}


/* ==========================================================================
   MODALS & TOAST
   ========================================================================== */
.btn-sm-outline {
  background: none;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-sm-outline:hover {
  border-color: var(--primary-deep);
  color: var(--primary-deep);
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.show {
  display: flex;
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.poster-dialog {
  max-width: 720px;
  max-height: 92vh;
}

.modal-header {
  padding: 1.15rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-title-wrap h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.modal-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: #eff6ff;
  color: var(--primary-deep);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.badge-wa {
  background: #dcfce7;
  color: #166534;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.poster-body {
  padding: 0.5rem;
  background: #0f172a;
  display: flex;
  justify-content: center;
  align-items: center;
}

.poster-body img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

#waPreviewText {
  width: 100%;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  font-family: 'Consolas', 'Menlo', 'Monaco', monospace;
  font-size: 0.825rem;
  line-height: 1.5;
  background: #f8fafc;
  color: #1e293b;
  resize: vertical;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: #fafbfd;
}

.toast-notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #0f172a;
  color: #ffffff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 99999;
  font-size: 0.875rem;
  font-weight: 700;
  transform: translateY(120px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #22c55e;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
}

/* ==========================================================================
   FLOATING FIXED BOTTOM PRICE BAR (MOBILE & TABLET)
   ========================================================================== */
.floating-price-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  padding: 0.65rem 1rem env(safe-area-inset-bottom, 0.65rem);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 -6px 25px rgba(15, 23, 42, 0.12);
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

@media (min-width: 1025px) {
  .floating-price-bar {
    display: none !important;
  }
}

.floating-price-bar.hidden-bar {
  transform: translateY(115%);
  opacity: 0;
  pointer-events: none;
}

.floating-bar-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.floating-price-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.floating-price-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-price-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-deep, #2563eb);
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.floating-btn-rincian {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  color: #ffffff;
  border: none;
  padding: 0.65rem 1.15rem;
  border-radius: 9999px;
  font-size: 0.825rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.floating-btn-rincian:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  transform: translateY(-1px);
}

.floating-btn-rincian:active {
  transform: translateY(1px);
}

.floating-btn-rincian svg {
  transition: transform 0.2s ease;
  animation: bounceDown 1.8s infinite;
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

.summary-highlight-pulse {
  animation: summaryPulse 1.4s ease-out;
}

@keyframes summaryPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.6);
    border-color: #2563eb;
  }
  40% {
    box-shadow: 0 0 0 12px rgba(37, 99, 235, 0);
    border-color: #3b82f6;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN ADJUSTMENTS (MOBILE & TABLET CLEANUP)
   ========================================================================== */
@media (max-width: 1024px) {
  .calculator-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .main-body-container {
    padding: 1.25rem 1.25rem 6.5rem;
  }
}

@media (max-width: 768px) {
  /* TOP NAVBAR */
  .top-navbar {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  }

  .nav-container {
    padding: 0.5rem 0.85rem;
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 0.45rem;
  }

  .nav-left {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-logo-img {
    max-width: 110px;
    height: 32px;
  }

  .brand-tag {
    display: none; /* Hide subtitle tag on mobile to prevent overflow */
  }

  .nav-right {
    order: 2;
    flex: 0 0 auto;
    gap: 0.35rem;
  }

  .btn-reset-top,
  .btn-lock-top {
    padding: 0.32rem 0.55rem;
    font-size: 0.72rem;
    margin-left: 0;
  }

  .nav-center-title {
    order: 3;
    width: 100%;
    margin: 0;
  }

  .nav-menu-tabs {
    width: 100%;
    display: flex;
    padding: 0.2rem;
    gap: 0.25rem;
  }

  .nav-tab-link {
    flex: 1;
    justify-content: center;
    text-align: center;
    padding: 0.45rem 0.35rem;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .nav-tab-link .tab-icon {
    font-size: 0.95rem;
  }

  /* HERO BANNER */
  .hero-top-banner {
    padding: 0.75rem 0.85rem;
  }

  .header-portal-badge {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.75rem;
  }

  .badge-content {
    gap: 0.65rem;
    align-items: flex-start;
  }

  .badge-icon {
    margin-top: 0.15rem;
  }

  .badge-icon svg {
    width: 18px;
    height: 18px;
  }

  .badge-text {
    font-size: 0.95rem;
    line-height: 1.25;
  }

  .badge-sub-text {
    font-size: 0.72rem;
    line-height: 1.35;
    margin-top: 0.15rem;
  }

  .header-actions {
    width: 100%;
  }

  .btn-header-poster {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 0.45rem 0.75rem;
    font-size: 0.75rem;
  }

  /* MAIN CONTAINER */
  .main-body-container {
    padding: 0.75rem 0.65rem 6.5rem; /* bottom padding so floating bar doesn't obscure content */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .calculator-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .calc-form-card,
  .calc-summary-column,
  .calc-summary-card,
  .calc-margin-card {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    width: 100% !important;
    padding: 1rem 0.85rem;
    border-radius: var(--radius-md);
  }

  .fabric-compact-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
  }

  .fabric-compact-card {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .sablon-type-grid,
  .sleeve-selector-grid {
    grid-template-columns: 1fr !important;
    gap: 0.55rem !important;
  }

  .sablon-type-card,
  .sleeve-btn {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .margin-metrics-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  /* PRODUCT TYPE JERSEY CARDS */
  .product-type-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
  }

  .product-type-card {
    padding: 0.45rem 0.25rem 0.6rem;
    border-radius: 10px;
  }

  .product-type-img-box {
    height: 75px;
    margin-bottom: 0.35rem;
  }

  .product-type-name {
    font-size: 0.72rem;
    line-height: 1.15;
  }

  .product-type-sub {
    font-size: 0.6rem;
    line-height: 1.15;
  }

  .product-type-radio-dot {
    width: 12px;
    height: 12px;
  }

  .product-type-radio-dot::after {
    width: 4px;
    height: 4px;
  }

  .product-type-badge,
  .product-type-badge-default {
    font-size: 0.5rem;
    padding: 0.1rem 0.3rem;
    top: 3px;
  }
}

@media (max-width: 640px) {
  .calc-field-row {
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.65rem;
  }

  .shipping-input-group {
    width: 100% !important;
  }

  .qty-stepper-wrap {
    width: 100%;
  }

  .stepper-btn {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
  }

  .step-title-row {
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .step-number {
    width: 22px;
    height: 22px;
    font-size: 0.75rem;
  }

  .calc-card-title {
    font-size: 0.95rem;
  }

  .section-desc {
    font-size: 0.72rem;
  }

  .selling-price-edit-box {
    padding: 0.75rem 0.65rem;
  }

  .selling-label-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .btn-reset-selling {
    font-size: 0.7rem;
  }

  .total-amount {
    font-size: 1.45rem;
  }

  .summary-actions button {
    padding: 0.75rem 0.85rem;
    font-size: 0.825rem;
  }

  .sablon-type-grid,
  .sleeve-selector-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .jumbo-size-grid,
  .kaos-size-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem;
  }

  .modal-dialog {
    margin: 0.75rem;
    max-width: calc(100vw - 1.5rem);
  }
}

@media (max-width: 360px) {
  .product-type-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .product-type-img-box {
    height: 95px;
  }
}

/* ==========================================================================
   KAOS CALCULATOR SPECIFIC STYLES
   ========================================================================== */
.min-order-alert {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.5rem;
  animation: fadeIn 0.2s ease-in;
}

.min-order-alert.valid {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.sablon-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.sablon-type-card {
  border: 2px solid var(--border-light);
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
}

.sablon-type-card:hover {
  border-color: #93c5fd;
  transform: translateY(-1px);
}

.sablon-type-card.selected {
  border-color: var(--primary-deep);
  background: #eff6ff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

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

.sablon-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}

.sablon-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
}

.sablon-type-card.selected .sablon-badge {
  background: #dbeafe;
  color: var(--primary-deep);
}

.sablon-desc {
  font-size: 0.775rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.sablon-price-tag {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary-deep);
  margin-top: 0.25rem;
}

.sleeve-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.sleeve-btn {
  border: 2px solid var(--border-light);
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 0.65rem 0.5rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  font-size: 0.825rem;
  font-weight: 700;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sleeve-btn:hover {
  border-color: #93c5fd;
}

.sleeve-btn.selected {
  border-color: var(--primary-deep);
  background: #eff6ff;
  color: var(--primary-deep);
}

.sleeve-price-sub {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

.sleeve-btn.selected .sleeve-price-sub {
  color: var(--primary-deep);
}

/* ==========================================================================
   LEAD TIME SELECTION CARDS (KEMEJA & PRODUCTION TIME)
   ========================================================================== */
.lead-time-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.lead-time-card {
  position: relative;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-sizing: border-box;
}

.lead-time-card input[type="radio"] {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  accent-color: var(--primary-deep);
  cursor: pointer;
  margin: 0;
  width: 16px;
  height: 16px;
}

.lead-time-card:hover {
  border-color: #93c5fd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.lead-time-card.selected {
  border-color: var(--primary-deep);
  background: #eff6ff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.lead-details {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-right: 1.5rem;
}

.lead-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 800;
  background: #e2e8f0;
  color: #334155;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.lead-badge.express {
  background: #fef3c7;
  color: #b45309;
}

.lead-badge.super {
  background: #fee2e2;
  color: #b91c1c;
}

.lead-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
}

.lead-desc {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.35;
}

.lead-surcharge {
  font-size: 0.75rem;
  font-weight: 800;
  color: #2563eb;
  margin-top: 0.2rem;
}

.lead-surcharge.free {
  color: #16a34a;
}

@media (max-width: 768px) {
  .lead-time-grid {
    grid-template-columns: 1fr;
  }
}

.sizechart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.825rem;
  margin-top: 0.5rem;
}

.sizechart-table th,
.sizechart-table td {
  padding: 0.45rem 0.65rem;
  text-align: center;
  border: 1px solid var(--border-light);
}

.sizechart-table th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
}

.sizechart-table tr:nth-child(even) {
  background: #f8fafc;
}

/* ==========================================================================
   SIZE BREAKDOWN MATRIX & SYNCHRONIZER (JERSEY & KAOS)
   ========================================================================== */
.size-breakdown-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 0.9rem;
  margin-top: 0.85rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  box-sizing: border-box;
  width: 100%;
}

.size-breakdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #e2e8f0;
}

.size-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.size-header-icon {
  font-size: 1.25rem;
}

.size-header-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
}

.size-header-sub {
  font-size: 0.72rem;
  color: #64748b;
  display: block;
}

.size-header-tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.size-tab-btn {
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.size-tab-btn:hover {
  border-color: #93c5fd;
  color: #1e40af;
}

.size-tab-btn.active {
  background: var(--primary-deep);
  color: #ffffff;
  border-color: var(--primary-deep);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.size-tab-badge {
  background: rgba(255, 255, 255, 0.25);
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  font-size: 0.7rem;
}

.size-tab-btn:not(.active) .size-tab-badge {
  background: #e2e8f0;
  color: #334155;
}

.size-panel {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.size-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.size-group-title small {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 500;
}

.size-inputs-grid {
  display: grid;
  gap: 0.45rem;
}

.size-inputs-grid.standard-sizes {
  grid-template-columns: repeat(5, 1fr);
}

.size-inputs-grid.jumbo-sizes {
  grid-template-columns: repeat(4, 1fr);
}

.size-input-box {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.4rem 0.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.15s ease;
  min-width: 0;
}

.size-input-box:hover {
  border-color: #93c5fd;
}

.size-input-box:focus-within {
  border-color: var(--primary-deep);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
  background: #eff6ff;
}

.size-input-box label {
  font-size: 0.75rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 0.2rem;
  line-height: 1.15;
}

.size-input-box label small {
  display: block;
  font-size: 0.58rem;
  color: #d97706;
  font-weight: 700;
}

.size-input-box input {
  width: 100%;
  max-width: 44px;
  text-align: center;
  font-weight: 800;
  font-size: 0.925rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.2rem 0;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
  font-family: inherit;
  transition: all 0.15s ease;
}

.size-input-box input:focus {
  background: #ffffff;
  border-color: var(--primary-deep);
}

.size-unit {
  font-size: 0.62rem;
  color: #94a3b8;
  margin-top: 0.1rem;
}

.size-breakdown-footer {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px dashed #cbd5e1;
}

.size-summary-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.size-chip {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-weight: 600;
  white-space: nowrap;
}

.size-chip.chip-pendek {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.size-chip.chip-panjang {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.size-chip.chip-jumbo {
  background: #fdf2f8;
  color: #9d174d;
  border: 1px solid #fbcfe8;
}

.size-chip.chip-total {
  background: #0f172a;
  color: #ffffff;
  margin-left: auto;
}

/* COMPANION MATRIX INSIDE STEP 3 ADDONS */
.addon-size-matrix {
  margin-top: 0.5rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.65rem;
  width: 100%;
  box-sizing: border-box;
}

.addon-size-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.35rem;
}

@media (max-width: 640px) {
  .size-inputs-grid.standard-sizes {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.25rem;
  }

  .size-inputs-grid.jumbo-sizes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.25rem;
  }

  .size-input-box {
    padding: 0.3rem 0.15rem;
  }

  .size-input-box input {
    font-size: 0.85rem;
    padding: 0.15rem 0;
  }

  .size-header-tabs {
    width: 100%;
  }

  .size-tab-btn {
    flex: 1;
    justify-content: center;
    padding: 0.4rem 0.35rem;
    font-size: 0.72rem;
  }

  .size-chip.chip-total {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .sablon-type-grid,
  .sleeve-selector-grid {
    grid-template-columns: 1fr !important;
    gap: 0.55rem;
  }
  .sablon-type-card,
  .sleeve-btn {
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

/* ==========================================================================
   PASSWORD AUTHENTICATION GATE (pmd2026!)
   ========================================================================== */
html.auth-locked-html body,
body.auth-locked {
  overflow: hidden !important;
  height: 100vh;
}

html.auth-locked-html .top-navbar,
html.auth-locked-html .hero-top-banner,
html.auth-locked-html .calc-main-layout,
html.auth-locked-html .main-body-container,
body.auth-locked .top-navbar,
body.auth-locked .hero-top-banner,
body.auth-locked .calc-main-layout,
body.auth-locked .main-body-container {
  filter: blur(14px);
  pointer-events: none !important;
  user-select: none !important;
  opacity: 0.12;
  transition: filter 0.4s ease, opacity 0.4s ease;
}

.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999999;
  padding: 1.25rem;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.auth-modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  display: none !important;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.15);
  overflow: hidden;
  animation: authCardIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

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

.auth-card.shake {
  animation: authShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes authShake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

.auth-card-header {
  padding: 2rem 1.75rem 1.25rem;
  text-align: center;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid #f1f5f9;
}

.auth-logo-img {
  height: 46px;
  width: auto;
  object-fit: contain;
  margin-bottom: 0.95rem;
}

.auth-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.auth-title {
  font-size: 1.22rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}

.auth-subtitle {
  font-size: 0.825rem;
  color: #64748b;
  line-height: 1.45;
}

.auth-card-body {
  padding: 1.5rem 1.75rem 1.85rem;
}

.auth-input-wrapper {
  margin-bottom: 1.15rem;
}

.auth-input-wrapper label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.45rem;
}

.auth-input-row {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-password-input {
  width: 100%;
  padding: 0.8rem 2.85rem 0.8rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  transition: all 0.2s ease;
  outline: none;
}

.auth-password-input:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.auth-password-input.input-error {
  border-color: #ef4444;
  background: #fff5f5;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.auth-toggle-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s;
}

.auth-toggle-btn:hover {
  color: #1e293b;
}

.auth-error-alert {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #b91c1c;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.15rem;
  animation: fadeIn 0.2s ease;
}

.auth-error-alert.show {
  display: flex;
}

.auth-btn-submit {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 0.925rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-btn-submit:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.auth-btn-submit:active {
  transform: translateY(0);
}

.auth-card-footer {
  text-align: center;
  margin-top: 1.15rem;
  font-size: 0.72rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.btn-lock-top {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 0.5rem;
}

.btn-lock-top:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}


