﻿        /* 토글 스위치 */
        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 48px;
            height: 26px;
            flex-shrink: 0;
        }
        .toggle-switch input { opacity: 0; width: 0; height: 0; }
        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0; left: 0; right: 0; bottom: 0;
            background: #ccc;
            border-radius: 26px;
            transition: 0.3s;
        }
        .toggle-slider:before {
            content: "";
            position: absolute;
            height: 20px; width: 20px;
            left: 3px; bottom: 3px;
            background: white;
            border-radius: 50%;
            transition: 0.3s;
        }
        .toggle-switch input:checked + .toggle-slider {
            background: var(--primary, #0F2B46);
        }
        .toggle-switch input:checked + .toggle-slider:before {
            transform: translateX(22px);
        }
        /* 알림 설정 항목 */
        .noti-setting-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 14px 0;
            border-bottom: 1px solid var(--line, #eee);
        }
        .noti-setting-item:last-child { border-bottom: none; }
        .noti-setting-info {
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 1;
        }
        .noti-setting-icon {
            font-size: 20px;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--bg-sub, #f5f5f5);
            border-radius: 10px;
            flex-shrink: 0;
        }
        .noti-setting-title {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-main);
        }
        .noti-setting-desc {
            font-size: 11px;
            color: var(--text-sub);
            margin-top: 2px;
        }

.modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }
        .modal-content {
            background: white;
            border-radius: 16px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
        }
        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px;
            border-bottom: 1px solid #eee;
        }
        .modal-header h3 {
            margin: 0;
            font-size: 18px;
        }
        .modal-close {
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: #666;
        }
        .modal-body {
            padding: 0;
        }
        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 26px;
        }
        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 26px;
        }
        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 20px;
            width: 20px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }
        .toggle-switch input:checked + .toggle-slider {
            background-color: #0F1F38;
        }
        .toggle-switch input:checked + .toggle-slider:before {
            transform: translateX(24px);
        }
        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        
        /* 전략 목록 스타일 */
        .strategy-list-item {
            display: flex;
            align-items: center;
            padding: 16px 20px;
            border-bottom: 1px solid #f0f0f0;
            cursor: pointer;
            transition: background 0.2s;
        }
        .strategy-list-item:hover {
            background: #f9f9f9;
        }
        .strategy-list-item:last-child {
            border-bottom: none;
        }
        .strategy-list-info {
            flex: 1;
        }
        .strategy-list-name {
            font-weight: 600;
            font-size: 15px;
            color: var(--text-main);
            margin-bottom: 4px;
        }
        .strategy-list-blocks {
            font-size: 13px;
            color: var(--text-sub);
            margin-bottom: 6px;
        }
        .strategy-list-stats {
            display: flex;
            gap: 12px;
            font-size: 12px;
        }
        .strategy-list-stats .positive {
            color: #28A745;
        }
        .strategy-list-stats .negative {
            color: #DC3545;
        }
        .strategy-list-stats .date {
            color: #999;
        }
        .strategy-edit-btn {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            border: 1px solid #ddd;
            background: white;
            color: var(--text-sub);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 16px;
            transition: all 0.2s;
            flex-shrink: 0;
        }
        .strategy-edit-btn:hover {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        /* 로그아웃 강조 버튼 */
        .btn-logout-prominent {
            width: 100%;
            padding: 16px 24px;
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: background 0.2s, transform 0.2s;
        }
        .btn-logout-prominent:hover {
            background: #1a2d4a;
            transform: translateY(-1px);
        }
        .btn-logout-prominent i {
            font-size: 20px;
        }
        
        /* 회원 탈퇴 섹션 (접히는 형태) */
        .withdraw-section-compact {
            padding: 12px 16px 24px;
        }
        .withdraw-toggle {
            width: 100%;
            padding: 12px 16px;
            background: transparent;
            border: 1px solid var(--line);
            border-radius: 8px;
            font-size: 13px;
            color: var(--text-sub);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: background 0.2s;
        }
        .withdraw-toggle:hover {
            background: var(--bg-base);
        }
        .withdraw-toggle i {
            transition: transform 0.3s;
        }
        .withdraw-toggle.expanded i {
            transform: rotate(180deg);
        }
        .withdraw-expand {
            margin-top: 12px;
            padding: 16px;
            background: #FEF2F2;
            border: 1px solid #FECACA;
            border-radius: 8px;
            text-align: center;
        }
        .withdraw-warning {
            font-size: 12px;
            color: #991B1B;
            margin-bottom: 12px;
            line-height: 1.5;
        }
        .btn-withdraw-small {
            padding: 8px 16px;
            background: white;
            border: 1px solid #DC2626;
            color: #DC2626;
            border-radius: 6px;
            font-size: 12px;
            cursor: pointer;
            transition: background 0.2s;
        }
        .btn-withdraw-small:hover {
            background: #DC2626;
            color: white;
        }
        
        /* 기존 회원 탈퇴 섹션 (삭제 예정) */
        .withdraw-section {
            padding: 24px 16px 20px;
            display: none;
        }
        .withdraw-card {
            background: white;
            border: 2px solid #FEE2E2;
            border-radius: 16px;
            padding: 24px;
            text-align: center;
        }
        .withdraw-icon {
            font-size: 32px;
            margin-bottom: 12px;
        }
        .withdraw-card h4 {
            color: #DC2626;
            font-size: 16px;
            font-weight: 700;
            margin: 0 0 8px 0;
        }
        .withdraw-card p {
            color: var(--text-sub);
            font-size: 13px;
            margin: 0 0 16px 0;
            line-height: 1.5;
        }
        .btn-withdraw {
            padding: 10px 24px;
            border: 1px solid #DC2626;
            border-radius: 8px;
            background: white;
            color: #DC2626;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }
        .btn-withdraw:hover {
            background: #DC2626;
            color: white;
        }
        
        /* 뱃지 스크롤 영역 */
        .badge-loading, .badge-empty {
            padding: 20px;
            text-align: center;
            color: var(--text-sub);
            font-size: 13px;
        }
        .badge-item.equipped {
            position: relative;
            border: 2px solid var(--accent);
        }
        .badge-equipped-mark {
            position: absolute;
            top: -5px;
            right: -5px;
            background: var(--accent);
            color: white;
            font-size: 10px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        /* 뱃지 모달 */
        .badge-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.6);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s;
            padding: 16px;
        }
        .badge-modal-overlay.show {
            opacity: 1;
            visibility: visible;
        }
        .badge-modal {
            background: white;
            border-radius: 20px;
            max-width: 420px;
            width: 100%;
            max-height: 85vh;
            overflow-y: auto;
            transform: translateY(20px);
            transition: transform 0.3s;
        }
        .badge-modal-overlay.show .badge-modal {
            transform: translateY(0);
        }
        .badge-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 20px 12px;
            border-bottom: 1px solid var(--line);
        }
        .badge-modal-header h2 {
            font-size: 18px;
            font-weight: 700;
            color: var(--primary);
            margin: 0;
        }
        .badge-close-btn {
            background: none;
            border: none;
            font-size: 24px;
            color: #999;
            cursor: pointer;
            padding: 4px;
        }
        .badge-modal-body {
            padding: 16px;
        }
        .badge-section {
            margin-bottom: 20px;
        }
        .badge-section-title {
            font-size: 14px;
            font-weight: 600;
            color: var(--primary);
            margin-bottom: 12px;
        }
        .badge-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
        }
        .badge-card {
            background: #f8f9fa;
            border-radius: 12px;
            padding: 12px 8px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
            border: 2px solid transparent;
        }
        .badge-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        .badge-card.owned {
            background: linear-gradient(135deg, #fff8e7 0%, #fff5dc 100%);
        }
        .badge-card.owned.equipped {
            border-color: var(--accent);
        }
        .badge-card.locked {
            opacity: 0.6;
            cursor: default;
        }
        .badge-card.locked:hover {
            transform: none;
            box-shadow: none;
        }
        .badge-card.purchasable {
            background: linear-gradient(135deg, #e8f4fd 0%, #dbeef9 100%);
        }
        .badge-card-icon {
            font-size: 32px;
            margin-bottom: 6px;
        }
        .badge-card-name {
            font-size: 12px;
            font-weight: 600;
            color: var(--primary);
            margin-bottom: 4px;
        }
        .badge-card-desc {
            font-size: 10px;
            color: var(--text-sub);
            line-height: 1.3;
        }
        .badge-card-price {
            font-size: 11px;
            font-weight: 600;
            color: var(--accent);
            margin-top: 4px;
        }
        .badge-card-equipped {
            font-size: 10px;
            color: white;
            background: var(--accent);
            padding: 2px 8px;
            border-radius: 10px;
            margin-top: 6px;
            display: inline-block;
        }
        .badge-empty-modal {
            text-align: center;
            padding: 40px;
            color: var(--text-sub);
        }
        
        /* 헤더 뱃지 */
.user-badge {
    font-size: 16px;
    margin-right: 2px;
}

/* ========================================
   Form & modal utilities
   ======================================== */

.modal-content--md { max-width: 480px; }
.modal-content--sm { max-width: 400px; }
.modal-header--primary { background: var(--primary); color: white; }
.modal-header--danger { background: #DC2626; color: white; }
.modal-close--light { color: white; }
.modal-body--padded { padding: 24px; }

.form-field { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-main);
}
.form-label--sub {
    font-weight: 400;
    color: var(--text-sub);
    margin-bottom: 8px;
}
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    background: var(--surface, white);
}
.form-input--lg { font-size: 16px; }
.form-textarea { resize: vertical; }
.form-hint {
    font-size: 12px;
    color: #999;
    margin-bottom: 16px;
}
.form-error {
    display: none;
    color: #DC2626;
    font-size: 13px;
    margin-bottom: 12px;
}
.form-error--boxed {
    padding: 10px;
    background: #FEE2E2;
    border-radius: 8px;
}
.btn-submit-full {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.withdraw-warning {
    color: var(--text-main);
    margin-bottom: 20px;
    line-height: 1.6;
}
.text-danger-strong { color: #DC2626; }
.modal-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}
.modal-btn {
    flex: 1;
    padding: 14px;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
}
.modal-btn--cancel {
    border: 1px solid #ddd;
    background: var(--surface, white);
    color: var(--text-main);
}
.modal-btn--danger {
    border: none;
    background: #DC2626;
    color: white;
    font-weight: 600;
}
.billing-area { padding: 12px; }

/* Settings modal */
.settings-user-info {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.settings-avatar {
    width: 48px;
    height: 48px;
    background: #EFF3F8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.settings-avatar i {
    font-size: 24px;
    color: var(--primary);
}
.settings-user-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}
.settings-user-email {
    font-size: 13px;
    color: var(--text-sub);
}
.settings-user-grade {
    margin-left: auto;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    background: #EFF3F8;
    color: var(--primary);
    font-weight: 600;
}
.form-input--settings {
    width: 100%;
    padding: 12px;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.2s;
    background: var(--surface, white);
}
.form-input--settings:focus {
    border-color: var(--primary);
    outline: none;
}
.form-input--disabled {
    border: 1.5px solid #eee;
    background: #f9f9f9;
    color: #999;
}
.form-hint--warning {
    font-size: 12px;
    color: #F59E0B;
    margin-top: 4px;
}
.form-divider {
    height: 1px;
    background: #eee;
    margin: 20px 0;
}
.form-success {
    display: none;
    color: #059669;
    font-size: 13px;
    margin-bottom: 12px;
    padding: 10px;
    background: #D1FAE5;
    border-radius: 8px;
}
.btn-submit-full--rounded {
    border-radius: 10px;
    transition: opacity 0.2s;
}

/* Notification modal */
.modal-body--compact { padding: 20px; }
.noti-master-section { margin-bottom: 20px; }
.noti-master-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.noti-master-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}
.noti-status-text {
    font-size: 12px;
    color: var(--text-sub);
    margin-top: 4px;
}
.noti-web-notice {
    display: none;
    padding: 16px;
    background: var(--bg-sub);
    border-radius: 12px;
    margin-bottom: 16px;
}
.noti-web-notice-text {
    font-size: 13px;
    color: var(--text-sub);
    line-height: 1.6;
}
.noti-web-notice-text i { color: var(--primary); }
.noti-web-notice-text a {
    color: var(--primary);
    font-weight: 600;
}
.noti-detail-section { display: none; }
.noti-section-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sub);
    margin-bottom: 12px;
}
.noti-setting-item--disabled { opacity: 0.5; }
.badge-soon {
    font-size: 11px;
    color: var(--primary);
    font-weight: 400;
}

