/* 계정설정 탭 전용 스타일 - Dark + Orange 테마 */

/* 엑셀 등 파일 input — 레이블로 트리거할 때만 숨김 (인라인 style 금지) */
.account-file-input-hidden {
    display: none !important;
}

/* 계정설정 탭 스타일 */
.account-management-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: 100%;
}

.account-section {
    background: var(--theme-bg-card);
    border-radius: var(--theme-radius);
    padding: 24px;
    box-shadow: var(--theme-shadow);
    border: 1px solid var(--theme-border);
    display: flex;
    flex-direction: column;
}

.account-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--theme-border);
}

.account-section .section-header h3 {
    font-size: calc(18px * var(--ui-font-scale));
    font-weight: 600;
    color: var(--theme-text);
    margin: 0;
}

/* 섹션 제목 그룹 */
.section-title-group {
    display: flex;
    align-items: center;
}

/* 계정 수 배지 */
.account-count-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: var(--theme-bg-input);
    color: var(--theme-text-secondary);
    font-size: calc(12px * var(--ui-font-scale));
    font-weight: 500;
    border-radius: 10px;
    border: 1px solid var(--theme-border);
}

/* 계정 추가 폼 */
.account-form-section {
    min-height: 400px;
    max-height: 620px;
    display: flex;
    flex-direction: column;
}

/* 검증 토글 스위치 */
.verification-toggle {
    margin-bottom: 12px;
    padding: 10px;
    background: var(--theme-bg-input);
    border-radius: var(--theme-radius-sm);
    border: 1px solid var(--theme-border);
    height: 44px;
    display: flex;
    align-items: center;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.toggle-input {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 48px;
    height: 24px;
    background: var(--theme-bg-elevated);
    border-radius: 24px;
    transition: all 0.3s ease;
    border: 1px solid var(--theme-border);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--theme-text-secondary);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: var(--theme-shadow);
}

.toggle-input:checked + .toggle-slider {
    background: var(--theme-accent);
    border-color: var(--theme-accent);
}

.toggle-input:checked + .toggle-slider::before {
    background: #111;
    transform: translateX(24px);
}

.toggle-text {
    font-size: calc(14px * var(--ui-font-scale));
    font-weight: 500;
    color: var(--theme-text-secondary);
}

.form-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end; /* 오른쪽 정렬 */
    height: 44px; /* 토글 스위치와 동일한 높이 */
}

.form-buttons .btn {
    height: 36px; /* 토글 스위치 내부 요소와 비슷한 높이 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    font-size: calc(14px * var(--ui-font-scale));
}

/* 추가 기능 섹션 */
.additional-features-section {
    margin-top: 16px;
    padding: 16px;
    background: var(--theme-bg-input);
    border-radius: var(--theme-radius-sm);
    border: 1px solid var(--theme-border);
    box-shadow: var(--theme-shadow);
}

/* 기능 설명 영역 */
.feature-descriptions {
    margin-top: 12px;
    padding: 10px;
    background: var(--theme-bg-card);
    border-radius: var(--theme-radius-sm);
    border: 1px solid var(--theme-border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.description-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: calc(13px * var(--ui-font-scale));
    color: var(--theme-text-secondary);
}

.description-icon {
    font-size: calc(14px * var(--ui-font-scale));
    width: 16px;
    text-align: center;
}

.description-text {
    flex: 1;
    line-height: 1.4;
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--theme-border), transparent);
    margin: 0 0 20px 0;
}

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

.feature-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    font-size: calc(12px * var(--ui-font-scale));
    font-weight: 500;
    border-radius: var(--theme-radius-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--theme-border);
    background: var(--theme-bg-card);
    color: var(--theme-text-secondary);
    text-decoration: none;
    min-height: 80px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--theme-shadow);
}

.feature-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--theme-accent-glow), transparent);
    transition: left 0.5s ease;
}

.feature-btn:hover::before {
    left: 100%;
}

.feature-btn:hover {
    background: var(--theme-bg-elevated);
    border-color: var(--theme-accent);
    transform: translateY(-4px);
    box-shadow: var(--theme-shadow-hover);
    color: var(--theme-text);
}

.feature-btn .btn-icon {
    font-size: calc(20px * var(--ui-font-scale));
    transition: transform 0.3s ease;
}

.feature-btn:hover .btn-icon {
    transform: scale(1.1);
}

