@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');

/* DCF 페이지 전용 스타일 - body 스타일 제거하여 base.css와 충돌 방지 */

/* DCF 컨테이너 스타일을 더 구체적으로 지정하여 base.css와 충돌 방지 */
.dcf-container {
    max-width: 1000px;
    margin: auto;
    background-color: #fff;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* 새로운 6단계 구조를 위한 스타일 */
.step-description {
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    color: #495057;
}

.fcff-calculation {
    margin: 20px 0;
}

.fcff-formula {
    background-color: #e3f2fd;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.formula-box {
    background-color: #fff;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 10px 0;
}

.formula {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.wacc-calculation {
    margin: 20px 0;
}

.wacc-formula {
    background-color: #e8f5e8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.wacc-results table {
    margin-top: 15px;
}

.enterprise-value-calculation {
    margin: 20px 0;
}

.calculation-steps {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.calc-step {
    margin: 15px 0;
    padding: 10px;
    background-color: #fff;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.calc-step.final-result {
    background-color: #d4edda;
    border-left-color: #28a745;
    font-weight: 600;
}

.calc-label {
    font-weight: 600;
    color: #495057;
    margin-right: 10px;
}

.calc-value {
    color: #007bff;
    font-weight: 600;
}

.terminal-value-formula {
    background-color: #fff3cd;
    padding: 15px;
    border-radius: 6px;
    margin: 10px 0;
    text-align: center;
}

.terminal-value-result {
    text-align: center;
    margin: 15px 0;
    font-size: 1.1rem;
}

.result-box {
    background-color: #d1ecf1;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 15px 0;
}

.result-label {
    font-weight: 600;
    color: #0c5460;
    margin-right: 10px;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #007bff;
}

.equity-value-calculation {
    margin: 20px 0;
}

.share-price-calculation {
    margin: 20px 0;
}

.sensitivity-analysis {
    margin: 20px 0;
}

.sensitivity-chart {
    margin: 20px 0;
}

.sensitivity-table {
    margin: 20px 0;
}

.explanation-panel {
    margin: 20px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
}

.explanation-panel .alert {
    margin-bottom: 0;
}

/* CAPM 스타일의 인터랙티브 요소 */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 단계별 진행 표시 */
.step-progress {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    padding: 0 20px;
}

.step-progress-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-progress-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    right: -50%;
    width: 100%;
    height: 2px;
    background-color: #dee2e6;
    z-index: 1;
}

.step-progress-item.active::after {
    background-color: #007bff;
}

.step-progress-item.completed::after {
    background-color: #28a745;
}

.step-progress-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #dee2e6;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.step-progress-item.active .step-progress-circle {
    background-color: #007bff;
    color: white;
}

.step-progress-item.completed .step-progress-circle {
    background-color: #28a745;
    color: white;
}

/* 차트 컨테이너 */
.chart-container {
    margin: 20px 0;
    padding: 15px;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    text-align: center;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Mobile chart optimizations */
@media (max-width: 768px) {
    .chart-container {
        margin: 10px 0;
        padding: 10px;
    }
    
    /* Limit pie chart size on mobile */
    .chart-container canvas,
    .chart-container svg,
    .chart-container .js-plotly-plot {
        max-width: 100% !important;
        max-height: 300px !important;
        width: auto !important;
        height: auto !important;
    }
    
    /* Specific fix for oversized pie charts */
    .chart-container div[id*="pie"],
    .chart-container div[id*="chart"] {
        max-width: 100% !important;
        max-height: 300px !important;
    }
}

/* 헤더 섹션 - DCF 페이지 내부 헤더만 적용 */
.dcf-container .header-section {
    margin-bottom: 30px;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 20px;
    margin-top: 4rem;
    margin-bottom: 4rem;
}

h1 {
    text-align: left !important;
    color: #003366;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 28px;
}

h2, h3 {
    color: #003366;
    margin-top: 0;
}

.model-description {
    text-align: left !important;
    color: #666;
    font-size: 14px;
    max-width: 700px;
    margin: 0;
}

/* 입력 카드 스타일 */
.input-card {
    background-color: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.card-header {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e1e4e8;
}

.card-header h2 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
}

.card-header h2 i {
    margin-right: 10px;
    color: #003366;
}

/* 섹션 타이틀 */
.section-title {
    font-weight: 600;
    color: #003366;
    margin: 25px 0 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eaeaea;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 8px;
}

/* 폼 스타일 */
form {
    padding: 20px;
    margin-bottom: 0;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* 폼 레이아웃 */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px 15px;
    width: 100%;
    box-sizing: border-box;
}

.form-row .form-group {
    flex: 1;
    padding: 0 10px;
    min-width: 200px;
    margin-bottom: 15px;
}

/* 레이블 스타일 */
label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
    font-size: 14px;
}

label i {
    margin-right: 5px;
    color: #003366;
}

/* 입력 필드 스타일 */
input[type="text"], 
input[type="number"],
select {
    width: 100%;
    padding: 10px 12px;
    box-sizing: border-box;
    border: 1px solid #cfd7e6;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus, 
input[type="number"]:focus,
select:focus {
    border-color: #007acc;
    box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.15);
    outline: none;
}

/* 입력 필드 아이콘 */
.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-right: 30px;
}

