/* ========== Product Detail & Checkout ========== */
/* ========== Product Detail Page ========== */

/* ===== Breadcrumb ===== */
.product-breadcrumb {
  padding: 1rem 0;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}
.product-breadcrumb a {
  color: var(--muted-foreground);
  transition: color 0.2s;
}
.product-breadcrumb a:hover {
  color: var(--primary-hover);
}
.product-breadcrumb .sep {
  margin: 0 0.375rem;
}
.product-breadcrumb .current {
  color: var(--foreground);
  font-weight: 500;
}

/* ===== Main Layout ===== */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 1.5rem 0 3rem;
}

/* ===== Image Gallery ===== */
.gallery {
  position: sticky;
  top: 5.5rem;
}
.gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: var(--muted);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.gallery-main .slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.gallery-main .slide.active {
  opacity: 1;
}
.gallery-main .slide svg {
  width: 45%;
  height: 45%;
  color: var(--muted-foreground);
}
.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 0.2s;
  opacity: 0;
}
.gallery-main:hover .gallery-btn {
  opacity: 1;
}
.gallery-btn:hover {
  background: #fff;
  box-shadow: var(--shadow-lg);
}
.gallery-btn.prev { left: 0.75rem; }
.gallery-btn.next { right: 0.75rem; }
.gallery-btn svg {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--foreground);
}

.gallery-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.375rem;
  z-index: 2;
}
.gallery-dots .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}
.gallery-dots .dot.active {
  background: #fff;
  width: 1.25rem;
  border-radius: 9999px;
}

.gallery-thumbs {
  display: flex;
  gap: 0.625rem;
  margin-top: 0.75rem;
}
.gallery-thumbs .thumb {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 0.5rem;
  border: 2px solid transparent;
  background: var(--muted);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gallery-thumbs .thumb:hover {
  border-color: var(--border);
}
.gallery-thumbs .thumb.active {
  border-color: var(--primary-hover);
}
.gallery-thumbs .thumb svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--muted-foreground);
}

/* ===== Product Info ===== */
.product-info__detail__page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.product-title__detail__page {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--foreground);
}
.product-tags__detail__page {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.product-tag__detail__page {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.product-tag__detail__page.hot {
  background: #fef2f2;
  color: var(--red);
}
.product-tag__detail__page.auth {
  background: #f0fdf4;
  color: var(--green);
}
.product-tag__detail__page.fast {
  background: #fffbeb;
  color: var(--amber);
}

.product-rating-row__detail__page {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.product-rating-row__detail__page .stars {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}
.product-rating-row__detail__page .stars svg {
  width: 1rem;
  height: 1rem;
  color: var(--amber);
  fill: var(--amber);
}
.product-rating-row__detail__page .score {
  font-size: 1rem;
  font-weight: 600;
  color: var(--amber);
}
.product-rating-row__detail__page .count {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}
.product-rating-row__detail__page .sales {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

/* Price Block */
.price-block {
  background: linear-gradient(135deg, #fef2f2 0%, #fff5f5 100%);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  border: 1px solid #fecaca;
}
.price-block .label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-bottom: 0.375rem;
}
.price-block .price-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}
.price-block .current-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--red);
  line-height: 1;
}
.price-block .current-price .currency {
  font-size: 1rem;
  margin-right: 0.125rem;
}
.price-block .original-price {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  text-decoration: line-through;
}
.price-block .discount {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  background: var(--red);
  color: #fff;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
}
.price-block .bulk-hint {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #b91c1c;
}

/* Spec Rows */
.spec-group {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.spec-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.spec-row .spec-label {
  flex-shrink: 0;
  width: 5rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  line-height: 1.75;
  text-align: right;
}
.spec-row .spec-value {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8125rem;
}
.spec-option {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  background: var(--background);
  color: var(--foreground);
  font-size: 0.8125rem;
}
.spec-option:hover {
  border-color: var(--primary-hover);
}
.spec-option.selected {
  border-color: var(--primary-hover);
  background: #eef2ff;
  color: var(--primary-hover);
  font-weight: 500;
}
.spec-option.disabled {
  border-color: var(--border);
  background: var(--background);
  color: var(--muted-foreground);
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Detail Images Grid */
.detail-images-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.detail-image-item {
  border-radius: 8px;
  overflow: hidden;
  background: var(--muted);
}
.detail-image-item img {
  width: 100%;
  display: block;
  object-fit: cover;
}

/* Quantity */
.quantity-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.quantity-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.quantity-control button {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  color: var(--foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.quantity-control button:hover {
  background: var(--border);
}
.quantity-control input {
  width: 3.5rem;
  height: 2.25rem;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  outline: none;
  font-family: var(--font-sans);
}
.quantity-unit {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

/* Action Buttons */
.action-row {
  display: flex;
  gap: 0.75rem;
  padding-top: 0.5rem;
}
.btn-buy {
  flex: 1;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--red);
  color: #fff;
  font-family: var(--font-sans);
}
.btn-buy:hover {
  background: #b91c1c;
}
.btn-cart {
  flex: 1;
  padding: 0.875rem 1.5rem;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  color: var(--primary);
  font-family: var(--font-sans);
}
.btn-cart:hover {
  background: var(--primary);
  color: var(--primary-foreground);
}

/* ===== Store Card ===== */
.store-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 1.5rem;
}
.store-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
}
.store-info {
  flex: 1;
  min-width: 0;
}
.store-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground);
}
.store-meta {
  display: flex;
  gap: 1rem;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.store-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.store-enter {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  font-size: 0.8125rem;
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-sans);
  font-weight: 500;
}
.store-enter:hover {
  border-color: var(--primary-hover);
  color: var(--primary-hover);
}

/* ===== Tabs Section ===== */
.detail-tabs {
  margin-top: 2rem;
  padding-bottom: 3rem;
}
.tab-nav {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 0;
}
.tab-btn {
  padding: 0.875rem 1.75rem;
  border: none;
  background: transparent;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted-foreground);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
  font-family: var(--font-sans);
}
.tab-btn:hover {
  color: var(--foreground);
}
.tab-btn.active {
  color: var(--primary-hover);
  border-bottom-color: var(--primary-hover);
}
.tab-content {
  padding-top: 1.5rem;
}
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

