/* Overview - Global Styles */

/* ===== CSS Variables ===== */
:root {
    /* Colors - Primary */
    --color-primary: #667eea;
    --color-primary-hover: #5a6fd6;
    --color-primary-light: #f0f4ff;

    /* Colors - Status */
    --color-positive: #c62828;
    --color-negative: #1565c0;
    --color-success: #4CAF50;
    --color-success-dark: #2e7d32;
    --color-danger: #f44336;
    --color-danger-dark: #d32f2f;

    /* Colors - Background */
    --bg-page: #f5f7fa;
    --bg-card: #ffffff;
    --bg-muted: #f8f9fa;
    --bg-input: #fafafa;

    /* Colors - Text */
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #888;
    --text-light: #999;

    /* Colors - Border */
    --border-color: #e0e0e0;
    --border-light: #ddd;
    --border-lighter: #eee;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 15px;
    --radius-2xl: 16px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 8px 25px rgba(0, 0, 0, 0.15);
    --shadow-dropdown: 0 4px 12px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* Z-index */
    --z-dropdown: 100;
    --z-modal: 1000;
    --z-toast: 2000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

/* ===== Utilities ===== */
.hidden {
    display: none !important;
}

.text--positive {
    color: var(--color-positive);
}

.text--negative {
    color: var(--color-negative);
}

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

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

/* ===== Custom Select (Dropdown) ===== */
.select {
    position: relative;
}

.select__selected {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    background: var(--bg-input);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-normal);
}

.select__selected:hover {
    border-color: var(--color-primary);
    background: var(--bg-card);
}

.select__selected.active {
    border-color: var(--color-primary);
    background: var(--bg-card);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.select__selected::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-muted);
    transition: transform var(--transition-normal);
}

.select__selected.active::after {
    transform: rotate(180deg);
}

.select__items {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--color-primary);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    z-index: var(--z-dropdown);
    max-height: 200px;
    overflow-y: auto;
    box-shadow: var(--shadow-dropdown);
}

.select__items.show {
    display: block;
}

.select__item {
    padding: 10px 14px;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.select__item:hover {
    background: var(--color-primary-light);
}

.select__item.selected {
    background: var(--color-primary);
    color: #fff;
}

.select__item:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* Legacy support - 기존 클래스명 호환 */
.custom-select { position: relative; }
.select-selected {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    background: var(--bg-input);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-normal);
}
.select-selected:hover {
    border-color: var(--color-primary);
    background: var(--bg-card);
}
.select-selected.active {
    border-color: var(--color-primary);
    background: var(--bg-card);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.select-selected::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-muted);
    transition: transform var(--transition-normal);
}
.select-selected.active::after {
    transform: rotate(180deg);
}
.select-items {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--color-primary);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    z-index: var(--z-dropdown);
    max-height: 200px;
    overflow-y: auto;
    box-shadow: var(--shadow-dropdown);
}
.select-items.show { display: block; }
.select-item {
    padding: 10px 14px;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--transition-fast);
}
.select-item:hover { background: var(--color-primary-light); }
.select-item.selected {
    background: var(--color-primary);
    color: #fff;
}
.select-item:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* ===== 컨테이너 ===== */
.bot-container {
    max-width: 1400px;
    margin: 0 auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== 카드 섹션 ===== */
.card-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-left: 10px;
}

/* ===== 페이지 타이틀 ===== */
.page-title h1 {
    font-size: 2rem;
    color: #667eea;
    font-weight: 700;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 30px;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

header p {
    opacity: 0.9;
    font-size: 1rem;
}

/* Menu Cards */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}

.menu-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.menu-card .icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.menu-card h2 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.menu-card p {
    color: #666;
    font-size: 0.95rem;
}

/* ===== Page Header ===== */
.page-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.page-header h1 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.back-arrow {
    font-size: 1.5rem;
    color: var(--color-primary);
    text-decoration: none;
    padding: 5px;
    transition: transform var(--transition-normal);
}

.back-arrow:hover {
    transform: translateX(-3px);
}

.page-title {
    text-align: center;
}

.page-title h1 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--color-primary);
    font-weight: 600;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    transition: background var(--transition-slow);
}

.back-btn:hover {
    background: var(--color-primary-hover);
}

/* ===== Filter Section ===== */
.filter-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

.filter-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: end;
}

.filter-row--flex {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

.filter-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.filter-group select,
.filter-group input {
    padding: 10px 15px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    min-width: 150px;
}

.filter-btn {
    padding: 10px 25px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.95rem;
    transition: background var(--transition-slow);
    margin-top: 20px;
}

.filter-btn:hover {
    background: var(--color-primary-hover);
}

/* ===== Card System ===== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

.card--sm {
    padding: 16px;
    margin-bottom: 12px;
}

.card--chart {
    /* Chart card specific */
}

.card--summary {
    padding: 16px;
    margin-bottom: 0;
}

.card--tx {
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: background var(--transition-normal);
}

.card--tx:hover {
    background: #f8f9ff;
}

/* Card Header */
.card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Legacy Card Classes - 호환성 유지 */
.chart-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.chart-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-tabs {
    display: flex;
    gap: 4px;
}

.chart-tab {
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: #f0f0f0;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
}

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

.chart-tab:hover:not(.active) {
    background: var(--border-color);
}

.chart-container {
    position: relative;
    height: 250px;
}

.tx-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: background var(--transition-normal);
}

.tx-card:hover {
    background: #f8f9ff;
}

/* Summary Row */
.summary-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

/* ===== Badge System ===== */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
}

.badge--pill {
    border-radius: 10px;
    padding: 2px 8px;
}

/* Type Badges */
.badge--deposit,
.type-badge.deposit {
    background: #e8f5e9;
    color: var(--color-success-dark);
}

.badge--withdraw,
.type-badge.withdraw {
    background: #ffebee;
    color: var(--color-positive);
}

/* Owner Badges */
.badge--chan,
.owner-badge.chan {
    background: #e3f2fd;
    color: var(--color-negative);
}

.badge--choe,
.owner-badge.choe {
    background: #fce4ec;
    color: #c2185b;
}