.input-with-icon:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.tooltip {
    position: absolute;
    top: -40px;
    left: 0;
    background-color: #003366;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 100;
    width: 200px;
}

.tooltip:after {
    content: "";
    position: absolute;
    top: 100%;
    left: 15px;
    border-width: 5px;
    border-style: solid;
    border-color: #003366 transparent transparent transparent;
}

/* 티커 검색 링크 */
.ticker-lookup {
    margin-top: 5px;
    font-size: 12px;
}

.ticker-lookup a {
    color: #007acc;
    text-decoration: none;
}

.ticker-lookup a:hover {
    text-decoration: underline;
}

/* 도움말 텍스트 */
.helper-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* 비율 컨테이너 */
.rate-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 슬라이더 스타일 */
input[type="range"] {
    flex: 1;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: #e1e4e8;
    border-radius: 5px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #003366;
    cursor: pointer;
}

/* 비율 입력 필드 */
.rate-container input[type="text"] {
    width: 80px;
    text-align: center;
}

/* 퍼센트 표시 */
.rate-container span {
    width: 50px;
    font-weight: bold;
    color: #003366;
}

/* 버튼 스타일 */
.submit-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #003366;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-weight: 600;
    margin-top: 20px;
}

.submit-btn:hover {
    background-color: #004080;
}

.submit-btn i {
    margin-right: 8px;
}

/* 로딩 스피너 */
#loading {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    color: #003366;
    margin-bottom: 15px;
}