/* ===== Specs Table ===== */
.specs-table {
  width: 100%;
  border-collapse: collapse;
}
.specs-table tr:nth-child(even) {
  background: var(--muted);
}
.specs-table td {
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
}
.specs-table td:first-child {
  width: 10rem;
  color: var(--muted-foreground);
  font-weight: 500;
}

/* ===== Reviews ===== */
.review-summary {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem;
  background: var(--muted);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.review-score {
  text-align: center;
}
.review-score .big {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--amber);
  line-height: 1;
}
.review-score .label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}
.review-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.review-bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}
.review-bar-row .star-label {
  width: 3rem;
  color: var(--muted-foreground);
}
.review-bar-row .bar-bg {
  flex: 1;
  height: 0.5rem;
  background: var(--border);
  border-radius: 9999px;
  overflow: hidden;
}
.review-bar-row .bar-fill {
  height: 100%;
  background: var(--amber);
  border-radius: 9999px;
  transition: width 0.6s ease;
}
.review-bar-row .pct {
  width: 2.5rem;
  text-align: right;
  color: var(--muted-foreground);
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.review-item {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.review-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.625rem;
}
.review-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}
.review-user {
  flex: 1;
}
.review-user .name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--foreground);
}
.review-user .date {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}
.review-stars {
  display: flex;
  gap: 0.125rem;
}
.review-stars svg {
  width: 0.875rem;
  height: 0.875rem;
  color: var(--amber);
  fill: var(--amber);
}
.review-body {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--foreground);
}
.review-specs {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .gallery {
    position: static;
  }
}
@media (max-width: 640px) {
  .product-title {
    font-size: 1.25rem;
  }
  .price-block .current-price {
    font-size: 1.5rem;
  }
  .action-row {
    flex-direction: column;
  }
  .gallery-thumbs .thumb {
    width: 3.5rem;
    height: 3.5rem;
  }
  .review-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .store-card {
    flex-wrap: wrap;
  }
}


/* ===== Settle Page Styles ===== */

