/* === Result Summary === */
.result-summary {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dfe7f2;
  border-radius: 16px;
  padding: 24px 22px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.result-summary-label {
  font-size: 12.5px;
  color: #64748b;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.result-summary-amount {
  font-size: 40px;
  font-weight: 800;
  color: var(--color-unfair);
  letter-spacing: -0.04em;
  line-height: 1.12;
  margin-bottom: 6px;
}

.result-summary-detail {
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 10px;
  line-height: 1.5;
}

.result-progress {
  height: 9px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 12px;
}

.result-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
  border-radius: 999px;
  transition: width 0.8s ease, filter 0.25s ease;
  filter: saturate(1.05);
}

.result-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #738396;
  margin-top: 8px;
  letter-spacing: 0.01em;
}

/* === Assessment === */
.assessment-box {
  padding: 16px;
  background: #f8fafd;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.72;
}

.assessment-box h3 {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* === Item Cards === */
.items-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.item-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.item-card:hover {
  border-color: #cad5e4;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.item-name {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
  line-height: 1.45;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 8px;
  letter-spacing: 0.02em;
}

.badge-unfair {
  background: var(--color-unfair-bg);
  color: var(--color-unfair);
}

.badge-fair {
  background: var(--color-fair-bg);
  color: var(--color-fair);
}

.badge-conditional {
  background: var(--color-conditional-bg);
  color: var(--color-conditional);
}

.item-amounts {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.6;
}

.item-charged {
  color: var(--color-text-secondary);
}

.item-charged .amount {
  text-decoration: line-through;
  color: var(--color-unfair);
}

.item-fair .amount {
  font-weight: 600;
  color: var(--color-fair);
}

.item-reason {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.65;
  margin-bottom: 8px;
}

.item-legal {
  font-size: 12px;
  color: #6b7280;
  padding: 7px 10px;
  background: #f8fafc;
  border: 1px solid #e5eaf1;
  border-radius: 8px;
  margin-top: 8px;
  line-height: 1.6;
}

.item-legal-label {
  font-weight: 600;
  margin-right: 4px;
}

/* === Negotiation Points === */
.negotiation-points {
  margin-bottom: 20px;
}

.negotiation-points h3 {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.negotiation-points ul {
  list-style: none;
  padding: 0;
}

.negotiation-points li {
  font-size: 14px;
  padding: 9px 0;
  border-bottom: 1px solid #e5eaf1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.62;
}

.negotiation-points li::before {
  content: '→';
  color: var(--color-accent);
  font-weight: 600;
  flex-shrink: 0;
}

.negotiation-points li:last-child {
  border-bottom: none;
}

/* === Email Section === */
.email-label {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  margin-top: 16px;
}

.email-box {
  border: 1px solid #dfe7f2;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.email-subject {
  padding: 12px 16px;
  background: #f8fafd;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid #e2e8f0;
  letter-spacing: 0.01em;
}

.email-body {
  padding: 16px;
  font-size: 14px;
  line-height: 1.74;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
  color: #334155;
}

/* === History === */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-card {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color var(--transition-base), background var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
  gap: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.history-card:hover {
  border-color: #cad5e4;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.history-info {
  flex: 1;
  min-width: 0;
}

.history-date {
  font-size: 12px;
  color: #7b8798;
}

.history-meta {
  font-size: 14px;
  font-weight: 600;
}

.history-stats {
  font-size: 12px;
  color: #607086;
}

.history-amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-unfair);
  white-space: nowrap;
}

.history-delete {
  padding: 4px 8px;
  border: none;
  background: none;
  color: var(--color-text-muted);
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
}

.history-delete:hover {
  background: var(--color-error-bg);
  color: var(--color-error);
}

.history-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* === Button row === */
.btn-row {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.btn-row .btn {
  flex: 1;
}

/* === Copy feedback === */
.copy-feedback {
  font-size: 13px;
  color: var(--color-fair);
  font-weight: 600;
  text-align: center;
  padding: 8px;
  opacity: 0;
  transition: opacity 0.2s;
}

.copy-feedback.visible {
  opacity: 1;
}

/* === Next Steps === */
.next-steps {
  margin: 24px 0;
  padding-top: 22px;
  border-top: 1px solid #e2e8f0;
}

.next-steps h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.next-step-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  background: #ffffff;
}

.next-step-card.next-step-recommended {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #f7f8ff 0%, #eef2ff 100%);
}

.next-step-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.45;
}

.next-step-desc {
  font-size: 13px;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 12px;
}

.next-step-action {
  text-decoration: none;
  display: inline-flex;
  width: auto;
}

.next-step-recommended .next-step-action {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  box-shadow: 0 8px 18px rgba(67,56,202,0.28);
}

.next-step-recommended .next-step-action:hover {
  background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
}

/* === Paywall Gate === */
.paywall-gate {
  margin: 26px 0 30px;
  text-align: center;
}

.paywall-box {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #ffffff 0%, #f6f9ff 52%, #eef2ff 100%);
  border: 1px solid #cfd9ea;
  border-radius: 18px;
  padding: 30px 22px 24px;
  box-shadow: var(--shadow-lg);
}

.paywall-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4f46e5 0%, #1d4ed8 100%);
}

.paywall-icon {
  font-size: 21px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  background: #111827;
  box-shadow: 0 10px 20px rgba(17,24,39,0.25);
}

.paywall-text {
  font-size: 15px;
  color: #334155;
  line-height: 1.72;
  margin-bottom: 20px;
  letter-spacing: 0.01em;
  font-weight: 500;
}

.paywall-box .btn {
  width: 100%;
  font-size: 16px;
  padding: 14px;
  box-shadow: 0 12px 24px rgba(17,24,39,0.2);
}

.paywall-note {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 12px;
  line-height: 1.6;
}

/* Locked state: blur detail content */
.result-detail.locked {
  position: relative;
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
  max-height: 300px;
  overflow: hidden;
}

.result-detail.locked::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(transparent, rgba(255,255,255,0.97));
}

/* Unlocked state: hide paywall */
.paywall-gate.hidden {
  display: none;
}
