.result-panel {
  display: none;
}

.result-panel.active {
  display: block;
}

.result-table-wrap {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 0;
  box-shadow: var(--shadow);
  overflow-x: auto;
  overflow-y: hidden;
  margin-bottom: 16px;
}

.result-table-header {
  padding: 20px 24px;
  border-bottom: 0;
  background: linear-gradient(135deg, #F8FBFF 0%, #ECFDF5 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.result-table-title {
  font-size: 18px;
  font-weight: 900;
  color: #0F172A;
}

.result-category-block {
  margin-bottom: 28px;
  background: rgba(248, 250, 252, 0.52);
}

.result-category-block:last-child {
  margin-bottom: 0;
}

.result-category-title {
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 900;
  color: #0F172A;
  background: linear-gradient(135deg, #F8FBFF 0%, #ECFDF5 100%);
  border-top: 1px solid rgba(226, 232, 240, 0.72);
  border-bottom: 1px solid rgba(226, 232, 240, 0.72);
}

.result-section {
  margin-bottom: 24px;
}

.result-section:last-of-type {
  margin-bottom: 0;
}

.result-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 24px;
  background: linear-gradient(135deg, #EFF6FF 0%, #F0FDFA 100%);
}

.result-section-title {
  font-size: 14px;
  font-weight: 900;
  color: #1D4ED8;
  padding: 11px 0;
  border-bottom: 0;
  letter-spacing: 0.02em;
}

table.estimate-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 15px;
}

table.estimate-table .estimate-col-item {
  width: auto;
}

table.estimate-table .estimate-col-qty {
  width: 120px;
}

table.estimate-table .estimate-col-amount {
  width: 180px;
}

table.estimate-table th {
  background: #F8FAFC;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 12px 24px;
  text-align: left;
}

table.result-table-heading th {
  border-bottom: 1px solid rgba(215, 225, 238, 0.72);
}

table.estimate-table td {
  padding: 14px 24px;
  border-bottom: 1px solid rgba(215, 225, 238, 0.72);
}

table.estimate-table tr:last-child td {
  border-bottom: none;
}

.result-row-main {
  font-weight: 700;
  color: #0F172A;
}

.result-row-description {
  max-width: 760px;
  margin-top: 6px;
  color: #64748B;
  font-size: 12px;
  line-height: 1.65;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result-package-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  max-width: 820px;
}

.result-package-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.36);
  background: #F8FAFC;
  color: #334155;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 800;
}

.result-package-chip b {
  color: #1D4ED8;
  font-size: 10px;
}

.result-package-chip.option {
  background: #FFF7ED;
  border-color: rgba(251, 146, 60, 0.34);
  color: #9A3412;
}

.result-package-chip.option b {
  color: #EA580C;
}

.result-package-chip.ng {
  background: #F8FAFC;
  color: #94A3B8;
  text-decoration: line-through;
}

.result-package-chip.ng b {
  color: #64748B;
  text-decoration: none;
}

.admin-step-add-trigger {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid #BFDBFE;
  border-radius: 999px;
  background: #FFFFFF;
  color: #1D4ED8;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.08);
}

.admin-step-add-trigger:hover {
  border-color: #2563EB;
  background: #EFF6FF;
}

.admin-step-add-trigger span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  line-height: 1;
}

.admin-unincluded-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.admin-unincluded-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.admin-unincluded-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(480px, 92vw);
  height: 100%;
  background: #FFFFFF;
  box-shadow: -24px 0 60px rgba(15, 23, 42, 0.18);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
}

.admin-unincluded-drawer-overlay.active .admin-unincluded-drawer {
  transform: translateX(0);
}

.admin-unincluded-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid #E2E8F0;
  background: #F8FAFC;
}

.admin-unincluded-drawer-kicker {
  font-size: 10px;
  font-weight: 900;
  color: #2563EB;
  letter-spacing: 0.08em;
}

.admin-unincluded-drawer-header h3 {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 900;
  color: #0F172A;
}

.admin-unincluded-drawer-close {
  width: 34px;
  height: 34px;
  border: 1px solid #CBD5E1;
  border-radius: 50%;
  background: #FFFFFF;
  color: #475569;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.admin-unincluded-drawer-close:hover {
  color: #0F172A;
  border-color: #2563EB;
}

