body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 20px;
    color: #333;
}

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

/* 탭 스타일 */
.tab-container {
    display: flex;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 20px;
}

.tab {
    padding: 12px 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.tab:hover {
    color: #495057;
}

.tab.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.tab-content {
    display: none;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

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

.btn {
    padding: 8px 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.btn:hover {
    background-color: #0056b3;
}

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

.day-header {
    text-align: center;
    font-weight: bold;
    padding: 10px;
    background-color: #f1f3f5;
    border-radius: 4px;
}

.day-cell {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 6px 8px;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    transition: background-color 0.2s;
}

.day-cell.cached-bg {
    background-color: #e8f4fd;
    border-color: #b8daff;
}

.day-cell.today-cell {
    border: 2px solid #339af0;
    background-color: #f8fbff;
    box-shadow: 0 0 0 1px #a5d8ff;
}

.day-cell.holiday-cell {
    background-color: #fcfcfc;
    border-color: #e9ecef;
}

.day-num {
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 4px;
    color: #495057;
}

.day-num.today-num {
    color: #1971c2;
    font-weight: 800;
}

.day-num.holiday-num {
    color: #e03131;
}

.cell-badge {
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: 700;
    line-height: 1.2;
}

.cell-badge-today {
    background: #e7f5ff;
    color: #1971c2;
    border: 1px solid #a5d8ff;
}

.cell-badge-holiday {
    background: #fff3bf;
    color: #d9480f;
    border: 1px solid #ffd43b;
}

.stock-tag {
    background-color: #ffffff;
    border: 1px solid #d0ebff;
    padding: 4px 6px;
    border-radius: 4px;
    margin-bottom: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.15s ease;
}

.stock-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.15);
    border-color: #339af0;
}

.stock-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    gap: 4px;
}

.stock-name {
    font-weight: 600;
    font-size: 12px;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.stock-score {
    font-size: 11px;
    font-weight: 700;
    background-color: #e7f5ff;
    color: #1971c2;
    padding: 1px 5px;
    border-radius: 3px;
    flex-shrink: 0;
}

.stock-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    margin-bottom: 3px;
}

.badge-support {
    background-color: #e8f5e9;
    color: #2e7d32;
    font-weight: 600;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
}

.stock-price {
    color: #c62828;
    font-weight: 700;
    font-size: 11px;
}

.stock-footer {
    font-size: 10px;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stock-none {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
    font-size: 11px;
    text-align: center;
    padding: 6px;
}

.log-box {
    height: 600px;
    overflow-y: auto;
    background-color: #f1f3f5;
    padding: 15px;
    border-radius: 4px;
    font-family: monospace;
    white-space: pre-wrap;
    margin-top: 10px;
}

.btn-screen {
    margin-top: auto;
    background-color: #28a745;
    width: 100%;
}

.btn-screen:hover {
    background-color: #218838;
}

.btn-screen:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* 계좌 관리 요약 카드 그리드 */
.summary-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
    margin-bottom: 25px;
}

.summary-card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.15s, box-shadow 0.15s;
}

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

.summary-title {
    font-size: 13px;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 8px;
}

.summary-val {
    font-size: 19px;
    font-weight: bold;
    color: #212529;
}

/* 계좌 보유 종목 테이블 */
.account-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.account-table th {
    background-color: #f1f3f5;
    color: #495057;
    padding: 12px 14px;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

.account-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: middle;
}

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

.stock-table-link {
    color: #212529;
    text-decoration: none;
    transition: color 0.15s;
}

.stock-table-link:hover {
    color: #007bff;
    text-decoration: underline;
}

/* 전략 탭 스타일 */
.strategy-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
}

.strategy-header h2 {
    margin: 0 0 8px 0;
    color: #212529;
    font-size: 22px;
}

.strategy-subtitle {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

/* 상단 프로세스 배너 */
.strategy-flow-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f0fa 100%);
    border: 1px solid #cce3f8;
    border-radius: 10px;
    padding: 16px 24px;
    margin-bottom: 24px;
    gap: 12px;
}

