/* 회계관리 페이지 스타일 - 최신 트렌드 */

.accounting-content {
    padding: 2rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: calc(100vh - var(--header-height));
}

/* 재무 요약 카드 */
.finance-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    border-radius: 20px;
    padding: 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--gray-100);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
}

.summary-card.income::before {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.summary-card.expense::before {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

.summary-card.profit::before {
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
}

.summary-card.balance::before {
    background: linear-gradient(90deg, #8b5cf6 0%, #a78bfa 100%);
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.card-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: var(--gray-50);
    border-radius: 16px;
}

.card-content {
    flex: 1;
}

.card-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.card-value {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.card-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.card-change.positive {
    color: var(--success);
}

.card-change.negative {
    color: var(--danger);
}

.change-label {
    font-weight: 400;
    color: var(--gray-500);
}

.balance-accounts {
    color: var(--gray-600);
}

.card-chart {
    width: 80px;
    height: 40px;
}

/* 기간 선택 */
.period-select {
    padding: 0.625rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    background: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

/* 차트 섹션 */
.charts-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--gray-100);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.chart-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
}

.chart-btn {
    padding: 0.375rem 0.875rem;
    background: var(--gray-100);
    border: none;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.chart-btn:hover {
    background: var(--gray-200);
}

.chart-btn.active {
    background: var(--primary);
    color: white;
}

.chart-body {
    height: 280px;
    position: relative;
}

/* 거래 내역 섹션 */
.transactions-section {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--gray-100);
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.section-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
}

.filter-controls {
    display: flex;
    gap: 0.75rem;
}

.search-input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.875rem;
    min-width: 200px;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
}

/* 거래 목록 */
.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    background: var(--gray-50);
    border-radius: 12px;
    border-left: 4px solid transparent;
    transition: all 0.2s;
}

.transaction-item.income {
    border-left-color: var(--success);
}

.transaction-item.expense {
    border-left-color: var(--danger);
}

.transaction-item:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateX(4px);
}

.transaction-date {
    text-align: center;
    min-width: 50px;
}

.date-day {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.date-month {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.transaction-info {
    flex: 1;
}

.transaction-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.375rem;
}

.transaction-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8125rem;
}

.transaction-category {
    padding: 0.125rem 0.5rem;
    background: var(--gray-200);
    border-radius: 4px;
    color: var(--gray-600);
}

.transaction-account {
    color: var(--gray-500);
}

.transaction-amount {
    font-size: 1.25rem;
    font-weight: 700;
    min-width: 150px;
    text-align: right;
}

.transaction-amount.positive {
    color: var(--success);
}

.transaction-amount.negative {
    color: var(--danger);
}

.transaction-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.action-btn.danger:hover {
    background: var(--danger);
    border-color: var(--danger);
}

/* 계좌 관리 섹션 */
.accounts-section {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--gray-100);
}

.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.account-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.account-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.account-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.4);
}

.account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.account-bank {
    font-size: 1.125rem;
    font-weight: 700;
}

.account-type {
    padding: 0.25rem 0.625rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.account-number {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.account-balance {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.account-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.last-transaction {
    font-size: 0.8125rem;
    opacity: 0.8;
}

.btn-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.add-account {
    background: var(--gray-50);
    color: var(--gray-400);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px dashed var(--gray-300);
}

.add-account:hover {
    background: white;
    border-color: var(--primary);
    color: var(--primary);
}

.add-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.add-text {
    font-size: 0.875rem;
    font-weight: 600;
}

/* 모달 폼 스타일 */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.radio-group {
    display: flex;
    gap: 1rem;
}

.radio-label {
    flex: 1;
    position: relative;
}

.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-text {
    display: block;
    padding: 0.75rem;
    text-align: center;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-text.income {
    color: var(--success);
}

.radio-text.expense {
    color: var(--danger);
}

.radio-label input[type="radio"]:checked + .radio-text.income {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.radio-label input[type="radio"]:checked + .radio-text.expense {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

/* 반응형 */
@media (max-width: 1200px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .accounting-content {
        padding: 1rem;
    }

    .finance-summary {
        grid-template-columns: 1fr;
    }

    .filter-controls {
        flex-direction: column;
        width: 100%;
    }

    .search-input,
    .filter-select {
        width: 100%;
    }

    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .transaction-amount {
        text-align: left;
        margin-top: 0.5rem;
    }

    .accounts-grid {
        grid-template-columns: 1fr;
    }
}