/* ==========================================================================
   PixaClear Partner Quote Calculator - Minimal, Uncluttered Side-by-Side UI
   ========================================================================== */

:root {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;

  --color-primary: #0f172a;
  --color-primary-hover: #1e293b;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-accent-soft: rgba(37, 99, 235, 0.08);
  --color-success: #10b981;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  --border-light: #e2e8f0;
  --border-subtle: #edf2f7;
  --border-focus: #3b82f6;

  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-card: 0 4px 6px -1px rgba(15, 23, 42, 0.04), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
  --shadow-card-hover: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
  --shadow-accent: 0 10px 25px -3px rgba(37, 99, 235, 0.15), 0 4px 6px -4px rgba(37, 99, 235, 0.1);

  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

body {
  background-color: var(--bg-page);
  background-image: 
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.03) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(15, 23, 42, 0.02) 0px, transparent 50%);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  padding: 1.75rem 1.5rem 4rem;
  -webkit-font-smoothing: antialiased;
}

.dashboard-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0.25rem 0.5rem;
}

.btn-lock-session {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

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

/* Security PIN Gate */
.pin-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.5rem;
}

.pin-gate-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  width: 100%;
  max-width: 360px;
  padding: 2.25rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.pin-logo-icon {
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: #ffffff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem;
  margin-bottom: 0.25rem;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.2);
}

.pin-gate-card h2 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  line-height: 1;
}

.pin-subtitle {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.pin-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.pin-input-wrap {
  width: 100%;
}

.pin-input-wrap input {
  width: 100%;
  text-align: center;
  font-family: var(--font-title);
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: 0.35em;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 2px solid var(--border-light);
  background: var(--bg-subtle);
  color: var(--color-primary);
  outline: none;
  transition: all 0.2s ease;
}

.pin-input-wrap input:focus {
  background: #ffffff;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.pin-input-wrap input.shake {
  animation: shake 0.35s ease-in-out;
  border-color: #ef4444;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.pin-btn {
  width: 100%;
  min-height: 46px;
  font-size: 0.98rem;
}

.pin-error-msg {
  font-size: 0.78rem;
  font-weight: 600;
  color: #ef4444;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.logo-icon-container {
  color: #ffffff;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}

.logo-svg {
  width: 100%;
  height: 100%;
}

.logo-text h1 {
  font-family: var(--font-title);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.1;
  color: var(--color-primary);
}

.logo-text .tagline {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.16em;
}

/* Top Controls Card */
.controls-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 14px;
  padding: 1.1rem 1.5rem;
  box-shadow: var(--shadow-card);
}

.controls-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.input-group {
  flex: 1 1 170px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.input-group.input-group-dim {
  flex: 0 1 125px;
  min-width: 100px;
}

.input-group label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: normal;
  overflow: visible;
  line-height: 1.2;
}

.input-wrapper,
.select-wrapper {
  position: relative;
  width: 100%;
}

.input-wrapper input,
.select-wrapper select {
  width: 100%;
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.52rem 0.75rem;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.input-group.input-group-dim input {
  padding: 0.52rem 0.65rem;
  font-size: 1.05rem;
}

.select-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 2.1rem;
}

.select-arrow {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
}

.input-wrapper input:focus,
.select-wrapper select:focus {
  background: #ffffff;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.btn {
  font-family: var(--font-title);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.55rem 1.45rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  flex: 0 1 130px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

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

.btn-secondary {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: #cbd5e1;
}

.error-msg {
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

.hidden {
  display: none !important;
}

/* Option Row Cards (Option on Left, Visual on Right) */
.result-list {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.option-row-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.option-row-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: #cbd5e1;
}

.option-row-card.best-choice {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-accent);
  position: relative;
}

.option-row-card.best-choice::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
}

@media (max-width: 890px) {
  .option-row-card {
    grid-template-columns: 1fr;
  }
}

/* Left Column: Option Info & Pricing */
.option-info-col {
  padding: 1.6rem 1.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.35rem;
}

.option-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.closeness-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-light);
}

.closeness-badge.rank-1 {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.series-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 3px 8px;
  border-radius: 6px;
}

/* Available Size Headline */
.available-size-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.block-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

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

.avail-size-headline {
  font-family: var(--font-title);
  font-size: 2.05rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.size-sub-specs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.size-sub-specs strong {
  color: var(--text-main);
  font-weight: 700;
}

/* Pricing Box & Financing */
.pricing-box {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 0.95rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Compact Suggested Rate Bar */
.suggested-compact-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0 0.15rem;
}

.rate-label-subtle {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.68rem;
  color: var(--text-subtle);
}

.suggested-rate-sm {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.btn-reset-rate {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.15s ease;
}

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

/* Desired Row Banner */
.rate-price-row.desired-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.05rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(15, 23, 42, 0.9);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.rate-input-part {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.rate-total-part {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 0.1rem;
}

.desired-row .rate-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.desired-row .total-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.desired-row .total-bold-val {
  font-family: var(--font-title);
  font-size: 1.7rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.desired-input-wrap {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid var(--color-accent);
  border-radius: 7px;
  padding: 0 0.5rem;
  height: 34px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.desired-input-wrap .prefix {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.98rem;
}

.card-custom-input {
  width: 70px;
  border: none;
  background: transparent;
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  padding: 0 0.25rem;
  outline: none;
}

.desired-input-wrap .suffix {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Financing Section */
.financing-section {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  border-top: 1px dashed #cbd5e1;
  padding-top: 0.75rem;
}

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

.financing-title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.financing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.financing-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 9px;
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.financing-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.fin-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.fin-plan-name {
  font-family: var(--font-title);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.fin-badge {
  background: #dcfce7;
  color: #15803d;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fin-monthly-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-top: 0.15rem;
}

.fin-monthly-val {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
}

.fin-monthly-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.fin-upfront-note {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* Right Column: Visual Representation Next to the Option */
.option-visual-col {
  background: #f8fafc;
  border-left: 1px solid var(--border-light);
  padding: 1.25rem 1.45rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
}

@media (max-width: 890px) {
  .option-visual-col {
    border-left: none;
    border-top: 1px solid var(--border-light);
  }
}

.visual-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.visual-legend {
  display: flex;
  gap: 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 2.5px;
  display: inline-block;
}

.swatch.req {
  background: rgba(236, 72, 153, 0.22);
  border: 1px solid rgba(236, 72, 153, 0.5);
}

.swatch.act {
  background: #0f172a;
  border: 1.5px solid #38bdf8;
}

.svg-cabinet-textured {
  stroke: #38bdf8;
  stroke-width: 8;
}

.svg-overlay-requested {
  fill: rgba(236, 72, 153, 0.14);
}

.svg-overlay-requested-outline {
  fill: none;
  stroke: rgba(236, 72, 153, 0.85);
  stroke-width: 5;
  stroke-dasharray: 14 8;
  pointer-events: none;
}

.visual-stage {
  flex: 1;
  min-height: 220px;
  max-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 0.6rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

.svg-canvas {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.svg-canvas svg {
  width: 100%;
  height: 100%;
  max-height: 230px;
}

.svg-overlay-actual {
  fill: none;
  stroke: #2563eb;
  stroke-width: 4;
  stroke-dasharray: 10 6;
}

/* Show More */
.show-more-container {
  display: flex;
  justify-content: center;
  margin-top: 0.75rem;
}

.option-row-card.more-option {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.option-row-card.more-option.visible-card {
  opacity: 1;
  transform: translateY(0);
}