.flow-step {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.flow-icon {
    font-size: 26px;
}

.flow-info {
    display: flex;
    flex-direction: column;
}

.flow-title {
    font-size: 15px;
    font-weight: bold;
    color: #0d6efd;
    margin-bottom: 3px;
}

.flow-desc {
    font-size: 12.5px;
    color: #495057;
}

.flow-arrow {
    font-size: 18px;
    color: #9ec5fe;
    font-weight: bold;
}

@media (max-width: 768px) {
    .strategy-flow-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .flow-arrow {
        display: none;
    }
}


.strategy-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.strategy-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.strategy-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.strategy-card-header {
    background: #f8fafc;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.strategy-card-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1e293b;
}

.step-badge {
    background: #2563eb;
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 12px;
    letter-spacing: 0.5px;
}

.strategy-card-body {
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.strategy-section {
    background: #fcfdfe;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 16px 18px;
}

.strategy-section h4 {
    margin: 0 0 10px 0;
    font-size: 15px;
    color: #334155;
    font-weight: 600;
}

.strategy-section ul {
    margin: 0;
    padding-left: 18px;
}

.strategy-section li {
    font-size: 13.5px;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 4px;
}

.strategy-section li strong {
    color: #0f172a;
}

/* ==========================================================================
   주문 모달 (Order Modal) 스타일
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.55);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.15s ease-out;
}

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

.order-modal {
    background: #ffffff;
    width: 440px;
    max-width: 92vw;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideUp {
    from { transform: translateY(20px) scale(0.97); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.order-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.order-modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #868e96;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.15s;
}

.modal-close-btn:hover {
    color: #212529;
    background: #e9ecef;
}

.order-modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-stock-info {
    background: #f1f3f5;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stock-info-main {
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.15s;
}

.stock-info-main:hover {
    opacity: 0.85;
}

.stock-info-main .stock-info-name {
    font-size: 16px;
    font-weight: bold;
    color: #212529;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.stock-info-main:hover .stock-info-name {
    color: #1c7ed6;
}

.stock-info-main .stock-info-code {
    font-size: 13px;
    color: #6c757d;
    margin-left: 6px;
}

.stock-info-price {
    font-size: 15px;
    font-weight: 700;
    color: #1c7ed6;
}

/* 매수 / 매도 토글 버튼 */
.order-side-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.side-btn {
    padding: 11px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #ffffff;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
    color: #495057;
}

.side-btn:hover {
    background: #f8f9fa;
}

.side-btn.side-buy.active {
    background: #ffe3e3;
    border-color: #e03131;
    color: #c92a2a;
    box-shadow: 0 0 0 1px #e03131;
}

.side-btn.side-sell.active {
    background: #e7f5ff;
    border-color: #1971c2;
    color: #1864ab;
    box-shadow: 0 0 0 1px #1971c2;
}

/* 폼 그룹 */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-type-selector {
    display: flex;
    gap: 12px;
    font-size: 13px;
}

.order-type-selector label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.form-input {
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
}

.form-input:focus {
    border-color: #339af0;
    box-shadow: 0 0 0 3px rgba(51, 154, 240, 0.15);
}

.form-input:disabled {
    background: #f1f3f5;
    color: #868e96;
    cursor: not-allowed;
}

.qty-controls {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.qty-btn {
    flex: 1;
    padding: 6px 0;
    font-size: 12px;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    color: #495057;
    transition: all 0.15s;
}

.qty-btn:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.order-calc-box {
    background: #fafafa;
    border: 1px dashed #dee2e6;
    border-radius: 6px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    font-size: 13.5px;
    color: #495057;
}

.order-modal-footer {
    display: flex;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.order-modal-footer .btn {
    flex: 1;
    padding: 12px;
    font-size: 15px;
    font-weight: bold;
    border-radius: 6px;
}

.btn-cancel {
    background: #e9ecef !important;
    color: #495057 !important;
    flex: 0 0 80px !important;
}

.btn-cancel:hover {
    background: #dee2e6 !important;
}

.btn-submit-order.buy {
    background-color: #e03131;
}

.btn-submit-order.buy:hover {
    background-color: #c92a2a;
}

.btn-submit-order.sell {
    background-color: #1971c2;
}

.btn-submit-order.sell:hover {
    background-color: #1864ab;
}

/* ==========================================================================
   미체결 주문 (Unexecuted Orders) 스타일
   ========================================================================== */
.unexecuted-section {
    margin-top: 24px;
    background: #fff9db;
    border: 1px solid #ffe066;
    border-radius: 8px;
    padding: 16px;
}

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

.unexecuted-header h3 {
    margin: 0;
    font-size: 15px;
    color: #f59f00;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.unexecuted-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
}

.unexecuted-table th {
    background: #fff3bf;
    color: #495057;
    font-weight: 600;
    padding: 8px 12px;
    border-bottom: 1px solid #ffe066;
}

.unexecuted-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f3f5;
}

.badge-order-side {
    display: inline-block;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 4px;
}

.badge-order-side.buy {
    background: #ffe3e3;
    color: #e03131;
    border: 1px solid #ffc9c9;
}

.badge-order-side.sell {
    background: #e7f5ff;
    color: #1971c2;
    border: 1px solid #a5d8ff;
}

/* 보유종목 테이블 내 미체결 뱃지 */
.holding-unexecuted-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff3bf;
    border: 1px solid #ffd43b;
    color: #d9480f;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 3px;
}

.btn-open-order {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    background: #339af0;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-open-order:hover {
    background: #1c7ed6;
}

/* ==========================================================================
   로그 서브 탭 (Log Subtabs) 스타일
   ========================================================================== */
.log-subtab-container {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
    flex-wrap: wrap;
}

.log-subtab {
    padding: 7px 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: #495057;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    outline: none;
}

.log-subtab:hover {
    background: #e9ecef;
    color: #212529;
    border-color: #ced4da;
}

.log-subtab.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.log-badge {
    background: #dee2e6;
    color: #495057;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: bold;
    min-width: 14px;
    text-align: center;
}

.log-subtab.active .log-badge {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

/* ==========================================================================
   무인 자동매매 설정 모달 및 토글 스위치 스타일
   ========================================================================== */
.config-modal {
    width: 520px;
    max-width: 94vw;
}

.config-toggle-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.toggle-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toggle-title {
    font-size: 15px;
    font-weight: 700;
    color: #212529;
}

.toggle-desc {
    font-size: 12.5px;
    color: #6c757d;
}

/* iOS 스타일 토글 스위치 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ced4da;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background-color: #28a745;
}

input:focus + .slider {
    box-shadow: 0 0 1px #28a745;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 28px;
}

.slider.round:before {
    border-radius: 50%;
}

.config-guide-box {
    background: #f1f3f5;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 18px;
    border-left: 4px solid #495057;
}

.guide-title {
    font-size: 13px;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 6px;
}

.guide-list {
    margin: 0;
    padding-left: 18px;
    font-size: 12px;
    color: #495057;
    line-height: 1.6;
}

.guide-list strong {
    color: #212529;
}

.config-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #495057;
    margin: 18px 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #e9ecef;
}

.form-help-text {
    display: block;
    font-size: 11.5px;
    color: #868e96;
    margin-top: 4px;
    line-height: 1.3;
}

/* ==========================================================================
   매매수익률 추이 및 차트 스타일
   ========================================================================== */
.profit-filter-group {
    display: inline-flex;
    background: #e9ecef;
    padding: 3px;
    border-radius: 8px;
    gap: 3px;
}

.profit-filter-group .btn-filter {
    border: none;
    background: transparent;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.profit-filter-group .btn-filter:hover {
    color: #212529;
}

.profit-filter-group .btn-filter.active {
    background: #ffffff;
    color: #007bff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.profit-charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 10px;
}

@media (max-width: 992px) {
    .profit-charts-grid {
        grid-template-columns: 1fr;
    }
}

.profit-chart-box {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

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

.chart-box-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #343a40;
}

/* 3개년 월별 매트릭스 스타일 */
.matrix-table {
    font-size: 12.5px;
}

.matrix-table th, .matrix-table td {
    padding: 10px 6px;
    text-align: center;
    vertical-align: middle;
}

.matrix-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 38px;
    border-radius: 4px;
    padding: 3px 2px;
    transition: background 0.15s;
}

.matrix-cell.has-data:hover {
    background: rgba(0, 0, 0, 0.04);
}

.matrix-rate {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.matrix-pnl {
    font-size: 10.5px;
    color: #666;
    line-height: 1.1;
}

.matrix-cell.empty {
    color: #ccc;
}

/* ==========================================================================
   글로벌 고정 상단 헤더 (Sticky Global Header)
   ========================================================================== */
.global-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 10px 24px;
    margin: -20px -20px 24px -20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.global-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.global-header-title {
    font-size: 18px;
    font-weight: 800;
    color: #212529;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: -0.5px;
}

.global-header-badges {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1;
}

.header-badge.market-open {
    background: #e6fcf5;
    color: #0ca678;
    border: 1px solid #c3fae8;
}

.header-badge.market-holiday {
    background: #fff9db;
    color: #f08c00;
    border: 1px solid #ffe066;
}

.header-badge.market-closed {
    background: #f1f3f5;
    color: #495057;
    border: 1px solid #dee2e6;
}

.header-badge.market-pre {
    background: #e7f5ff;
    color: #1971c2;
    border: 1px solid #a5d8ff;
}

.calendar-market-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-left: 4px solid #1c7ed6;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
}

.header-badge.bot-on {
    background: #e7f5ff;
    color: #1c7ed6;
    border: 1px solid #a5d8ff;
}

.header-badge.bot-off {
    background: #fff5f5;
    color: #fa5252;
    border: 1px solid #ffc9c9;
}

.header-badge.telegram {
    background: #f1f3f5;
    color: #495057;
    border: 1px solid #dee2e6;
}

.global-header-metrics {
    display: flex;
    gap: 16px;
    align-items: center;
    background: #f8f9fa;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

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

.metric-label {
    font-size: 10.5px;
    color: #868e96;
    font-weight: 500;
    line-height: 1.1;
}

.metric-value {
    font-size: 13.5px;
    font-weight: 700;
    color: #212529;
    line-height: 1.2;
}

.global-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-header-action {
    padding: 7px 12px;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-header-toggle-on {
    background: #2b8a3e;
    color: white;
}
.btn-header-toggle-on:hover {
    background: #237032;
}

.btn-header-toggle-off {
    background: #e03131;
    color: white;
}
.btn-header-toggle-off:hover {
    background: #c92a2a;
}

.btn-header-config {
    background: #495057;
    color: white;
}
.btn-header-config:hover {
    background: #343a40;
}

.btn-header-refresh {
    background: #1971c2;
    color: white;
}
.btn-header-refresh:hover {
    background: #1864ab;
}

.header-user-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 6px;
    padding-left: 10px;
    border-left: 1px solid #dee2e6;
}

.header-user-name {
    font-size: 12px;
    font-weight: 700;
    color: #495057;
    background: #f1f3f5;
    padding: 5px 9px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    white-space: nowrap;
}

.btn-header-logout {
    background: #495057;
    color: white;
    text-decoration: none;
    white-space: nowrap;
}

.btn-header-logout:hover {
    background: #fa5252;
    color: white;
}

/* 트랙 섹션 헤더 디자인 */
.track-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

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

.track-title {
    margin: 0;
    font-size: 16.5px;
    font-weight: 700;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 8px;
}

.track-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.track-badge-night {
    background: #e7f5ff;
    color: #1971c2;
    border: 1px solid #a5d8ff;
}

.track-badge-day {
    background: #fff3bf;
    color: #d9480f;
    border: 1px solid #ffd43b;
}

/* 전략 접이식 패널 (캘린더 탭 내부) */
.strategy-accordion-box {
    margin-top: 30px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.strategy-accordion-header {
    padding: 14px 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-weight: 700;
    font-size: 15px;
    color: #343a40;
    border-bottom: 1px solid #e9ecef;
}

.strategy-accordion-header:hover {
    background: #e9ecef;
}

.strategy-accordion-content {
    padding: 20px;
}