/* Project Badges */
.badge--eggmoney,
.project-badge.eggmoney {
    background: #fff3e0;
    color: #e65100;
}

.badge--vr,
.project-badge.valuerebalancing {
    background: #e8f5e9;
    color: var(--color-success-dark);
}

/* Legacy Badge Classes */
.type-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
}

.owner-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.project-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* ===== Accordion System ===== */
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.accordion-header:hover {
    border-color: var(--color-primary);
}

.accordion-header.active {
    border-color: #d0d0d0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: 0;
}

.accordion-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.accordion-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.accordion-toggle {
    font-size: 0.8rem;
    color: var(--color-primary);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.accordion-header.active .accordion-toggle {
    transform: rotate(90deg);
}

.accordion-content {
    display: none;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 16px;
    margin-bottom: 8px;
}

.accordion-content.active {
    display: block;
}

/* Accordion inner elements */
.accordion-owner {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.accordion-date {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.accordion-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.accordion-profit {
    font-size: 0.85rem;
    font-weight: 600;
}

.accordion-project {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.accordion-seed-info {
    font-size: 0.7rem;
    color: #888;
    font-weight: 500;
}

.accordion-seed-info.seed-warning {
    color: #f57c00;
    font-weight: 600;
}

.accordion-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.accordion-detail-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
}

.accordion-detail-label {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 4px;
}

.accordion-detail-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

/* Owner colors */
.owner-chan {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.owner-choe {
    background: linear-gradient(135deg, #14b8a6, #06b6d4);
}

/* Project colors */
.project-eggmoney {
    background: #fff3e0;
    color: #e65100;
}

.project-valuerebalancing {
    background: #e8f5e9;
    color: #2e7d32;
}

.project-honey {
    background: #fff8e1;
    color: #ff8f00;
}

.project-joy {
    background: #fce4ec;
    color: #c2185b;
}

.project-default {
    background: #f5f5f5;
    color: #666;
}

/* Profit colors */
.profit-positive {
    color: var(--color-positive) !important;
}

.profit-negative {
    color: var(--color-negative) !important;
}

.profit-rate-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    background: #f3e5f5;
}

/* Accordion responsive */
@media (max-width: 480px) {
    .accordion-header {
        padding: 14px 14px;
    }

    .accordion-left {
        gap: 8px;
    }

    .accordion-date {
        font-size: 0.85rem;
    }

    .accordion-value {
        font-size: 0.8rem;
    }

    .accordion-profit {
        font-size: 0.75rem;
    }

    .profit-rate-badge {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    .accordion-owner {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
}

/* ===== Modal System ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    width: 90%;
    max-width: 360px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
}

.modal-close {
    background: none;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-field label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #666;
}

.modal-field input,
.modal-field select {
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: #fafafa;
}

.modal-field input:focus,
.modal-field select:focus {
    outline: none;
    border-color: var(--color-primary);
    background: white;
}

.modal-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.modal-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.modal-btn-cancel {
    background: #f0f0f0;
    color: #666;
}

.modal-btn-cancel:hover {
    background: #e0e0e0;
}

.modal-btn-submit {
    background: var(--color-primary);
    color: #fff;
}

.modal-btn-submit:hover {
    background: #5a6fd6;
}

.modal-btn-delete {
    background: #f44336;
    color: #fff;
}

.modal-btn-delete:hover {
    background: #d32f2f;
}

@media (max-width: 480px) {
    .modal-row {
        grid-template-columns: 1fr;
    }
}

/* Summary Cards */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.summary-card.deposit {
    border-left: 4px solid #4CAF50;
}

.summary-card.withdraw {
    border-left: 4px solid #f44336;
}

.summary-card.total {
    border-left: 4px solid #2196F3;
}

.summary-card h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.summary-card .amount {
    font-size: 1.5rem;
    font-weight: 600;
}

.summary-card.deposit .amount {
    color: #4CAF50;
}

.summary-card.withdraw .amount {
    color: #f44336;
}

.summary-card.total .amount {
    color: #2196F3;
}

/* Transaction Table */
.table-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.transaction-table {
    width: 100%;
    border-collapse: collapse;
}

.transaction-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    border-bottom: 2px solid #eee;
}

.transaction-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

.transaction-table tr:hover {
    background: #f8f9fa;
}

.transaction-table .type-deposit {
    color: #4CAF50;
    font-weight: 500;
}

.transaction-table .type-withdraw {
    color: #f44336;
    font-weight: 500;
}

.transaction-table .amount-cell {
    text-align: right;
    font-family: 'SF Mono', 'Consolas', monospace;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .page-title h1 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1rem;
    }

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

    .page-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 14px 20px;
    }

    .filter-row {
        flex-direction: column;
    }

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

    .transaction-table {
        font-size: 0.85rem;
    }

    .transaction-table th,
    .transaction-table td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .page-title h1 {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1rem;
    }

    .page-header {
        padding: 8px 10px;
    }

    .summary-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .chart-container {
        height: 180px;
    }
}

/* ==========================================================================
   INDEX PAGE STYLES
   ========================================================================== */

        /* 로그인 폼 스타일 */
        .login-container {
            max-width: 400px;
            margin: 100px auto;
            padding: 40px;
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        }

        .login-header {
            text-align: center;
            margin-bottom: 30px;
        }

        .login-header h2 {
            color: #333;
            margin: 0 0 10px 0;
            font-size: 1.8em;
        }

        .login-header p {
            color: #999;
            margin: 0;
            font-size: 0.95em;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: #555;
            font-weight: 500;
            font-size: 0.95em;
        }

        .form-group input {
            width: 100%;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 8px;
            font-size: 1em;
            box-sizing: border-box;
            transition: all 0.3s ease;
        }

        .form-group input:focus {
            outline: none;
            border-color: #007bff;
            box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
        }

        .login-btn {
            width: 100%;
            padding: 12px;
            background: #007bff;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 1em;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .login-btn:hover {
            background: #0056b3;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
        }

        .login-btn:active {
            transform: translateY(0);
        }

        .error-message {
            background: #ffebee;
            color: #c62828;
            padding: 12px;
            border-radius: 8px;
            margin-bottom: 20px;
            font-size: 0.9em;
            text-align: center;
            display: none;
        }

        .error-message.show {
            display: block;
        }

        .logout-btn {
            padding: 10px 20px;
            background: #dc3545;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.9em;
            transition: all 0.3s ease;
        }

        .logout-btn:hover {
            background: #c82333;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
        }

        .hidden {
            display: none;
        }

        /* 햄버거 버튼 스타일 */
        .hamburger-btn {
            display: flex;
            flex-direction: column;
            justify-content: space-around;
            width: 28px;
            height: 28px;
            background: transparent;
            border: none;
            cursor: pointer;
            padding: 0;
            z-index: 1001;
        }

        .hamburger-btn span {
            width: 28px;
            height: 3px;
            background: #667eea;
            border-radius: 2px;
            transition: all 0.3s ease;
        }

        .hamburger-btn:hover span {
            background: #5568d3;
        }

        .hamburger-btn.active span:nth-child(1) {
            transform: translateY(10px) rotate(45deg);
        }

        .hamburger-btn.active span:nth-child(2) {
            opacity: 0;
        }

        .hamburger-btn.active span:nth-child(3) {
            transform: translateY(-10px) rotate(-45deg);
        }

        /* 사이드 메뉴 스타일 */
        .side-menu {
            position: fixed;
            top: 0;
            left: -320px;
            width: 280px;
            height: 100vh;
            background: white;
            box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
            transition: left 0.3s ease;
            z-index: 1002;
            overflow-y: auto;
        }

        .side-menu.active {
            left: 0;
        }

        .side-menu-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px;
            border-bottom: 1px solid #eee;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }

        .side-menu-header h2 {
            margin: 0;
            font-size: 1.3em;
        }

        .close-menu-btn {
            background: transparent;
            border: none;
            color: white;
            font-size: 2em;
            cursor: pointer;
            padding: 0;
            width: 32px;
            height: 32px;
            line-height: 1;
            transition: transform 0.2s ease;
        }

        .close-menu-btn:hover {
            transform: rotate(90deg);
        }

        .side-menu-nav {
            padding: 10px 0;
        }

        .side-menu-item {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 16px 20px;
            text-decoration: none;
            transition: all 0.2s ease;
            border-left: 4px solid transparent;
        }

        .side-menu-item:hover {
            background: #f8f9ff;
            border-left-color: #667eea;
        }

        .side-menu-icon {
            font-size: 1.8em;
            min-width: 40px;
            text-align: center;
        }

        .side-menu-text {
            flex: 1;
        }

        .side-menu-title {
            font-weight: 600;
            color: #333;
            font-size: 1em;
            margin-bottom: 2px;
        }

        .side-menu-desc {
            font-size: 0.8em;
            color: #666;
        }

        /* 오버레이 배경 */
        .menu-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100vh;
            background: rgba(0, 0, 0, 0.5);
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            z-index: 1000;
        }

        .menu-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        /* 필터 섹션 */
        .filter-section {
            background: white;
            border-radius: 12px;
            padding: 16px 20px;
            margin-bottom: 12px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        }

        /* 필터 스타일 - style.css로 이동됨 */

        /* 전체 요약 카드 (수익 + 보유 주식) - 흰색 카드 */
        .total-summary-card {
            background: #fff;
            border-radius: 12px;
            padding: 16px;
            margin-bottom: 10px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        }

        .total-summary-header-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }

        .total-summary-header {
            font-size: 1rem;
            font-weight: 700;
            color: #333;
        }

        .project-filter-checkboxes {
            display: flex;
            gap: 8px;
        }

        .project-filter-label {
            display: flex;
            align-items: center;
            gap: 4px;
            cursor: pointer;
        }

        .project-filter-label input[type="checkbox"] {
            width: 14px;
            height: 14px;
            accent-color: #1976d2;
        }

        .project-filter-text {
            font-size: 0.7rem;
            font-weight: 600;
            padding: 2px 6px;
            border-radius: 4px;
        }

        .project-filter-text.egg {
            background: #fff3e0;
            color: #e65100;
        }

        .project-filter-text.vr {
            background: #e3f2fd;
            color: #1565c0;
        }

        .total-summary-profit {
            margin-bottom: 12px;
            padding-bottom: 12px;
            border-bottom: 1px solid #f0f0f0;
        }

        .total-summary-profit-main {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 4px;
        }

        .total-summary-label {
            font-size: 0.85rem;
            color: #666;
        }

        .total-summary-value {
            font-size: 1.3rem;
            font-weight: 700;
        }

        .total-summary-value.positive {
            color: #c62828;
        }

        .total-summary-value.negative {
            color: #1565c0;
        }

        .total-summary-profit-sub {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
        }

        .total-summary-sub-value {
            font-size: 0.85rem;
            color: #888;
        }

        .total-summary-rate {
            font-size: 0.75rem;
            font-weight: 600;
            padding: 3px 8px;
            border-radius: 4px;
            background: #f3e5f5;
        }

        .total-summary-stocks {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .total-summary-stocks-label {
            font-size: 0.8rem;
            color: #888;
        }

        .total-summary-card .stock-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }


        /* 보유 주식 칩 */
        .stock-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            flex: 1;
        }

        .stock-chip {
            padding: 3px 8px;
            border-radius: 12px;
            font-size: 0.72rem;
            font-weight: 500;
        }

        .stock-chip strong {
            font-weight: 700;
        }

        /* 주식 칩 색상 (10개 순환) */
        .stock-chip.color-0 { background: #e3f2fd; color: #1565c0; }
        .stock-chip.color-0 strong { color: #0d47a1; }
        .stock-chip.color-1 { background: #fce4ec; color: #c2185b; }
        .stock-chip.color-1 strong { color: #880e4f; }
        .stock-chip.color-2 { background: #e8f5e9; color: #2e7d32; }
        .stock-chip.color-2 strong { color: #1b5e20; }
        .stock-chip.color-3 { background: #fff3e0; color: #e65100; }
        .stock-chip.color-3 strong { color: #bf360c; }
        .stock-chip.color-4 { background: #ede7f6; color: #5e35b1; }
        .stock-chip.color-4 strong { color: #4527a0; }
        .stock-chip.color-5 { background: #e0f7fa; color: #00838f; }
        .stock-chip.color-5 strong { color: #006064; }
        .stock-chip.color-6 { background: #fff8e1; color: #ff8f00; }
        .stock-chip.color-6 strong { color: #ff6f00; }
        .stock-chip.color-7 { background: #f3e5f5; color: #8e24aa; }
        .stock-chip.color-7 strong { color: #6a1b9a; }
        .stock-chip.color-8 { background: #e8eaf6; color: #3949ab; }
        .stock-chip.color-8 strong { color: #283593; }
        .stock-chip.color-9 { background: #efebe9; color: #6d4c41; }
        .stock-chip.color-9 strong { color: #4e342e; }

        .profit-text {
            font-weight: 600;
            font-size: 0.95rem;
            white-space: nowrap;
        }

        .profit-text-sub {
            font-weight: 500;
            font-size: 0.8rem;
            white-space: nowrap;
            color: #888;
        }

        .profit-rate {
            font-weight: 600;
            font-size: 0.75rem;
            white-space: nowrap;
            padding: 3px 8px;
            border-radius: 4px;
            background: #f3e5f5;
        }

        /* D-day 배지 */
        .dday-badge {
            font-size: 0.75rem;
            font-weight: 600;
            padding: 2px 8px;
            border-radius: 4px;
            background: #e8f5e9;
            color: #2e7d32;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .dday-imminent {
            background: #ffebee;
            color: #c62828;
        }

        /* 총자산 카드 내 시장 지표 */
        .market-indicator-inline {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            margin-top: 12px;
            padding-top: 12px;
            border-top: 1px solid rgba(255,255,255,0.15);
        }

        .market-indicator-inline .market-indicator-label {
            font-size: 0.85rem;
            color: rgba(255,255,255,0.7);
        }

        .market-indicator-inline .market-indicator-price {
            font-size: 0.85rem;
            color: #ffeb3b;
        }

        .market-indicator-inline .market-indicator-rate {
            font-size: 0.75rem;
            font-weight: 600;
            padding: 3px 8px;
            border-radius: 4px;
            background: rgba(255,255,255,0.2);
            color: #ffeb3b;
        }

        /* 나스닥 하락 경고 애니메이션 */
        .market-indicator-inline.drawdown-alert .market-indicator-rate {
            animation: shake-once 1.2s ease-in-out;
        }

        @keyframes shake-once {
            0%, 100% { transform: translate(0, 0) rotate(0deg); }
            10% { transform: translate(-2px, -2px) rotate(-1deg); }
            20% { transform: translate(2px, -1px) rotate(1deg); }
            30% { transform: translate(-2px, 1px) rotate(-0.5deg); }
            40% { transform: translate(2px, 2px) rotate(0.5deg); }
            50% { transform: translate(-1px, -1px) rotate(-1deg); }
            60% { transform: translate(1px, 1px) rotate(1deg); }
            70% { transform: translate(-1px, 2px) rotate(-0.5deg); }
            80% { transform: translate(1px, -1px) rotate(0.5deg); }
            90% { transform: translate(-1px, 1px) rotate(0deg); }
        }

        /* 얼럿 카드 스타일 */
        .alert-section {
            margin-bottom: 16px;
        }

        .alert-card {
            display: flex;
            align-items: flex-start;
            animation: shake-once 1.2s ease-in-out;
            gap: 12px;
            padding: 14px 16px;
            border-radius: 12px;
            margin-bottom: 10px;
        }

        .alert-card:last-child {
            margin-bottom: 0;
        }

        .alert-warning {
            background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
            border: 1px solid #ffb74d;
        }

        .alert-info {
            background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
            border: 1px solid #64b5f6;
        }

        .alert-icon {
            font-size: 1.5rem;
            flex-shrink: 0;
        }

        .alert-content {
            flex: 1;
        }

        .alert-title {
            font-weight: 700;
            font-size: 0.95rem;
            margin-bottom: 4px;
        }

        .alert-warning .alert-title {
            color: #e65100;
        }

        .alert-info .alert-title {
            color: #1565c0;
        }

        .alert-message {
            font-size: 0.85rem;
            color: #555;
            margin-bottom: 4px;
        }

        .alert-detail {
            font-size: 0.75rem;
            color: #888;
        }

        /* 총 자산 카드 */
        .total-assets-card {
            background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
            border-radius: 16px;
            padding: 24px;
            margin-bottom: 24px;
            color: white;
            box-shadow: 0 4px 20px rgba(30, 58, 95, 0.4);
        }

        .total-assets-main {
            text-align: center;
            margin-bottom: 20px;
            padding-bottom: 16px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        }

        .total-assets-label {
            font-size: 0.85rem;
            opacity: 0.9;
            margin-bottom: 8px;
        }

        .total-assets-krw {
            font-size: 2rem;
            font-weight: 700;
            margin-bottom: 4px;
        }

        .total-assets-usd {
            font-size: 1.1rem;
            opacity: 0.85;
        }

        .total-assets-profit {
            text-align: center;
        }

        .profit-row {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 8px;
        }

        .profit-label {
            font-size: 0.8rem;
            opacity: 0.9;
        }

        .profit-value {
            font-size: 0.95rem;
            font-weight: 600;
        }

        .total-assets-card .profit-positive {
            color: #ffeb3b !important;
        }

        .total-assets-card .profit-negative {
            color: #90caf9 !important;
        }

        .total-assets-card .profit-rate {
            background: rgba(255, 255, 255, 0.2);
            color: white;
        }

        .deposit-info {
            font-size: 0.75rem;
            opacity: 0.7;
        }

        /* 현금비중 카드 */
        .cash-ratio-card {
            background: #fff;
            border-radius: 16px;
            padding: 0;
            margin-bottom: 24px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
            overflow: visible;
        }

        .cash-ratio-title {
            font-size: 1rem;
            font-weight: 700;
            color: #333;
        }

        .cash-ratio-card .filter-group label {
            color: #666;
        }

        .cash-ratio-card .custom-select {
            background: #fff;
            border: 1px solid #ddd;
        }

        .cash-ratio-card .select-selected {
            color: #333;
        }

        .cash-ratio-card .select-selected:hover {
            background: #f5f5f5;
        }

        /* 필터 탭 버튼 */
        .cash-ratio-filter-tabs {
            display: flex;
            gap: 8px;
            padding: 4px;
            background: #f8f9fa;
            border-radius: 10px;
        }

        .cash-ratio-tab {
            flex: 1;
            padding: 10px 16px;
            border: none;
            background: transparent;
            color: #666;
            font-size: 0.9rem;
            font-weight: 600;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .cash-ratio-tab:hover {
            background: rgba(255, 255, 255, 0.6);
            color: #333;
        }

        .cash-ratio-tab.active {
            background: #fff;
            color: #333;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
        }

        /* 도넛 그리드 */
        .cash-ratio-donut-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 20px;
            justify-items: center;
        }

        .cash-ratio-donut-grid.single {
            grid-template-columns: 1fr;
            justify-items: center;
        }

        .cash-ratio-donut-item {
            width: 100%;
            max-width: 320px;
        }

        .cash-ratio-donut-label {
            font-size: 0.9rem;
            font-weight: 600;
            color: #333;
            margin-bottom: 8px;
            text-align: center;
        }

        .cash-ratio-donut-container {
            position: relative;
            height: 220px;
            margin: 0 auto;
        }

        .cash-ratio-donut-container canvas {
            width: 100% !important;
            height: 100% !important;
        }

        /* 더보기 버튼 */
        .cash-ratio-toggle-btn {
            background: transparent;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            padding: 8px 20px;
            color: #666;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .cash-ratio-toggle-btn:hover {
            background: #f8f9fa;
            border-color: #d0d0d0;
            color: #333;
        }

        .cash-ratio-toggle-btn .toggle-icon {
            font-size: 0.75rem;
            transition: transform 0.3s ease;
        }

        .cash-ratio-toggle-btn.expanded .toggle-icon {
            transform: rotate(180deg);
        }

        /* 프로젝트별 리스트 */
        .cash-ratio-list {
            padding: 20px;
            background: #f8f9fa;
            display: none;
            border-top: 1px solid #e0e0e0;
        }

        .cash-ratio-list.show {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 12px;
        }

        .cash-ratio-project-item {
            background: #fff;
            border-radius: 12px;
            padding: 14px;
            border: 1px solid #e0e0e0;
            transition: all 0.3s ease;
        }

        .cash-ratio-project-item:hover {
            background: #fafafa;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .cash-ratio-project-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 10px;
        }

        .cash-ratio-bar-container {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .cash-ratio-bar-progress {
            height: 18px;
            background: #e0e0e0;
            border-radius: 10px;
            overflow: hidden;
            display: flex;
            box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
        }

        .cash-ratio-bar-fill {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.65rem;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.95);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
        }

        .cash-ratio-bar-fill:hover {
            filter: brightness(1.1);
        }

        .cash-ratio-bar-fill.stock {
            background: linear-gradient(135deg, #FDE047 0%, #FBBF24 50%, #F59E0B 100%);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 8px rgba(251, 191, 36, 0.5);
        }

        .cash-ratio-bar-fill.cash {
            background: linear-gradient(135deg, #7DD3FC 0%, #38BDF8 50%, #0EA5E9 100%);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 8px rgba(56, 189, 248, 0.5);
        }

        .cash-ratio-bar-labels {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .cash-ratio-bar-label {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.75rem;
            color: #555;
        }

        .label-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            flex-shrink: 0;
        }

        .label-dot.stock {
            background: linear-gradient(135deg, #FDE047, #F59E0B);
            box-shadow: 0 2px 4px rgba(251, 191, 36, 0.6);
        }

        .label-dot.cash {
            background: linear-gradient(135deg, #7DD3FC, #0EA5E9);
            box-shadow: 0 2px 4px rgba(56, 189, 248, 0.6);
        }

        .label-text {
            line-height: 1.2;
        }

        .cash-ratio-project-owner {
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: 600;
            color: #fff;
        }

        .cash-ratio-project-name {
            font-size: 0.8rem;
            font-weight: 600;
            padding: 2px 8px;
            border-radius: 4px;
        }

        /* 동기화 버튼 */
        .sync-btn-container {
            margin-top: 16px;
            text-align: center;
        }

        .sync-btn {
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.3);
            padding: 8px 20px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .sync-btn:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .sync-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .sync-btn.syncing .sync-icon {
            display: inline-block;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        /* 현금 현황 카드 */
        .cash-summary-card {
            background: white;
            border-radius: 12px;
            padding: 16px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        }

        .cash-detail-list {
            margin-bottom: 12px;
        }

        .cash-detail-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 0;
            border-bottom: 1px solid #f0f0f0;
        }

        .cash-detail-row:last-child {
            border-bottom: none;
        }

        .cash-detail-left {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .cash-project-name {
            font-size: 0.8rem;
            color: #666;
        }

        .cash-detail-right {
            display: flex;
            gap: 12px;
        }

        .cash-item {
            font-size: 0.9rem;
            font-weight: 600;
            color: #333;
        }

        .cash-label {
            font-size: 0.7rem;
            padding: 2px 6px;
            border-radius: 4px;
            margin-right: 6px;
            font-weight: 600;
            background: #fff;
            border: 1px solid;
        }

        .cash-label.cash {
            color: #10b981;
            border-color: #10b981;
        }

        .cash-label.rp {
            color: #3b82f6;
            border-color: #3b82f6;
        }

        .cash-label.pool-rp {
            color: #8b5cf6;
            border-color: #8b5cf6;
        }

        .cash-label.pool {
            color: #ec4899;
            border-color: #ec4899;
        }

        .cash-label.wallet-cash {
            color: #f59e0b;
            border-color: #f59e0b;
        }

        /* 자산 요약 섹션 */
        .portfolio-assets-summary {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 12px;
            margin-bottom: 12px;
        }

        .assets-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 6px 0;
        }

        .assets-row:first-child {
            padding-top: 0;
        }

        .assets-label {
            font-size: 0.85rem;
            color: #666;
            font-weight: 500;
        }

        .assets-value {
            font-size: 0.95rem;
            font-weight: 700;
            color: #333;
        }

        .assets-detail-row {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            padding-top: 8px;
            margin-top: 8px;
            border-top: 1px dashed #e0e0e0;
        }

        .assets-detail-item {
            font-size: 0.8rem;
            font-weight: 600;
            color: #555;
        }

        .portfolio-stock-card {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 12px;
            margin-bottom: 10px;
            border: 1px solid #e0e0e0;
        }

        .portfolio-stock-header {
            font-size: 0.85rem;
            font-weight: 700;
            color: #333;
            margin-bottom: 10px;
            padding-bottom: 8px;
            border-bottom: 1px solid #e0e0e0;
        }

        .portfolio-detail-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
        }

        .portfolio-detail-item {
            background: #fff;
            border-radius: 8px;
            padding: 10px;
            text-align: center;
        }

        .portfolio-detail-item.full-width {
            grid-column: 1 / -1;
        }

        .portfolio-detail-label {
            font-size: 0.7rem;
            color: #888;
            margin-bottom: 4px;
        }

        .portfolio-detail-value {
            font-size: 0.9rem;
            font-weight: 600;
            color: #333;
        }

        .portfolio-detail-value.dday-imminent {
            color: #ef4444;
        }

        @media (max-width: 768px) {
            .profit-text {
                font-size: 0.85rem;
            }

            .profit-rate {
                font-size: 0.65rem;
                padding: 2px 6px;
            }

            .logout-btn {
                font-size: 0.85em;
                padding: 8px 16px;
            }

            .side-menu {
                width: 260px;
                left: -300px;
            }

            .hamburger-btn {
                width: 26px;
                height: 26px;
            }

            .hamburger-btn span {
                width: 26px;
            }

            .total-assets-card {
                padding: 20px;
                margin-bottom: 20px;
            }

            .total-assets-krw {
                font-size: 1.7rem;
            }

            .total-assets-usd {
                font-size: 1rem;
            }

            .profit-value {
                font-size: 0.9rem;
            }

            .cash-detail-right {
                gap: 10px;
            }

            .cash-item {
                font-size: 0.85rem;
            }

            .cash-label {
                font-size: 0.72rem;
            }

            /* 얼럿 카드 모바일 */
            .alert-card {
                padding: 12px 14px;
                gap: 10px;
            }

            .alert-icon {
                font-size: 1.3rem;
            }

            .alert-title {
                font-size: 0.9rem;
            }

            .alert-message {
                font-size: 0.8rem;
            }

            .alert-detail {
                font-size: 0.7rem;
            }

            /* 현금비중 카드 모바일 */
            .cash-ratio-card {
                padding: 0;
                margin-bottom: 16px;
            }

            .cash-ratio-card > div:first-child {
                padding: 16px 16px !important;
            }

            .cash-ratio-title {
                font-size: 0.9rem;
                margin-bottom: 12px !important;
            }

            .cash-ratio-filter-tabs {
                gap: 6px;
                padding: 3px;
                margin-bottom: 16px !important;
            }

            .cash-ratio-tab {
                padding: 8px 10px;
                font-size: 0.8rem;
            }

            .cash-ratio-donut-grid {
                grid-template-columns: 1fr;
                gap: 16px;
            }

            .cash-ratio-donut-item {
                max-width: 100%;
            }

            .cash-ratio-donut-label {
                font-size: 0.85rem;
                margin-bottom: 6px;
            }

            .cash-ratio-donut-container {
                height: 200px !important;
            }

            .cash-ratio-card canvas {
                max-width: 100% !important;
                max-height: 100% !important;
                display: block !important;
            }

            .cash-ratio-toggle-btn {
                padding: 6px 16px;
                font-size: 0.85rem;
            }

            .cash-ratio-list {
                padding: 12px;
            }

            .cash-ratio-list.show {
                grid-template-columns: 1fr;
                gap: 8px;
            }

            .cash-ratio-project-item {
                padding: 10px;
                margin-bottom: 0;
                background: rgba(255, 255, 255, 0.05);
                border: 1px solid rgba(255, 255, 255, 0.1);
                border-radius: 8px;
            }

            .cash-ratio-project-header {
                margin-bottom: 8px;
                display: flex;
                align-items: center;
                gap: 6px;
                flex-wrap: wrap;
            }

            .cash-ratio-project-owner {
                font-size: 0.7rem;
                padding: 2px 6px;
            }

            .cash-ratio-project-name {
                font-size: 0.7rem;
                padding: 2px 6px;
            }

            .cash-ratio-bar-container {
                gap: 6px;
            }

            .cash-ratio-bar-progress {
                height: 16px !important;
                display: flex !important;
                overflow: hidden;
            }

            .cash-ratio-bar-fill {
                min-width: 2%;
                height: 16px;
                font-size: 0;
            }

            .cash-ratio-bar-labels {
                gap: 3px;
            }

            .cash-ratio-bar-label {
                font-size: 0.7rem;
                flex-wrap: nowrap;
                white-space: nowrap;
                overflow: hidden;
            }

            .label-text {
                font-size: 0.7rem;
                line-height: 1.2;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .label-dot {
                width: 6px;
                height: 6px;
            }

            /* 필터 섹션 모바일 */
            .filter-section {
                padding: 14px 16px;
            }

            .filter-row {
                grid-template-columns: 1fr 1fr;
                gap: 10px;
            }

            .select-selected {
                padding: 9px 12px;
                font-size: 0.85rem;
            }

            /* 전체 요약 카드 모바일 */
            .total-summary-card {
                padding: 14px;
            }

            .total-summary-header-row {
                margin-bottom: 10px;
            }

            .total-summary-header {
                font-size: 0.95rem;
            }

            .project-filter-checkboxes {
                gap: 6px;
            }

            .project-filter-text {
                font-size: 0.65rem;
                padding: 2px 5px;
            }

            .total-summary-value {
                font-size: 1.2rem;
            }

            .total-summary-sub-value {
                font-size: 0.8rem;
            }

            .total-summary-rate {
                font-size: 0.7rem;
                padding: 2px 6px;
            }
        }

        @media (max-width: 480px) {
            .profit-text {
                font-size: 0.8rem;
            }

            .profit-rate {
                font-size: 0.6rem;
                padding: 2px 5px;
            }

            .total-assets-card {
                padding: 18px;
                margin-bottom: 16px;
            }

            .total-assets-krw {
                font-size: 1.5rem;
            }

            .total-assets-usd {
                font-size: 0.95rem;
            }

            .profit-label {
                font-size: 0.75rem;
            }

            .profit-value {
                font-size: 0.85rem;
            }

            .deposit-info {
                font-size: 0.7rem;
            }

            .market-indicator-inline {
                gap: 8px;
                margin-top: 10px;
                padding-top: 10px;
            }

            .market-indicator-inline .market-indicator-label {
                font-size: 0.75rem;
            }

            .market-indicator-inline .market-indicator-price {
                font-size: 0.75rem;
            }

            .market-indicator-inline .market-indicator-rate {
                font-size: 0.6rem;
                padding: 2px 5px;
            }

            .cash-detail-row {
                flex-direction: column;
                align-items: flex-start;
                gap: 6px;
            }

            .cash-detail-right {
                width: 100%;
                justify-content: space-between;
                gap: 4px;
            }

            .cash-item {
                font-size: 0.8rem;
            }

            .cash-label {
                font-size: 0.68rem;
            }

            .logout-btn {
                font-size: 0.8em;
                padding: 6px 14px;
            }

            .side-menu {
                width: 240px;
                left: -280px;
            }

            .hamburger-btn {
                width: 24px;
                height: 24px;
            }

            .hamburger-btn span {
                width: 24px;
                height: 2.5px;
            }

            .side-menu-header h2 {
                font-size: 1.1em;
            }

            .side-menu-item {
                padding: 14px 16px;
            }

            .side-menu-icon {
                font-size: 1.5em;
            }

            .side-menu-title {
                font-size: 0.95em;
            }

            .side-menu-desc {
                font-size: 0.75em;
            }

            /* 필터 섹션 소형 모바일 */
            .filter-section {
                padding: 12px 14px;
            }

            .filter-row {
                grid-template-columns: 1fr 1fr;
                gap: 8px;
            }

            .filter-group label {
                font-size: 0.7rem;
            }

            .select-selected {
                padding: 8px 10px;
                font-size: 0.8rem;
            }

            .select-selected::after {
                border-left-width: 4px;
                border-right-width: 4px;
                border-top-width: 4px;
            }

            .select-item {
                padding: 8px 10px;
                font-size: 0.8rem;
            }

            /* 전체 요약 카드 소형 모바일 */
            .total-summary-card {
                padding: 12px;
                margin-bottom: 10px;
            }

            .total-summary-header-row {
                margin-bottom: 8px;
            }

            .total-summary-header {
                font-size: 0.9rem;
            }

            .project-filter-checkboxes {
                gap: 4px;
            }

            .project-filter-label input[type="checkbox"] {
                width: 12px;
                height: 12px;
            }

            .project-filter-text {
                font-size: 0.6rem;
                padding: 1px 4px;
            }

            .total-summary-profit {
                margin-bottom: 10px;
                padding-bottom: 10px;
            }

            .total-summary-label {
                font-size: 0.75rem;
            }

            .total-summary-value {
                font-size: 1.1rem;
            }

            .total-summary-sub-value {
                font-size: 0.75rem;
            }

            .total-summary-rate {
                font-size: 0.65rem;
                padding: 2px 5px;
            }

            .total-summary-stocks {
                gap: 6px;
            }

            .total-summary-stocks-label {
                font-size: 0.7rem;
            }

            .total-summary-card .stock-chips {
                gap: 5px;
            }

            .total-summary-card .stock-chip {
                padding: 2px 6px;
                font-size: 0.65rem;
            }

            .profit-text-sub {
                font-size: 0.7rem;
            }

            .portfolio-project-name {
                font-size: 0.7rem;
            }
        }

/* ==========================================================================
   SNAPSHOT PAGE STYLES
   ========================================================================== */

        .hidden {
            display: none;
        }

        /* 페이지 헤더 - style.css로 이동됨 */

        /* 차트 카드 - style.css로 이동됨 */

        /* 자산 구성 도넛 차트 */
        .composition-single-chart {
            position: relative;
            height: 220px;
            max-width: 300px;
            margin: 0 auto;
        }

        /* 요약 카드 - summary-row는 style.css로 이동됨 */
        .summary-label {
            font-size: 0.8rem;
            color: var(--text-muted, #888);
            margin-bottom: 4px;
        }

        .summary-value {
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--text-primary, #333);
        }

        .summary-sub {
            font-size: 0.75rem;
            color: var(--text-light, #999);
            margin-top: 2px;
        }

        .summary-value.positive {
            color: var(--color-positive, #c62828);
        }

        .summary-value.negative {
            color: var(--color-negative, #1565c0);
        }

        /* 스냅샷 업데이트 버튼 */
        .update-btn {
            padding: 8px 16px;
            background: #667eea;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .update-btn:hover {
            background: #5a6fd6;
        }

        .update-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .update-btn.syncing .sync-icon {
            display: inline-block;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        /* 포트폴리오 칩 */
        .portfolio-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-top: 12px;
            padding-top: 12px;
            border-top: 1px dashed #e0e0e0;
        }

        .portfolio-chip {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            border-radius: 6px;
            font-size: 0.75rem;
            background: #f0f4ff;
        }

        .portfolio-chip-owner {
            font-weight: 600;
            padding: 1px 6px;
            border-radius: 3px;
            color: white;
            font-size: 0.7rem;
        }

        .owner-chan {
            background: linear-gradient(135deg, #6366f1, #8b5cf6);
        }

        .owner-choe {
            background: linear-gradient(135deg, #14b8a6, #06b6d4);
        }

        .portfolio-chip-project {
            font-size: 0.7rem;
            color: #666;
        }

        .portfolio-chip-value {
            font-weight: 600;
            color: #333;
        }

        /* 페이징 */
        .pagination {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-top: 20px;
        }

        .page-btn {
            padding: 8px 14px;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            background: white;
            cursor: pointer;
            font-size: 0.85rem;
            transition: all 0.2s;
        }

        .page-btn:hover {
            border-color: #667eea;
            background: #f8f9ff;
        }

        .page-btn.active {
            background: #667eea;
            color: white;
            border-color: #667eea;
        }

        .page-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .page-info {
            display: flex;
            align-items: center;
            font-size: 0.85rem;
            color: #666;
            padding: 0 12px;
        }

        /* VR 차트 섹션 */
        .vr-section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }

        .vr-section-title {
            font-size: 1.1rem;
            font-weight: 700;
            color: #333;
        }

        .owner-tabs {
            display: flex;
            gap: 4px;
        }

        .owner-tab {
            padding: 6px 14px;
            font-size: 0.8rem;
            font-weight: 600;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .owner-tab.chan {
            background: #f0f0f0;
            color: #666;
        }

        .owner-tab.chan.active {
            background: linear-gradient(135deg, #6366f1, #8b5cf6);
            color: white;
        }

        .owner-tab.choe {
            background: #f0f0f0;
            color: #666;
        }

        .owner-tab.choe.active {
            background: linear-gradient(135deg, #14b8a6, #06b6d4);
            color: white;
        }

        .owner-tab:hover:not(.active) {
            background: #e0e0e0;
        }

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

        /* VR 개별 카드 스타일 */
        .vr-individual-card {
            margin-bottom: 16px;
        }

        .vr-card-title {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .vr-chart-wrapper {
            margin-bottom: 16px;
        }

        .vr-chart-wrapper:last-child {
            margin-bottom: 0;
        }

        .vr-chart-label {
            font-size: 0.8rem;
            font-weight: 600;
            color: #555;
            margin-bottom: 10px;
        }

        .vr-chart-container-full {
            position: relative;
            height: 220px;
        }

        @media (max-width: 768px) {
            .vr-chart-container-full {
                height: 180px;
            }

            .chart-container {
                height: 200px;
            }

        }

        @media (max-width: 480px) {
            /* 공통 스타일은 style.css로 이동됨 */
            .summary-card {
                padding: 12px;
            }

            .summary-value {
                font-size: 1.1rem;
            }

        }

/* ==========================================================================
   TRANSACTION PAGE STYLES
   ========================================================================== */

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: #f0f2f5;
            min-height: 100vh;
            padding: 16px;
            color: #1a1a1a;
        }

        .container {
            max-width: 800px;
            margin: 0 auto;
        }

        /* 페이지 헤더 - style.css로 이동됨 */

        /* 추가 버튼 */
        .add-btn {
            width: 100%;
            padding: 14px 20px;
            border: 2px dashed #667eea;
            border-radius: 10px;
            background: rgba(102, 126, 234, 0.05);
            color: #667eea;
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            margin-bottom: 16px;
        }

        .add-btn:hover {
            border-style: solid;
            background: rgba(102, 126, 234, 0.1);
        }

        /* 요약 섹션 */
        .summary-section {
            background: #fff;
            border-radius: 16px;
            padding: 16px;
            margin-bottom: 16px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        }

        .summary-header {
            font-size: 0.85rem;
            font-weight: 600;
            color: #666;
            margin-bottom: 12px;
        }

        .summary-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
        }

        .summary-box {
            background: #f8f9fa;
            border-radius: 10px;
            padding: 12px 10px;
            text-align: center;
        }

        .summary-box-label {
            display: block;
            font-size: 0.7rem;
            color: #888;
            margin-bottom: 4px;
        }

        .summary-box-value {
            display: block;
            font-size: 0.95rem;
            font-weight: 700;
            color: #1a1a1a;
        }

        .summary-box-value.deposit { color: #4CAF50; }
        .summary-box-value.withdraw { color: #e53935; }
        .summary-box-value.total { color: #667eea; }

        /* 필터 섹션 */
        .filter-section {
            background: white;
            border-radius: 12px;
            padding: 16px;
            margin-bottom: 16px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        }

        /* 필터 스타일 - style.css로 이동됨 (filter-row--flex 사용) */

        /* 배지 스타일 - style.css로 이동됨 */

        .tx-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

        .tx-card-header-left {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .tx-card-date {
            font-size: 0.8rem;
            color: #666;
        }

        /* owner-badge, project-badge - style.css로 이동됨 */

        .tx-card-body {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }

        .tx-card-item {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .tx-card-label {
            font-size: 0.7rem;
            color: #999;
        }

        .tx-card-value {
            font-size: 0.85rem;
            font-weight: 500;
            color: #1a1a1a;
        }

        /* 반응형 */
        @media (max-width: 600px) {
            .summary-section {
                padding: 12px;
            }

            .summary-grid {
                grid-template-columns: 1fr;
                gap: 6px;
            }

            .summary-box {
                display: flex;
                justify-content: space-between;
                align-items: center;
                padding: 14px 16px;
            }

            .summary-box-label {
                margin-bottom: 0;
                font-size: 0.75rem;
                flex-shrink: 0;
            }

            .summary-box-value {
                font-size: 0.85rem;
                text-align: right;
                word-break: break-all;
            }
        }

        @media (max-width: 480px) {
            body {
                padding: 10px;
            }

            .page-header {
                padding: 12px 14px;
            }

            .page-title h1 {
                font-size: 1rem;
            }

            .add-btn {
                padding: 12px 16px;
                font-size: 0.9rem;
            }

            .filter-section {
                padding: 12px;
            }

            .filter-row {
                flex-direction: column;
            }

            .filter-group {
                width: 100%;
            }

            .summary-box {
                padding: 12px 14px;
            }

            .summary-box-label {
                font-size: 0.7rem;
            }

            .summary-box-value {
                font-size: 0.8rem;
            }

            .tx-card {
                padding: 12px 14px;
            }

            .tx-card-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }

            .tx-card-header-left {
                flex-wrap: wrap;
            }

            .tx-card-value {
                font-size: 0.8rem;
            }
        }

        @media (max-width: 360px) {
            body {
                padding: 8px;
            }

            .summary-box-value {
                font-size: 0.75rem;
            }

            .page-header {
                padding: 8px 10px;
            }

            .page-title h1 {
                font-size: 0.95rem;
            }
        }