.admin-unincluded-drawer-body {
  padding: 18px 24px 26px;
  overflow-y: auto;
  display: grid;
  gap: 10px;
}

.admin-unincluded-drawer-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background: #FFFFFF;
  padding: 13px 14px;
  color: #0F172A;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.admin-unincluded-drawer-item:hover {
  border-color: #2563EB;
  background: #EFF6FF;
}

.admin-unincluded-drawer-item-main {
  font-size: 14px;
  font-weight: 900;
}

.admin-unincluded-drawer-item-meta {
  color: #1D4ED8;
  font-family: "DM Mono", monospace;
  font-size: 13px;
  font-weight: 900;
}

table.estimate-table .qty {
  text-align: center;
  white-space: nowrap;
}

table.estimate-table .amount {
  font-family: "DM Mono", monospace;
  text-align: right;
  font-weight: 800;
  color: #1D4ED8;
}

.amount-before {
  display: block;
  color: #94A3B8;
  font-size: 12px;
  text-decoration: line-through;
  margin-bottom: 4px;
}

.amount-discount {
  display: inline-flex;
  justify-content: center;
  min-width: 48px;
  margin-bottom: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #DCFCE7;
  color: #15803D;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 11px;
  font-weight: 900;
}

.amount-after {
  display: block;
  color: #15803D;
  font-size: 15px;
  font-weight: 900;
}

.admin-row-discount {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: #F8FAFC;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 8px;
  align-items: end;
}

