@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');

/* 기본 레이아웃 */
html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background-color: #ECEFF1; /* Page Background */
    color: #37474F; /* Body Text */
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.container {
    max-width: 1000px;
    margin: auto;
    background-color: #FFFFFF; /* Container Background */
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
}

.footer {
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #0A2342;
    color: white;
    flex-shrink: 0;
}

/* 헤더 섹션 */
.header-section {
    margin-bottom: 30px;
    border-bottom: 1px solid #CFD8DC; /* Borders/Dividers */
    padding-bottom: 20px;
}

h1 {
    text-align: center;
    color: #003366; /* Primary Dark Blue (Headers) - Unchanged */
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 28px;
}

h2, h3 {
    color: #003366; /* Primary Dark Blue (Headers) - Unchanged */
    margin-top: 0;
}

.model-description {
    text-align: center;
    color: #546E7A; /* Secondary Text */
    font-size: 14px;
    max-width: 700px;
    margin: 0 auto;
}

/* 섹션 타이틀 스타일 수정 */
.section-title {
    font-weight: 600;
    color: #003366; /* Primary Dark Blue (Headers) - Unchanged */
    margin: 35px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #CFD8DC; /* Borders/Dividers */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 18px;
}

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

/* 영어 레이블 스타일 */
.eng-label {
    display: block;
    font-size: 12px;
    color: #546E7A; /* Secondary Text */
    font-weight: normal;
    margin-top: 2px;
}

/* 입력 카드 스타일 */
.input-card, .cycle-card, .action-card, .result-section {
    background-color: #fff;
    border: 1px solid #D9E0E6; /* Refined border color */
    border-radius: 8px; /* Slightly more rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* More refined shadow */
    margin-bottom: 30px;
    overflow: hidden;
}

.card-header {
    background-color: #F8FAFC; /* Very light blue-gray for headers */
    padding: 18px 22px; /* Slightly more padding for elegance */
    border-bottom: 1px solid #D9E0E6; /* Refined border color */
}

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

.card-header h2 i {
    margin-right: 12px;
    color: #1A365D; /* Refined dark blue for icons */
}

/* 계정 선택 커스텀 드롭다운 스타일 */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.account-search {
  width: 100%;
  padding: 12px 14px; /* Slightly more padding */
  border: 1px solid #D9E0E6; /* Refined border color */
  border-radius: 6px; /* Slightly more rounded */
  font-size: 15px; /* Slightly smaller for refinement */
  color: #495057;
  background-color: #fff;
  transition: all 0.2s ease-in-out;
}

.account-search:focus {
  border-color: #0056b3; /* Medium blue */
  outline: 0;
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15); /* More refined shadow */
}

.account-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
  background-color: #fff;
  border: 1px solid #D9E0E6; /* Refined border color */
  border-top: none; /* Remove top border for seamless connection */
  border-radius: 0 0 6px 6px; /* Match input radius */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); /* Enhanced dropdown shadow */
  z-index: 1000;
  display: none;
}

.account-dropdown.active {
  display: block;
}

.custom-option-header {
  background-color: #EEF2F7; /* Light blue-gray */
  color: #1A365D; /* Dark blue */
  font-weight: 600;
  padding: 10px 14px;
  border-top: 1px solid #D9E0E6;
  border-bottom: 1px solid #D9E0E6;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dropdown-option {
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.dropdown-option:hover {
  background-color: #F0F4F8; /* Light blue-gray hover */
}

.dropdown-option.selected {
  background-color: #0056b3; /* Medium blue */
  color: white;
}

.dropdown-option.filtered-out {
  display: none;
}

.custom-account {
  color: #D4AF37; /* Gold accent - financial theme */
  font-style: italic;
  font-weight: 500;
}

.custom-account-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #D4AF37; /* Gold border - financial theme */
  border-radius: 6px;
  font-size: 15px;
  color: #495057;
  background-color: #fff;
  transition: all 0.2s ease-in-out;
  margin-top: 5px;
}

.custom-account-input:focus {
  border-color: #D4AF37; /* Gold - financial theme */
  outline: 0;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15); /* Gold shadow */
}

/* 폼 레이블 스타일 */
.form-group label {
  display: block;
  margin-bottom: 0.6rem;
  color: #1A365D; /* Dark blue - financial theme */
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.2px;
}