/* 결과 섹션 */
.step {
    display: none;
    background-color: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.step.active {
    display: block;
}

.step h3 {
    color: #003366;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eaeaea;
}

/* 다음 단계 버튼 */
.next-step,
.show-all {
    display: inline-block;
    background-color: #007bff; /* Primary blue */
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease; /* Smooth transition for all properties */
    margin: 10px 5px; /* Some margin for spacing */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

.next-step:hover,
.show-all:hover {
    background-color: #0056b3; /* Darker blue on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Slightly larger shadow on hover */
}

.next-step:active,
.show-all:active {
    background-color: #004085; /* Even darker blue on click */
    transform: translateY(1px); /* Slight press down effect */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* Smaller shadow on click */
}

.next-step i,
.show-all i {
    margin-left: 8px; /* Space for icon if present */
}

/* Ensure buttons are centered if they are the only element in their line */
.step > .next-step,
.step > .show-all {
    display: block;
    width: fit-content; /* Or a specific max-width */
    margin-left: auto;
    margin-right: auto;
}

/* Mobile next-step button fix - prevent jumping to footer */
@media (max-width: 768px) {
    .next-step,
    .show-all {
        margin: 15px auto;
        display: block;
        width: fit-content;
        scroll-margin-top: 80px; /* Prevent jumping to footer */
    }
    
    /* Ensure proper spacing after button click */
    .step {
        scroll-margin-top: 80px;
        padding-bottom: 20px;
    }
    
    /* Prevent footer jump by ensuring content has proper spacing */
    .step:target {
        scroll-margin-top: 80px;
    }
}

/* 테이블 스타일 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

.table th {
    background-color: #f8f9fa;
    color: #003366;
    font-weight: 600;
    text-align: left;
    padding: 12px;
    border: 1px solid #e1e4e8;
}

.table td {
    padding: 10px 12px;
    border: 1px solid #e1e4e8;
}

.table tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* 차트 컨테이너 */
.chart-container {
    margin: 20px 0;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .form-row .form-group {
        flex: 100%;
        min-width: 100%;
        padding: 0 5px;
    }
    
    .dcf-container {
        padding: 15px;
        margin: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .form-row {
        margin: 0 -5px 15px;
    }
    
    .input-card {
        margin: 0 0 20px 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .step {
        margin: 0 0 15px 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 15px;
    }
    
    .summary-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .summary-item {
        min-width: 100%;
        flex: none;
    }
    
    .table-responsive {
        margin: 0 -15px;
        padding: 0 15px;
    }
    
    .chart-container {
        margin: 10px -15px;
        padding: 10px 15px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

/* Wizard 버튼 중앙 정렬 was here, styles are now consolidated above */
.next-step:hover,
.show-all:hover {
  background-color: #2980b9;
}

/* 테이블 반응형 */
.table-responsive {
  overflow-x: auto;
  width: 100%;
  box-sizing: border-box;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  border: 1px solid #ddd;
  padding: 8px 12px;
  text-align: center;
}
.table th {
  background: #f9f9f9;
  font-weight: 600;
}

/* Plotly 차트 컨테이너 */
#sensitivity-plot {
  width: 100% !important;
  height: 400px;
  margin-bottom: 20px;
}

/* 설명문 스타일 */
.explanation {
  margin: 15px 0;
  font-size: 0.95rem;
  color: #333;
  line-height: 1.5;
}

/* 로딩 스피너 */
#loading {
  text-align: center;
  margin: 20px 0;
}
.spinner-border {
  width: 50px;
  height: 50px;
}

/* Input Summary 스타일 */
.input-summary-card {
  background-color: #f8fafc;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.summary-section {
  margin-bottom: 20px;
  border-bottom: 1px solid #eaeaea;
  padding-bottom: 15px;
}

.summary-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.section-title {
  font-weight: 600;
  color: #003366;
  margin-bottom: 12px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title i {
  color: #0056b3;
}

.summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 10px;
}

.summary-item {
  flex: 1;
  min-width: 250px;
  background-color: #fff;
  border-radius: 6px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.summary-item label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: #444;
  margin-bottom: 6px;
  font-size: 14px;
}

.summary-item label i {
  color: #0056b3;
  font-size: 12px;
}

.summary-item .value {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-item .value.changed {
  color: #0056b3;
}

.summary-item .changed-value {
  font-size: 14px;
  color: #28a745;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

.summary-item .changed-value i {
  font-size: 12px;
}

.summary-item .changed-value.negative {
  color: #dc3545;
}

.summary-item .changed-value.positive {
  color: #28a745;
}

.summary-item .explanation {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
  line-height: 1.4;
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 4px;
  border-left: 3px solid #007bff;
}

.summary-item .explanation code {
  background-color: #e9ecef;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
}

/* 다운로드 버튼 스타일 */
.download-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.download-buttons .btn {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
}

.download-buttons .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.download-buttons .btn i {
  font-size: 0.875rem;
}

.industry-info {
  background-color: #e6f3ff;
  padding: 12px 15px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 14px;
  color: #0056b3;
}

.industry-message {
  margin-top: 6px;
  font-size: 13px;
  color: #555;
  font-style: italic;
}

/* 추가 모바일 최적화 */
@media (max-width: 480px) {
    .dcf-container {
        padding: 10px;
    }
    
    .form-row .form-group {
        padding: 0 2px;
    }
    
    .form-row {
        margin: 0 -2px 10px;
    }
    
    .rate-container {
        flex-direction: column;
        gap: 5px;
        align-items: stretch;
    }
    
    .rate-container input[type="text"] {
        width: 100%;
        text-align: center;
    }
    
    .rate-container span {
        text-align: center;
        width: 100%;
    }
    
    .summary-item {
        padding: 10px;
    }
    
    .summary-item .value {
        font-size: 16px;
    }
    
    .summary-item .explanation {
        font-size: 11px;
        padding: 6px;
    }
    
    .download-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .download-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .table th, .table td {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2, h3 {
        font-size: 18px;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .model-description {
        font-size: 13px;
    }
}

/* 전체 페이지 overflow 방지 */
body {
    overflow-x: hidden;
}

/* 모든 컨테이너에 기본 overflow 설정 */
* {
    box-sizing: border-box;
}

/* 특정 요소들의 overflow 방지 */
.dcf-container,
.input-card,
.step,
.chart-container,
.input-summary-card,
.table-responsive {
    max-width: 100%;
    overflow-x: hidden;
}

/* 추가 모바일 최적화 */
@media (max-width: 480px) {
    .dcf-container {
        padding: 10px;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        padding: 10px;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .form-row .form-group {
        padding: 0 2px;
        box-sizing: border-box;
    }
    
    .form-row {
        margin: 0 -2px 10px;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
    }
    
    .rate-container {
        flex-direction: column;
        gap: 5px;
        align-items: stretch;
        width: 100%;
        box-sizing: border-box;
    }
    
    .rate-container input[type="text"] {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
    
    .rate-container span {
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }
    
    .summary-item {
        padding: 10px;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        word-wrap: break-word;
    }
    
    .summary-item .value {
        font-size: 16px;
    }
    
    .summary-item .explanation {
        font-size: 12px;
        word-wrap: break-word;
    }
    
    .section-title {
        font-size: 18px;
        word-wrap: break-word;
    }
    
    .section-header h3 {
        font-size: 20px;
        word-wrap: break-word;
    }
    
    .alert-heading {
        font-size: 18px;
        word-wrap: break-word;
    }
    
    .info-tip {
        padding: 10px;
        font-size: 12px;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        word-wrap: break-word;
    }
    
    /* 플롯 차트 컨테이너 크기 제한 */
    .plotly-container,
    #sensitivity-chart,
    #fcff-chart {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    /* 테이블 스크롤 처리 */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    
    /* 긴 텍스트 줄바꿈 */
    .explanation,
    .helper-text,
    .info-tip,
    .change-reason {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* 폼 요소들 모바일 최적화 */
    input[type="text"],
    input[type="number"],
    select {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* 버튼 요소들 모바일 최적화 */
    .submit-btn,
    .btn {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 14px;
        padding: 10px;
    }
    
    /* 계산 과정 스텝들 모바일 최적화 */
    .step {
        padding: 15px;
        margin: 10px 0;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
}

/* FCFF Flow Diagram Styles */
.fcff-flow-diagram {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  border-radius: 8px;
  padding: 25px;
  margin: 20px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.flow-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.flow-step {
  background: white;
  border-radius: 6px;
  padding: 15px;
  text-align: center;
  min-width: 100px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

.flow-step:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.flow-step:hover .flow-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-10px);
}

.flow-icon {
  font-size: 20px;
  color: #1e3a8a;
  margin-bottom: 8px;
}

.flow-label {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 8px;
  font-size: 14px;
}

.flow-value {
  font-size: 16px;
  font-weight: 700;
  color: #1a202c;
  font-family: 'JetBrains Mono', monospace;
}

.flow-arrow {
  font-size: 24px;
  color: white;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.flow-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1a202c;
  color: white;
  padding: 15px;
  border-radius: 8px;
  width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.flow-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1a202c;
}

.flow-tooltip h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #3b82f6;
}

.flow-tooltip p {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

/* FCFF Calculator Styles */
.fcff-calculator {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 20px;
  margin: 20px 0;
  border: 1px solid #e5e7eb;
}

.calculator-header {
  text-align: center;
  margin-bottom: 25px;
}

.calculator-header h4 {
  color: #2d3748;
  margin-bottom: 8px;
  font-weight: 600;
}

.calculator-header p {
  color: #718096;
  margin: 0;
  font-size: 14px;
}

.calculator-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-group label {
  font-weight: 500;
  color: #2d3748;
  font-size: 14px;
}

.control-group input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1e3a8a;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.control-group input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1e3a8a;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.control-value {
  font-weight: 600;
  color: #2d3748;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
}

.calculator-result {
  text-align: center;
}

.result-card {
  background: white;
  border-radius: 6px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 2px solid #1e3a8a;
}

.result-card h5 {
  color: #2d3748;
  margin-bottom: 10px;
  font-weight: 600;
}

.result-value {
  font-size: 20px;
  font-weight: 700;
  color: #1e3a8a;
  font-family: 'JetBrains Mono', monospace;
}

/* FCFF Forecast Section Styles */
.fcff-forecast-section {
  margin: 25px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 20px;
}

.section-header h4 {
  color: #2d3748;
  margin-bottom: 8px;
  font-weight: 600;
}

.section-header p {
  color: #718096;
  margin: 0;
  font-size: 14px;
}

.fcff-table {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.fcff-table thead th {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  border: none;
  padding: 12px 10px;
  font-weight: 600;
  text-align: center;
}

.fcff-table tbody tr {
  transition: background-color 0.2s ease;
}

.fcff-table tbody tr:hover {
  background-color: #f8f9fa;
}

.fcff-table tbody td {
  padding: 12px;
  border-color: #e9ecef;
  font-family: 'JetBrains Mono', monospace;
}

.fcff-table .fcff-cell {
  background-color: #eff6ff;
  font-weight: 700;
  color: #1e3a8a;
}

/* FCFF Chart Section Styles */
.fcff-chart-section {
  margin: 25px 0;
}

.chart-container {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  min-height: 400px;
}

/* Enhanced Explanation Panel */
.explanation-panel .alert {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 25px;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.explanation-panel .alert-heading {
  color: #1e3a8a;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.explanation-panel .alert-heading i {
  color: #3b82f6;
  font-size: 20px;
}

.explanation-panel .alert p {
  color: #475569;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.explanation-details {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
}

.detail-item {
  background: white;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  position: relative;
}

.detail-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: #3b82f6;
}

.detail-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  border-radius: 0 2px 2px 0;
}

.detail-item strong {
  color: #1e3a8a;
  display: block;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
}

.detail-item p {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
}

.detail-item strong i {
  color: #3b82f6;
  margin-right: 8px;
  font-size: 14px;
}

/* WACC Flow Diagram Styles */
.wacc-flow-diagram {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  border-radius: 8px;
  padding: 25px;
  margin: 20px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* CAPM Calculation Section */
.capm-calculation-section {
  margin: 25px 0;
}

.capm-formula-box {
  background: white;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

.formula-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 15px;
  text-align: center;
}

.capm-formula-box .formula {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  color: #1e3a8a;
  font-weight: 600;
  text-align: center;
  margin: 20px 0;
  padding: 15px;
  background: #f8fafc;
  border-radius: 6px;
  border: 2px solid #e2e8f0;
}

.formula-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.formula-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #f8fafc;
  border-radius: 6px;
  border-left: 4px solid #1e3a8a;
}

.variable {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: #1e3a8a;
  min-width: 60px;
}

/* Capital Structure Section */
.capital-structure-section {
  margin: 25px 0;
}

.capital-structure-chart {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  min-height: 300px;
}

.capital-structure-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.capital-item {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.2s ease;
}

.capital-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.capital-item.equity {
  border-left: 4px solid #1e3a8a;
}

.capital-item.debt {
  border-left: 4px solid #3b82f6;
}

.capital-icon {
  font-size: 24px;
  color: #1e3a8a;
}

.capital-item.debt .capital-icon {
  color: #3b82f6;
}

.capital-label {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 5px;
}

.capital-percentage {
  font-size: 20px;
  font-weight: 700;
  color: #1e3a8a;
  font-family: 'JetBrains Mono', monospace;
}

.capital-item.debt .capital-percentage {
  color: #3b82f6;
}

.capital-value {
  font-size: 14px;
  color: #718096;
  font-family: 'JetBrains Mono', monospace;
}

/* WACC Formula Box Styles */
.wacc-formula-box {
  background: white;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  margin: 20px 0;
}

.wacc-formula-box .formula {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  color: #1e3a8a;
  font-weight: 600;
  text-align: center;
  margin: 20px 0;
  padding: 15px;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

/* Enterprise Value Flow Styles */
.enterprise-value-flow {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 20px 0;
}

.calculation-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.1);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.calculation-card:hover {
  box-shadow: 0 8px 25px rgba(30, 58, 138, 0.15);
  transform: translateY(-2px);
}

.calculation-card.final-card {
  background: white;
  color: #1e3a8a;
}

.calculation-card.final-card .card-header h5 {
  color: #1e3a8a;
}

.card-header {
  display: flex;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-bottom: 1px solid #e2e8f0;
}

.final-card .card-header {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-bottom: 1px solid #e2e8f0;
}

.step-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  margin-right: 15px;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.3);
}

.final-card .step-icon {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
}

.card-header h5 {
  margin: 0;
  color: #1e3a8a;
  font-size: 18px;
  font-weight: 600;
}

.card-content {
  padding: 25px;
}

.fcff-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.fcff-summary .summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.fcff-summary .summary-item .label {
  color: #64748b;
  font-weight: 500;
}

.fcff-summary .summary-item .value {
  color: #1e3a8a;
  font-weight: 700;
  font-size: 16px;
}

.fcff-summary .summary-item .value.highlight {
  color: #3b82f6;
  font-size: 18px;
}

.fcff-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.fcff-table th {
  background: #1e3a8a;
  color: white;
  padding: 12px;
  text-align: center;
  font-weight: 600;
}

.fcff-table td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}

.fcff-table td.highlight {
  background: #f0f9ff;
  color: #1e3a8a;
  font-weight: 600;
}

/* 툴팁 스타일 */
.tooltip-trigger {
  position: relative;
  cursor: help;
  color: #1e3a8a;
  transition: all 0.2s ease;
}

.tooltip-trigger:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 4px;
  padding: 2px 4px;
}

.tooltip-trigger:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1e3a8a;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  white-space: pre-line;
  z-index: 1000;
  min-width: 250px;
  text-align: left;
  box-shadow: 0 8px 25px rgba(30, 58, 138, 0.3);
  line-height: 1.5;
  font-weight: 400;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip-trigger:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  border: 6px solid transparent;
  border-top-color: #1e3a8a;
  z-index: 1000;
}

.tooltip-trigger i {
  margin-left: 6px;
  font-size: 11px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.tooltip-trigger:hover i {
  opacity: 1;
}

.terminal-formula {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.formula-box {
  background: #f8fafc;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.formula-box .formula {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  color: #1e3a8a;
  font-weight: 600;
  text-align: center;
  display: block;
  margin-bottom: 15px;
}

.formula-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.formula-breakdown .formula-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.formula-breakdown .formula-item .variable {
  background: #1e3a8a;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
}

.terminal-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: white;
  color: #1e3a8a;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.1);
  border: 2px solid #1e3a8a;
  position: relative;
}

.terminal-result .result-label {
  font-size: 16px;
  font-weight: 500;
  color: #1e3a8a;
  z-index: 2;
}

.terminal-result .result-value {
  font-size: 24px;
  font-weight: 700;
  color: #1e3a8a;
  z-index: 2;
}

.enterprise-formula {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.enterprise-breakdown {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-bottom: 10px;
}

.breakdown-item.total {
  background: #f8fafc;
  border: 2px solid #1e3a8a;
  font-size: 18px;
  font-weight: 700;
}

.breakdown-item .label {
  color: #1e3a8a;
  font-weight: 500;
}

.breakdown-item .value {
  color: #1e3a8a;
  font-weight: 600;
  font-size: 16px;
}

.breakdown-item.total .value {
  font-size: 20px;
  font-weight: 700;
  color: #1e3a8a;
}

/* Equity Value Flow Styles */
.equity-value-flow {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 20px 0;
}

.equity-formula, .debt-formula, .cash-formula {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.equity-breakdown, .debt-breakdown, .cash-breakdown {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.debt-item {
  background: #fef2f2;
  border-left: 4px solid #ef4444;
}

.debt-item .value {
  color: #dc2626;
  font-weight: 700;
}

.cash-item {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
}

.cash-item .value {
  color: #16a34a;
  font-weight: 700;
}

/* Equity Charts Section */
.equity-charts-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 30px 0;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.chart-container {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.1);
}

.chart-container h6 {
  color: #1e3a8a;
  font-weight: 600;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-container h6 i {
  color: #3b82f6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .fcff-summary {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .formula-breakdown {
    grid-template-columns: 1fr;
  }
  
  .enterprise-value-flow {
    gap: 15px;
  }
  
  .equity-value-flow {
    gap: 15px;
  }
  
  .equity-charts-section {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .card-content {
    padding: 20px;
  }
}

/* Formula Item Tooltip */
.formula-item {
  position: relative;
  cursor: help;
  transition: all 0.3s ease;
}

.formula-item:hover {
  background-color: #f8f9fa;
  border-radius: 4px;
  padding: 2px 4px;
}

.formula-item[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1e3a8a;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 5px;
}

.formula-item[data-tooltip]:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1e3a8a;
  margin-bottom: -5px;
}

/* CAPM Result Styles */
.capm-result {
  text-align: center;
  margin: 20px 0;
}

.wacc-result {
  text-align: center;
  margin: 20px 0;
}

/* WACC Components Table */
.wacc-components-section {
  margin: 25px 0;
}

.wacc-table {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wacc-table thead th {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  border: none;
  padding: 15px 12px;
  font-weight: 600;
  text-align: center;
}

.wacc-table tbody tr {
  transition: background-color 0.2s ease;
}

.wacc-table tbody tr:hover {
  background-color: #f8f9fa;
}

.wacc-table tbody td {
  padding: 12px;
  border-color: #e9ecef;
  font-family: 'JetBrains Mono', monospace;
}

.wacc-table .component-cell {
  font-weight: 600;
  color: #2d3748;
}

.wacc-table .component-cell i {
  color: #1e3a8a;
  margin-right: 8px;
}

.wacc-total-row {
  background-color: #eff6ff;
  font-weight: 700;
}

.wacc-total-row .component-cell {
  color: #1e3a8a;
}

.wacc-total-row .value-cell,
.wacc-total-row .contribution-cell {
  color: #1e3a8a;
}

/* Mobile Responsive for FCFF Components */
@media (max-width: 768px) {
  .flow-container {
    flex-direction: column;
    gap: 15px;
  }
  
  .flow-arrow {
    transform: rotate(90deg);
  }
  
  .calculator-controls {
    grid-template-columns: 1fr;
  }
  
  .explanation-details {
    grid-template-columns: 1fr;
  }
  
  .flow-tooltip {
    width: 150px;
  }
  
  .formula-breakdown {
    grid-template-columns: 1fr;
  }
  
  .capital-structure-details {
    grid-template-columns: 1fr;
  }
  
  .capital-item {
    flex-direction: column;
    text-align: center;
  }
}

/* Share Price Flow Styles */
.share-price-flow {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.intrinsic-formula {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.intrinsic-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.intrinsic-breakdown .breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.intrinsic-breakdown .breakdown-item:hover {
  border-color: #1e3a8a;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.1);
}

.intrinsic-breakdown .breakdown-item.total {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  border: none;
  font-weight: 600;
}

.intrinsic-breakdown .breakdown-item .label {
  font-weight: 500;
  color: #64748b;
}

.intrinsic-breakdown .breakdown-item.total .label {
  color: white;
}

.intrinsic-breakdown .breakdown-item .value {
  font-weight: 600;
  color: #1e3a8a;
}

.intrinsic-breakdown .breakdown-item.total .value {
  color: white;
}

/* Price Comparison Styles */
.price-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1rem;
}

.comparison-chart {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  min-height: 300px;
}

.price-analysis {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.analysis-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.analysis-item:hover {
  border-color: #1e3a8a;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.1);
}

.analysis-item.difference {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-color: #cbd5e1;
}

.analysis-item.recommendation {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-color: #0ea5e9;
}

.analysis-item .label {
  font-weight: 500;
  color: #64748b;
}

.analysis-item .value {
  font-weight: 600;
  color: #1e3a8a;
}

.recommendation.buy {
  color: #16a34a;
  background: #dcfce7;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.recommendation.sell {
  color: #dc2626;
  background: #fef2f2;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.recommendation.hold {
  color: #d97706;
  background: #fef3c7;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Sensitivity Analysis Styles */
.sensitivity-analysis {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 1rem;
}

.sensitivity-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.chart-container {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
}

.chart-container h6 {
  margin-bottom: 1rem;
  color: #1e3a8a;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sensitivity-matrix {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
}

.sensitivity-matrix h6 {
  margin-bottom: 1rem;
  color: #1e3a8a;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Scenario Analysis Styles */
.scenario-analysis {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.scenario-analysis h6 {
  margin-bottom: 1.5rem;
  color: #1e3a8a;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.scenario-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.scenario-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.scenario-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.scenario-card.conservative {
  border-color: #f59e0b;
}

.scenario-card.base {
  border-color: #1e3a8a;
}

.scenario-card.optimistic {
  border-color: #10b981;
}

.scenario-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.scenario-header i {
  font-size: 1.5rem;
}

.scenario-card.conservative .scenario-header i {
  color: #f59e0b;
}

.scenario-card.base .scenario-header i {
  color: #1e3a8a;
}

.scenario-card.optimistic .scenario-header i {
  color: #10b981;
}

.scenario-header h6 {
  margin: 0;
  font-weight: 600;
  color: #1e3a8a;
}

.scenario-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.scenario-params {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: #64748b;
}

.scenario-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e3a8a;
}

.scenario-card.conservative .scenario-price {
  color: #f59e0b;
}

.scenario-card.optimistic .scenario-price {
  color: #10b981;
}

/* WACC Parameter Selection Styles */
.wacc-parameter-selection {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
}

.wacc-parameter-selection .form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: white;
  transition: all 0.3s ease;
  cursor: pointer;
  flex: 1;
}

.wacc-parameter-selection .form-check:hover {
  border-color: #1e3a8a;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.1);
}

.wacc-parameter-selection .form-check-input:checked + .form-check-label {
  color: #1e3a8a;
  font-weight: 600;
}

.wacc-parameter-selection .form-check-input:checked ~ .form-check {
  border-color: #1e3a8a;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.wacc-parameter-selection .form-check-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  cursor: pointer;
  font-weight: 500;
  color: #64748b;
}

.wacc-parameter-selection .form-check-label i {
  font-size: 1.2rem;
  color: #1e3a8a;
}

.wacc-default-section {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.wacc-custom-section {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 12px;
  border: 1px solid #0ea5e9;
}

.wacc-custom-section .form-group {
  margin-bottom: 1.5rem;
}

.wacc-custom-section .rate-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.wacc-custom-section .rate-container input[type="range"] {
  flex: 1;
  margin: 0;
}

.wacc-custom-section .rate-container input[type="text"] {
  width: 80px;
  text-align: center;
  font-weight: 600;
  color: #1e3a8a;
}

.wacc-custom-section .rate-container span {
  font-weight: 600;
  color: #1e3a8a;
  min-width: 50px;
}

/* Forecast Parameter Selection Styles */
.forecast-parameter-selection {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
}

.forecast-parameter-selection .form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: white;
  transition: all 0.3s ease;
  cursor: pointer;
  flex: 1;
}

.forecast-parameter-selection .form-check:hover {
  border-color: #1e3a8a;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.1);
}

.forecast-parameter-selection .form-check-input:checked + .form-check-label {
  color: #1e3a8a;
  font-weight: 600;
}

.forecast-parameter-selection .form-check-input:checked ~ .form-check {
  border-color: #1e3a8a;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.forecast-parameter-selection .form-check-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  cursor: pointer;
  font-weight: 500;
  color: #64748b;
}

.forecast-parameter-selection .form-check-label i {
  font-size: 1.2rem;
  color: #1e3a8a;
}

.forecast-custom-section {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 12px;
  border: 1px solid #0ea5e9;
}

.forecast-custom-section .form-group {
  margin-bottom: 1.5rem;
}

.forecast-custom-section .rate-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.forecast-custom-section .rate-container input[type="range"] {
  flex: 1;
  margin: 0;
}

.forecast-custom-section .rate-container input[type="text"] {
  width: 80px;
  text-align: center;
  font-weight: 600;
  color: #1e3a8a;
}

.forecast-custom-section .rate-container span {
  font-weight: 600;
  color: #1e3a8a;
  min-width: 50px;
}

/* Mobile Responsive for Share Price */
@media (max-width: 768px) {
  .price-comparison {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .sensitivity-charts {
    grid-template-columns: 1fr;
  }
  
  .scenario-cards {
    grid-template-columns: 1fr;
  }
  
  .intrinsic-breakdown .breakdown-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .analysis-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .wacc-parameter-selection {
    flex-direction: column;
    gap: 1rem;
  }
  
  .wacc-parameter-selection .form-check {
    flex: none;
  }
  
  .forecast-parameter-selection {
    flex-direction: column;
    gap: 1rem;
  }
  
  .forecast-parameter-selection .form-check {
    flex: none;
  }
}