/* Hero Banner */
.settle-hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #3b82f6 100%);
  color: #fff;
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.settle-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.settle-hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
}
.settle-hero p {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 0;
  position: relative;
}
.settle-hero .stats-row {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 36px;
  position: relative;
}
.settle-hero .stat-item {
  text-align: center;
}
.settle-hero .stat-num {
  font-size: 2rem;
  font-weight: 700;
  display: block;
}
.settle-hero .stat-label {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Steps */
.settle-steps {
  padding: 60px 0 40px;
  background: #f8fafc;
}
.settle-steps h2 {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 40px;
}
.steps-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.step-card {
  background: #fff;
  border-radius: 12px;
  padding: 28px 24px;
  width: 220px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  position: relative;
}
.step-card .step-num {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 14px;
}
.step-card .step-icon {
  margin-bottom: 12px;
}
.step-card .step-icon svg {
  width: 32px;
  height: 32px;
  color: #2563eb;
}
.step-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
}
.step-card p {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}
.step-arrow {
  display: flex;
  align-items: center;
  color: #cbd5e1;
  font-size: 1.5rem;
}

/* Benefits */
.settle-benefits {
  padding: 50px 0;
  background: #fff;
}
.settle-benefits h2 {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 40px;
}
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.benefit-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s, box-shadow 0.2s;
}
.benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(37,99,235,0.1);
  border-color: #bfdbfe;
}
.benefit-card .benefit-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.benefit-card .benefit-icon svg {
  width: 24px;
  height: 24px;
  color: #2563eb;
}
.benefit-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
}
.benefit-card p {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

/* Form Section */
.settle-form-section {
  padding: 60px 0 80px;
  background: #f8fafc;
}
.settle-form-section h2 {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}
.settle-form-section .form-subtitle {
  text-align: center;
  color: #64748b;
  margin-bottom: 40px;
  font-size: 0.9375rem;
}
.settle-form-wrapper {
  max-width: 780px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  padding: 48px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
}

/* Form Group */
.settle-form-wrapper .form-group {
  margin-bottom: 24px;
}
.settle-form-wrapper .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.settle-form-wrapper .form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}
.settle-form-wrapper .form-group label .required {
  color: #ef4444;
  margin-left: 2px;
}
.settle-form-wrapper .form-group input,
.settle-form-wrapper .form-group textarea,
.settle-form-wrapper .form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.9375rem;
  color: #1e293b;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  font-family: inherit;
}
.settle-form-wrapper .form-group input::placeholder,
.settle-form-wrapper .form-group textarea::placeholder {
  color: #94a3b8;
}
.settle-form-wrapper .form-group input:focus,
.settle-form-wrapper .form-group textarea:focus,
.settle-form-wrapper .form-group select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.settle-form-wrapper .form-group input.error,
.settle-form-wrapper .form-group textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}
.settle-form-wrapper .form-group .field-hint {
  font-size: 0.8125rem;
  color: #94a3b8;
  margin-top: 6px;
}
.settle-form-wrapper .form-group .field-error {
  font-size: 0.8125rem;
  color: #ef4444;
  margin-top: 6px;
  display: none;
}
.settle-form-wrapper .form-group .field-error.visible {
  display: block;
}
.settle-form-wrapper .form-group textarea {
  min-height: 100px;
  resize: vertical;
}

/* Upload Area */
.upload-area {
  border: 2px dashed #e2e8f0;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.upload-area:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}
.upload-area .upload-icon {
  margin-bottom: 12px;
}
.upload-area .upload-icon svg {
  width: 40px;
  height: 40px;
  color: #94a3b8;
}
.upload-area .upload-text {
  font-size: 0.9375rem;
  color: #64748b;
  margin-bottom: 4px;
}
.upload-area .upload-hint {
  font-size: 0.8125rem;
  color: #94a3b8;
}
.upload-area .upload-text span {
  color: #2563eb;
  font-weight: 600;
}
.upload-area input[type="file"] {
  display: none;
}
.upload-preview {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 10px;
  margin-top: 12px;
}
.upload-preview.show {
  display: flex;
}
.upload-preview .file-name {
  font-size: 0.875rem;
  color: #166534;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-preview .file-remove {
  color: #ef4444;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Checkbox */
.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 28px 0;
}
.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #2563eb;
  cursor: pointer;
  flex-shrink: 0;
}
.form-checkbox label {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
  cursor: pointer;
}
.form-checkbox label a {
  color: #2563eb;
  text-decoration: none;
}
.form-checkbox label a:hover {
  text-decoration: underline;
}