.admin-row-discount-title {
  grid-column: 1/-1;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.admin-row-discount label {
  display: grid;
  gap: 4px;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

.admin-row-discount-toggle {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  align-self: center;
  gap: 7px;
  padding-bottom: 7px;
  color: #0F172A;
}

.admin-row-discount input,
.admin-row-discount select {
  width: 100%;
  min-width: 0;
  border: 1px solid #CBD5E1;
  border-radius: 7px;
  background: #FFFFFF;
  padding: 7px 8px;
  color: #0F172A;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.admin-row-discount .admin-discount-input-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid #CBD5E1;
  border-radius: 7px;
  background: #FFFFFF;
  overflow: hidden;
}

.admin-row-discount .admin-discount-input-wrap input {
  border: 0;
  border-radius: 0;
  padding-right: 4px;
}

.admin-row-discount .admin-discount-input-wrap em {
  flex: 0 0 auto;
  padding: 0 9px 0 2px;
  color: #64748B;
  font-size: 12px;
  font-weight: 900;
  font-style: normal;
}

.admin-row-discount .admin-discount-input-wrap:focus-within {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.admin-row-discount input:disabled,
.admin-row-discount select:disabled {
  background: #F1F5F9;
  color: #94A3B8;
  cursor: not-allowed;
}

.admin-row-discount-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #2563EB;
}

.admin-row-discount strong,
.admin-row-discount em {
  align-self: center;
  justify-self: start;
  font-size: 12px;
  font-weight: 900;
  font-style: normal;
  color: #15803D;
  white-space: nowrap;
}

.admin-row-discount em {
  color: #94A3B8;
}

.summary-rows {
  margin-top: 36px;
  padding: 0;
  background: #F1F5F9;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  position: relative;
}

.summary-rows::before {
  content: "";
  display: block;
  height: 12px;
  background: #F8FBFF;
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
}

.summary-rows .result-section-title {
  background: radial-gradient(circle at 90% 10%, rgba(20, 184, 166, 0.42), transparent 34%), linear-gradient(135deg, #111827 0%, #1D4ED8 100%);
  color: white;
  border-bottom: 0;
}

.summary-rows .sum-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 24px;
  font-size: 15px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
  background: white;
}

.summary-rows .sum-row.taxbase-row {
  font-size: 17px;
  font-weight: 900;
}

.summary-rows .sum-row small {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 800;
  color: #64748B;
}

.sum-rate-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #EEF2F7;
  color: #475569;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.estimate-table th.amount small {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  font-weight: 800;
  color: #64748B;
}

.summary-rows .sum-row.portfolio-consent-pending {
  color: #94A3B8;
  background: repeating-linear-gradient(-45deg, #F8FAFC 0, #F8FAFC 8px, #F1F5F9 8px, #F1F5F9 16px);
  border-top: 1px dashed #CBD5E1;
  border-bottom: 1px dashed #CBD5E1;
}

.summary-rows .sum-row.portfolio-consent-pending small {
  display: inline-flex;
  margin-left: 6px;
  margin-top: 0;
  font-size: 10px;
  font-weight: 800;
  color: #64748B;
}

.summary-rows .sum-row.direction-consent-applied small,
.summary-rows .sum-row.portfolio-consent-applied small {
  color: #2563EB;
}

.summary-rows .sum-row.portfolio-consent-applied {
  background: #F0FDF4;
  color: #166534;
  border-top: 1px solid rgba(34, 197, 94, 0.22);
  border-bottom: 1px solid rgba(34, 197, 94, 0.22);
}

.summary-rows .sum-row.portfolio-consent-applied .num {
  color: #15803D;
  font-weight: 900;
}

.summary-rows .sum-row:last-child {
  border-bottom: none;
  font-weight: 800;
  font-size: 20px;
  background: #EAF2FF;
  color: #1D4ED8;
  padding: 16px 24px;
}

.summary-rows .sum-row .num {
  font-family: "DM Mono", monospace;
}

.result-adjustment-controls {
  margin-top: 18px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.result-adjustment-controls:empty {
  display: none;
}

.admin-preview-discount-guide {
  display: grid;
  gap: 6px;
  padding: 16px 24px;
  background: #ECFDF5;
  border-top: 1px solid rgba(34, 197, 94, 0.24);
  border-bottom: 1px solid rgba(34, 197, 94, 0.24);
  color: #14532D;
}

.admin-preview-discount-guide strong {
  font-size: 14px;
  font-weight: 900;
}

.admin-preview-discount-guide span {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
}

.admin-preview-discount-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 24px 18px;
  background: #F8FAFC;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.admin-preview-discount-controls-top {
  margin: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(135deg, #F8FBFF 0%, #F0FDFA 100%);
}

.admin-preview-discount-title {
  grid-column: 1/-1;
  font-size: 12px;
  font-weight: 900;
  color: #334155;
  letter-spacing: 0.04em;
}

.admin-preview-discount-controls label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #475569;
}

.admin-preview-discount-controls select,
.admin-preview-discount-controls input,
.admin-preview-discount-controls textarea {
  width: 100%;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 9px 10px;
  background: #FFFFFF;
  color: #0F172A;
  font: inherit;
}

.admin-preview-discount-controls textarea {
  min-height: 66px;
  resize: vertical;
  line-height: 1.6;
}

.admin-preview-discount-wide {
  grid-column: 1/-1;
}

.admin-preview-discount-controls .admin-preview-discount-toggle {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: #FFFFFF;
  color: #0F172A;
}

.admin-preview-discount-controls .admin-preview-discount-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #2563EB;
}

.admin-preview-discount-current {
  align-self: end;
  padding: 10px 12px;
  border-radius: 8px;
  background: #FFFFFF;
  border: 1px solid rgba(34, 197, 94, 0.24);
  color: #047857;
  font-size: 12px;
  font-weight: 900;
}

.note-box {
  background: #FFF7ED;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(146, 64, 14, 0.08);
  padding: 14px 18px;
  font-size: 13px;
  color: #92400E;
  margin-bottom: 16px;
}

.result-final-consent {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 8px;
  background: #F8FBFF;
  color: #1E3A8A;
  font-size: 14px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.result-final-consent.is-agreed {
  background: #EFF6FF;
  border-color: rgba(37, 99, 235, 0.48);
}

.result-final-consent-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1.5px solid #93C5FD;
  color: #2563EB;
  font-size: 14px;
  line-height: 1;
}

.result-final-consent.is-agreed .result-final-consent-icon {
  background: #2563EB;
  border-color: #2563EB;
  color: #FFFFFF;
}

.result-action-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.result-contact-button {
  min-width: 260px;
  justify-content: center;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
}

@media print {
  .header, .sidebar, .step-progress, .step-nav, .action-buttons,
  .note-box, .btn, #pdfBtn, #copyBtn, #resetBtn {
    display: none !important;
  }
  .container {
    grid-template-columns: 1fr;
  }
  body {
    background: white;
  }
}