.feature-btn .btn-text {
    font-size: calc(11px * var(--ui-font-scale));
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

/* 폴더 정보 CSS 제거됨 */

/* 반응형 디자인 */
@media (max-width: 768px) {
    .additional-features-section {
        padding: 16px;
        margin-top: 16px;
    }
    
    .feature-actions-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .feature-btn {
        min-height: 60px;
        padding: 12px;
    }
    
    .feature-descriptions {
        margin-top: 12px;
        padding: 10px;
        gap: 6px;
    }
    
    .description-item {
        font-size: calc(12px * var(--ui-font-scale));
    }
    
    .feature-btn .btn-icon {
        font-size: calc(18px * var(--ui-font-scale));
    }
}

.excel-description {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--theme-bg-input);
    border-radius: var(--theme-radius-sm);
    border-left: 4px solid var(--theme-accent);
}

.excel-description p {
    margin: 0;
    color: var(--theme-text-secondary);
    font-size: calc(14px * var(--ui-font-scale));
}

.excel-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.excel-action-section {
    background: var(--theme-bg-card);
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius-sm);
    padding: 20px;
    transition: all 0.2s ease;
    box-shadow: var(--theme-shadow);
}

.excel-action-section:hover {
    border-color: var(--theme-accent);
    box-shadow: var(--theme-shadow-hover);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--theme-border);
}

.section-icon {
    font-size: calc(20px * var(--ui-font-scale));
}

.section-title h4 {
    margin: 0;
    font-size: calc(16px * var(--ui-font-scale));
    font-weight: 600;
    color: var(--theme-text);
}

.section-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.excel-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: calc(14px * var(--ui-font-scale));
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    min-height: 44px;
}

.excel-action-btn .btn-icon {
    font-size: calc(16px * var(--ui-font-scale));
}

.action-description {
    margin-top: 8px;
}

.action-description p {
    margin: 0;
    font-size: calc(12px * var(--ui-font-scale));
    color: var(--theme-text-secondary);
    line-height: 1.4;
}

.excel-info-section {
    background: var(--theme-bg-input);
    border-radius: var(--theme-radius-sm);
    padding: 20px;
    border: 1px solid var(--theme-border);
}

.info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.info-icon {
    font-size: calc(16px * var(--ui-font-scale));
}

.info-header h4 {
    margin: 0;
    font-size: calc(14px * var(--ui-font-scale));
    font-weight: 600;
    color: var(--theme-text);
}

.info-content ul {
    margin: 0;
    padding-left: 16px;
    list-style: none;
}

.info-content li {
    position: relative;
    margin-bottom: 8px;
    font-size: calc(13px * var(--ui-font-scale));
    color: var(--theme-text-secondary);
    line-height: 1.5;
}

.info-content li::before {
    content: "•";
    color: var(--theme-accent);
    font-weight: bold;
    position: absolute;
    left: -16px;
}

.info-content strong {
    color: var(--theme-text);
    font-weight: 600;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .excel-actions-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .excel-modal-container {
        width: 95%;
        margin: 20px;
    }
}

.account-form {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-label {
    font-size: calc(14px * var(--ui-font-scale));
    font-weight: 500;
    color: var(--theme-text-secondary);
}

/* 계정 설정 폼 입력 필드 - Dark 테마 */
.account-form .form-input,
.account-form .form-select,
#account-settings-content .form-input,
#account-settings-content .form-select {
    padding: 12px 16px !important;
    border: 1px solid var(--theme-border-strong) !important;
    border-radius: var(--theme-radius-sm) !important;
    font-size: calc(14px * var(--ui-font-scale)) !important;
    transition: all 0.2s ease !important;
    width: 100%;
    box-sizing: border-box;
    background-color: var(--theme-bg-input) !important;
    color: var(--theme-text) !important;
}

.account-form .form-input:hover,
.account-form .form-select:hover,
#account-settings-content .form-input:hover,
#account-settings-content .form-select:hover {
    border-color: var(--theme-border) !important;
}

.account-form .form-input:focus,
.account-form .form-select:focus,
#account-settings-content .form-input:focus,
#account-settings-content .form-select:focus {
    outline: none !important;
    border-color: var(--theme-accent) !important;
    box-shadow: 0 0 0 3px var(--theme-accent-glow) !important;
    background-color: var(--theme-bg-input) !important;
}

.account-form .form-input::placeholder,
#account-settings-content .form-input::placeholder {
    color: var(--theme-text-muted) !important;
    font-style: italic;
}

/* Password 타입 마스킹 비활성화 (PyWebView 호환성) */
/* input[type="password"] {
    -webkit-text-security: none !important;
    text-security: none !important;
    font-family: inherit !important;
} */