/* Submit */
.form-submit-row {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}
.btn-submit {
  flex: 1;
  padding: 14px 32px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.btn-submit:hover {
  opacity: 0.92;
}
.btn-submit:active {
  transform: scale(0.98);
}
.btn-reset {
  padding: 14px 28px;
  background: #fff;
  color: #64748b;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-reset:hover {
  background: #f8fafc;
}

/* Section Divider */
.form-divider {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 32px 0;
}
.form-section-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.form-section-title svg {
  width: 20px;
  height: 20px;
  color: #2563eb;
}

/* Success State */
.settle-success {
  display: none;
  text-align: center;
  padding: 60px 20px;
}
.settle-success.show {
  display: block;
}
.settle-success .success-icon {
  width: 80px;
  height: 80px;
  background: #dcfce7;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.settle-success .success-icon svg {
  width: 40px;
  height: 40px;
  color: #16a34a;
}
.settle-success h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
}
.settle-success p {
  color: #64748b;
  font-size: 0.9375rem;
  margin-bottom: 32px;
  line-height: 1.7;
}
.settle-success .btn-back {
  display: inline-block;
  padding: 12px 32px;
  background: #2563eb;
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: opacity 0.2s;
}
.settle-success .btn-back:hover {
  opacity: 0.92;
}

/* Section title optional badge */
.form-section-title .optional-badge {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 500;
  color: #2563eb;
  background: #eff6ff;
  padding: 2px 10px;
  border-radius: 100px;
}

/* Upload Grid */
.settle-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.settle-upload-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
}
.upload-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.upload-item-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}
.upload-item-tag {
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 100px;
  font-weight: 500;
}
.tag-required { background: #fef2f2; color: #ef4444; }
.tag-optional { background: #f1f5f9; color: #64748b; }
.tag-uploaded { background: #f0fdf4; color: #16a34a; }

.settle-upload-area {
  border: 2px dashed #e2e8f0;
  border-radius: 10px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.settle-upload-area:hover {
  border-color: #93c5fd;
  background: #fff;
}
.settle-upload-area svg {
  width: 28px;
  height: 28px;
  color: #94a3b8;
  margin-bottom: 8px;
}
.settle-upload-area span {
  display: block;
  font-size: 0.875rem;
  color: #2563eb;
  font-weight: 600;
}
.settle-upload-area .upload-area-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 400;
  margin-top: 4px;
}
.settle-upload-area input[type="file"] {
  display: none;
}

/* Upload preview in grid items */
.upload-preview-row {
  display: none;
  margin-top: 12px;
}
.upload-preview-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 8px;
}
.upload-preview-name {
  font-size: 0.8125rem;
  color: #166534;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-preview-size {
  font-size: 0.75rem;
  color: #64748b;
}
.upload-preview-remove {
  color: #ef4444;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  padding-left: 4px;
}

/* Responsive */
@media (max-width: 768px) {
  .settle-hero {
    padding: 60px 0 40px;
  }
  .settle-hero h1 {
    font-size: 1.625rem;
  }
  .settle-hero .stats-row {
    gap: 24px;
  }
  .settle-hero .stat-num {
    font-size: 1.5rem;
  }
  .steps-row {
    flex-direction: column;
    align-items: center;
  }
  .step-arrow {
    transform: rotate(90deg);
  }
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .settle-form-wrapper {
    padding: 28px 20px;
  }
  .settle-upload-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .form-submit-row {
    flex-direction: column;
  }
}
@media (max-width: 640px) {
  .benefits-grid {
    grid-template-columns: 1fr;
  }
  .settle-hero .stats-row {
    flex-wrap: wrap;
    gap: 16px;
  }
  .settle-hero .stat-item {
    width: 40%;
  }
}

/* ========== Settle Success Page ========== */
.ss-page {
  min-height: 100vh;
  background: #f5f5f5;
  display: flex;
  flex-direction: column;
}

/* ===== Topbar ===== */
.ss-topbar {
  background: #fff;
  border-bottom: 2px solid #e4393c;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
}
.ss-topbar-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ss-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.ss-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #e4393c, #ff6b6b);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ss-logo-icon svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}
.ss-logo-text {
  font-size: 20px;
  font-weight: 700;
  color: #333;
}
.ss-page-title {
  font-size: 15px;
  color: #999;
  margin-left: 20px;
  padding-left: 20px;
  border-left: 1px solid #e8e8e8;
}
.ss-topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.ss-topbar-right a {
  font-size: 13px;
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}
.ss-topbar-right a:hover { color: #e4393c; }

/* ===== Main ===== */
.ss-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.ss-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  width: 100%;
  max-width: 860px;
  overflow: hidden;
}

/* --- Success Banner --- */
.ss-banner {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #bbf7d0 100%);
  padding: 52px 40px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ss-banner::before,
.ss-banner::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
}
.ss-banner::before {
  width: 260px;
  height: 260px;
  top: -100px;
  right: -80px;
  background: #22c55e;
}
.ss-banner::after {
  width: 160px;
  height: 160px;
  bottom: -60px;
  left: -40px;
  background: #16a34a;
}

/* --- Success Icon --- */
.ss-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.ss-icon-circle {
  width: 88px;
  height: 88px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  animation: ss-pop 0.5s cubic-bezier(0.175,0.885,0.32,1.275) forwards;
}
.ss-icon-circle svg {
  width: 44px;
  height: 44px;
  stroke: #fff;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ss-icon-check {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: ss-draw 0.6s 0.4s ease forwards;
}
.ss-icon-ring {
  position: absolute;
  width: 110px;
  height: 110px;
  border: 2px solid rgba(34,197,94,0.25);
  border-radius: 50%;
  animation: ss-pulse-ring 2s ease-in-out infinite;
}
.ss-icon-ring-2 {
  position: absolute;
  width: 130px;
  height: 130px;
  border: 2px solid rgba(34,197,94,0.12);
  border-radius: 50%;
  animation: ss-pulse-ring 2s 0.5s ease-in-out infinite;
}
@keyframes ss-pop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}
@keyframes ss-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes ss-pulse-ring {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.5; }
}