/* Modal size variants */
.modal-content--lg { max-width: 500px; }
.modal-content--edit { max-width: 360px; }
.modal-content--xs { max-width: 320px; }
.modal-content--center { text-align: center; }
.modal-body--scroll {
    max-height: 60vh;
    overflow-y: auto;
}
.modal-header--center {
    justify-content: center;
    border-bottom: none;
}
.modal-header--center h3 { color: #DC2626; }

/* Learning lock settings */
.lock-settings-body { padding: 20px; }
.lock-settings-section { margin-bottom: 30px; }
.lock-settings-section--bordered {
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}
.lock-settings-heading {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
}
.lock-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.feature-settings-group.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}
.lock-field-label {
    display: block;
    margin-bottom: 10px;
}
.lock-field-label > span {
    display: block;
    margin-bottom: 5px;
}
.form-input--compact {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
}
.form-hint--sm {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}
.lock-actions {
    margin-top: 30px;
    display: flex;
    gap: 10px;
}
.modal-btn--primary-dark {
    flex: 1;
    padding: 12px;
    background: #0F1F38;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.modal-btn--secondary {
    flex: 1;
    padding: 12px;
    background: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* Loading & empty states */
.state-loading {
    text-align: center;
    padding: 40px;
}
.state-loading--sm {
    text-align: center;
    padding: 20px;
}
.state-loading-icon {
    font-size: 32px;
    animation: spin 1s linear infinite;
    color: var(--primary);
}
.state-loading-icon--sm {
    font-size: 24px;
    animation: spin 1s linear infinite;
}
.state-loading-text {
    margin-top: 12px;
    color: var(--text-sub);
}
.state-empty {
    text-align: center;
    padding: 60px 20px;
}
.state-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}
.state-empty-title {
    font-size: 16px;
    color: var(--text-main);
    margin-bottom: 8px;
}
.state-empty-desc {
    font-size: 13px;
    color: var(--text-sub);
}
.state-empty-link {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}
.state-error-title { color: #DC2626; }
.state-error-desc {
    font-size: 13px;
    color: var(--text-sub);
    margin-top: 8px;
}
.state-error-center {
    padding: 20px;
    text-align: center;
}
.state-error-msg { color: #e74c3c; }
.btn-close-modal {
    margin-top: 20px;
    padding: 10px 20px;
    background: #0F1F38;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* Strategy modals */
.modal-actions--sm {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.modal-btn--sm {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}
.modal-btn--save {
    border: none;
    background: var(--primary);
    color: white;
    font-weight: 600;
}
.modal-btn--delete-full {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: #DC2626;
    color: white;
    font-size: 14px;
    cursor: pointer;
}
.delete-confirm-text {
    color: var(--text-main);
    margin-bottom: 8px;
}
.delete-confirm-desc {
    color: var(--text-sub);
    font-size: 14px;
    margin-bottom: 20px;
}