/* 패스워드 입력 필드 글씨체 강제 적용 */
#account-password {
    font-family: '에이투지체-2ExtraLight', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: calc(14px * var(--ui-font-scale)) !important;
    font-weight: normal !important;
    letter-spacing: normal !important;
}





.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 0;
    border-top: none;
}

.form-actions .btn {
    padding: 12px 24px;
    font-size: calc(14px * var(--ui-font-scale));
    font-weight: 500;
}

/* 계정 추가 버튼 스타일 */
.account-form .form-actions .btn-primary {
    width: 100%;
    justify-content: center;
    text-align: center;
}

/* 계정 목록 */
.account-list-section {
    min-height: 400px;
    max-height: 620px;
    display: flex;
    flex-direction: column;
}

/* 버튼 스타일 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: calc(14px * var(--ui-font-scale));
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-icon {
    font-size: calc(16px * var(--ui-font-scale));
}

.btn-primary {
    background: var(--theme-accent);
    color: var(--theme-text);
    box-shadow: 0 2px 8px var(--theme-accent-glow);
}

.btn-primary:hover {
    background: var(--theme-accent-hover);
    color: var(--theme-text);
    box-shadow: 0 4px 12px var(--theme-accent-glow);
}

.btn-secondary {
    background: var(--theme-bg-input);
    color: var(--theme-text);
    border: 1px solid var(--theme-border-strong);
}

.btn-secondary:hover {
    background: var(--theme-bg-elevated);
    border-color: var(--theme-accent);
    color: var(--theme-accent);
}

.btn-success {
    background: #22c55e;
    color: #111;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

/* 계정 목록 */
.account-actions {
    display: flex;
    gap: 8px;
}

.account-list-container {
    background: var(--theme-bg-input);
    border-radius: var(--theme-radius-sm);
    padding: 16px;
    min-height: 200px;
    flex: 1;
    overflow-y: auto;
    max-height: 500px;
    border: 1px solid var(--theme-border);
}

.account-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    text-align: center;
    color: var(--theme-text-secondary);
    grid-column: 1 / -1;
}

.empty-icon {
    font-size: calc(48px * var(--ui-font-scale));
    margin-bottom: 16px;
    opacity: 0.7;
}

.empty-state p {
    font-size: calc(16px * var(--ui-font-scale));
    margin: 0;
}

/* 계정 카드 */
.account-card {
    background: var(--theme-bg-card);
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius-sm);
    padding: 12px;
    transition: all 0.2s;
    min-height: 80px;
    box-shadow: var(--theme-shadow);
}

.account-card:hover {
    border-color: var(--theme-accent);
    box-shadow: var(--theme-shadow-hover);
}

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

.account-id {
    font-weight: 600;
    color: var(--theme-text);
    font-size: calc(14px * var(--ui-font-scale));
}

.account-actions-small {
    display: flex;
    gap: 4px;
    align-items: center;
}

.btn-small {
    padding: 4px 8px;
    font-size: calc(12px * var(--ui-font-scale));
    border-radius: 4px;
    min-width: 50px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle-btn {
    /* .btn-small의 모든 스타일을 상속받음 */
}

.account-password {
    color: var(--theme-text-secondary);
    font-size: calc(12px * var(--ui-font-scale));
    font-family: '에이투지체-2ExtraLight', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--theme-bg-input);
    padding: 6px;
    border-radius: var(--theme-radius-sm);
    margin-bottom: 6px;
    word-break: break-all;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.password-display {
    flex: 1;
    word-break: break-all;
}

.password-toggle-text {
    font-size: calc(12px * var(--ui-font-scale));
    font-weight: 500;
    user-select: none;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
    color: var(--theme-accent);
}

.password-toggle-text:hover {
    background-color: var(--theme-accent-glow);
    color: var(--theme-accent-hover);
}


.account-date {
    font-size: calc(10px * var(--ui-font-scale));
    color: var(--theme-text-muted);
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid var(--theme-border);
    text-align: right;
}

/* 간단한 계정 목록 아이템 */
.account-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--theme-bg-card);
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius-sm);
    padding: 12px 16px;
    transition: all 0.2s;
    box-shadow: var(--theme-shadow);
}

.account-item:hover {
    border-color: var(--theme-accent);
    box-shadow: var(--theme-shadow-hover);
}

.account-id-text {
    font-size: calc(14px * var(--ui-font-scale));
    font-weight: 500;
    color: var(--theme-text);
    flex: 1;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .account-management-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .account-section {
        min-height: auto;
    }
    
    .account-list {
        grid-template-columns: 1fr;
    }
    
    .account-actions {
        flex-wrap: wrap;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
}