.ss-title {
  font-size: 28px;
  font-weight: 700;
  color: #166534;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
.ss-subtitle {
  font-size: 15px;
  color: #4d7c5e;
  line-height: 1.7;
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
}

/* --- Phone Reminder --- */
.ss-phone-reminder {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 18px 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 24px auto 0;
  max-width: 520px;
  position: relative;
  z-index: 1;
  animation: ss-slide-up 0.6s 0.6s ease both;
}
.ss-phone-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: ss-phone-shake 2s 1.2s ease-in-out infinite;
}
.ss-phone-icon svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}
.ss-phone-text {
  text-align: left;
}
.ss-phone-text strong {
  display: block;
  font-size: 15px;
  color: #9a3412;
  margin-bottom: 4px;
}
.ss-phone-text span {
  font-size: 13px;
  color: #c2410c;
  line-height: 1.6;
}
@keyframes ss-slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ss-phone-shake {
  0%, 100% { transform: rotate(0); }
  10% { transform: rotate(-12deg); }
  20% { transform: rotate(12deg); }
  30% { transform: rotate(-8deg); }
  40% { transform: rotate(8deg); }
  50% { transform: rotate(0); }
}

/* --- Application Info --- */
.ss-body {
  padding: 32px 40px 28px;
}
.ss-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ss-section-title svg {
  width: 20px;
  height: 20px;
  fill: #e4393c;
}

.ss-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 32px;
}
.ss-info-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.ss-info-label {
  font-size: 13px;
  color: #999;
  white-space: nowrap;
  min-width: 80px;
}
.ss-info-value {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}
.ss-info-value.status {
  color: #2563eb;
  background: #eff6ff;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.ss-info-value.status-pending {
  color: #2563eb;
  background: #eff6ff;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.ss-info-value.status-approved {
  color: #16a34a;
  background: #f0fdf4;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.ss-info-value.status-rejected {
  color: #dc2626;
  background: #fef2f2;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

/* --- Review Timeline --- */
.ss-timeline {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid #f0f0f0;
}
.ss-timeline-list {
  display: flex;
  align-items: flex-start;
  position: relative;
  padding: 0 10px;
}
.ss-timeline-list::before {
  content: '';
  position: absolute;
  top: 22px;
  left: 60px;
  right: 60px;
  height: 3px;
  background: #e8e8e8;
  border-radius: 2px;
}
.ss-step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}
.ss-step-dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.3s;
}
.ss-step.done .ss-step-dot {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
}
.ss-step.active .ss-step-dot {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: 0 0 0 6px rgba(59,130,246,0.15);
  animation: ss-step-pulse 2s ease-in-out infinite;
}
.ss-step.pending .ss-step-dot {
  background: #f5f5f5;
  color: #ccc;
  border: 2px solid #e8e8e8;
}
.ss-step.rejected .ss-step-dot {
  background: #fef2f2;
  color: #dc2626;
  border: 2px solid #fecaca;
}
.ss-step.rejected .ss-step-text {
  color: #dc2626;
  font-weight: 600;
}
@keyframes ss-step-pulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(59,130,246,0.15); }
  50% { box-shadow: 0 0 0 10px rgba(59,130,246,0.06); }
}