/* 일반 입력 필드 스타일 (계정 검색/커스텀 입력 외) */
.form-group input[type="text"]:not(.account-search):not(.custom-account-input),
.form-group input[type="number"],
.form-group input[type="date"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #D9E0E6; /* Refined border color */
  border-radius: 6px;
  font-size: 15px;
  color: #495057;
  background-color: #fff;
  transition: all 0.2s ease-in-out;
}

.form-group input[type="text"]:not(.account-search):not(.custom-account-input):focus,
.form-group input[type="number"]:focus,
.form-group input[type="date"]:focus {
  border-color: #0056b3; /* Medium blue */
  outline: 0;
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15); /* More refined shadow */
}

/* 날짜 입력 필드 특별 스타일 */
.form-group input[type="date"] {
  font-family: 'Inter', Arial, sans-serif;
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%231A365D" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
  color: #495057;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  cursor: pointer;
}

.form-group input[type="date"]:focus {
  border-color: #0056b3; /* Medium blue */
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}

.form-group input[type="date"]:hover {
  border-color: #0056b3; /* Medium blue */
}

.transaction-date-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.transaction-date-icon {
  position: absolute;
  right: 12px;
  color: #1A365D;
  pointer-events: none;
  z-index: 2;
}

/* 버튼 스타일 */
button {
  margin: 5px;
  padding: 12px 18px;
  background: #0056b3; /* Medium blue - financial theme */
  border: none;
  color: #fff;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  background: #003d82; /* Darker blue */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

/* 액션 버튼들 스타일 */
.action-buttons {
  display: flex;
  flex-direction: column;
  padding: 15px;
  gap: 20px;
}

/* 버튼 그룹 스타일 */
.button-group {
  background-color: #F2F2F2; /* Light Gray */
  border: 1px solid #D3D3D3; /* Light Gray Borders */
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 10px;
}

/* 회계 원리 설명 섹션 스타일 */
.accounting-principles-card {
  background-color: #fff;
  border: 1px solid #D3D3D3; /* Light Gray Borders */
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
  overflow: hidden;
}

.principles-content {
  padding: 20px;
}

.principle-section {
  margin-bottom: 25px;
}

.principle-section h3 {
  color: #2E4053; /* Deep Blue (Headers) */
  font-size: 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.principle-section h3 i {
  margin-right: 10px;
}

.equation-box {
  background-color: #F2F2F2; /* Light Gray */
  border-left: 4px solid #2196F3; /* Primary Action Blue */
  padding: 15px;
  margin: 15px 0;
  border-radius: 4px;
}

.equation {
  font-size: 18px;
  font-weight: 600;
  color: #2E4053; /* Deep Blue (Headers) */
}

.sample-data-section {
  margin-top: 20px;
  margin-bottom: 30px; /* Consistent section spacing */
  text-align: center;
}

.sample-data-description {
  background-color: #F2F2F2; /* Light Gray */
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: left;
  border-left: 4px solid #2E4053; /* Deep Blue (Headers) */
}

.sample-data-description p {
  margin: 10px 0;
  line-height: 1.6;
  color: #444;
}

.sample-data-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  padding: 10px 0 20px;
}

.btn-sample {
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.btn-sample i {
  margin-right: 10px;
  font-size: 16px;
}

.beginner {
  background-color: #2C3E50;  /* Deep Blue-gray */
  background-image: linear-gradient(to bottom right, #2C3E50, #34495E);
  color: white;
  border: none;
}

.beginner:hover {
  background-color: #34495E;
  background-image: none;
}

.intermediate {
  background-color: #1A5276;  /* Navy Blue */
  background-image: linear-gradient(to bottom right, #1A5276, #154360);
  color: white;
  border: none;
}

.intermediate:hover {
  background-color: #154360;
  background-image: none;
}

.advanced {
  background-color: #117864;  /* Deep Teal */
  background-image: linear-gradient(to bottom right, #117864, #0E6251);
  color: white;
  border: none;
}

.advanced:hover {
  background-color: #0E6251;
  background-image: none;
}

.btn-reset {
  background-color: #7F8C8D; /* Professional Gray */
  background-image: linear-gradient(to bottom right, #7F8C8D, #616A6B);
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: all 0.3s;
}

.btn-reset:hover {
  background-color: #616A6B; /* Darker Gray */
  background-image: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-reset i {
  margin-right: 10px;
  font-size: 16px;
}

/* 아코디언 스타일 */
.accordion {
  width: 100%;
}

.accordion-item {
  margin-bottom: 10px;
  border: 1px solid #D3D3D3; /* Light Gray Borders */
  border-radius: 6px;
  overflow: hidden;
}

.accordion-header {
  background-color: #F2F2F2; /* Light Gray */
  padding: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: #2E4053; /* Deep Blue (Headers) */
  transition: background-color 0.3s;
}

.accordion-header:hover {
  background-color: #E5E5E5; /* Light Gray Hover */
}

.accordion-header i:first-child {
  margin-right: 10px;
  color: #2196F3; /* Primary Action Blue for specific highlights */
}

.accordion-icon {
  transition: transform 0.3s;
}

.accordion-header.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease;
  background-color: #fff;
}

.accordion-content.active {
  padding: 10px;
  max-height: 2000px; /* 더 큰 값으로 설정하여 긴 내용도 표시되도록 함 */
}

.accordion-content h4 {
  color: #2196F3; /* Primary Action Blue for specific highlights */
  margin-top: 15px;
  margin-bottom: 8px;
  font-size: 16px;
}

.accordion-content ul {
  padding-left: 20px;
  margin-bottom: 15px;
}

.accordion-content p {
  margin-bottom: 10px;
  line-height: 1.6;
}

.equation-box {
  background-color: #F5F7F8; /* Slightly off-white for headers/contrast areas */
  border-left: 4px solid #0056b3;
  padding: 15px;
  margin: 15px 0;
  border-radius: 4px;
}

.equation {
  font-family: 'Consolas', monospace;
  font-size: 18px;
  text-align: center;
  color: #003366; /* Primary Dark Blue (Headers) - Unchanged */
  font-weight: 600;
}

/* T-계정 시각화 스타일 */
.t-account-visual {
  margin: 30px 0;
}

.t-account-container {
  display: flex;
  justify-content: center;
  margin-top: 15px;
}

.t-account {
  width: 80%;
  max-width: 600px;
  border: 2px solid #003366;
  border-radius: 6px;
  overflow: hidden;
}

.t-header {
  background-color: #003366; /* Primary Dark Blue (Headers) - Unchanged */
  color: white;
  padding: 10px;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
}

.t-body {
  display: flex;
}

.t-left, .t-right {
  flex: 1;
  padding: 15px;
}

.t-left {
  border-right: 1px solid #003366;
  background-color: #e9f5ff;
}

.t-right {
  background-color: #f0f8ea;
}

.t-title {
  font-weight: 600;
  text-align: center;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #ccc;
}

.t-content p {
  margin: 8px 0;
  padding: 5px;
  border-radius: 4px;
}

.t-left .t-title {
  color: #1a73e8;
}

.t-right .t-title {
  color: #4CAF50; /* Accent Green (Success) */
}

.accounting-equation {
  margin-top: 30px;
}

/* 거래 입력 컨테이너 스타일 */
.transaction-entry-container {
  padding: 0 15px;
}

/* 차변/대변 섹션 스타일 */
.debit-section, .credit-section {
  margin-bottom: 25px;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #CFD8DC; /* Borders/Dividers */
}

.debit-section {
  background-color: #e9f5ff;
  border-left: 4px solid #1a73e8;
}

.credit-section {
  background-color: #f0f8ea;
  border-left: 4px solid #1A365D; /* Dark blue - financial theme */
}

.debit-title, .credit-title {
  color: #1A365D; /* Dark blue - financial theme */
  font-weight: 600;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #D9E0E6; /* Refined border color */
  letter-spacing: 0.2px;
  text-align: left;
  justify-content: flex-start;
}

.debit-title i {
  color: #800020; /* Burgundy - financial theme */
}

.credit-title i {
  color: #D4AF37; /* Gold - financial theme */
}

.debit-input {
  border-left: 3px solid #1a73e8;
}

.credit-input {
  border-left: 3px solid #28a745;
}

/* 차변/대변 균형 표시기 */
.balance-indicator {
  background-color: #F5F7F8; /* Slightly off-white for headers/contrast areas */
  border: 1px solid #CFD8DC; /* Borders/Dividers */
  border-radius: 6px;
  padding: 15px;
  margin: 20px 0;
  text-align: center;
}

.balance-title {
  font-weight: 600;
  color: #003366; /* Primary Dark Blue (Headers) - Unchanged */
  margin-bottom: 10px;
}

.balance-status {
  font-size: 16px;
  padding: 10px;
  border-radius: 4px;
  background-color: #fff3cd;
  color: #856404;
}

.balance-status.balanced {
  background-color: #d4edda;
  color: #155724;
}

.balance-status.unbalanced {
  background-color: #f8d7da;
  color: #721c24;
}

.group-title {
  font-size: 16px;
  color: #003366; /* Primary Dark Blue (Headers) - Unchanged */
  margin: 0 0 15px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e1e4e8;
  display: flex;
  align-items: center;
}

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

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.btn-action {
  background-color: #1A5276;
  min-width: 130px;
  margin: 5px;
}

.btn-export {
  background-color: #4CAF50; /* Accent Green (Success) */
  min-width: 130px;
  margin: 5px;
}
/* 결과 출력 영역 */
.result-section {
  margin-top: 30px;
  padding-bottom: 20px;
}

.output-container {
  padding: 20px;
  background-color: #fff;
  border-radius: 0 0 6px 6px;
  min-height: 200px;
}

.output {
  background-color: #fff;
  padding: 20px;
  border-radius: 4px;
  font-family: 'Inter', Arial, sans-serif;
  white-space: normal;
  font-size: 14px;
  border: 1px solid #CFD8DC; /* Borders/Dividers */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 재무제표 공통 스타일 */
.financial-statement {
  width: 100%;
  margin-bottom: 30px;
  border-collapse: collapse;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
  background-color: white;
}

.financial-statement-header {
  text-align: center;
  margin-bottom: 20px;
  padding: 15px;
  border-bottom: 2px solid #003366;
  background-color: #F5F7F8; /* Slightly off-white for headers/contrast areas */
}

.financial-statement-title {
  font-size: 20px;
  font-weight: 700;
  color: #003366; /* Primary Dark Blue (Headers) - Unchanged */
  margin-bottom: 5px;
}

.financial-statement-subtitle {
  font-size: 16px;
  color: #003366; /* Primary Dark Blue (Headers) - Unchanged */
  margin: 5px 0;
}

.financial-statement-date {
  font-size: 14px;
  color: #546E7A; /* Secondary Text */
  margin: 5px 0;
}

.financial-statement-currency {
  font-size: 12px;
  color: #546E7A; /* Secondary Text */
  font-style: italic;
}

/* 공통 테이블 스타일 */
.financial-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
}

.financial-table th, 
.financial-table td {
  padding: 12px 15px;
  border: 1px solid #ddd;
  text-align: left;
}

.financial-table thead th {
  background-color: #f5f5f5;
  font-weight: bold;
  border-bottom: 2px solid #333;
  color: #003366; /* Primary Dark Blue (Headers) - Unchanged */
}

.financial-table tfoot th, 
.financial-table tfoot td {
  background-color: #f5f5f5;
  font-weight: bold;
  border-top: 2px solid #333;
}

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

.financial-table tbody tr:hover {
  background-color: #f1f1f1;
}

.financial-table .amount {
  text-align: right;
  font-family: 'Consolas', monospace;
}

/* 재무상태표 스타일 */
.balance-sheet {
  width: 100%;
}

.balance-sheet th,
.balance-sheet td {
  padding: 10px 15px;
  text-align: left;
  border-bottom: 1px solid #e1e4e8;
}

.balance-sheet th {
  font-weight: 600;
  color: #003366; /* Primary Dark Blue (Headers) - Unchanged */
  background-color: #F5F7F8; /* Slightly off-white for headers/contrast areas */
}

.balance-sheet td.amount {
  text-align: right;
  font-family: 'Consolas', monospace;
}

.section-header {
  font-weight: 700;
  color: #003366; /* Primary Dark Blue (Headers) - Unchanged */
  background-color: #f1f3f5;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.subsection-header {
  font-weight: 600;
  padding-left: 25px !important;
  color: #444;
}

.account-item {
  padding-left: 40px !important;
}

.total-row {
  font-weight: 700;
  border-top: 1px solid #003366;
  border-bottom: double 3px #003366 !important;
}

.subtotal-row {
  font-weight: 600;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  background-color: #F5F7F8; /* Slightly off-white for headers/contrast areas */
}

/* 손익계산서 스타일 */
.income-statement {
  width: 100%;
}

.income-statement th,
.income-statement td {
  padding: 10px 15px;
  text-align: left;
  border-bottom: 1px solid #e1e4e8;
}

.income-statement td.amount {
  text-align: right;
  font-family: 'Consolas', monospace;
}

.revenue-row {
  color: #4CAF50; /* Accent Green (Success) */
}

.expense-row {
  color: #dc3545;
}

.net-income {
  font-weight: 700;
  font-size: 16px;
  color: #003366; /* Primary Dark Blue (Headers) - Unchanged */
}

/* 현금흐름표 스타일 */
.cash-flow-statement {
  width: 100%;
}

.cash-flow-statement th,
.cash-flow-statement td {
  padding: 10px 15px;
  text-align: left;
  border-bottom: 1px solid #e1e4e8;
}

.cash-flow-statement td.amount {
  text-align: right;
  font-family: 'Consolas', monospace;
}

.cash-flow-operating {
  color: #4CAF50; /* Accent Green (Success) */
}

.cash-flow-investing {
  color: #fd7e14;
}

.cash-flow-financing {
  color: #6f42c1;
}

.cash-flow-total {
  font-weight: 700;
  color: #003366; /* Primary Dark Blue (Headers) - Unchanged */
}

/* 자본변동표 스타일 */
.equity-statement {
  width: 100%;
}

.equity-statement th,
.equity-statement td {
  padding: 10px 15px;
  text-align: left;
  border-bottom: 1px solid #e1e4e8;
}

.equity-statement th {
  font-weight: 600;
  color: #003366; /* Primary Dark Blue (Headers) - Unchanged */
  background-color: #F5F7F8; /* Slightly off-white for headers/contrast areas */
  text-align: center;
  font-size: 13px;
}

.equity-statement td.amount {
  text-align: right;
  font-family: 'Consolas', monospace;
}

/* 오류 메시지 스타일 */
.error {
  padding: 15px;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  margin-bottom: 20px;
}
/* 테이블 스타일 */
.output table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  border: 1px solid #CFD8DC; /* Borders/Dividers */
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.output th, .output td {
  border: 1px solid #CFD8DC; /* Borders/Dividers */
  padding: 12px 15px;
  text-align: left;
}

.output th {
  background-color: #f1f3f5;
  color: #003366; /* Primary Dark Blue (Headers) - Unchanged */
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.output tr:nth-child(even) {
  background-color: #F5F7F8; /* Slightly off-white for headers/contrast areas */
}

.output tr:hover {
  background-color: #e9f5ff;
}
/* 출력 영역 헤더 스타일 */
.output h3 {
  color: #003366; /* Primary Dark Blue (Headers) - Unchanged */
  border-bottom: 2px solid #1a73e8;
  padding-bottom: 8px;
  margin-top: 25px;
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 600;
}

/* 회계 사이클 다이어그램 스타일 */
.cycle-card {
  margin-bottom: 30px;
}

.cycle {
  background-color: #F5F7F8; /* Slightly off-white for headers/contrast areas */
  padding: 20px;
  border-radius: 0 0 6px 6px;
  border: 1px solid #CFD8DC; /* Borders/Dividers */
}

.cycle ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
  margin: 0;
}

.cycle .step {
  padding: 12px 18px;
  border: 1px solid #cfd7e6;
  border-radius: 6px;
  margin: 8px;
  font-weight: 500;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  position: relative;
}

.cycle .step:after {
  content: '→';
  position: absolute;
  right: -15px;
  top: 50%;
  transform: translateY(-50%);
  color: #546E7A; /* Secondary Text */
  font-size: 18px;
}

.cycle .step:last-child:after {
  display: none;
}

.cycle .step.done {
  background-color: #4CAF50; /* Accent Green (Success) */
  color: white;
  border-color: #4CAF50; /* Accent Green (Success) */
}

.cycle .step:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 차트 영역 스타일 */
.chart {
  margin: 30px 0;
  padding: 20px;
  background-color: white;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  border: 1px solid #CFD8DC; /* Borders/Dividers */
  height: 400px;
}

/* T-계정 스타일 */
.t-accounts-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.t-account-wrapper {
  flex: 1 1 calc(50% - 10px); /* Each card aims for 50% width, accounts for a 20px gap */
  min-width: 320px; /* Minimum width before cards stack to single column */
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
  display: flex; /* Added for vertical stretching of .t-account */
  flex-direction: column; /* Added for vertical stretching of .t-account */
}

.t-account-title {
  background-color: #F5F7F8; /* Slightly off-white for headers/contrast areas */
  padding: 10px;
  font-weight: bold;
  text-align: center;
  border-bottom: 1px solid #e9ecef;
  color: #003366; /* Primary Dark Blue (Headers) - Unchanged */
}

.t-account {
  border: 1px solid #ddd;
  margin-bottom: 0; /* Removed, wrapper handles bottom margin */
  background-color: white;
  flex-grow: 1; /* Allow .t-account to fill .t-account-wrapper */
  display: flex; /* Added for flex layout of header, body, footer */
  flex-direction: column; /* Added for flex layout of header, body, footer */
}

.t-header {
  width: 100%; /* Ensure full width */
  box-sizing: border-box; /* Include padding and border in the element's total width */
  text-align: center;
  padding: 8px;
  font-weight: bold;
  border-bottom: 2px solid #333;
  background-color: #f5f5f5;
  color: #003366; /* Primary Dark Blue (Headers) - Unchanged */
}

.t-body {
  display: flex;
}

.t-left, .t-right {
  flex-basis: 50%; /* Each column is 50% of .t-body */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  padding: 8px;
  display: flex; /* Added for flex layout of title and content */
  flex-direction: column; /* Added for flex layout of title and content */
}

.t-left {
  border-right: 1px solid #ddd;
}

.t-title {
  text-align: center;
  padding: 5px;
  font-weight: bold;
  background-color: #eee;
  border-bottom: 1px solid #ddd;
  flex-shrink: 0; /* Prevent shrinking */
}

.t-content {
  min-height: 80px;
  padding: 0;
  flex-grow: 1; /* Allow content to take available vertical space */
  overflow-y: auto; /* Add scroll if many items */
}

.t-item {
  padding: 6px 0; /* Adjusted vertical padding */
  border-bottom: 1px solid #eee;
  font-size: 0.9em;
  display: flex;
  justify-content: space-between;
  align-items: center; /* Vertically align items */
}

.t-item:last-child {
  border-bottom: none;
}

.t-item.empty {
  color: #999;
  text-align: center;
  padding: 15px;
}

.t-desc {
  flex-grow: 1; 
  text-align: left;
  word-break: keep-all; 
  white-space: normal; 
  margin-right: 8px; /* Space between description and amount */
  line-height: 1.3;
  padding-left: 2px; /* Small padding if needed */
}

.t-amount {
  flex-shrink: 0; /* Prevent amount from shrinking */
  font-weight: bold;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* Show ... if too long */
  /* Consider a min-width if amounts are still too cramped, e.g., min-width: 70px; */
}

.t-footer {
  display: flex;
  border-top: 2px solid #333;
}

/* 시산표 스타일 */
.trial-balance-container {
  margin-top: 20px;
  overflow-x: auto;
}

/* 분개장 스타일 */
.journal-entries-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 20px;
}

.journal-entry {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  background-color: white;
}

.journal-entry-header {
  background-color: #F5F7F8; /* Slightly off-white for headers/contrast areas */
  padding: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  border-bottom: 1px solid #e9ecef;
}

.journal-entry-id {
  font-weight: bold;
  color: #003366; /* Primary Dark Blue (Headers) - Unchanged */
}

.journal-entry-date, .journal-entry-desc {
  color: #555;
}

.journal-table {
  margin: 0;
}

/* 총계정원장 스타일 */
.ledger-container {
  margin-top: 20px;
  overflow-x: auto;
}

.ledger-table {
  min-width: 800px;
}

.balance {
  font-weight: bold;
  background-color: #F5F7F8; /* Slightly off-white for headers/contrast areas */
}