.ss-step-text {
  font-size: 13px;
  color: #999;
  line-height: 1.5;
}
.ss-step.done .ss-step-text { color: #16a34a; font-weight: 600; }
.ss-step.active .ss-step-text { color: #2563eb; font-weight: 600; }
.ss-step-time {
  font-size: 11px;
  color: #bbb;
  margin-top: 4px;
}

/* --- What's Next --- */
.ss-whats-next {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid #f0f0f0;
}
.ss-next-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ss-next-card {
  background: #fafafa;
  border-radius: 10px;
  padding: 20px 16px;
  text-align: center;
  transition: all 0.25s;
}
.ss-next-card:hover {
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}
.ss-next-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.ss-next-icon.blue { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.ss-next-icon.green { background: linear-gradient(135deg, #dcfce7, #bbf7d0); }
.ss-next-icon.orange { background: linear-gradient(135deg, #ffedd5, #fed7aa); }
.ss-next-icon svg {
  width: 24px;
  height: 24px;
}
.ss-next-icon.blue svg { fill: #3b82f6; }
.ss-next-icon.green svg { fill: #22c55e; }
.ss-next-icon.orange svg { fill: #f97316; }
.ss-next-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}
.ss-next-desc {
  font-size: 12px;
  color: #999;
  line-height: 1.6;
}

/* --- Tips --- */
.ss-tips {
  margin-top: 28px;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: 10px;
  padding: 16px 20px;
}
.ss-tips-title {
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ss-tips-title svg {
  width: 16px;
  height: 16px;
  fill: #f59e0b;
}
.ss-tips-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ss-tips-list li {
  font-size: 12px;
  color: #a16207;
  line-height: 1.8;
  padding-left: 16px;
  position: relative;
}
.ss-tips-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  background: #f59e0b;
  border-radius: 50%;
}

/* --- Actions --- */
.ss-actions {
  padding: 24px 40px 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-top: 1px solid #f5f5f5;
}
.ss-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s;
  border: none;
  cursor: pointer;
}
.ss-btn svg {
  width: 16px;
  height: 16px;
}
.ss-btn-primary {
  background: linear-gradient(135deg, #e4393c, #c53030);
  color: #fff;
  box-shadow: 0 4px 12px rgba(228,57,60,0.3);
}
.ss-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(228,57,60,0.4);
}
.ss-btn-outline {
  background: #fff;
  color: #666;
  border: 1px solid #d9d9d9;
}
.ss-btn-outline:hover {
  border-color: #e4393c;
  color: #e4393c;
}
.ss-btn-link {
  background: none;
  color: #999;
  padding: 12px 16px;
}
.ss-btn-link:hover { color: #e4393c; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .ss-banner { padding: 36px 20px 28px; }
  .ss-body { padding: 24px 20px 20px; }
  .ss-actions { padding: 20px; flex-wrap: wrap; }
  .ss-info-grid { grid-template-columns: 1fr; }
  .ss-next-grid { grid-template-columns: 1fr; }
  .ss-title { font-size: 22px; }
  .ss-timeline-list { flex-direction: column; align-items: flex-start; gap: 20px; }
  .ss-timeline-list::before { display: none; }
  .ss-step { display: flex; align-items: center; text-align: left; gap: 14px; }
  .ss-step-dot { margin: 0; flex-shrink: 0; }
  .ss-phone-reminder { margin-left: 0; margin-right: 0; }
}
