@charset "UTF-8";

/* ==========================================================================
   Re.y Enterprise - 인기 테마 프리셋 정의 (라이트 / 다크)
   1. google_workspace: 구글 워크스페이스 (기본 추천: 클린 화이트 / 머티리얼 다크)
   2. notion_slack: 노션 / 슬랙 스타일 (미니멀 쿨 그레이 / 딥 차콜)
   3. midnight_navy: 엔터프라이즈 미드나잇 네이비 (펄 화이트 / 딥 네이비)
   4. forest_emerald: 자연주의 포레스트 (세이지 그린 / 딥 올리브)
   ========================================================================== */

/* ----------------------------------------------------
   1. Google Workspace 스타일 (기본 추천 테마)
   ---------------------------------------------------- */
html[data-theme-preset="google_workspace"][data-theme="light"],
html[data-theme-preset="google_workspace"]:not([data-theme="dark"]):not(.dark-mode),
html:not([data-theme="dark"]):not(.dark-mode):not([data-theme-preset]),
html[data-theme-preset="google_workspace"][data-theme="light"] body,
html[data-theme-preset="google_workspace"]:not([data-theme="dark"]):not(.dark-mode) body,
html:not([data-theme="dark"]):not(.dark-mode):not([data-theme-preset]) body,
body[data-theme-preset="google_workspace"]:not(.dark-mode),
body:not(.dark-mode):not([data-theme-preset]) {
    --bg-body: #f8f9fa;
    --bg-card: #ffffff;
    --bg-sidebar: #f1f3f4;
    --bg-sidebar-hover: #e8eaed;
    --bg-card-alt: #f1f3f4;
    --bg-sub: #e8eaed;
    --bg-elevated: #ffffff;
    --text-main: #202124;
    --text-sub: #3c4043;
    --text-muted: #5f6368;
    --text-disabled: #80868b;
    --border-base: #dadce0;
    --border-color: #dadce0;
    --color-primary: #1a73e8;
    --color-primary-light: rgba(26, 115, 232, 0.12);
    --btn-primary-bg: #1a73e8;
    --int-bg-body: #f8f9fa;
    --int-bg-card: #ffffff;
    --int-border: #dadce0;
    --ivory-step-1: #dadce0;
    --ivory-step-2: #ffffff;
    --ivory-step-3: #ffffff;
    --ivory-step-4: #f8f9fa;
    --ivory-sub-box: #f1f3f4;
    --ivory-input-bg: #ffffff;
}

html[data-theme-preset="google_workspace"][data-theme="dark"],
html[data-theme-preset="google_workspace"].dark-mode,
html.dark-mode:not([data-theme-preset]),
html[data-theme="dark"]:not([data-theme-preset]),
html[data-theme-preset="google_workspace"][data-theme="dark"] body,
html[data-theme-preset="google_workspace"].dark-mode body,
html.dark-mode:not([data-theme-preset]) body,
body[data-theme-preset="google_workspace"].dark-mode,
body.dark-mode[data-theme-preset="google_workspace"],
body.dark-mode:not([data-theme-preset]) {
    --bg-body: #1e1f20;
    --bg-card: #282a2c;
    --bg-sidebar: #18191a;
    --bg-sidebar-hover: #222325;
    --bg-card-alt: #202124;
    --bg-sub: #303134;
    --bg-elevated: #282a2c;
    --text-main: #e8eaed;
    --text-sub: #bdc1c6;
    --text-muted: #9aa0a6;
    --text-disabled: #5f6368;
    --border-base: #3c4043;
    --border-color: #3c4043;
    --color-primary: #8ab4f8;
    --color-primary-light: rgba(138, 180, 248, 0.15);
    --btn-primary-bg: #8ab4f8;
    --int-bg-body: #1e1f20;
    --int-bg-card: #282a2c;
    --int-border: #3c4043;
    --ivory-step-1: #3c4043;
    --ivory-step-2: #18191a;
    --ivory-step-3: #282a2c;
    --ivory-step-4: #1e1f20;
    --ivory-sub-box: #202124;
    --ivory-input-bg: #18191a;
}

html[data-theme-preset="google_workspace"][data-theme="dark"],
html[data-theme-preset="google_workspace"].dark-mode,
html[data-theme-preset="google_workspace"][data-theme="dark"] body,
html[data-theme-preset="google_workspace"].dark-mode body,
body[data-theme-preset="google_workspace"].dark-mode,
body.dark-mode[data-theme-preset="google_workspace"] {
    --bg-body: #1e1f20;
    --bg-card: #282a2c;
    --bg-sidebar: #18191a;
    --bg-sidebar-hover: #222325;
    --bg-card-alt: #202124;
    --bg-sub: #303134;
    --bg-elevated: #282a2c;
    --text-main: #e8eaed;
    --text-sub: #bdc1c6;
    --text-muted: #9aa0a6;
    --border-base: #3c4043;
    --border-color: #3c4043;
    --color-primary: #8ab4f8;
    --color-primary-light: rgba(138, 180, 248, 0.15);
    --btn-primary-bg: #1a73e8;
    --int-bg-body: #1e1f20;
    --int-bg-card: #282a2c;
    --int-border: #3c4043;
    --dark-step-1: #18191a;
    --dark-step-2: #282a2c;
    --dark-step-3: #1e1f20;
    --dark-sub-box: #202124;
    --dark-input-bg: #18191a;
}

/* ----------------------------------------------------
   3. Notion / Slack 모던 미니멀 스타일
   ---------------------------------------------------- */
html[data-theme-preset="notion_slack"][data-theme="light"],
html[data-theme-preset="notion_slack"]:not([data-theme="dark"]):not(.dark-mode),
html[data-theme-preset="notion_slack"][data-theme="light"] body,
html[data-theme-preset="notion_slack"]:not([data-theme="dark"]):not(.dark-mode) body,
body[data-theme-preset="notion_slack"]:not(.dark-mode) {
    --bg-body: #f7f6f3;
    --bg-card: #ffffff;
    --bg-sidebar: #ebeae5;
    --bg-card-alt: #f1f0eb;
    --bg-sub: #e6e5e0;
    --text-main: #2e2e2e;
    --text-sub: #454545;
    --text-muted: #73726e;
    --border-base: #e0ded9;
    --color-primary: #0f7b6c;
    --btn-primary-bg: #0f7b6c;
    --int-bg-body: #f7f6f3;
    --int-bg-card: #ffffff;
    --int-border: #e0ded9;
}
html[data-theme-preset="notion_slack"][data-theme="dark"],
html[data-theme-preset="notion_slack"].dark-mode,
html[data-theme-preset="notion_slack"][data-theme="dark"] body,
html[data-theme-preset="notion_slack"].dark-mode body,
body[data-theme-preset="notion_slack"].dark-mode,
body.dark-mode[data-theme-preset="notion_slack"] {
    --bg-body: #191919;
    --bg-card: #202020;
    --bg-sidebar: #141414;
    --bg-card-alt: #1c1c1c;
    --bg-sub: #282828;
    --text-main: #d3d3d3;
    --text-sub: #a5a5a5;
    --text-muted: #7a7a7a;
    --border-base: #2f2f2f;
    --color-primary: #2eaadc;
    --btn-primary-bg: #2eaadc;
    --int-bg-body: #191919;
    --int-bg-card: #202020;
    --int-border: #2f2f2f;
}

/* ----------------------------------------------------
   4. Midnight Navy 엔터프라이즈 스타일
   ---------------------------------------------------- */
html[data-theme-preset="midnight_navy"][data-theme="light"],
html[data-theme-preset="midnight_navy"]:not([data-theme="dark"]):not(.dark-mode),
html[data-theme-preset="midnight_navy"][data-theme="light"] body,
html[data-theme-preset="midnight_navy"]:not([data-theme="dark"]):not(.dark-mode) body,
body[data-theme-preset="midnight_navy"]:not(.dark-mode) {
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #f1f5f9;
    --bg-card-alt: #f1f5f9;
    --bg-sub: #e2e8f0;
    --text-main: #0f172a;
    --text-sub: #1e293b;
    --text-muted: #64748b;
    --border-base: #cbd5e1;
    --color-primary: #0284c7;
    --btn-primary-bg: #0284c7;
    --int-bg-body: #f8fafc;
    --int-bg-card: #ffffff;
    --int-border: #cbd5e1;
}
html[data-theme-preset="midnight_navy"][data-theme="dark"],
html[data-theme-preset="midnight_navy"].dark-mode,
html[data-theme-preset="midnight_navy"][data-theme="dark"] body,
html[data-theme-preset="midnight_navy"].dark-mode body,
body[data-theme-preset="midnight_navy"].dark-mode,
body.dark-mode[data-theme-preset="midnight_navy"] {
    --bg-body: #0B132B;
    --bg-card: #111D42;
    --bg-sidebar: #080E21;
    --bg-card-alt: #172654;
    --bg-sub: #172654;
    --text-main: #F1F5F9;
    --text-sub: #CBD5E1;
    --text-muted: #94A3B8;
    --border-base: #1E3570;
    --color-primary: #38BDF8;
    --btn-primary-bg: #0284c7;
    --int-bg-body: #0B132B;
    --int-bg-card: #111D42;
    --int-border: #1E3570;
}

/* ----------------------------------------------------
   5. Forest & Emerald 자연주의 스타일
   ---------------------------------------------------- */
html[data-theme-preset="forest_emerald"][data-theme="light"],
html[data-theme-preset="forest_emerald"]:not([data-theme="dark"]):not(.dark-mode),
html[data-theme-preset="forest_emerald"][data-theme="light"] body,
html[data-theme-preset="forest_emerald"]:not([data-theme="dark"]):not(.dark-mode) body,
body[data-theme-preset="forest_emerald"]:not(.dark-mode) {
    --bg-body: #f5f7f4;
    --bg-card: #ffffff;
    --bg-sidebar: #e9efe7;
    --bg-sidebar-hover: #dfe7dd;
    --bg-card-alt: #e9efe7;
    --bg-sub: #dbe4d9;
    --bg-elevated: #ffffff;
    --text-main: #1c261f;
    --text-sub: #2e3c31;
    --text-muted: #5e6f62;
    --text-disabled: #8a9c8e;
    --border-base: #ccd8ca;
    --border-color: #ccd8ca;
    --color-primary: #059669;
    --color-primary-light: rgba(5, 150, 105, 0.12);
    --btn-primary-bg: #059669;
    --int-bg-body: #f5f7f4;
    --int-bg-card: #ffffff;
    --int-border: #ccd8ca;
    --ivory-step-1: #ccd8ca;
    --ivory-step-2: #e9efe7;
    --ivory-step-3: #ffffff;
    --ivory-step-4: #f5f7f4;
    --ivory-sub-box: #e9efe7;
    --ivory-input-bg: #ffffff;
}
html[data-theme-preset="forest_emerald"][data-theme="dark"],
html[data-theme-preset="forest_emerald"].dark-mode,
html[data-theme-preset="forest_emerald"][data-theme="dark"] body,
html[data-theme-preset="forest_emerald"].dark-mode body,
body[data-theme-preset="forest_emerald"].dark-mode,
body.dark-mode[data-theme-preset="forest_emerald"] {
    --bg-body: #0F1D15;
    --bg-card: #16281E;
    --bg-sidebar: #0C1811;
    --bg-sidebar-hover: #13241B;
    --bg-card-alt: #1D3327;
    --bg-sub: #1D3327;
    --bg-elevated: #1D3327;
    --text-main: #E2EBE5;
    --text-sub: #B2C5B8;
    --text-muted: #8AA492;
    --text-disabled: #5E7A67;
    --border-base: #2C4C3A;
    --border-color: #2C4C3A;
    --border-light: #203A2B;
    --border-strong: #385E49;
    --color-primary: #10B981;
    --color-primary-hover: #34D399;
    --color-primary-light: rgba(16, 185, 129, 0.16);
    --btn-primary-bg: #059669;
    --int-bg-body: #0F1D15;
    --int-bg-card: #16281E;
    --int-bg-header: #1D3327;
    --int-bg-subtle: #1D3327;
    --int-border: #2C4C3A;
    --dark-step-1: #0C1811;
    --dark-step-2: #16281E;
    --dark-step-3: #0F1D15;
    --dark-sub-box: #1D3327;
    --dark-input-bg: #122118;
    --legal-navy-dark: #0C1811;
    --legal-navy-card: #16281E;
    --legal-card-bg: #16281E;
    --legal-gray-bg: #1D3327;
    --legal-border: #2C4C3A;
    --legal-text-main: #E2EBE5;
    --legal-text-sub: #B2C5B8;
}

/* ==========================================================================
   테마 프리셋 선택 및 커스텀 팝업 모달 UI 스타일 (완벽 균형 및 고해상도 가독성)
   ========================================================================== */
#modal-theme-customizer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    zoom: 1 !important; /* 브라우저 배율 변경 시 모달 왜곡 방지 */
}

#modal-theme-customizer.active {
    display: flex;
}

.theme-modal-content {
    background: var(--bg-card, #FFFFFF);
    border: 1px solid var(--border-base, #DFD8C8);
    border-radius: 12px;
    width: 880px;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    font-family: inherit;
    animation: modalPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="dark"] .theme-modal-content,
body.dark-mode .theme-modal-content {
    background: var(--bg-card, #1F1F24) !important;
    border-color: var(--border-base, #383842) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65) !important;
}

/* 모달 헤더 */
.theme-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light, #E2E8F0);
    background: var(--bg-card-alt, #F8FAFC);
}

html[data-theme="dark"] .theme-modal-header,
body.dark-mode .theme-modal-header {
    background: var(--bg-card-alt, #18181B) !important;
    border-bottom-color: var(--border-base, #383842) !important;
}

.theme-modal-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main, #1E293B);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

html[data-theme="dark"] .theme-modal-header h3,
body.dark-mode .theme-modal-header h3 {
    color: #FFFFFF !important;
}

/* 닫기 버튼 전용 스타일 */
.theme-modal-header .modal-close-btn {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    padding: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    border: none !important;
    color: var(--text-muted, #64748B) !important;
    font-size: 22px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.theme-modal-header .modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    color: var(--text-main, #0F172A) !important;
}

html[data-theme="dark"] .theme-modal-header .modal-close-btn,
body.dark-mode .theme-modal-header .modal-close-btn {
    color: #A1A1AA !important;
}

html[data-theme="dark"] .theme-modal-header .modal-close-btn:hover,
body.dark-mode .theme-modal-header .modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #FFFFFF !important;
}

/* 🌟 모달 상단 라이트/다크 모드 전환 바 */
.theme-mode-switch-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: var(--bg-card-alt, #F1F5F9);
    border-bottom: 1px solid var(--border-light, #E2E8F0);
    gap: 12px;
    flex-wrap: wrap;
}

html[data-theme="dark"] .theme-mode-switch-bar,
body.dark-mode .theme-mode-switch-bar {
    background: var(--bg-card-alt, #17171A) !important;
    border-bottom-color: var(--border-base, #383842) !important;
}

.theme-mode-switch-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mode-switch-label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-main, #1E293B);
    display: flex;
    align-items: center;
    gap: 6px;
}

html[data-theme="dark"] .mode-switch-label,
body.dark-mode .mode-switch-label {
    color: #FFFFFF !important;
}

.theme-mode-pill-btn {
    background: var(--bg-card, #FFFFFF);
    border: 1.5px solid var(--border-base, #CBD5E1);
    color: var(--text-sub, #475569);
    height: 32px;
    padding: 0 14px;
    border-radius: 18px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-sizing: border-box;
}

.theme-mode-pill-btn:hover {
    border-color: var(--color-primary, #2563EB);
    color: var(--color-primary, #2563EB);
}

.theme-mode-pill-btn.active {
    background: var(--color-primary, #2563EB) !important;
    color: #FFFFFF !important;
    border-color: var(--color-primary, #2563EB) !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

html[data-theme="dark"] .theme-mode-pill-btn,
body.dark-mode .theme-mode-pill-btn {
    background: #27272D;
    border-color: #383842;
    color: #D4D4D8;
}

html[data-theme="dark"] .theme-mode-pill-btn:hover,
body.dark-mode .theme-mode-pill-btn:hover {
    border-color: #60A5FA;
    color: #FFFFFF;
}

html[data-theme="dark"] .theme-mode-pill-btn.active,
body.dark-mode .theme-mode-pill-btn.active {
    background: #3B82F6 !important;
    color: #FFFFFF !important;
    border-color: #3B82F6 !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

.theme-mode-sync-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-sub, #64748B);
    cursor: pointer;
    user-select: none;
}

html[data-theme="dark"] .theme-mode-sync-check,
body.dark-mode .theme-mode-sync-check {
    color: #A1A1AA !important;
}

.theme-mode-sync-check input {
    accent-color: #2563EB;
    cursor: pointer;
}

/* 탭 바 */
.theme-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--border-light, #E2E8F0);
    padding-bottom: 6px;
}

html[data-theme="dark"] .theme-tabs,
body.dark-mode .theme-tabs {
    border-bottom-color: var(--border-base, #383842) !important;
}

.theme-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted, #64748B);
    font-size: 13px;
    font-weight: 600;
    height: 32px;
    padding: 0 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.theme-tab-btn:hover {
    color: var(--text-main, #1E293B);
    background: rgba(0, 0, 0, 0.04);
}

.theme-tab-btn.active {
    background: var(--color-primary, #2563EB) !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .theme-tab-btn,
body.dark-mode .theme-tab-btn {
    color: #A1A1AA !important;
}

html[data-theme="dark"] .theme-tab-btn:hover,
body.dark-mode .theme-tab-btn:hover {
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .theme-tab-btn.active,
body.dark-mode .theme-tab-btn.active {
    background: #3B82F6 !important;
    color: #FFFFFF !important;
}

/* 모달 바디 */
.theme-modal-body {
    display: flex;
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    gap: 20px;
}

@media (max-width: 860px) {
    .theme-modal-body {
        flex-direction: column;
    }
}

.theme-modal-left {
    flex: 1.25;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.theme-modal-right {
    flex: 0.95;
    background: var(--bg-card-alt, #F8FAFC);
    border: 1px solid var(--border-light, #E2E8F0);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

html[data-theme="dark"] .theme-modal-right,
body.dark-mode .theme-modal-right {
    background: var(--bg-body, #17171A) !important;
    border-color: var(--border-base, #383842) !important;
}

/* 공통 안내 텍스트 가독성 강화 */
.theme-guide-text {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-sub, #475569);
    margin: 0 0 10px 0;
}

html[data-theme="dark"] .theme-guide-text,
body.dark-mode .theme-guide-text {
    color: #CBD5E1 !important;
}

/* 프리셋 카드 그리드 */
.preset-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.preset-card {
    background: var(--bg-card, #FFFFFF);
    border: 1.5px solid var(--border-base, #E2E8F0);
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    box-sizing: border-box;
}

.preset-card:hover {
    border-color: var(--color-primary, #2563EB);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.preset-card.active {
    border-color: var(--color-primary, #2563EB);
    background: rgba(37, 99, 235, 0.05);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

html[data-theme="dark"] .preset-card,
body.dark-mode .preset-card {
    background: #27272D !important;
    border-color: #383842 !important;
}

html[data-theme="dark"] .preset-card:hover,
body.dark-mode .preset-card:hover {
    border-color: #60A5FA !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .preset-card.active,
body.dark-mode .preset-card.active {
    border-color: #3B82F6 !important;
    background: rgba(59, 130, 246, 0.12) !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25) !important;
}

.preset-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preset-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main, #1E293B);
    display: flex;
    align-items: center;
    gap: 6px;
}

html[data-theme="dark"] .preset-title,
body.dark-mode .preset-title {
    color: #FFFFFF !important;
}

.preset-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--color-primary, #2563EB);
    color: #FFFFFF;
    display: none;
}

.preset-card.active .preset-badge {
    display: inline-block;
}

/* 프리셋 팔레트 그룹 (라이트 + 다크 2줄 상시 노출) */
.preset-palette-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.palette-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.palette-tag {
    font-size: 10.5px;
    font-weight: 600;
    width: 44px;
    color: var(--text-muted, #64748B);
    flex-shrink: 0;
    white-space: nowrap;
}

html[data-theme="dark"] .palette-tag,
body.dark-mode .palette-tag {
    color: #A1A1AA !important;
}

.palette-row .preset-palette {
    flex: 1;
    display: flex;
    height: 14px;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.preset-palette span {
    flex: 1;
    height: 100%;
}

/* 프리셋 설명 (가독성 완전 개선) */
.preset-desc {
    font-size: 11.5px !important;
    color: var(--text-sub, #475569) !important;
    line-height: 1.4 !important;
    margin-top: 2px;
}

html[data-theme="dark"] .preset-desc,
body.dark-mode .preset-desc {
    color: #CBD5E1 !important; /* 다크모드에서 선명하게 보이도록 고명도 지정 */
}

/* 화면 배율 캡슐 버튼 스타일 */
.zoom-btn {
    background: var(--bg-card, #FFFFFF);
    border: 1.5px solid var(--border-base, #CBD5E1);
    border-radius: 6px;
    padding: 8px 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--text-main, #1E293B);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    box-sizing: border-box;
    height: 48px;
}

.zoom-btn:hover {
    border-color: var(--color-primary, #2563EB);
    background: var(--bg-sidebar-hover, #EFF6FF);
}

.zoom-btn.active {
    border-color: var(--color-primary, #2563EB);
    background: var(--color-primary, #2563EB);
    color: #FFFFFF !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.zoom-btn.active div {
    color: #FFFFFF !important;
}

html[data-theme="dark"] .zoom-btn,
body.dark-mode .zoom-btn {
    background: #27272D;
    border-color: #383842;
    color: #FFFFFF;
}

html[data-theme="dark"] .zoom-btn:hover,
body.dark-mode .zoom-btn:hover {
    background: #32323A;
    border-color: #60A5FA;
}

html[data-theme="dark"] .zoom-btn.active,
body.dark-mode .zoom-btn.active {
    background: #3B82F6 !important;
    border-color: #3B82F6 !important;
    color: #FFFFFF !important;
}

/* 5대 커스텀 컬러 피커 폼 */
.custom-color-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.color-input-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-card-alt, #F8FAFC);
    border: 1px solid var(--border-light, #E2E8F0);
    border-radius: 6px;
}

html[data-theme="dark"] .color-input-row,
body.dark-mode .color-input-row {
    background: #27272D !important;
    border-color: #383842 !important;
}

.color-input-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main, #1E293B);
}

html[data-theme="dark"] .color-input-left,
body.dark-mode .color-input-left {
    color: #FFFFFF !important;
}

.color-input-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-picker-native {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

.color-picker-native::-webkit-color-swatch {
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.color-hex-text {
    width: 74px;
    font-family: monospace;
    font-size: 12px;
    height: 28px;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-base, #CBD5E1);
    background: var(--bg-card, #FFFFFF);
    color: var(--text-main, #1E293B);
    text-align: center;
}

html[data-theme="dark"] .color-hex-text,
body.dark-mode .color-hex-text {
    background: #17171A !important;
    border-color: #383842 !important;
    color: #FFFFFF !important;
}

/* 라이브 미니 대시보드 미리보기 박스 */
.mini-preview-frame {
    flex: 1;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.12);
    transition: all 0.2s ease;
    min-height: 220px;
}

.mini-preview-header {
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 700;
}

.mini-preview-body {
    display: flex;
    flex: 1;
}

.mini-preview-sidebar {
    width: 52px;
    padding: 8px 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mini-sidebar-item {
    height: 10px;
    border-radius: 2px;
    opacity: 0.6;
}

.mini-preview-content {
    flex: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mini-preview-card {
    border-radius: 5px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mini-card-btn {
    height: 20px;
    border-radius: 3px;
    border: none;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    align-self: flex-start;
}

/* 모달 하단 푸터 및 버튼 시스템 규격화 */
.theme-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-top: 1px solid var(--border-light, #E2E8F0);
    background: var(--bg-card-alt, #F8FAFC);
}

html[data-theme="dark"] .theme-modal-footer,
body.dark-mode .theme-modal-footer {
    background: var(--bg-card-alt, #18181B) !important;
    border-top-color: var(--border-base, #383842) !important;
}

.theme-modal-footer .btn-modern {
    height: 36px !important;
    padding: 0 16px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    border-radius: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
}

.theme-modal-footer .btn-modern.btn-blue {
    background: var(--color-primary, #2563EB) !important;
    color: #FFFFFF !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25) !important;
}

.theme-modal-footer .btn-modern.btn-blue:hover {
    filter: brightness(1.08) !important;
    transform: translateY(-1px) !important;
}

.theme-modal-footer .btn-modern.btn-outline-gray {
    background: var(--bg-card, #FFFFFF) !important;
    border: 1px solid var(--border-base, #CBD5E1) !important;
    color: var(--text-main, #1E293B) !important;
}

.theme-modal-footer .btn-modern.btn-outline-gray:hover {
    background: var(--bg-card-alt, #F1F5F9) !important;
    border-color: var(--color-primary, #2563EB) !important;
    color: var(--color-primary, #2563EB) !important;
}

html[data-theme="dark"] .theme-modal-footer .btn-modern.btn-outline-gray,
body.dark-mode .theme-modal-footer .btn-modern.btn-outline-gray {
    background: #27272D !important;
    border-color: #383842 !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .theme-modal-footer .btn-modern.btn-outline-gray:hover,
body.dark-mode .theme-modal-footer .btn-modern.btn-outline-gray:hover {
    background: #32323A !important;
    border-color: #60A5FA !important;
    color: #60A5FA !important;
}

/* ==========================================================================
   Re.y Enterprise - 전사(헤더/사이드바/전체 메뉴 카드 및 테이블) 100% 통합 동기화 마스터
   - 5대 프리셋(시그니처, 구글, 노션, 네이비, 포레스트) 및 사용자 5대 컬러 커스텀 지원
   - 설정 화면뿐 아니라 인테리어, 유지보수, 자산, 상표권, 임대차 등 전 메뉴 전역 일관 적용
   ========================================================================== */

/* 1. 최상단 헤더, 회사 CI 블록, 메인 네비게이션 헤더 */
html[data-theme-preset] .global-top-header,
html[data-theme-preset] .header-ci-block,
html[data-theme-preset] .header-main-block,
html[data-theme-preset] .main-header,
html[data-theme-preset] header.global-top-header,
html[data-theme-preset] div.header-ci-block,
html[data-theme-preset] div.header-main-block,
body[data-theme-preset] .global-top-header,
body[data-theme-preset] .header-ci-block,
body[data-theme-preset] .header-main-block,
body[data-theme-preset] .main-header {
    background: var(--bg-sidebar) !important;
    background-color: var(--bg-sidebar) !important;
    border-color: var(--border-base) !important;
}

/* 2. 좌측 사이드바 및 서브메뉴 */
html[data-theme-preset] .sidebar,
html[data-theme-preset] aside.sidebar,
html[data-theme-preset] .sidebar-header,
html[data-theme-preset] aside.sidebar .menu,
body[data-theme-preset] .sidebar,
body[data-theme-preset] aside.sidebar,
body[data-theme-preset] .sidebar-header {
    background: var(--bg-sidebar) !important;
    background-color: var(--bg-sidebar) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .sidebar .menu-item > a,
body[data-theme-preset] .sidebar .menu-item > a {
    color: var(--text-sub) !important;
}

html[data-theme-preset] .sidebar .menu-item:hover > a,
body[data-theme-preset] .sidebar .menu-item:hover > a {
    background-color: var(--bg-card-alt, var(--bg-sub)) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .sidebar .submenu,
body[data-theme-preset] .sidebar .submenu {
    border-left-color: var(--border-base) !important;
}

html[data-theme-preset] .sidebar .submenu li a,
body[data-theme-preset] .sidebar .submenu li a {
    color: var(--text-sub) !important;
}

html[data-theme-preset] .sidebar .submenu li a:hover,
body[data-theme-preset] .sidebar .submenu li a:hover {
    background-color: var(--bg-card-alt, var(--bg-sub)) !important;
    color: var(--text-main) !important;
}

/* 3. 대시보드 워크스페이스 및 바디 배경 */
html[data-theme-preset] body,
html[data-theme-preset] .dashboard-container,
html[data-theme-preset] .dashboard-main-wrapper,
html[data-theme-preset] .dashboard-workspace,
html[data-theme-preset] .main-content,
html[data-theme-preset] .content-body,
body[data-theme-preset],
body[data-theme-preset] .dashboard-container,
body[data-theme-preset] .dashboard-main-wrapper,
body[data-theme-preset] .dashboard-workspace,
body[data-theme-preset] .main-content,
body[data-theme-preset] .content-body {
    background: var(--bg-body) !important;
    background-color: var(--bg-body) !important;
}

/* 4. 전 메뉴 카드, 위젯, KPI 블록, 대시보드 패널, 테이블 컨테이너 100% 동기화 */
html[data-theme-preset] .card,
html[data-theme-preset] .widget,
html[data-theme-preset] .fcc-card,
html[data-theme-preset] .kpi-card,
html[data-theme-preset] .summary-card,
html[data-theme-preset] .stat-card,
html[data-theme-preset] .panel,
html[data-theme-preset] .int-kpi-card,
html[data-theme-preset] .interior-toolbar-card,
html[data-theme-preset] .interior-table-card,
html[data-theme-preset] .maint-kpi-summary-card,
html[data-theme-preset] .maintenance-card,
html[data-theme-preset] .asset-summary-card,
html[data-theme-preset] .asset-kpi-card,
html[data-theme-preset] .asset-matrix-card,
html[data-theme-preset] .asset-chart-card,
html[data-theme-preset] .asset-tracker-card,
html[data-theme-preset] .tm-kpi-card,
html[data-theme-preset] .trademark-card,
html[data-theme-preset] .lease-kpi-card,
html[data-theme-preset] .lease-summary-card,
html[data-theme-preset] .lease-kpi-compact-panel,
html[data-theme-preset] .table-responsive,
html[data-theme-preset] .int-table-responsive,
html[data-theme-preset] .data-table-container,
html[data-theme-preset] .profile-card,
html[data-theme-preset] .password-card,
html[data-theme-preset] .theme-settings-card,
html[data-theme-preset] .exp-kpi-card,
html[data-theme-preset] .exp-main-workspace-card,
html[data-theme-preset] .fcc-pulse-card,
html[data-theme-preset] .exp-card-chart-wide,
html[data-theme-preset] .exp-card-memo-tower,
html[data-theme-preset] .exp-top-tab-bar,
html[data-theme-preset] .exp-toolbar-2tier,
html[data-theme-preset] .legal-card,
html[data-theme-preset] .workspace-view-pane,
html[data-theme-preset] .result-sheet-viewer,
html[data-theme-preset] .conf-console-split-layout,
html[data-theme-preset] .workspace-mode-selector-bar,
html[data-theme-preset] .corp-doc-workspace,
html[data-theme-preset] .corp-kpi-card,
html[data-theme-preset] .corp-card,
html[data-theme-preset] .corp-table-card,
html[data-theme-preset] .corp-summary-card,
html[data-theme-preset] .corp-filter-card,
html[data-theme-preset] .seal-summary-container .widget,
html[data-theme-preset] .seal-mini-card,
html[data-theme-preset] .seal-shelf-card,
html[data-theme-preset] .seal-bookshelf-container,
html[data-theme-preset] .seal-bookshelf-grid,
html[data-theme-preset] .seal-card,
html[data-theme-preset] .loc-card,
html[data-theme-preset] .loc-summary-card,
html[data-theme-preset] .master-location-card,
html[data-theme-preset] .loc-grid-card,
html[data-theme-preset] .loc-detail-card,
html[data-theme-preset] .legal-summary-card,
html[data-theme-preset] .lawyer-card,
html[data-theme-preset] .advisory-card,
html[data-theme-preset] .advisory-kpi-card,
html[data-theme-preset] .contract-kpi-card,
html[data-theme-preset] .lawfirm-card,
html[data-theme-preset] .party-section,
html[data-theme-preset] .mail-kpi-card,
html[data-theme-preset] .mail-log-kpi-grid,
html[data-theme-preset] #sent-log-section,
html[data-theme-preset] #received-log-section,
html[data-theme-preset] .sharp-win-layout,
html[data-theme-preset] .sharp-section-card,
body[data-theme-preset] .card,
body[data-theme-preset] .widget,
body[data-theme-preset] .fcc-card,
body[data-theme-preset] .kpi-card,
body[data-theme-preset] .summary-card,
body[data-theme-preset] .stat-card,
body[data-theme-preset] .panel,
body[data-theme-preset] .int-kpi-card,
body[data-theme-preset] .interior-toolbar-card,
body[data-theme-preset] .interior-table-card,
body[data-theme-preset] .maint-kpi-summary-card,
body[data-theme-preset] .maintenance-card,
body[data-theme-preset] .asset-summary-card,
body[data-theme-preset] .asset-kpi-card,
body[data-theme-preset] .asset-matrix-card,
body[data-theme-preset] .asset-chart-card,
body[data-theme-preset] .asset-tracker-card,
body[data-theme-preset] .tm-kpi-card,
body[data-theme-preset] .trademark-card,
body[data-theme-preset] .lease-kpi-card,
body[data-theme-preset] .lease-summary-card,
body[data-theme-preset] .lease-kpi-compact-panel,
body[data-theme-preset] .table-responsive,
body[data-theme-preset] .int-table-responsive,
body[data-theme-preset] .data-table-container,
body[data-theme-preset] .profile-card,
body[data-theme-preset] .password-card,
body[data-theme-preset] .theme-settings-card,
body[data-theme-preset] .exp-kpi-card,
body[data-theme-preset] .exp-main-workspace-card,
body[data-theme-preset] .fcc-pulse-card,
body[data-theme-preset] .exp-card-chart-wide,
body[data-theme-preset] .exp-card-memo-tower,
body[data-theme-preset] .exp-top-tab-bar,
body[data-theme-preset] .exp-toolbar-2tier,
body[data-theme-preset] .legal-card,
body[data-theme-preset] .workspace-view-pane,
body[data-theme-preset] .result-sheet-viewer,
body[data-theme-preset] .conf-console-split-layout,
body[data-theme-preset] .workspace-mode-selector-bar,
body[data-theme-preset] .corp-doc-workspace,
body[data-theme-preset] .corp-kpi-card,
body[data-theme-preset] .corp-card,
body[data-theme-preset] .corp-table-card,
body[data-theme-preset] .corp-summary-card,
body[data-theme-preset] .corp-filter-card,
body[data-theme-preset] .seal-summary-container .widget,
body[data-theme-preset] .seal-mini-card,
body[data-theme-preset] .seal-shelf-card,
body[data-theme-preset] .seal-bookshelf-container,
body[data-theme-preset] .seal-bookshelf-grid,
body[data-theme-preset] .seal-card,
body[data-theme-preset] .loc-card,
body[data-theme-preset] .loc-summary-card,
body[data-theme-preset] .master-location-card,
body[data-theme-preset] .loc-grid-card,
body[data-theme-preset] .loc-detail-card,
body[data-theme-preset] .legal-summary-card,
body[data-theme-preset] .lawyer-card,
body[data-theme-preset] .advisory-card,
body[data-theme-preset] .advisory-kpi-card,
body[data-theme-preset] .contract-kpi-card,
body[data-theme-preset] .lawfirm-card,
body[data-theme-preset] .party-section,
body[data-theme-preset] .mail-kpi-card,
body[data-theme-preset] .mail-log-kpi-grid,
body[data-theme-preset] #sent-log-section,
body[data-theme-preset] #received-log-section,
body[data-theme-preset] .sharp-win-layout,
body[data-theme-preset] .sharp-section-card {
    background: var(--bg-card) !important;
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
}

/* 5. 카드 내부 서브박스 및 태그, 통계 셀, 탭 */
html[data-theme-preset] .int-summary-year-box,
html[data-theme-preset] .int-summary-year-box.prev-box,
html[data-theme-preset] .int-summary-year-box.curr-box,
html[data-theme-preset] .maint-stat-cell,
html[data-theme-preset] .tm-stat-pill,
html[data-theme-preset] .tm-cost-detail-box,
html[data-theme-preset] .kpi-list-content,
html[data-theme-preset] .chart-guide-tag,
html[data-theme-preset] .maint-year-tag,
html[data-theme-preset] .tm-kpi-count-badge,
html[data-theme-preset] .tm-kpi-status-tag,
html[data-theme-preset] .exp-month-sub-info-box,
html[data-theme-preset] .exp-sub-chips-bar,
html[data-theme-preset] .exp-cat-ratio-legend,
html[data-theme-preset] .exp-top-tab-list li,
html[data-theme-preset] .btn-mode-tab,
html[data-theme-preset] .calc-summary-box,
html[data-theme-preset] .seal-info-wrapper,
html[data-theme-preset] .seal-shelf-card.highlight-box,
html[data-theme-preset] .sharp-section-header,
html[data-theme-preset] .sharp-dropzone,
body[data-theme-preset] .int-summary-year-box,
body[data-theme-preset] .int-summary-year-box.prev-box,
body[data-theme-preset] .int-summary-year-box.curr-box,
body[data-theme-preset] .maint-stat-cell,
body[data-theme-preset] .tm-stat-pill,
body[data-theme-preset] .tm-cost-detail-box,
body[data-theme-preset] .kpi-list-content,
body[data-theme-preset] .exp-month-sub-info-box,
body[data-theme-preset] .exp-top-tab-list li,
body[data-theme-preset] .btn-mode-tab,
body[data-theme-preset] .sharp-section-header {
    background-color: var(--bg-card-alt, var(--bg-sub)) !important;
    border-color: var(--border-base) !important;
}

/* 활성 탭 하이라이트 */
html[data-theme-preset] .exp-top-tab-list li.active,
body[data-theme-preset] .exp-top-tab-list li.active,
html[data-theme-preset] .btn-mode-tab.active,
body[data-theme-preset] .btn-mode-tab.active {
    background-color: var(--color-primary) !important;
    color: #FFFFFF !important;
    border-color: var(--color-primary) !important;
}

/* 6. 전사 테이블 th/td 헤더 및 행 경계선, 수직 정렬 오와 열 일원화 */
html[data-theme-preset] .table,
html[data-theme-preset] .data-table,
html[data-theme-preset] table.custom-table,
html[data-theme-preset] table.int-custom-table,
html[data-theme-preset] .exp-pivot-table,
html[data-theme-preset] .calc-result-table,
html[data-theme-preset] #seal-usage-table,
html[data-theme-preset] #seal-cert-table,
html[data-theme-preset] .loc-table,
html[data-theme-preset] .corp-table,
html[data-theme-preset] #sent-log-table,
html[data-theme-preset] #received-log-table,
body[data-theme-preset] .table,
body[data-theme-preset] .data-table,
body[data-theme-preset] table.custom-table,
body[data-theme-preset] table.int-custom-table,
body[data-theme-preset] .exp-pivot-table,
body[data-theme-preset] .calc-result-table,
body[data-theme-preset] #seal-usage-table,
body[data-theme-preset] #seal-cert-table,
body[data-theme-preset] .loc-table,
body[data-theme-preset] .corp-table,
body[data-theme-preset] #sent-log-table,
body[data-theme-preset] #received-log-table {
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .table th,
html[data-theme-preset] .data-table th,
html[data-theme-preset] table.custom-table th,
html[data-theme-preset] table.int-custom-table th,
html[data-theme-preset] .exp-pivot-table th,
html[data-theme-preset] .calc-result-table th,
html[data-theme-preset] #seal-usage-table th,
html[data-theme-preset] #seal-cert-table th,
html[data-theme-preset] .loc-table th,
html[data-theme-preset] .corp-table th,
html[data-theme-preset] #sent-log-table th,
html[data-theme-preset] #received-log-table th,
html[data-theme-preset] .pivot-header-cell,
body[data-theme-preset] .table th,
body[data-theme-preset] .data-table th,
body[data-theme-preset] table.custom-table th,
body[data-theme-preset] table.int-custom-table th,
body[data-theme-preset] .exp-pivot-table th,
body[data-theme-preset] .calc-result-table th,
body[data-theme-preset] #seal-usage-table th,
body[data-theme-preset] #seal-cert-table th,
body[data-theme-preset] .loc-table th,
body[data-theme-preset] .corp-table th,
body[data-theme-preset] #sent-log-table th,
body[data-theme-preset] #received-log-table th {
    background-color: var(--bg-card-alt, var(--bg-sub)) !important;
    border-color: var(--border-base) !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] .table td,
html[data-theme-preset] .data-table td,
html[data-theme-preset] table.custom-table td,
html[data-theme-preset] table.int-custom-table td,
html[data-theme-preset] .exp-pivot-table td,
html[data-theme-preset] .calc-result-table td,
html[data-theme-preset] #seal-usage-table td,
html[data-theme-preset] #seal-cert-table td,
html[data-theme-preset] .loc-table td,
html[data-theme-preset] .corp-table td,
html[data-theme-preset] #sent-log-table td,
html[data-theme-preset] #received-log-table td,
body[data-theme-preset] .table td,
body[data-theme-preset] .data-table td,
body[data-theme-preset] table.custom-table td,
body[data-theme-preset] table.int-custom-table td,
body[data-theme-preset] .exp-pivot-table td,
body[data-theme-preset] .calc-result-table td,
body[data-theme-preset] #seal-usage-table td,
body[data-theme-preset] #seal-cert-table td,
body[data-theme-preset] .loc-table td,
body[data-theme-preset] .corp-table td,
body[data-theme-preset] #sent-log-table td,
body[data-theme-preset] #received-log-table td {
    background-color: var(--bg-card) !important;
    background: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
    vertical-align: middle !important;
}

/* 🏢 [설정 - 신뢰하는 기기 관리 & 회사 기본정보 & 마스터 사용자 관리 프리셋 테마 완벽 동기화] */
html[data-theme-preset] .settings-bottom-card,
body[data-theme-preset] .settings-bottom-card,
html[data-theme-preset] .mci-widget-wrapper,
body[data-theme-preset] .mci-widget-wrapper,
html[data-theme-preset] .mci-card,
body[data-theme-preset] .mci-card,
html[data-theme-preset] .mci-card-header,
body[data-theme-preset] .mci-card-header,
html[data-theme-preset] .mci-card-body,
body[data-theme-preset] .mci-card-body,
html[data-theme-preset] .mci-table-box,
body[data-theme-preset] .mci-table-box,
html[data-theme-preset] .report-cycle-box,
body[data-theme-preset] .report-cycle-box,
html[data-theme-preset] .mci-it-sidebar,
body[data-theme-preset] .mci-it-sidebar,
html[data-theme-preset] .mci-it-content,
body[data-theme-preset] .mci-it-content,
html[data-theme-preset] .org-kpi-card,
body[data-theme-preset] .org-kpi-card,
html[data-theme-preset] #user-security-panel,
body[data-theme-preset] #user-security-panel,
html[data-theme-preset] .sec-grid-left,
body[data-theme-preset] .sec-grid-left,
html[data-theme-preset] .sec-grid-right,
body[data-theme-preset] .sec-grid-right,
html[data-theme-preset] .security-info-pane,
body[data-theme-preset] .security-info-pane,
html[data-theme-preset] .security-action-pane,
body[data-theme-preset] .security-action-pane,
html[data-theme-preset] .sec-card,
body[data-theme-preset] .sec-card,
html[data-theme-preset] .sec-history-full-card,
body[data-theme-preset] .sec-history-full-card,
html[data-theme-preset] .sec-history-table-box,
body[data-theme-preset] .sec-history-table-box,
html[data-theme-preset] .perm-header-row,
body[data-theme-preset] .perm-header-row,
html[data-theme-preset] .perm-compact-card,
body[data-theme-preset] .perm-compact-card,
html[data-theme-preset] .perm-compact-header,
body[data-theme-preset] .perm-compact-header {
    background-color: var(--bg-card) !important;
    background: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .sec-tab-bar .tab-link,
body[data-theme-preset] .sec-tab-bar .tab-link {
    background: var(--bg-card-alt, var(--bg-sub)) !important;
    color: var(--text-muted, var(--text-sub)) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .sec-tab-bar .tab-link.active,
body[data-theme-preset] .sec-tab-bar .tab-link.active {
    background: var(--color-primary) !important;
    color: #ffffff !important;
    border-color: var(--color-primary) !important;
}

/* 수발신 대장 및 테이블 셀 수직 오와 열 일치 */
html[data-theme-preset] #sent-log-table td.wrap-text,
html[data-theme-preset] #received-log-table td.wrap-text,
html[data-theme-preset] .data-table td.wrap-text,
html[data-theme-preset] table td.wrap-text,
body[data-theme-preset] #sent-log-table td.wrap-text,
body[data-theme-preset] #received-log-table td.wrap-text,
body[data-theme-preset] .data-table td.wrap-text,
body[data-theme-preset] table td.wrap-text {
    display: table-cell !important;
    vertical-align: middle !important;
    word-break: break-all !important;
    white-space: normal !important;
    line-height: 1.45 !important;
}

/* 7. 메인 타이틀, 제목, 텍스트 선명도 */
html[data-theme-preset] h1,
html[data-theme-preset] h2,
html[data-theme-preset] h3,
html[data-theme-preset] h4,
html[data-theme-preset] .card-title,
html[data-theme-preset] #main-title,
html[data-theme-preset] .tm-hero-num,
html[data-theme-preset] .metric-val,
html[data-theme-preset] .exp-kpi-title,
html[data-theme-preset] .exp-hero-num,
html[data-theme-preset] .pulse-amount,
html[data-theme-preset] .pulse-title,
html[data-theme-preset] .seal-name-title,
html[data-theme-preset] .shelf-label,
html[data-theme-preset] .shelf-value,
html[data-theme-preset] .law-version-pill,
body[data-theme-preset] h1,
body[data-theme-preset] h2,
body[data-theme-preset] h3,
body[data-theme-preset] h4,
body[data-theme-preset] .card-title,
body[data-theme-preset] #main-title,
body[data-theme-preset] .exp-kpi-title,
body[data-theme-preset] .exp-hero-num,
body[data-theme-preset] .pulse-amount,
body[data-theme-preset] .pulse-title {
    color: var(--text-main) !important;
}

/* 8. 툴바 내 검색 인풋 및 셀렉트 박스 (라이트/다크/테마 자연스러운 서브 카드 톤 연동, 검은 박스 및 검색창 이중 박스 방지) */
html[data-theme-preset] .search-box,
body[data-theme-preset] .search-box {
    background: var(--ivory-input-bg, var(--bg-card, #ffffff)) !important;
    background-color: var(--ivory-input-bg, var(--bg-card, #ffffff)) !important;
    border: 1px solid var(--border-base) !important;
    box-shadow: none !important;
}

html[data-theme-preset][data-theme="dark"] .search-box,
html[data-theme-preset].dark-mode .search-box,
body[data-theme-preset].dark-mode .search-box {
    background: var(--bg-card-alt, var(--bg-sub)) !important;
    background-color: var(--bg-card-alt, var(--bg-sub)) !important;
    border: 1px solid var(--border-base) !important;
    box-shadow: none !important;
}

.search-box input,
html[data-theme-preset] .search-box input,
body[data-theme-preset] .search-box input,
html[data-theme-preset][data-theme="dark"] .search-box input,
html[data-theme-preset].dark-mode .search-box input,
body[data-theme-preset].dark-mode .search-box input {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: var(--text-main) !important;
    width: 100% !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

html[data-theme-preset] .interior-search-input,
html[data-theme-preset] .interior-select,
html[data-theme-preset] .form-control,
html[data-theme-preset] select.form-select,
html[data-theme-preset] .sharp-input,
html[data-theme-preset] .sharp-textarea,
html[data-theme-preset] .sharp-select,
body[data-theme-preset] .interior-search-input,
body[data-theme-preset] .interior-select,
body[data-theme-preset] .form-control,
body[data-theme-preset] select.form-select,
body[data-theme-preset] .sharp-input,
body[data-theme-preset] .sharp-textarea,
body[data-theme-preset] .sharp-select {
    background: var(--ivory-input-bg, var(--bg-card, #ffffff)) !important;
    background-color: var(--ivory-input-bg, var(--bg-card, #ffffff)) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset][data-theme="dark"] .interior-search-input,
html[data-theme-preset][data-theme="dark"] .interior-select,
html[data-theme-preset][data-theme="dark"] .form-control,
html[data-theme-preset][data-theme="dark"] select.form-select,
html[data-theme-preset][data-theme="dark"] .sharp-input,
html[data-theme-preset][data-theme="dark"] .sharp-textarea,
html[data-theme-preset][data-theme="dark"] .sharp-select,
html[data-theme-preset].dark-mode .interior-search-input,
html[data-theme-preset].dark-mode .interior-select,
html[data-theme-preset].dark-mode .form-control,
html[data-theme-preset].dark-mode select.form-select,
html[data-theme-preset].dark-mode .sharp-input,
html[data-theme-preset].dark-mode .sharp-textarea,
html[data-theme-preset].dark-mode .sharp-select,
body[data-theme-preset].dark-mode .sharp-input,
body[data-theme-preset].dark-mode .sharp-textarea,
body[data-theme-preset].dark-mode .sharp-select {
    background: var(--bg-card-alt, var(--bg-sub)) !important;
    background-color: var(--bg-card-alt, var(--bg-sub)) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

/* 9. 버튼 계열 표준화 */
html[data-theme-preset] .btn-modern.btn-outline-gray,
body[data-theme-preset] .btn-modern.btn-outline-gray,
html[data-theme-preset] .btn-secondary,
body[data-theme-preset] .btn-secondary,
html[data-theme-preset] .sharp-btn-secondary,
body[data-theme-preset] .sharp-btn-secondary {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .btn-modern.btn-blue,
body[data-theme-preset] .btn-modern.btn-blue,
html[data-theme-preset] .btn-primary,
body[data-theme-preset] .btn-primary,
html[data-theme-preset] .sharp-btn-primary,
body[data-theme-preset] .sharp-btn-primary {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #FFFFFF !important;
}

/* ==========================================================================
   10. 인라인 스타일 무력화 방어 쉴드 (HTML/JS 잔여 인라인 스타일 원천 격리)
   - 대표님 대원칙: 섹션/버튼/텍스트의 색상과 배경은 무조건 CSS에서만 통제
   ========================================================================== */
html[data-theme-preset] .card[style*="background"],
html[data-theme-preset] .widget[style*="background"],
html[data-theme-preset] .kpi-card[style*="background"],
html[data-theme-preset] .summary-card[style*="background"],
html[data-theme-preset] .modal-content[style*="background"],
html[data-theme-preset] .table[style*="background"],
html[data-theme-preset] .data-table[style*="background"],
html[data-theme-preset] .exp-kpi-card[style*="background"],
html[data-theme-preset] .exp-main-workspace-card[style*="background"],
html[data-theme-preset] .legal-card[style*="background"],
body[data-theme-preset] .card[style*="background"],
body[data-theme-preset] .widget[style*="background"],
body[data-theme-preset] .kpi-card[style*="background"],
body[data-theme-preset] .exp-kpi-card[style*="background"] {
    background: var(--bg-card) !important;
    background-color: var(--bg-card) !important;
}

/* 다크 모드일 때 인라인 어두운 텍스트 무력화 */
html[data-theme="dark"][data-theme-preset] [style*="color: #0"],
html[data-theme="dark"][data-theme-preset] [style*="color: #1"],
html[data-theme="dark"][data-theme-preset] [style*="color: #2"],
html[data-theme="dark"][data-theme-preset] [style*="color:#0"],
html[data-theme="dark"][data-theme-preset] [style*="color:#1"],
html[data-theme="dark"][data-theme-preset] [style*="color:#2"],
body.dark-mode[data-theme-preset] [style*="color: #0"],
body.dark-mode[data-theme-preset] [style*="color: #1"],
body.dark-mode[data-theme-preset] [style*="color: #2"],
body.dark-mode[data-theme-preset] [style*="color:#0"],
body.dark-mode[data-theme-preset] [style*="color:#1"],
body.dark-mode[data-theme-preset] [style*="color:#2"] {
    color: var(--text-main) !important;
}

/* 라이트 모드일 때 인라인 밝은 텍스트 무력화 */
html[data-theme="light"][data-theme-preset] [style*="color: #f"],
html[data-theme="light"][data-theme-preset] [style*="color: #e"],
html[data-theme="light"][data-theme-preset] [style*="color:#f"],
html[data-theme="light"][data-theme-preset] [style*="color:#e"],
body:not(.dark-mode)[data-theme-preset] [style*="color: #f"],
body:not(.dark-mode)[data-theme-preset] [style*="color: #e"],
body:not(.dark-mode)[data-theme-preset] [style*="color:#f"],
body:not(.dark-mode)[data-theme-preset] [style*="color:#e"] {
    color: var(--text-main) !important;
}

/* ==========================================================================
   11. 테마 커스터마이저 모달 규격화 (인라인 스타일 완전 제거 및 폰트/레이아웃 정돈)
   ========================================================================== */
.zoom-card-box {
    background: var(--bg-card-alt) !important;
    border: 1px solid var(--border-base) !important;
    border-radius: 8px !important;
    padding: 14px !important;
    margin-bottom: 12px !important;
}

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

.zoom-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.zoom-icon-primary {
    color: var(--color-primary) !important;
    font-size: 15px !important;
}

.zoom-header-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
}

.zoom-badge-pill {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: var(--color-primary) !important;
    background: rgba(37, 99, 235, 0.12) !important;
    padding: 2px 10px !important;
    border-radius: 12px !important;
}

.zoom-preset-btn-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
}

.zoom-btn-percent {
    font-size: 12.5px !important;
    font-weight: 700 !important;
}

.zoom-btn-desc {
    font-size: 10px !important;
    opacity: 0.85 !important;
}

.zoom-slider-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
}

.zoom-slider-labels {
    display: flex !important;
    justify-content: space-between !important;
    font-size: 11px !important;
    color: var(--text-sub) !important;
    font-weight: 600 !important;
}

.zoom-range-input {
    width: 100% !important;
    cursor: pointer !important;
    accent-color: var(--color-primary) !important;
}

.zoom-tip-box {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 6px !important;
    padding: 12px 14px !important;
}

.zoom-tip-header {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    margin-bottom: 6px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.zoom-tip-icon {
    color: var(--color-primary) !important;
}

.zoom-tip-list {
    font-size: 11.5px !important;
    color: var(--text-sub) !important;
    margin: 0 !important;
    padding-left: 18px !important;
    line-height: 1.55 !important;
}

.custom-mode-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    margin-bottom: 12px !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    background: rgba(245, 158, 11, 0.12) !important;
    color: #b45309 !important;
}

.custom-badge-icon {
    color: #f59e0b !important;
}

.color-step-icon-1 { color: #3b82f6 !important; }
.color-step-icon-2 { color: #10b981 !important; }
.color-step-icon-3 { color: #f59e0b !important; }
.color-step-icon-4 { color: #8b5cf6 !important; }
.color-step-icon-5 { color: #ec4899 !important; }

.preview-box-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.preview-box-title {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
}

.preview-box-badge {
    font-size: 11px !important;
    font-weight: 700 !important;
}

.window-controls-dots {
    display: flex !important;
    gap: 4px !important;
}

.window-controls-dots span {
    width: 6px !important;
    height: 6px !important;
    border-radius: 50% !important;
}
.dot-red { background: #ef4444 !important; }
.dot-yellow { background: #f59e0b !important; }
.dot-green { background: #10b981 !important; }

.mini-card-title {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
}

.mini-card-skeleton {
    height: 6px !important;
    background: rgba(128, 128, 128, 0.2) !important;
    border-radius: 3px !important;
}
.mini-card-skeleton.w-70 {
    width: 70% !important;
}

.modal-btn-actions {
    display: flex !important;
    gap: 8px !important;
}

/* ==========================================================================
   12. 프리셋 카드 컬러 스워치(Swatch) 팔레트 규격화 (HTML 인라인 스타일 완전 이관)
   ========================================================================== */
.preset-card[data-preset="google_workspace"] .palette-row.light-palette .swatch-1 { background: #F8F9FA !important; }
.preset-card[data-preset="google_workspace"] .palette-row.light-palette .swatch-2 { background: #FFFFFF !important; }
.preset-card[data-preset="google_workspace"] .palette-row.light-palette .swatch-3 { background: #F1F3F4 !important; }
.preset-card[data-preset="google_workspace"] .palette-row.light-palette .swatch-4 { background: #202124 !important; }
.preset-card[data-preset="google_workspace"] .palette-row.light-palette .swatch-5 { background: #1A73E8 !important; }

.preset-card[data-preset="google_workspace"] .palette-row.dark-palette .swatch-1 { background: #1E1F20 !important; }
.preset-card[data-preset="google_workspace"] .palette-row.dark-palette .swatch-2 { background: #282A2C !important; }
.preset-card[data-preset="google_workspace"] .palette-row.dark-palette .swatch-3 { background: #18191A !important; }
.preset-card[data-preset="google_workspace"] .palette-row.dark-palette .swatch-4 { background: #E8EAED !important; }
.preset-card[data-preset="google_workspace"] .palette-row.dark-palette .swatch-5 { background: #8AB4F8 !important; }

.preset-card[data-preset="notion_slack"] .palette-row.light-palette .swatch-1 { background: #F7F6F3 !important; }
.preset-card[data-preset="notion_slack"] .palette-row.light-palette .swatch-2 { background: #FFFFFF !important; }
.preset-card[data-preset="notion_slack"] .palette-row.light-palette .swatch-3 { background: #EBEAE5 !important; }
.preset-card[data-preset="notion_slack"] .palette-row.light-palette .swatch-4 { background: #2E2E2E !important; }
.preset-card[data-preset="notion_slack"] .palette-row.light-palette .swatch-5 { background: #0F7B6C !important; }

.preset-card[data-preset="notion_slack"] .palette-row.dark-palette .swatch-1 { background: #191919 !important; }
.preset-card[data-preset="notion_slack"] .palette-row.dark-palette .swatch-2 { background: #202020 !important; }
.preset-card[data-preset="notion_slack"] .palette-row.dark-palette .swatch-3 { background: #141414 !important; }
.preset-card[data-preset="notion_slack"] .palette-row.dark-palette .swatch-4 { background: #D3D3D3 !important; }
.preset-card[data-preset="notion_slack"] .palette-row.dark-palette .swatch-5 { background: #2EAADC !important; }

.preset-card[data-preset="midnight_navy"] .palette-row.light-palette .swatch-1 { background: #F8FAFC !important; }
.preset-card[data-preset="midnight_navy"] .palette-row.light-palette .swatch-2 { background: #FFFFFF !important; }
.preset-card[data-preset="midnight_navy"] .palette-row.light-palette .swatch-3 { background: #F1F5F9 !important; }
.preset-card[data-preset="midnight_navy"] .palette-row.light-palette .swatch-4 { background: #0F172A !important; }
.preset-card[data-preset="midnight_navy"] .palette-row.light-palette .swatch-5 { background: #0284C7 !important; }

.preset-card[data-preset="midnight_navy"] .palette-row.dark-palette .swatch-1 { background: #0B132B !important; }
.preset-card[data-preset="midnight_navy"] .palette-row.dark-palette .swatch-2 { background: #111D42 !important; }
.preset-card[data-preset="midnight_navy"] .palette-row.dark-palette .swatch-3 { background: #080E21 !important; }
.preset-card[data-preset="midnight_navy"] .palette-row.dark-palette .swatch-4 { background: #F1F5F9 !important; }
.preset-card[data-preset="midnight_navy"] .palette-row.dark-palette .swatch-5 { background: #38BDF8 !important; }

.preset-card[data-preset="forest_emerald"] .palette-row.light-palette .swatch-1 { background: #F5F7F4 !important; }
.preset-card[data-preset="forest_emerald"] .palette-row.light-palette .swatch-2 { background: #FFFFFF !important; }
.preset-card[data-preset="forest_emerald"] .palette-row.light-palette .swatch-3 { background: #E9EFE7 !important; }
.preset-card[data-preset="forest_emerald"] .palette-row.light-palette .swatch-4 { background: #1C261F !important; }
.preset-card[data-preset="forest_emerald"] .palette-row.light-palette .swatch-5 { background: #059669 !important; }

.preset-card[data-preset="forest_emerald"] .palette-row.dark-palette .swatch-1 { background: #0F1D15 !important; }
.preset-card[data-preset="forest_emerald"] .palette-row.dark-palette .swatch-2 { background: #16281E !important; }
.preset-card[data-preset="forest_emerald"] .palette-row.dark-palette .swatch-3 { background: #0C1811 !important; }
.preset-card[data-preset="forest_emerald"] .palette-row.dark-palette .swatch-4 { background: #E2EBE5 !important; }
.preset-card[data-preset="forest_emerald"] .palette-row.dark-palette .swatch-5 { background: #10B981 !important; }

/* ==========================================================================
   🖨️ 인쇄 시 전사 테마 프리셋 완전 초기화 (순백 A4 표준 보장)
   - 다크모드/다크테마 인쇄 시 외곽 검은 바탕/토너 낭비 100% 원천 차단
   ========================================================================== */
@media print {
    html,
    html body,
    html[data-theme] body,
    html[data-theme-preset] body,
    html[data-theme="dark"] body,
    html[data-theme-preset][data-theme] body,
    html[data-theme-preset="google_workspace"][data-theme="dark"] body,
    html[data-theme-preset="notion_slack"][data-theme="dark"] body,
    html[data-theme-preset="midnight_navy"][data-theme="dark"] body,
    html[data-theme-preset="forest_emerald"][data-theme="dark"] body,
    body,
    body.dark-mode,
    body[data-theme-preset],
    body[data-theme-preset].dark-mode,
    body.dark-mode[data-theme-preset="google_workspace"],
    body.dark-mode[data-theme-preset="notion_slack"],
    body.dark-mode[data-theme-preset="midnight_navy"],
    body.dark-mode[data-theme-preset="forest_emerald"] {
        --bg-body: #ffffff;
        --bg-card: #ffffff;
        --bg-card-alt: #ffffff;
        --bg-sub: #ffffff;
        --bg-page: #ffffff;
        background: #ffffff !important;
        background-color: #ffffff !important;
        color: #0f172a !important;
    }
}








/* ==========================================================================
   🏢 [전사 테마 프리셋 완전 일원화] 공간 및 인테리어 관리 (Interior Management)
   ========================================================================== */
html[data-theme-preset] #interior-kpi-section .int-kpi-card,
body[data-theme-preset] #interior-kpi-section .int-kpi-card {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

html[data-theme-preset] #interior-kpi-section .int-kpi-card .card-title,
body[data-theme-preset] #interior-kpi-section .int-kpi-card .card-title {
    color: var(--text-main) !important;
    border-bottom-color: var(--border-base) !important;
}

html[data-theme-preset] #interior-kpi-section .int-summary-year-box.prev-box,
body[data-theme-preset] #interior-kpi-section .int-summary-year-box.prev-box {
    background-color: var(--bg-sub, var(--bg-card-alt)) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #interior-kpi-section .prev-box .year-badge-title,
body[data-theme-preset] #interior-kpi-section .prev-box .year-badge-title {
    color: var(--text-sub) !important;
    border-bottom: 1px dashed var(--border-base) !important;
}

html[data-theme-preset] #interior-kpi-section .prev-box .metric-label,
body[data-theme-preset] #interior-kpi-section .prev-box .metric-label {
    color: var(--text-muted) !important;
}

html[data-theme-preset] #interior-kpi-section .prev-box .metric-val,
body[data-theme-preset] #interior-kpi-section .prev-box .metric-val {
    color: var(--text-main) !important;
}

html[data-theme-preset] #interior-kpi-section .int-summary-year-box.curr-box,
body[data-theme-preset] #interior-kpi-section .int-summary-year-box.curr-box {
    background-color: var(--bg-card-alt, rgba(16, 185, 129, 0.12)) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #interior-kpi-section .curr-box .year-badge-title.curr-title,
body[data-theme-preset] #interior-kpi-section .curr-box .year-badge-title.curr-title {
    color: var(--color-primary) !important;
    border-bottom-color: var(--border-base) !important;
}

html[data-theme-preset] #interior-kpi-section .curr-box .metric-label,
body[data-theme-preset] #interior-kpi-section .curr-box .metric-label {
    color: var(--text-muted) !important;
}

html[data-theme-preset] #interior-kpi-section .curr-box .metric-val,
body[data-theme-preset] #interior-kpi-section .curr-box .metric-val {
    color: var(--text-main) !important;
}

html[data-theme-preset] #interior-kpi-section .curr-box .metric-val strong.text-primary,
html[data-theme-preset] #interior-kpi-section .curr-box .curr-noc strong,
body[data-theme-preset] #interior-kpi-section .curr-box .metric-val strong.text-primary,
body[data-theme-preset] #interior-kpi-section .curr-box .curr-noc strong {
    color: var(--color-primary) !important;
}

html[data-theme-preset] #interior-kpi-section .kpi-list-content,
body[data-theme-preset] #interior-kpi-section .kpi-list-content {
    background-color: var(--bg-card) !important;
}

html[data-theme-preset] #interior-kpi-section .kpi-list-content .kpi-alert-label,
body[data-theme-preset] #interior-kpi-section .kpi-list-content .kpi-alert-label {
    color: var(--text-sub) !important;
}

html[data-theme-preset] #interior-kpi-section .kpi-list-content .kpi-alert-val,
body[data-theme-preset] #interior-kpi-section .kpi-list-content .kpi-alert-val {
    color: var(--text-main) !important;
}

/* 툴바 & 검색 카드 */
html[data-theme-preset] .interior-toolbar-card,
body[data-theme-preset] .interior-toolbar-card {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .interior-toolbar-card .interior-search-box,
body[data-theme-preset] .interior-toolbar-card .interior-search-box {
    background-color: var(--bg-sidebar, var(--bg-sub)) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .interior-toolbar-card .interior-search-box input,
body[data-theme-preset] .interior-toolbar-card .interior-search-box input {
    color: var(--text-main) !important;
    background: transparent !important;
}

html[data-theme-preset] .interior-toolbar-card .interior-select,
body[data-theme-preset] .interior-toolbar-card .interior-select {
    background-color: var(--bg-sidebar, var(--bg-sub)) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

/* 메인 테이블 카드 */
html[data-theme-preset] .interior-table-card,
body[data-theme-preset] .interior-table-card {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .interior-table-card .interior-main-title,
body[data-theme-preset] .interior-table-card .interior-main-title {
    color: var(--text-main) !important;
}

html[data-theme-preset] .interior-table-card .interior-table-container,
body[data-theme-preset] .interior-table-card .interior-table-container {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .interior-table-card .interior-data-table th,
html[data-theme-preset] .interior-data-table th,
body[data-theme-preset] .interior-table-card .interior-data-table th,
body[data-theme-preset] .interior-data-table th {
    background-color: var(--bg-sidebar, var(--bg-card-alt)) !important;
    color: var(--text-sub) !important;
    border-color: var(--border-base) !important;
    font-weight: 700 !important;
}

html[data-theme-preset] .interior-table-card .interior-data-table td,
html[data-theme-preset] .interior-data-table td,
body[data-theme-preset] .interior-table-card .interior-data-table td,
body[data-theme-preset] .interior-data-table td {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .interior-table-card .interior-data-table tr:hover td,
body[data-theme-preset] .interior-table-card .interior-data-table tr:hover td {
    background-color: var(--bg-sidebar-hover, var(--bg-card-alt)) !important;
}

/* 상세 워크스페이스 (#interior-detail-section) */
html[data-theme-preset] #interior-detail-section.interior-slide-workspace,
body[data-theme-preset] #interior-detail-section.interior-slide-workspace {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #interior-detail-section .int-ws-header,
body[data-theme-preset] #interior-detail-section .int-ws-header {
    background-color: var(--bg-sidebar, var(--bg-card-alt)) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] #interior-detail-section .int-ws-tag,
body[data-theme-preset] #interior-detail-section .int-ws-tag {
    color: var(--text-main) !important;
}

html[data-theme-preset] #interior-detail-section #int-ws-project-title-bracket,
body[data-theme-preset] #interior-detail-section #int-ws-project-title-bracket {
    color: var(--text-muted) !important;
}

html[data-theme-preset] #interior-detail-section #ws-status-selector,
body[data-theme-preset] #interior-detail-section #ws-status-selector {
    background-color: var(--bg-card-alt, var(--bg-card)) !important;
    color: var(--text-main) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #interior-detail-section .btn-close-ws-modern,
body[data-theme-preset] #interior-detail-section .btn-close-ws-modern {
    background-color: var(--bg-card-alt, var(--bg-card)) !important;
    color: var(--text-sub) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #interior-detail-section .int-top-tab-bar,
body[data-theme-preset] #interior-detail-section .int-top-tab-bar {
    background-color: var(--bg-sidebar, var(--bg-card-alt)) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] #interior-detail-section .int-top-tab-list li,
body[data-theme-preset] #interior-detail-section .int-top-tab-list li {
    color: var(--text-sub) !important;
    background: transparent !important;
    border-color: transparent !important;
}

html[data-theme-preset] #interior-detail-section .int-top-tab-list li:hover,
body[data-theme-preset] #interior-detail-section .int-top-tab-list li:hover {
    color: var(--text-main) !important;
    background: var(--bg-sidebar-hover, var(--bg-card-alt)) !important;
}

html[data-theme-preset] #interior-detail-section .int-top-tab-list li.active,
body[data-theme-preset] #interior-detail-section .int-top-tab-list li.active {
    background-color: var(--bg-card) !important;
    color: var(--color-primary) !important;
    border-color: var(--border-base) !important;
    border-top: 3px solid var(--color-primary) !important;
}

html[data-theme-preset] #interior-detail-section .btn-focus-mode-toggle,
body[data-theme-preset] #interior-detail-section .btn-focus-mode-toggle {
    background-color: var(--bg-card-alt, var(--bg-card)) !important;
    color: var(--text-sub) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #interior-detail-section .workspace-grid-2-col,
body[data-theme-preset] #interior-detail-section .workspace-grid-2-col {
    background-color: var(--bg-card) !important;
}

html[data-theme-preset] #interior-detail-section .col-list,
html[data-theme-preset] #interior-detail-section #int-col-list,
body[data-theme-preset] #interior-detail-section .col-list,
body[data-theme-preset] #interior-detail-section #int-col-list {
    background-color: var(--bg-sidebar, var(--bg-card-alt)) !important;
    border-right: 1px solid var(--border-base) !important;
}

html[data-theme-preset] #interior-detail-section .int-list-header,
body[data-theme-preset] #interior-detail-section .int-list-header {
    background-color: var(--bg-sidebar, var(--bg-card-alt)) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] #interior-detail-section #int-list-title,
body[data-theme-preset] #interior-detail-section #int-list-title {
    color: var(--text-main) !important;
}

html[data-theme-preset] #interior-detail-section .int-sub-list li,
body[data-theme-preset] #interior-detail-section .int-sub-list li {
    color: var(--text-sub) !important;
}

html[data-theme-preset] #interior-detail-section .int-sub-list li:hover,
body[data-theme-preset] #interior-detail-section .int-sub-list li:hover {
    background-color: var(--bg-sidebar-hover, var(--bg-card-alt)) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #interior-detail-section .int-sub-list li.active,
body[data-theme-preset] #interior-detail-section .int-sub-list li.active {
    background-color: var(--color-primary-light, rgba(16, 185, 129, 0.16)) !important;
    color: var(--color-primary) !important;
}

/* 내부 상세 카드들 */
html[data-theme-preset] #interior-detail-section .int-summary-info-card,
html[data-theme-preset] #interior-detail-section .int-summary-map-card,
html[data-theme-preset] #interior-detail-section .int-content-card,
html[data-theme-preset] #interior-detail-section .spec-kpi-card,
body[data-theme-preset] #interior-detail-section .int-summary-info-card,
body[data-theme-preset] #interior-detail-section .int-summary-map-card,
body[data-theme-preset] #interior-detail-section .int-content-card,
body[data-theme-preset] #interior-detail-section .spec-kpi-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] #interior-detail-section .int-info-title,
html[data-theme-preset] #interior-detail-section .int-pane-header h3,
body[data-theme-preset] #interior-detail-section .int-info-title,
body[data-theme-preset] #interior-detail-section .int-pane-header h3 {
    color: var(--text-main) !important;
}

html[data-theme-preset] #interior-detail-section .int-detail-table th,
body[data-theme-preset] #interior-detail-section .int-detail-table th {
    background-color: var(--bg-sidebar, var(--bg-card-alt)) !important;
    color: var(--text-sub) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #interior-detail-section .int-detail-table td,
body[data-theme-preset] #interior-detail-section .int-detail-table td {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-base) !important;
}



/* ==========================================================================
   🏢 [전사 테마 프리셋 완전 일원화] 스마트 웹메일 & 환경설정 센터 (WebMail System)
   ========================================================================== */

/* 1. 웹메일 3단 분할 레이아웃 & 컨테이너 */
html[data-theme-preset] .mail-main-layout,
html[data-theme-preset] .mail-app-container,
html[data-theme-preset] #mail-system-section,
body[data-theme-preset] .mail-main-layout,
body[data-theme-preset] .mail-app-container,
body[data-theme-preset] #mail-system-section {
    background-color: var(--bg-body) !important;
    color: var(--text-main) !important;
}

/* 2. 좌측 1단: 메일 사이드바 & 폴더 트리 */
html[data-theme-preset] .mail-sidebar,
body[data-theme-preset] .mail-sidebar {
    background-color: var(--bg-sidebar) !important;
    border-right: 1px solid var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .mail-sidebar .folder-group-title-flex,
body[data-theme-preset] .mail-sidebar .folder-group-title-flex {
    color: var(--text-muted) !important;
}

html[data-theme-preset] .mail-sidebar .folder-item,
body[data-theme-preset] .mail-sidebar .folder-item {
    color: var(--text-sub) !important;
}

html[data-theme-preset] .mail-sidebar .folder-item:hover,
body[data-theme-preset] .mail-sidebar .folder-item:hover {
    background-color: var(--bg-sidebar-hover) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .mail-sidebar .folder-item.active,
body[data-theme-preset] .mail-sidebar .folder-item.active {
    background-color: var(--bg-card) !important;
    color: var(--color-primary) !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12) !important;
}

html[data-theme-preset] .sidebar-quota-box,
body[data-theme-preset] .sidebar-quota-box {
    border-top: 1px solid var(--border-base) !important;
    background-color: transparent !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] .sidebar-quota-box .btn-mail-settings-launch,
body[data-theme-preset] .sidebar-quota-box .btn-mail-settings-launch {
    background-color: var(--bg-card-alt) !important;
    border: 1px solid var(--border-base) !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] .sidebar-quota-box .btn-mail-settings-launch:hover,
body[data-theme-preset] .sidebar-quota-box .btn-mail-settings-launch:hover {
    background-color: var(--bg-sidebar-hover) !important;
    color: var(--text-main) !important;
}

/* 3. 중앙 2단: 메일 목록 패널 */
html[data-theme-preset] .mail-list-panel,
html[data-theme-preset] .mail-list-column,
body[data-theme-preset] .mail-list-panel,
body[data-theme-preset] .mail-list-column {
    background-color: var(--bg-card-alt, var(--bg-body)) !important;
    border-right: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .mail-list-header,
body[data-theme-preset] .mail-list-header {
    background-color: var(--bg-card-alt, var(--bg-sidebar)) !important;
    border-bottom: 1px solid var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .mail-list-toolbar,
body[data-theme-preset] .mail-list-toolbar {
    background-color: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .mail-table-header,
html[data-theme-preset] .mail-list-col-headers,
body[data-theme-preset] .mail-table-header,
body[data-theme-preset] .mail-list-col-headers {
    background-color: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-base) !important;
    color: var(--text-muted) !important;
}

html[data-theme-preset] .mail-item-row,
body[data-theme-preset] .mail-item-row {
    background-color: var(--bg-card-alt, var(--bg-card)) !important;
    border-bottom: 1px solid var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .mail-item-row:hover,
body[data-theme-preset] .mail-item-row:hover {
    background-color: var(--bg-sidebar-hover) !important;
}

html[data-theme-preset] .mail-item-row.selected,
html[data-theme-preset] .mail-item-row.active,
body[data-theme-preset] .mail-item-row.selected,
body[data-theme-preset] .mail-item-row.active {
    background-color: var(--bg-card) !important;
    border-left: 3px solid var(--color-primary) !important;
}

/* 4. 우측 3단: 메일 미리보기 상세 뷰어 */
html[data-theme-preset] .mail-detail-panel,
html[data-theme-preset] .mail-preview-pane,
body[data-theme-preset] .mail-detail-panel,
body[data-theme-preset] .mail-preview-pane {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .mail-detail-header,
html[data-theme-preset] .mail-preview-header,
body[data-theme-preset] .mail-detail-header,
body[data-theme-preset] .mail-preview-header {
    background-color: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .action-btn-group,
body[data-theme-preset] .action-btn-group {
    background-color: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .preview-btn,
body[data-theme-preset] .preview-btn {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .preview-btn:hover,
body[data-theme-preset] .preview-btn:hover {
    background-color: var(--bg-sidebar-hover) !important;
}

/* 5. 🏢 스마트 웹메일 환경설정 센터 독립 창 */
html[data-theme-preset] .settings-standalone-container,
body[data-theme-preset] .settings-standalone-container {
    background-color: var(--bg-body) !important;
}

html[data-theme-preset] .settings-header,
body[data-theme-preset] .settings-header {
    background-color: var(--bg-sidebar) !important;
    border-bottom: 1.5px solid var(--border-base) !important;
}

html[data-theme-preset] .settings-header-title,
body[data-theme-preset] .settings-header-title {
    color: var(--text-main) !important;
}

html[data-theme-preset] .settings-sidebar-nav,
body[data-theme-preset] .settings-sidebar-nav {
    background-color: var(--bg-sidebar) !important;
    border-right: 1.5px solid var(--border-base) !important;
}

html[data-theme-preset] .settings-nav-item,
body[data-theme-preset] .settings-nav-item {
    color: var(--text-sub) !important;
}

html[data-theme-preset] .settings-nav-item:hover,
body[data-theme-preset] .settings-nav-item:hover {
    background-color: var(--bg-sidebar-hover) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .settings-nav-item.active,
body[data-theme-preset] .settings-nav-item.active {
    background-color: var(--bg-card) !important;
    color: var(--color-primary) !important;
    border-left: 3px solid var(--color-primary) !important;
    font-weight: 700 !important;
}

html[data-theme-preset] .settings-content-pane,
body[data-theme-preset] .settings-content-pane {
    background-color: var(--bg-card) !important;
}

html[data-theme-preset] .sharp-card-block,
body[data-theme-preset] .sharp-card-block {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .folder-usage-card,
body[data-theme-preset] .folder-usage-card {
    background-color: var(--bg-card-alt) !important;
    border: 1px solid var(--border-base) !important;
}



/* ==========================================================================
   🏢 [전사 테마 프리셋 완전 일원화] 상표 현황 관리 (Trademark Registrations)
   ========================================================================== */
html[data-theme-preset] .trademark-summary-grid .info-card,
html[data-theme-preset] .tm-kpi-card,
html[data-theme-preset] .tm-detail-main-widget,
html[data-theme-preset] #trademark-detail-section,
html[data-theme-preset] .tm-basic-timeline-card,
html[data-theme-preset] .tm-meta-top-strip,
html[data-theme-preset] .tm-timeline-step,
html[data-theme-preset] .tm-agent-card,
html[data-theme-preset] .tm-action-section,
html[data-theme-preset] .tm-tab-content-card,
html[data-theme-preset] .tm-drop-zone-wrapper,
body[data-theme-preset] .trademark-summary-grid .info-card,
body[data-theme-preset] .tm-kpi-card,
body[data-theme-preset] .tm-detail-main-widget,
body[data-theme-preset] #trademark-detail-section,
body[data-theme-preset] .tm-basic-timeline-card,
body[data-theme-preset] .tm-meta-top-strip,
body[data-theme-preset] .tm-timeline-step,
body[data-theme-preset] .tm-agent-card,
body[data-theme-preset] .tm-action-section,
body[data-theme-preset] .tm-tab-content-card,
body[data-theme-preset] .tm-drop-zone-wrapper {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .tm-table-card,
html[data-theme-preset] #trademark-reg-table,
body[data-theme-preset] .tm-table-card,
body[data-theme-preset] #trademark-reg-table {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #trademark-reg-table th,
body[data-theme-preset] #trademark-reg-table th {
    background-color: var(--bg-sidebar) !important;
    color: var(--text-sub) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #trademark-reg-table td,
body[data-theme-preset] #trademark-reg-table td {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #trademark-reg-table tbody tr:hover td,
body[data-theme-preset] #trademark-reg-table tbody tr:hover td {
    background-color: var(--bg-sidebar-hover) !important;
}

/* 닫기 버튼 전사 표준 규격 일치화 */
.btn-close-ws-modern {
    height: 28px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--text-sub, #475569) !important;
    background-color: var(--bg-card-alt, #f1f5f9) !important;
    border: 1px solid var(--border-base, #cbd5e1) !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    line-height: 1 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.15s ease !important;
}

.btn-close-ws-modern i {
    font-size: 11px !important;
    color: var(--text-muted, #64748b) !important;
    transition: color 0.15s ease !important;
}

.btn-close-ws-modern:hover {
    background-color: #fee2e2 !important;
    border-color: #fecaca !important;
    color: #dc2626 !important;
}

.btn-close-ws-modern:hover i {
    color: #dc2626 !important;
}



/* ==========================================================================
   🏢 [전사 테마 프리셋 완전 일원화] 소프트웨어 라이선스 & 상표 관리 세부 요소
   ========================================================================== */

/* 버튼 눈부심/채도 완화 (비비드 시안/에메랄드 -> 중후하고 세련된 테마 톤) */
html[data-theme-preset] #add-trademark-btn,
html[data-theme-preset] .btn-primary,
html[data-theme-preset] .btn-blue,
body[data-theme-preset] #add-trademark-btn,
body[data-theme-preset] .btn-primary,
body[data-theme-preset] .btn-blue {
    background-color: var(--btn-primary-bg, var(--color-primary)) !important;
    border-color: var(--btn-primary-bg, var(--color-primary)) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

html[data-theme-preset] .btn-primary:hover,
html[data-theme-preset] .btn-blue:hover,
body[data-theme-preset] .btn-primary:hover,
body[data-theme-preset] .btn-blue:hover {
    background-color: var(--btn-primary-hover, var(--color-primary-hover, var(--btn-primary-bg, var(--color-primary)))) !important;
    filter: brightness(1.1);
}

/* 상표 진행비용 테이블 & 헤더 & 드롭존 */
html[data-theme-preset] .tm-cost-table,
html[data-theme-preset] #tm-cost-table,
body[data-theme-preset] .tm-cost-table,
body[data-theme-preset] #tm-cost-table {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .tm-cost-table th,
html[data-theme-preset] #tm-cost-table th,
body[data-theme-preset] .tm-cost-table th,
body[data-theme-preset] #tm-cost-table th {
    background-color: var(--bg-sidebar) !important;
    color: var(--text-sub) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .tm-cost-table td,
html[data-theme-preset] #tm-cost-table td,
body[data-theme-preset] .tm-cost-table td,
body[data-theme-preset] #tm-cost-table td {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .tm-drop-zone,
html[data-theme-preset] .tm-file-dropzone,
html[data-theme-preset] .drop-target,
body[data-theme-preset] .tm-drop-zone,
body[data-theme-preset] .tm-file-dropzone,
body[data-theme-preset] .drop-target {
    background-color: var(--bg-card-alt) !important;
    border: 1.5px dashed var(--border-base) !important;
    color: var(--text-muted) !important;
}

/* 소프트웨어 라이선스 전 영역 테마 프리셋 연동 */
html[data-theme-preset] .sw-kpi-summary-container,
html[data-theme-preset] .sw-kpi-card,
html[data-theme-preset] .sw-card,
html[data-theme-preset] .sw-table-card,
html[data-theme-preset] #sw-detail-section,
html[data-theme-preset] .sw-detail-main-widget,
html[data-theme-preset] .sw-detail-top-header,
html[data-theme-preset] .sw-top-tab-bar,
html[data-theme-preset] .sw-tab-pane,
html[data-theme-preset] .sw-table-container,
body[data-theme-preset] .sw-kpi-summary-container,
body[data-theme-preset] .sw-kpi-card,
body[data-theme-preset] .sw-card,
body[data-theme-preset] .sw-table-card,
body[data-theme-preset] #sw-detail-section,
body[data-theme-preset] .sw-detail-main-widget,
body[data-theme-preset] .sw-detail-top-header,
body[data-theme-preset] .sw-top-tab-bar,
body[data-theme-preset] .sw-tab-pane,
body[data-theme-preset] .sw-table-container {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .sw-top-tab-bar,
html[data-theme-preset] .sw-detail-top-header,
body[data-theme-preset] .sw-top-tab-bar,
body[data-theme-preset] .sw-detail-top-header {
    background-color: var(--bg-sidebar) !important;
}

html[data-theme-preset] #sw-main-table th,
html[data-theme-preset] .sw-data-table th,
body[data-theme-preset] #sw-main-table th,
body[data-theme-preset] .sw-data-table th {
    background-color: var(--bg-sidebar) !important;
    color: var(--text-sub) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #sw-main-table td,
html[data-theme-preset] .sw-data-table td,
body[data-theme-preset] #sw-main-table td,
body[data-theme-preset] .sw-data-table td {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #sw-main-table tbody tr:hover td,
html[data-theme-preset] .sw-data-table tbody tr:hover td,
body[data-theme-preset] #sw-main-table tbody tr:hover td,
body[data-theme-preset] .sw-data-table tbody tr:hover td {
    background-color: var(--bg-sidebar-hover) !important;
}



/* ==========================================================================
   🏢 [전사 테마 프리셋 완전 일원화] 렌탈 장비 관리 (Rental Management)
   ========================================================================== */

/* 1. 상단 3대 KPI 카드 및 메인 목록 테이블 */
html[data-theme-preset] .rental-summary-grid .rental-kpi-card,
html[data-theme-preset] .rental-kpi-card,
html[data-theme-preset] .rental-card,
html[data-theme-preset] .rental-detail-container,
html[data-theme-preset] #rental-detail-section,
body[data-theme-preset] .rental-summary-grid .rental-kpi-card,
body[data-theme-preset] .rental-kpi-card,
body[data-theme-preset] .rental-card,
body[data-theme-preset] .rental-detail-container,
body[data-theme-preset] #rental-detail-section {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #rental-main-table,
html[data-theme-preset] .rental-table,
body[data-theme-preset] #rental-main-table,
body[data-theme-preset] .rental-table {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #rental-main-table th,
html[data-theme-preset] .rental-table th,
body[data-theme-preset] #rental-main-table th,
body[data-theme-preset] .rental-table th {
    background-color: var(--bg-sidebar) !important;
    color: var(--text-sub) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #rental-main-table td,
html[data-theme-preset] .rental-table td,
body[data-theme-preset] #rental-main-table td,
body[data-theme-preset] .rental-table td {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #rental-main-table tbody tr:hover td,
body[data-theme-preset] #rental-main-table tbody tr:hover td {
    background-color: var(--bg-sidebar-hover) !important;
}

/* 2. 렌탈 상세 마스터 프로필 워크스페이스 & 3단 탭 네비게이션 */
html[data-theme-preset] .rental-inspector-top-header,
body[data-theme-preset] .rental-inspector-top-header {
    background-color: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .rental-inspector-top-header h3,
body[data-theme-preset] .rental-inspector-top-header h3 {
    color: var(--text-main) !important;
}

html[data-theme-preset] .rental-detail-nav-tabs,
body[data-theme-preset] .rental-detail-nav-tabs {
    background-color: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .rental-detail-nav-tabs .tab-link,
body[data-theme-preset] .rental-detail-nav-tabs .tab-link {
    background: transparent !important;
    color: var(--text-sub) !important;
    border-color: transparent !important;
}

html[data-theme-preset] .rental-detail-nav-tabs .tab-link:hover,
body[data-theme-preset] .rental-detail-nav-tabs .tab-link:hover {
    background-color: var(--bg-sidebar-hover) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .rental-detail-nav-tabs .tab-link.active,
body[data-theme-preset] .rental-detail-nav-tabs .tab-link.active {
    background-color: var(--bg-card) !important;
    color: var(--color-primary) !important;
    border-color: var(--border-base) !important;
    border-top: 3px solid var(--color-primary) !important;
    font-weight: 700 !important;
}

/* 3. 탭 내부 패널, 서브 카드, 표, 이력 대장 */
html[data-theme-preset] .rental-tab-pane,
html[data-theme-preset] .rental-profile-card,
html[data-theme-preset] .rental-sub-card,
html[data-theme-preset] .rental-history-table-card,
body[data-theme-preset] .rental-tab-pane,
body[data-theme-preset] .rental-profile-card,
body[data-theme-preset] .rental-sub-card,
body[data-theme-preset] .rental-history-table-card {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .rental-history-table th,
html[data-theme-preset] #service-log-table th,
html[data-theme-preset] #rental-history-table th,
body[data-theme-preset] .rental-history-table th,
body[data-theme-preset] #service-log-table th,
body[data-theme-preset] #rental-history-table th {
    background-color: var(--bg-sidebar) !important;
    color: var(--text-sub) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .rental-history-table td,
html[data-theme-preset] #service-log-table td,
html[data-theme-preset] #rental-history-table td,
body[data-theme-preset] .rental-history-table td,
body[data-theme-preset] #service-log-table td,
body[data-theme-preset] #rental-history-table td {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-base) !important;
}

/* 4. 🏢 렌탈 계약 조건 변경 독립 창 (rental_contract_change_window) */
html[data-theme-preset] .sharp-win-layout,
body[data-theme-preset] .sharp-win-layout {
    background-color: var(--bg-body) !important;
}

html[data-theme-preset] .sharp-win-sidebar,
body[data-theme-preset] .sharp-win-sidebar {
    background-color: var(--bg-sidebar) !important;
    border-right-color: var(--border-base) !important;
}

html[data-theme-preset] .sharp-win-content,
html[data-theme-preset] .sharp-win-scroll-area,
body[data-theme-preset] .sharp-win-content,
body[data-theme-preset] .sharp-win-scroll-area {
    background-color: var(--bg-body) !important;
}

html[data-theme-preset] .sharp-section-card,
body[data-theme-preset] .sharp-section-card {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .sharp-section-header,
body[data-theme-preset] .sharp-section-header {
    background-color: var(--bg-sidebar) !important;
    border-bottom-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .change-info-summary-box,
body[data-theme-preset] .change-info-summary-box {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .summary-item-card,
body[data-theme-preset] .summary-item-card {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .summary-item-value,
body[data-theme-preset] .summary-item-value {
    color: var(--text-main) !important;
}



/* ==========================================================================
   🏢 [전사 테마 프리셋 완전 일원화] 보험 관리 (Insurance Management)
   ========================================================================== */

/* 1. 상단 3대 KPI 카드 및 메인 보험 목록 테이블 */
html[data-theme-preset] .ins-kpi-summary-container,
html[data-theme-preset] .ins-kpi-card,
html[data-theme-preset] .insurance-card,
html[data-theme-preset] .insurance-detail-container,
html[data-theme-preset] #insurance-detail-view,
body[data-theme-preset] .ins-kpi-summary-container,
body[data-theme-preset] .ins-kpi-card,
body[data-theme-preset] .insurance-card,
body[data-theme-preset] .insurance-detail-container,
body[data-theme-preset] #insurance-detail-view {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #insurance-main-table,
html[data-theme-preset] .insurance-table,
body[data-theme-preset] #insurance-main-table,
body[data-theme-preset] .insurance-table {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #insurance-main-table th,
html[data-theme-preset] .insurance-table th,
body[data-theme-preset] #insurance-main-table th,
body[data-theme-preset] .insurance-table th {
    background-color: var(--bg-sidebar) !important;
    color: var(--text-sub) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #insurance-main-table td,
html[data-theme-preset] .insurance-table td,
body[data-theme-preset] #insurance-main-table td,
body[data-theme-preset] .insurance-table td {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #insurance-main-table tbody tr:hover td,
body[data-theme-preset] #insurance-main-table tbody tr:hover td {
    background-color: var(--bg-sidebar-hover) !important;
}

/* 2. 보험 상세 마스터 프로필 워크스페이스 & 상단 탭 네비게이션 */
html[data-theme-preset] .insurance-inspector-top-header,
body[data-theme-preset] .insurance-inspector-top-header {
    background-color: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .insurance-inspector-top-header h3,
body[data-theme-preset] .insurance-inspector-top-header h3 {
    color: var(--text-main) !important;
}

html[data-theme-preset] #insurance-detail-view .ins-ws-tab-btn,
body[data-theme-preset] #insurance-detail-view .ins-ws-tab-btn {
    background: transparent !important;
    color: var(--text-sub) !important;
    border-color: transparent !important;
}

html[data-theme-preset] #insurance-detail-view .ins-ws-tab-btn:hover,
body[data-theme-preset] #insurance-detail-view .ins-ws-tab-btn:hover {
    background-color: var(--bg-sidebar-hover) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #insurance-detail-view .ins-ws-tab-btn.active,
body[data-theme-preset] #insurance-detail-view .ins-ws-tab-btn.active {
    background-color: var(--bg-card) !important;
    color: var(--color-primary) !important;
    border-color: var(--border-base) !important;
    border-top: 3px solid var(--color-primary) !important;
    font-weight: 700 !important;
}

/* 3. 탭 내부 패널, 그리드, 서브 카드, 보장 상세 명세 표 */
html[data-theme-preset] #insurance-detail-view .ins-card-box,
html[data-theme-preset] #insurance-detail-view .ins-card-section,
html[data-theme-preset] #insurance-detail-view .ins-split-left-panel,
html[data-theme-preset] #insurance-detail-view .ins-split-right-panel,
html[data-theme-preset] #insurance-detail-view .ins-memo-card-box,
html[data-theme-preset] #insurance-detail-view .ins-coverage-item,
body[data-theme-preset] #insurance-detail-view .ins-card-box,
body[data-theme-preset] #insurance-detail-view .ins-card-section,
body[data-theme-preset] #insurance-detail-view .ins-split-left-panel,
body[data-theme-preset] #insurance-detail-view .ins-split-right-panel,
body[data-theme-preset] #insurance-detail-view .ins-memo-card-box,
body[data-theme-preset] #insurance-detail-view .ins-coverage-item {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #insurance-detail-view .ins-card-header,
html[data-theme-preset] #insurance-detail-view .ins-panel-sub-header,
body[data-theme-preset] #insurance-detail-view .ins-card-header,
body[data-theme-preset] #insurance-detail-view .ins-panel-sub-header {
    background-color: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #insurance-detail-view .info-table-simple th,
html[data-theme-preset] #insurance-detail-view .ins-spec-bookshelf th,
body[data-theme-preset] #insurance-detail-view .info-table-simple th,
body[data-theme-preset] #insurance-detail-view .ins-spec-bookshelf th {
    background-color: var(--bg-sidebar) !important;
    color: var(--text-sub) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #insurance-detail-view .info-table-simple td,
html[data-theme-preset] #insurance-detail-view .ins-spec-bookshelf td,
body[data-theme-preset] #insurance-detail-view .info-table-simple td,
body[data-theme-preset] #insurance-detail-view .ins-spec-bookshelf td {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #insurance-detail-view .spec-shelf-item,
body[data-theme-preset] #insurance-detail-view .spec-shelf-item {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #insurance-detail-view .spec-lbl,
body[data-theme-preset] #insurance-detail-view .spec-lbl {
    color: var(--text-muted) !important;
}

html[data-theme-preset] #insurance-detail-view .spec-val,
body[data-theme-preset] #insurance-detail-view .spec-val {
    color: var(--text-main) !important;
}

/* 4. 캘린더 날짜 선택 아이콘 테마 모드 대응 */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(0.8) !important;
    opacity: 0.85;
}

html:not([data-theme="dark"]):not(.dark-mode) input[type="date"]::-webkit-calendar-picker-indicator {
    filter: none !important;
    opacity: 0.7;
}



/* ==========================================================================
   🏢 [전사 테마 프리셋 완전 일원화] 차량 관제 (Vehicle Management)
   ========================================================================== */

/* 1. 상단 모빌리티 포트폴리오, 운영비용, 리스크 3대 KPI 카드 */
html[data-theme-preset] .vh-kpi-grid,
html[data-theme-preset] .vh-kpi-card,
html[data-theme-preset] .vehicle-card,
html[data-theme-preset] .vehicle-table-card,
html[data-theme-preset] #vehicle-detail-section,
html[data-theme-preset] .detail-section-container,
body[data-theme-preset] .vh-kpi-grid,
body[data-theme-preset] .vh-kpi-card,
body[data-theme-preset] .vehicle-card,
body[data-theme-preset] .vehicle-table-card,
body[data-theme-preset] #vehicle-detail-section,
body[data-theme-preset] .detail-section-container {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

/* 2. 메인 차량 목록 테이블 */
html[data-theme-preset] #vehicle-table,
html[data-theme-preset] .vehicle-data-table,
body[data-theme-preset] #vehicle-table,
body[data-theme-preset] .vehicle-data-table {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #vehicle-table th,
html[data-theme-preset] .vehicle-data-table th,
body[data-theme-preset] #vehicle-table th,
body[data-theme-preset] .vehicle-data-table th {
    background-color: var(--bg-sidebar) !important;
    color: var(--text-sub) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #vehicle-table td,
html[data-theme-preset] .vehicle-data-table td,
body[data-theme-preset] #vehicle-table td,
body[data-theme-preset] .vehicle-data-table td {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #vehicle-table tbody tr:hover td,
body[data-theme-preset] #vehicle-table tbody tr:hover td {
    background-color: var(--bg-sidebar-hover) !important;
}

/* 3. 차량 상세 정보 워크스페이스 & 상단 7대 가로 탭 바 */
html[data-theme-preset] #vehicle-detail-section .detail-toolbar,
body[data-theme-preset] #vehicle-detail-section .detail-toolbar {
    background-color: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] #vehicle-detail-section .detail-title-text,
body[data-theme-preset] #vehicle-detail-section .detail-title-text {
    color: var(--text-main) !important;
}

html[data-theme-preset] #vehicle-detail-section .nav-tabs,
html[data-theme-preset] #vehicle-detail-section .vh-detail-tabs,
body[data-theme-preset] #vehicle-detail-section .nav-tabs,
body[data-theme-preset] #vehicle-detail-section .vh-detail-tabs {
    background-color: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] #vehicle-detail-section .nav-tabs .nav-link,
html[data-theme-preset] #vehicle-detail-section .vh-detail-tabs button,
body[data-theme-preset] #vehicle-detail-section .nav-tabs .nav-link,
body[data-theme-preset] #vehicle-detail-section .vh-detail-tabs button {
    background: transparent !important;
    color: var(--text-sub) !important;
    border-color: transparent !important;
}

html[data-theme-preset] #vehicle-detail-section .nav-tabs .nav-link:hover,
html[data-theme-preset] #vehicle-detail-section .vh-detail-tabs button:hover,
body[data-theme-preset] #vehicle-detail-section .nav-tabs .nav-link:hover,
body[data-theme-preset] #vehicle-detail-section .vh-detail-tabs button:hover {
    background-color: var(--bg-sidebar-hover) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #vehicle-detail-section .nav-tabs .nav-link.active,
html[data-theme-preset] #vehicle-detail-section .vh-detail-tabs button.active,
body[data-theme-preset] #vehicle-detail-section .nav-tabs .nav-link.active,
body[data-theme-preset] #vehicle-detail-section .vh-detail-tabs button.active {
    background-color: var(--bg-card) !important;
    color: var(--color-primary) !important;
    border-color: var(--border-base) !important;
    border-top: 3px solid var(--color-primary) !important;
    font-weight: 700 !important;
}

/* 4. 7대 탭 내부 서브 카드, 표, 메모, 증빙 서류 뷰어 */
html[data-theme-preset] #vehicle-detail-section .tab-pane,
html[data-theme-preset] #vehicle-detail-section .vh-tab-pane,
html[data-theme-preset] #vehicle-detail-section .detail-card,
html[data-theme-preset] #vehicle-detail-section .detail-panel,
html[data-theme-preset] #vehicle-detail-section .vh-sub-card,
html[data-theme-preset] #vehicle-detail-section .memo-panel,
body[data-theme-preset] #vehicle-detail-section .tab-pane,
body[data-theme-preset] #vehicle-detail-section .vh-tab-pane,
body[data-theme-preset] #vehicle-detail-section .detail-card,
body[data-theme-preset] #vehicle-detail-section .detail-panel,
body[data-theme-preset] #vehicle-detail-section .vh-sub-card,
body[data-theme-preset] #vehicle-detail-section .memo-panel {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #vehicle-detail-section .detail-card-header,
html[data-theme-preset] #vehicle-detail-section .panel-header,
body[data-theme-preset] #vehicle-detail-section .detail-card-header,
body[data-theme-preset] #vehicle-detail-section .panel-header {
    background-color: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #vehicle-detail-section .table th,
html[data-theme-preset] #vehicle-detail-section table th,
body[data-theme-preset] #vehicle-detail-section .table th,
body[data-theme-preset] #vehicle-detail-section table th {
    background-color: var(--bg-sidebar) !important;
    color: var(--text-sub) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #vehicle-detail-section .table td,
html[data-theme-preset] #vehicle-detail-section table td,
body[data-theme-preset] #vehicle-detail-section .table td,
body[data-theme-preset] #vehicle-detail-section table td {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-base) !important;
}

/* ==========================================================================
   🚗 [전사 테마 프리셋 완전 일원화] 총무: 스마트 주차 통합 관제 시스템
   ========================================================================== */

/* 1. 상단 ZONE 1: 전사 주차 가동 현황 KPI 카드 & 특이사항/공지 카드 */
html[data-theme-preset] .pk-kpi-status-card,
html[data-theme-preset] .pk-notice-memo-card,
body[data-theme-preset] .pk-kpi-status-card,
body[data-theme-preset] .pk-notice-memo-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .pk-card-title,
html[data-theme-preset] .pk-kpi-main-label,
body[data-theme-preset] .pk-card-title,
body[data-theme-preset] .pk-kpi-main-label {
    color: var(--text-main) !important;
}

html[data-theme-preset] .pk-sub-caption,
body[data-theme-preset] .pk-sub-caption {
    color: var(--text-muted) !important;
}

html[data-theme-preset] .pk-year-text,
body[data-theme-preset] .pk-year-text {
    color: var(--text-main) !important;
}

html[data-theme-preset] .pk-gauge-summary-badge,
body[data-theme-preset] .pk-gauge-summary-badge {
    background: rgba(37, 99, 235, 0.15) !important;
    border-color: rgba(96, 165, 250, 0.3) !important;
    color: #93c5fd !important;
}

html[data-theme-preset] .pk-gauge-fraction-text,
body[data-theme-preset] .pk-gauge-fraction-text {
    color: var(--text-sub) !important;
}

html[data-theme-preset] .pk-progress-track,
body[data-theme-preset] .pk-progress-track {
    background-color: var(--bg-sidebar) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .pk-kpi-box,
body[data-theme-preset] .pk-kpi-box {
    background-color: var(--bg-sidebar) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .pk-kpi-box-lbl,
html[data-theme-preset] .pk-kpi-box-sub,
body[data-theme-preset] .pk-kpi-box-lbl,
body[data-theme-preset] .pk-kpi-box-sub {
    color: var(--text-muted) !important;
}

html[data-theme-preset] .pk-kpi-box-val,
body[data-theme-preset] .pk-kpi-box-val {
    color: var(--text-main) !important;
}

/* 2. ZONE 2: 통합 검색 & 전사 액션 툴바 */
html[data-theme-preset] .pk-zone-2-search-card,
body[data-theme-preset] .pk-zone-2-search-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .pk-search-input-wrap,
body[data-theme-preset] .pk-search-input-wrap {
    background-color: var(--bg-sidebar) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] #pk-search-input,
body[data-theme-preset] #pk-search-input {
    background-color: transparent !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .pk-search-icon,
body[data-theme-preset] .pk-search-icon {
    color: var(--text-muted) !important;
}

/* 3. ZONE 3: 주차 관리 건물 현황 & 요일별 실시간 잔여석 워크스페이스 */
html[data-theme-preset] .pk-matrix-panel,
body[data-theme-preset] .pk-matrix-panel {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .pk-building-legend-group,
body[data-theme-preset] .pk-building-legend-group {
    color: var(--text-muted) !important;
}

html[data-theme-preset] .pk-building-card-item,
body[data-theme-preset] .pk-building-card-item {
    background-color: var(--bg-sidebar) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .pk-building-card-item:hover,
body[data-theme-preset] .pk-building-card-item:hover {
    border-color: var(--color-primary) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}

html[data-theme-preset] .pk-building-card-item.active,
body[data-theme-preset] .pk-building-card-item.active {
    background-color: var(--bg-sidebar-hover) !important;
    border-color: var(--color-primary) !important;
}

html[data-theme-preset] .pk-bcard-name,
body[data-theme-preset] .pk-bcard-name {
    color: var(--text-main) !important;
}

html[data-theme-preset] .pk-bcard-type-tag,
body[data-theme-preset] .pk-bcard-type-tag {
    background-color: var(--bg-card-alt) !important;
    color: var(--text-sub) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .pk-bcard-to-badge,
body[data-theme-preset] .pk-bcard-to-badge {
    color: var(--text-sub) !important;
}

html[data-theme-preset] .pk-bcard-to-badge strong,
body[data-theme-preset] .pk-bcard-to-badge strong {
    color: var(--text-main) !important;
}

html[data-theme-preset] .pk-bcard-progress-track,
body[data-theme-preset] .pk-bcard-progress-track {
    background-color: var(--border-base) !important;
}

html[data-theme-preset] .pk-bcard-usage-fraction,
body[data-theme-preset] .pk-bcard-usage-fraction {
    color: var(--text-sub) !important;
}

html[data-theme-preset] .pk-bcard-usage-fraction strong,
body[data-theme-preset] .pk-bcard-usage-fraction strong {
    color: var(--text-main) !important;
}

/* 요일별 실시간 잔여석 상세 워크스페이스 */
html[data-theme-preset] .pk-matrix-detail-workspace,
body[data-theme-preset] .pk-matrix-detail-workspace {
    background-color: var(--bg-sidebar) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .pk-matrix-workspace-header,
body[data-theme-preset] .pk-matrix-workspace-header {
    border-bottom: 1px dashed var(--border-base) !important;
}

html[data-theme-preset] .pk-ws-main-title,
body[data-theme-preset] .pk-ws-main-title {
    color: var(--text-main) !important;
}

html[data-theme-preset] .pk-ws-sub-guide,
body[data-theme-preset] .pk-ws-sub-guide {
    color: var(--text-muted) !important;
}

html[data-theme-preset] .pk-matrix-summary,
body[data-theme-preset] .pk-matrix-summary {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .pk-matrix-day-box,
body[data-theme-preset] .pk-matrix-day-box {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .pk-matrix-day-box:hover,
body[data-theme-preset] .pk-matrix-day-box:hover {
    border-color: var(--color-primary) !important;
}

html[data-theme-preset] .pk-matrix-day-name,
body[data-theme-preset] .pk-matrix-day-name {
    color: var(--text-muted) !important;
}

/* 4. ZONE 4: 실시간 주차 배정 원장 테이블 */
html[data-theme-preset] .pk-tetris-section-card,
body[data-theme-preset] .pk-tetris-section-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] #pk-tetris-table th,
body[data-theme-preset] #pk-tetris-table th {
    background-color: var(--bg-sidebar) !important;
    color: var(--text-sub) !important;
    border-bottom: 2px solid var(--border-base) !important;
    border-top: none !important;
}

html[data-theme-preset] #pk-tetris-table td,
body[data-theme-preset] #pk-tetris-table td {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] #pk-tetris-table tbody tr:hover td,
body[data-theme-preset] #pk-tetris-table tbody tr:hover td {
    background-color: var(--bg-sidebar-hover) !important;
}

html[data-theme-preset] .pk-list-bname,
html[data-theme-preset] .pk-list-uname,
html[data-theme-preset] .pk-list-vnum,
body[data-theme-preset] .pk-list-bname,
body[data-theme-preset] .pk-list-uname,
body[data-theme-preset] .pk-list-vnum {
    color: var(--text-main) !important;
}

html[data-theme-preset] .pk-list-ptype,
html[data-theme-preset] .pk-list-dept,
html[data-theme-preset] .pk-list-empno,
html[data-theme-preset] .pk-list-vmodel,
body[data-theme-preset] .pk-list-ptype,
body[data-theme-preset] .pk-list-dept,
body[data-theme-preset] .pk-list-empno,
body[data-theme-preset] .pk-list-vmodel {
    color: var(--text-muted) !important;
}

/* ==========================================================================
   💰 [전사 테마 프리셋 완전 일원화] 비용 분석: 지출결의 관리 (/expenses)
   ========================================================================== */

/* 1. 상단 4대 핵심 KPI 카드 그리드 */
html[data-theme-preset] .exp-kpi-card,
body[data-theme-preset] .exp-kpi-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .exp-kpi-card-header,
body[data-theme-preset] .exp-kpi-card-header {
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .exp-kpi-title,
body[data-theme-preset] .exp-kpi-title {
    color: var(--text-main) !important;
}

html[data-theme-preset] .exp-year-select-chip,
body[data-theme-preset] .exp-year-select-chip {
    background-color: var(--bg-card-alt) !important;
    border: 1px solid var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .exp-hero-num,
body[data-theme-preset] .exp-hero-num {
    color: var(--text-main) !important;
}

html[data-theme-preset] .exp-hero-unit,
body[data-theme-preset] .exp-hero-unit {
    color: var(--text-muted) !important;
}

html[data-theme-preset] .btn-month-nav,
body[data-theme-preset] .btn-month-nav {
    background-color: var(--bg-sidebar) !important;
    border: 1px solid var(--border-base) !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] .btn-month-nav:hover,
body[data-theme-preset] .btn-month-nav:hover {
    background-color: var(--bg-sidebar-hover) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .exp-month-sub-info-box,
body[data-theme-preset] .exp-month-sub-info-box {
    background-color: var(--bg-sidebar) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .exp-sub-info-row .sub-lbl,
body[data-theme-preset] .exp-sub-info-row .sub-lbl {
    color: var(--text-muted) !important;
}

html[data-theme-preset] .exp-sub-info-row .sub-val,
body[data-theme-preset] .exp-sub-info-row .sub-val {
    color: var(--text-main) !important;
}

html[data-theme-preset] .btn-memo-add-mini,
body[data-theme-preset] .btn-memo-add-mini {
    background-color: var(--bg-card-alt) !important;
    border: 1px solid var(--border-base) !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] .exp-section-dashed-line,
body[data-theme-preset] .exp-section-dashed-line {
    border-bottom: 1px dashed var(--border-base) !important;
}

/* 2. 메인 워크스페이스 카드 & 수평 카테고리 탭 (8대 탭) */
html[data-theme-preset] .exp-main-workspace-card,
body[data-theme-preset] .exp-main-workspace-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .exp-top-tab-bar,
body[data-theme-preset] .exp-top-tab-bar {
    background-color: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .exp-top-tab-list li,
body[data-theme-preset] .exp-top-tab-list li {
    background-color: var(--bg-card-alt) !important;
    border: 1px solid var(--border-base) !important;
    border-bottom: none !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] .exp-top-tab-list li:hover,
body[data-theme-preset] .exp-top-tab-list li:hover {
    background-color: var(--bg-sidebar-hover) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .exp-top-tab-list li.active,
body[data-theme-preset] .exp-top-tab-list li.active {
    background-color: var(--bg-card) !important;
    border-top: 3px solid var(--color-primary) !important;
    color: var(--color-primary) !important;
    font-weight: 700 !important;
}

/* 3. 소분류 칩스 바 & 2단 툴바 */
html[data-theme-preset] .exp-sub-chips-bar,
body[data-theme-preset] .exp-sub-chips-bar {
    background-color: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .exp-chips-label,
body[data-theme-preset] .exp-chips-label {
    color: var(--text-muted) !important;
}

html[data-theme-preset] .exp-sub-chip,
body[data-theme-preset] .exp-sub-chip {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] .exp-sub-chip:hover,
body[data-theme-preset] .exp-sub-chip:hover {
    border-color: var(--color-primary) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .exp-sub-chip.active,
body[data-theme-preset] .exp-sub-chip.active {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #ffffff !important;
}

html[data-theme-preset] .exp-toolbar-2tier,
body[data-theme-preset] .exp-toolbar-2tier {
    background-color: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .exp-search-box-wide,
body[data-theme-preset] .exp-search-box-wide {
    background-color: var(--bg-sidebar) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .exp-search-box-wide input#exp-search-input,
body[data-theme-preset] .exp-search-box-wide input#exp-search-input {
    background-color: transparent !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .exp-search-box-wide i.fa-search,
body[data-theme-preset] .exp-search-box-wide i.fa-search {
    color: var(--text-muted) !important;
}

html[data-theme-preset] .exp-toolbar-tier2,
body[data-theme-preset] .exp-toolbar-tier2 {
    background-color: var(--bg-card-alt) !important;
    border-top: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .exp-filter-lbl,
body[data-theme-preset] .exp-filter-lbl {
    color: var(--text-muted) !important;
}

html[data-theme-preset] .exp-month-select,
html[data-theme-preset] .exp-date-input,
body[data-theme-preset] .exp-month-select,
body[data-theme-preset] .exp-date-input {
    background-color: var(--bg-sidebar) !important;
    border: 1px solid var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .date-sep,
html[data-theme-preset] .exp-filter-divider,
body[data-theme-preset] .date-sep,
body[data-theme-preset] .exp-filter-divider {
    color: var(--text-muted) !important;
    border-color: var(--border-base) !important;
}

/* 4. 피벗 매트릭스 뷰 & 테이블 */
html[data-theme-preset] .exp-matrix-guide-bar,
body[data-theme-preset] .exp-matrix-guide-bar {
    background-color: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .exp-guide-text,
body[data-theme-preset] .exp-guide-text {
    color: var(--text-muted) !important;
}

html[data-theme-preset] .exp-matrix-year-badge,
body[data-theme-preset] .exp-matrix-year-badge {
    background-color: var(--bg-card-alt) !important;
    border: 1px solid var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .exp-matrix-data-table th,
html[data-theme-preset] #exp-data-table th,
body[data-theme-preset] .exp-matrix-data-table th,
body[data-theme-preset] #exp-data-table th {
    background-color: var(--bg-sidebar) !important;
    color: var(--text-sub) !important;
    border-bottom: 2px solid var(--border-base) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .exp-matrix-data-table td,
html[data-theme-preset] #exp-data-table td,
body[data-theme-preset] .exp-matrix-data-table td,
body[data-theme-preset] #exp-data-table td {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .exp-matrix-row:hover td,
html[data-theme-preset] #exp-data-table tbody tr:hover td,
body[data-theme-preset] .exp-matrix-row:hover td,
body[data-theme-preset] #exp-data-table tbody tr:hover td {
    background-color: var(--bg-sidebar-hover) !important;
}

html[data-theme-preset] .exp-matrix-row.row-expanded td,
body[data-theme-preset] .exp-matrix-row.row-expanded td {
    background-color: var(--bg-sidebar-hover) !important;
}

html[data-theme-preset] .exp-matrix-sum-row td,
body[data-theme-preset] .exp-matrix-sum-row td {
    background-color: var(--bg-card-alt) !important;
    border-top: 2px solid var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .exp-mat-pcat-badge,
body[data-theme-preset] .exp-mat-pcat-badge {
    background-color: var(--bg-card-alt) !important;
    border: 1px solid var(--border-base) !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] .exp-mat-scat-name,
body[data-theme-preset] .exp-mat-scat-name {
    color: var(--text-main) !important;
}

/* 5. 드릴다운 세부 지출 내역 패널 */
html[data-theme-preset] .exp-drilldown-panel,
body[data-theme-preset] .exp-drilldown-panel {
    background-color: var(--bg-sidebar) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .exp-drilldown-header,
body[data-theme-preset] .exp-drilldown-header {
    background-color: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .exp-drilldown-title,
body[data-theme-preset] .exp-drilldown-title {
    color: var(--text-main) !important;
}

html[data-theme-preset] .exp-drilldown-title strong,
body[data-theme-preset] .exp-drilldown-title strong {
    color: var(--text-main) !important;
}

html[data-theme-preset] .exp-drilldown-inner-table th,
body[data-theme-preset] .exp-drilldown-inner-table th {
    background-color: var(--bg-card-alt) !important;
    color: var(--text-sub) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .exp-drilldown-inner-table td,
body[data-theme-preset] .exp-drilldown-inner-table td {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .exp-drilldown-inner-table tbody tr:hover td,
body[data-theme-preset] .exp-drilldown-inner-table tbody tr:hover td {
    background-color: var(--bg-sidebar-hover) !important;
}

html[data-theme-preset] .exp-user-name,
html[data-theme-preset] .exp-merchant-text,
html[data-theme-preset] .exp-purpose-main-text,
html[data-theme-preset] .exp-dd-purpose-main,
body[data-theme-preset] .exp-user-name,
body[data-theme-preset] .exp-merchant-text,
body[data-theme-preset] .exp-purpose-main-text,
body[data-theme-preset] .exp-dd-purpose-main {
    color: var(--text-main) !important;
}

html[data-theme-preset] .exp-dept-name,
html[data-theme-preset] .exp-subcat-text,
html[data-theme-preset] .exp-purpose-sub-text,
html[data-theme-preset] .exp-dd-purpose-sub,
body[data-theme-preset] .exp-dept-name,
body[data-theme-preset] .exp-subcat-text,
body[data-theme-preset] .exp-purpose-sub-text,
body[data-theme-preset] .exp-dd-purpose-sub {
    color: var(--text-muted) !important;
}

/* ==========================================================================
   🏢 [전사 테마 프리셋 완전 일원화] 임대차: 임대차 현황 & 공과금 통합 관제 센터
   ========================================================================== */

/* 1. 상단 3대 KPI 카드 & 알림 리스트 */
html[data-theme-preset] .lease-top-kpi-container .widget,
html[data-theme-preset] .lease-kpi-card,
body[data-theme-preset] .lease-top-kpi-container .widget,
body[data-theme-preset] .lease-kpi-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .lease-kpi-card .kpi-card-header,
body[data-theme-preset] .lease-kpi-card .kpi-card-header {
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .lease-kpi-card h3,
body[data-theme-preset] .lease-kpi-card h3 {
    color: var(--text-main) !important;
}

html[data-theme-preset] .summary-row-top .stat-card,
body[data-theme-preset] .summary-row-top .stat-card {
    background-color: var(--bg-sidebar) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .summary-grid-bottom .stat-item,
body[data-theme-preset] .summary-grid-bottom .stat-item {
    background-color: var(--bg-sidebar) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .summary-grid-bottom .stat-item .stat-label,
html[data-theme-preset] .summary-row-top .stat-card .stat-label,
body[data-theme-preset] .summary-grid-bottom .stat-item .stat-label,
body[data-theme-preset] .summary-row-top .stat-card .stat-label {
    color: var(--text-muted) !important;
}

html[data-theme-preset] .summary-grid-bottom .stat-item .stat-value,
html[data-theme-preset] .summary-row-top .stat-card .stat-value,
body[data-theme-preset] .summary-grid-bottom .stat-item .stat-value,
body[data-theme-preset] .summary-row-top .stat-card .stat-value {
    color: var(--text-main) !important;
}

html[data-theme-preset] .kpi-alert-scroll-container .alert-item,
body[data-theme-preset] .kpi-alert-scroll-container .alert-item {
    background-color: var(--bg-sidebar) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .alert-building-name,
body[data-theme-preset] .alert-building-name {
    color: var(--text-main) !important;
}

html[data-theme-preset] .alert-sub-info,
body[data-theme-preset] .alert-sub-info {
    color: var(--text-muted) !important;
}

/* 2. 임대차 검색 & 툴바 */
html[data-theme-preset] .lease-search-bar-wrap,
html[data-theme-preset] .search-filter-card,
body[data-theme-preset] .lease-search-bar-wrap,
body[data-theme-preset] .search-filter-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .lease-search-input-box,
body[data-theme-preset] .lease-search-input-box {
    background-color: var(--bg-sidebar) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] #lease-search-input,
body[data-theme-preset] #lease-search-input {
    background-color: transparent !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .lease-region-select,
body[data-theme-preset] .lease-region-select {
    background-color: var(--bg-sidebar) !important;
    border: 1px solid var(--border-base) !important;
    color: var(--text-main) !important;
}

/* 3. 임대차 계약 목록 테이블 (#lease-table) - 완벽 가운데 정렬 & 테마 동기화 */
html[data-theme-preset] .lease-table-container-wrap,
body[data-theme-preset] .lease-table-container-wrap {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] #lease-table,
body[data-theme-preset] #lease-table {
    background-color: var(--bg-card) !important;
}

html[data-theme-preset] #lease-table th,
body[data-theme-preset] #lease-table th {
    background-color: var(--bg-sidebar) !important;
    color: var(--text-sub) !important;
    border-bottom: 2px solid var(--border-base) !important;
    text-align: center !important;
}

html[data-theme-preset] #lease-table td,
body[data-theme-preset] #lease-table td {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--border-base) !important;
    text-align: center !important;
}

html[data-theme-preset] #lease-table td.col-building,
body[data-theme-preset] #lease-table td.col-building {
    text-align: center !important;
}

html[data-theme-preset] #lease-table tbody tr:hover td,
body[data-theme-preset] #lease-table tbody tr:hover td {
    background-color: var(--bg-sidebar-hover) !important;
}

html[data-theme-preset] #lease-table tbody tr.selected-row td,
body[data-theme-preset] #lease-table tbody tr.selected-row td {
    background-color: var(--bg-sidebar-hover) !important;
}

html[data-theme-preset] .cell-building-name,
body[data-theme-preset] .cell-building-name {
    color: var(--text-main) !important;
}

html[data-theme-preset] .cell-unit-name,
body[data-theme-preset] .cell-unit-name {
    color: var(--text-muted) !important;
}

/* 4. 임대차 계약 상세 워크스페이스 (#lease-detail-view) */
html[data-theme-preset] #lease-detail-view,
body[data-theme-preset] #lease-detail-view {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] #lease-detail-view .detail-toolbar,
body[data-theme-preset] #lease-detail-view .detail-toolbar {
    background-color: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] #lease-detail-view .detail-title-text,
body[data-theme-preset] #lease-detail-view .detail-title-text {
    color: var(--text-main) !important;
}

html[data-theme-preset] .lease-detail-left-sidebar,
body[data-theme-preset] .lease-detail-left-sidebar {
    background-color: var(--bg-sidebar) !important;
    border-right: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .lease-detail-menu-btn,
body[data-theme-preset] .lease-detail-menu-btn {
    background-color: transparent !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] .lease-detail-menu-btn:hover,
body[data-theme-preset] .lease-detail-menu-btn:hover {
    background-color: var(--bg-sidebar-hover) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .lease-detail-menu-btn.active,
body[data-theme-preset] .lease-detail-menu-btn.active {
    background-color: var(--color-primary) !important;
    color: #ffffff !important;
}

html[data-theme-preset] .lease-sub-card,
html[data-theme-preset] .lease-detail-pane-content .widget,
body[data-theme-preset] .lease-sub-card,
body[data-theme-preset] .lease-detail-pane-content .widget {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .lease-detail-table th,
body[data-theme-preset] .lease-detail-table th {
    background-color: var(--bg-sidebar) !important;
    color: var(--text-sub) !important;
    border-color: var(--border-base) !important;
    text-align: center !important;
}

html[data-theme-preset] .lease-detail-table td,
body[data-theme-preset] .lease-detail-table td {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-base) !important;
    text-align: center !important;
}

/* 5. 공과금(실관리비) 통합 관제 센터 팝업/페이지 (.bulk-app-viewport) */
html[data-theme-preset] .bulk-app-viewport,
body[data-theme-preset] .bulk-app-viewport {
    background-color: var(--bg-workspace) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .bulk-top-masthead,
body[data-theme-preset] .bulk-top-masthead {
    background-color: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .masthead-main-heading,
body[data-theme-preset] .masthead-main-heading {
    color: var(--text-main) !important;
}

html[data-theme-preset] .masthead-sub-caption,
body[data-theme-preset] .masthead-sub-caption {
    color: var(--text-muted) !important;
}

html[data-theme-preset] .bulk-mode-navbar,
body[data-theme-preset] .bulk-mode-navbar {
    background-color: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .mode-tab-pill,
body[data-theme-preset] .mode-tab-pill {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] .mode-tab-pill.active,
body[data-theme-preset] .mode-tab-pill.active {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #ffffff !important;
}

html[data-theme-preset] .btn-date-step-arrow,
body[data-theme-preset] .btn-date-step-arrow {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .prominent-date-badge-capsule,
body[data-theme-preset] .prominent-date-badge-capsule {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .select-prominent-date,
body[data-theme-preset] .select-prominent-date {
    background-color: transparent !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .kpi-counter-card,
body[data-theme-preset] .kpi-counter-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .kpi-counter-card .card-caption,
body[data-theme-preset] .kpi-counter-card .card-caption {
    color: var(--text-muted) !important;
}

html[data-theme-preset] .bulk-spreadsheet-card-frame,
body[data-theme-preset] .bulk-spreadsheet-card-frame {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .spreadsheet-data-grid,
body[data-theme-preset] .spreadsheet-data-grid {
    background-color: var(--bg-card) !important;
}

html[data-theme-preset] .spreadsheet-data-grid th,
body[data-theme-preset] .spreadsheet-data-grid th {
    background-color: var(--bg-sidebar) !important;
    color: var(--text-sub) !important;
    border-bottom: 2px solid var(--border-base) !important;
    text-align: center !important;
}

html[data-theme-preset] .spreadsheet-data-grid td,
body[data-theme-preset] .spreadsheet-data-grid td {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--border-base) !important;
    text-align: center !important;
}

html[data-theme-preset] .spreadsheet-data-grid tbody tr:hover td,
body[data-theme-preset] .spreadsheet-data-grid tbody tr:hover td {
    background-color: var(--bg-sidebar-hover) !important;
}

/* 6. 소프트웨어 라이선스 운용 S/W 종류(종) 수치 테마 가독성 보장 */
html[data-theme-preset] .sw-cell-val.text-dark-bold,
body[data-theme-preset] .sw-cell-val.text-dark-bold {
    color: var(--text-main) !important;
}

/* 7. 임대차 지도 (lease_map) 플로팅 팝업 및 사이드바 테마 연동 */
html[data-theme-preset] .map-search-header,
body[data-theme-preset] .map-search-header {
    background-color: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .map-search-header .search-box,
body[data-theme-preset] .map-search-header .search-box {
    background-color: var(--bg-sidebar) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] #map-integration-search,
body[data-theme-preset] #map-integration-search {
    background-color: transparent !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .map-sidebar-panel,
body[data-theme-preset] .map-sidebar-panel {
    background-color: var(--bg-card) !important;
    border-right: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .region-filter-header,
body[data-theme-preset] .region-filter-header {
    background-color: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .filter-title,
body[data-theme-preset] .filter-title {
    color: var(--text-main) !important;
}

html[data-theme-preset] .region-accordion-item,
body[data-theme-preset] .region-accordion-item {
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .region-title-btn,
body[data-theme-preset] .region-title-btn {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .region-title-btn:hover,
body[data-theme-preset] .region-title-btn:hover {
    background-color: var(--bg-sidebar-hover) !important;
}

html[data-theme-preset] .map-floating-info,
body[data-theme-preset] .map-floating-info {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .summary-header,
body[data-theme-preset] .summary-header {
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .summary-building-title,
body[data-theme-preset] .summary-building-title {
    color: var(--text-main) !important;
}

html[data-theme-preset] .summary-building-addr,
body[data-theme-preset] .summary-building-addr {
    color: var(--text-muted) !important;
}

html[data-theme-preset] .summary-data-table th,
body[data-theme-preset] .summary-data-table th {
    background-color: var(--bg-sidebar) !important;
    color: var(--text-sub) !important;
    border-bottom: 1px solid var(--border-base) !important;
    text-align: center !important;
}

html[data-theme-preset] .summary-data-table td,
body[data-theme-preset] .summary-data-table td {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--border-base) !important;
    text-align: center !important;
}

html[data-theme-preset] .summary-footer-box,
body[data-theme-preset] .summary-footer-box {
    background-color: var(--bg-sidebar) !important;
    border-top: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .summary-footer-box .footer-label,
body[data-theme-preset] .summary-footer-box .footer-label {
    color: var(--text-muted) !important;
}

html[data-theme-preset] .summary-footer-box .val-bold,
body[data-theme-preset] .summary-footer-box .val-bold {
    color: var(--text-main) !important;
}






/* 임대차 지도 플로팅 상세 팝업 와이드 & 닫기 버튼 배치 보장 */
.map-floating-info {
    width: 580px !important;
    min-width: 580px !important;
    max-width: 600px !important;
}

.map-floating-info .btn-close-ws-modern {
    position: absolute !important;
    top: 10px !important;
    right: 12px !important;
    z-index: 10 !important;
    pointer-events: auto !important;
}

/* ==========================================================================
   ⚖️ [전사 테마 프리셋 완전 일원화] 법무 3대 페이지 (소송현황 / 기록 열람 센터 / 통합 관리 센터)
   ========================================================================== */

/* --- (A) 법무: 소송현황 메인 KPI · 표 · 인스펙터 7대 탭 --- */
html[data-theme-preset] .legal-kpi-card,
body[data-theme-preset] .legal-kpi-card {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .legal-kpi-card .kpi-card-header,
body[data-theme-preset] .legal-kpi-card .kpi-card-header {
    background-color: transparent !important;
    border-bottom-color: var(--border-base) !important;
}

html[data-theme-preset] .legal-kpi-card .kpi-title-simple,
body[data-theme-preset] .legal-kpi-card .kpi-title-simple,
html[data-theme-preset] .cal-month-display,
body[data-theme-preset] .cal-month-display {
    color: var(--text-main) !important;
}

html[data-theme-preset] .kpi-custom-table th,
body[data-theme-preset] .kpi-custom-table th {
    background-color: var(--bg-card-alt) !important;
    color: var(--text-sub) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .kpi-custom-table td,
body[data-theme-preset] .kpi-custom-table td {
    background-color: transparent !important;
    color: var(--text-main) !important;
    border-bottom-color: var(--border-base) !important;
}

html[data-theme-preset] .kpi-custom-table tbody tr:hover td,
body[data-theme-preset] .kpi-custom-table tbody tr:hover td {
    background-color: var(--bg-sidebar-hover) !important;
}

html[data-theme-preset] .btn-cal-nav,
body[data-theme-preset] .btn-cal-nav {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] .btn-cal-nav:hover,
body[data-theme-preset] .btn-cal-nav:hover {
    background-color: var(--bg-sidebar-hover) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .cal-day-num,
body[data-theme-preset] .cal-day-num {
    color: var(--text-sub) !important;
}

html[data-theme-preset] .cal-date-event-card,
body[data-theme-preset] .cal-date-event-card {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .litigation-toolbar-card,
body[data-theme-preset] .litigation-toolbar-card,
html[data-theme-preset] .litigation-table-card,
body[data-theme-preset] .litigation-table-card {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .litigation-search-input-wrap,
body[data-theme-preset] .litigation-search-input-wrap,
html[data-theme-preset] #litigationSearchInput,
body[data-theme-preset] #litigationSearchInput {
    background-color: var(--bg-input, var(--bg-card-alt)) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #legal-cases-table,
body[data-theme-preset] #legal-cases-table {
    background-color: var(--bg-card) !important;
}

html[data-theme-preset] #legal-cases-table thead th,
body[data-theme-preset] #legal-cases-table thead th {
    background-color: var(--bg-card-alt) !important;
    color: var(--text-sub) !important;
    border-bottom-color: var(--border-base) !important;
}

html[data-theme-preset] #legal-cases-table tbody td,
body[data-theme-preset] #legal-cases-table tbody td {
    color: var(--text-main) !important;
    border-bottom-color: var(--border-base) !important;
}

html[data-theme-preset] #legal-cases-table tbody tr:hover td,
body[data-theme-preset] #legal-cases-table tbody tr:hover td {
    background-color: var(--bg-sidebar-hover) !important;
}

html[data-theme-preset] #legal-cases-table tbody tr.selected-case-row td,
body[data-theme-preset] #legal-cases-table tbody tr.selected-case-row td {
    background-color: var(--nav-active-bg, rgba(37, 99, 235, 0.14)) !important;
}

html[data-theme-preset] #btn-open-integrated-manage,
body[data-theme-preset] #btn-open-integrated-manage,
html[data-theme-preset] .btn-litigation-primary,
body[data-theme-preset] .btn-litigation-primary,
html[data-theme-preset] .btn-inspector-action,
body[data-theme-preset] .btn-inspector-action,
html[data-theme-preset] .btn-sleek-primary,
body[data-theme-preset] .btn-sleek-primary,
html[data-theme-preset] .btn-view-case-record,
body[data-theme-preset] .btn-view-case-record {
    background-color: var(--btn-primary-bg, var(--color-primary)) !important;
    border-color: var(--btn-primary-bg, var(--color-primary)) !important;
    color: #ffffff !important;
}

html[data-theme-preset] #btn-open-all-records-popup,
body[data-theme-preset] #btn-open-all-records-popup,
html[data-theme-preset] .btn-inspector-records-center,
body[data-theme-preset] .btn-inspector-records-center,
html[data-theme-preset] .btn-memo-popup-open,
body[data-theme-preset] .btn-memo-popup-open,
html[data-theme-preset] .btn-shortcut-premium,
body[data-theme-preset] .btn-shortcut-premium,
html[data-theme-preset] .btn-tb-action,
body[data-theme-preset] .btn-tb-action,
html[data-theme-preset] .btn-rec-filter,
body[data-theme-preset] .btn-rec-filter,
html[data-theme-preset] .btn-sleek-sub,
body[data-theme-preset] .btn-sleek-sub {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .btn-rec-filter.active,
body[data-theme-preset] .btn-rec-filter.active {
    background-color: var(--btn-primary-bg, var(--color-primary)) !important;
    border-color: var(--btn-primary-bg, var(--color-primary)) !important;
    color: #ffffff !important;
}

/* 소송현황 하단 인스펙터 (#legalCaseDetailInspector) */
html[data-theme-preset] #legalCaseDetailInspector.inspector-section,
body[data-theme-preset] #legalCaseDetailInspector.inspector-section,
html[data-theme-preset] #legalCaseDetailInspector .inspector-title-card,
body[data-theme-preset] #legalCaseDetailInspector .inspector-title-card,
html[data-theme-preset] #legalCaseDetailInspector .inspector-card,
body[data-theme-preset] #legalCaseDetailInspector .inspector-card {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #legalCaseDetailInspector .inspector-title-bar,
body[data-theme-preset] #legalCaseDetailInspector .inspector-title-bar {
    background-color: transparent !important;
    border-bottom-color: var(--border-base) !important;
}

html[data-theme-preset] #legalCaseDetailInspector .inspector-main-title,
body[data-theme-preset] #legalCaseDetailInspector .inspector-main-title,
html[data-theme-preset] #legalCaseDetailInspector .card-head,
body[data-theme-preset] #legalCaseDetailInspector .card-head,
html[data-theme-preset] #legalCaseDetailInspector .info-val,
body[data-theme-preset] #legalCaseDetailInspector .info-val {
    color: var(--text-main) !important;
}

html[data-theme-preset] #legalCaseDetailInspector .inspector-sidebar-nav,
body[data-theme-preset] #legalCaseDetailInspector .inspector-sidebar-nav {
    background-color: var(--bg-sidebar) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #legalCaseDetailInspector .inspector-sidebar-nav .nav-item,
body[data-theme-preset] #legalCaseDetailInspector .inspector-sidebar-nav .nav-item {
    background-color: transparent !important;
    color: var(--text-sub) !important;
    border-color: transparent !important;
}

html[data-theme-preset] #legalCaseDetailInspector .inspector-sidebar-nav .nav-item:hover,
body[data-theme-preset] #legalCaseDetailInspector .inspector-sidebar-nav .nav-item:hover {
    background-color: var(--bg-sidebar-hover) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #legalCaseDetailInspector .inspector-sidebar-nav .nav-item.active,
body[data-theme-preset] #legalCaseDetailInspector .inspector-sidebar-nav .nav-item.active {
    background-color: var(--btn-primary-bg, var(--color-primary)) !important;
    border-color: var(--btn-primary-bg, var(--color-primary)) !important;
    color: #ffffff !important;
}

html[data-theme-preset] #legalCaseDetailInspector .inspector-data-table th,
body[data-theme-preset] #legalCaseDetailInspector .inspector-data-table th,
html[data-theme-preset] #legalCaseDetailInspector .inspector-records-table th,
body[data-theme-preset] #legalCaseDetailInspector .inspector-records-table th {
    background-color: var(--bg-card-alt) !important;
    color: var(--text-sub) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #legalCaseDetailInspector .inspector-data-table td,
body[data-theme-preset] #legalCaseDetailInspector .inspector-data-table td,
html[data-theme-preset] #legalCaseDetailInspector .inspector-records-table td,
body[data-theme-preset] #legalCaseDetailInspector .inspector-records-table td {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] #legalCaseDetailInspector .inspector-table-scroll-wrap,
body[data-theme-preset] #legalCaseDetailInspector .inspector-table-scroll-wrap,
html[data-theme-preset] #legalCaseDetailInspector .party-section-card,
body[data-theme-preset] #legalCaseDetailInspector .party-section-card,
html[data-theme-preset] #legalCaseDetailInspector .info-group-box,
body[data-theme-preset] #legalCaseDetailInspector .info-group-box,
html[data-theme-preset] #legalCaseDetailInspector .sleek-judgment-card,
body[data-theme-preset] #legalCaseDetailInspector .sleek-judgment-card,
html[data-theme-preset] #legalCaseDetailInspector .settlement-info-box,
body[data-theme-preset] #legalCaseDetailInspector .settlement-info-box {
    background: var(--bg-card, #1F1F24) !important;
    background-color: var(--bg-card, #1F1F24) !important;
    border: 1px solid var(--border-base, #383842) !important;
    border-radius: 6px !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #legalCaseDetailInspector .party-section-card.plaintiff-card,
body[data-theme-preset] #legalCaseDetailInspector .party-section-card.plaintiff-card {
    border-top: 3px solid #3B82F6 !important;
}

html[data-theme-preset] #legalCaseDetailInspector .party-section-card.defendant-card,
body[data-theme-preset] #legalCaseDetailInspector .party-section-card.defendant-card {
    border-top: 3px solid #F43F5E !important;
}

html[data-theme-preset] #legalCaseDetailInspector .party-item-card,
body[data-theme-preset] #legalCaseDetailInspector .party-item-card,
html[data-theme-preset] #legalCaseDetailInspector .sleek-stat-box,
body[data-theme-preset] #legalCaseDetailInspector .sleek-stat-box,
html[data-theme-preset] #legalCaseDetailInspector .sleek-jd-holding-box,
body[data-theme-preset] #legalCaseDetailInspector .sleek-jd-holding-box {
    background: var(--bg-card-alt, #27272D) !important;
    background-color: var(--bg-card-alt, #27272D) !important;
    border: 1px solid var(--border-base, #383842) !important;
    border-radius: 6px !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #legalCaseDetailInspector .sleek-jd-holding-box,
body[data-theme-preset] #legalCaseDetailInspector .sleek-jd-holding-box {
    border-left: 4px solid var(--color-primary, #3B82F6) !important;
}

html[data-theme-preset] #legalCaseDetailInspector .settlement-meta-label,
body[data-theme-preset] #legalCaseDetailInspector .settlement-meta-label,
html[data-theme-preset] #legalCaseDetailInspector .settlement-summary-title,
body[data-theme-preset] #legalCaseDetailInspector .settlement-summary-title,
html[data-theme-preset] #legalCaseDetailInspector .settlement-files-header,
body[data-theme-preset] #legalCaseDetailInspector .settlement-files-header,
html[data-theme-preset] #legalCaseDetailInspector .settlement-attached-empty,
body[data-theme-preset] #legalCaseDetailInspector .settlement-attached-empty,
html[data-theme-preset] #legalCaseDetailInspector .settlement-empty-state,
body[data-theme-preset] #legalCaseDetailInspector .settlement-empty-state {
    color: var(--text-sub) !important;
}

html[data-theme-preset] #legalCaseDetailInspector .settlement-meta-val,
body[data-theme-preset] #legalCaseDetailInspector .settlement-meta-val,
html[data-theme-preset] #legalCaseDetailInspector .settlement-summary-text,
body[data-theme-preset] #legalCaseDetailInspector .settlement-summary-text {
    color: var(--text-main) !important;
}

html[data-theme-preset] #legalCaseDetailInspector .settlement-summary-box,
body[data-theme-preset] #legalCaseDetailInspector .settlement-summary-box {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #legalCaseDetailInspector .settlement-attached-files-box,
body[data-theme-preset] #legalCaseDetailInspector .settlement-attached-files-box {
    border-top: 1px solid var(--border-base) !important;
}

html[data-theme-preset] #legalCaseDetailInspector .agent-tag-pill,
body[data-theme-preset] #legalCaseDetailInspector .agent-tag-pill,
html[data-theme-preset] #legalCaseDetailInspector .settlement-file-chip,
body[data-theme-preset] #legalCaseDetailInspector .settlement-file-chip {
    background-color: var(--bg-card-alt) !important;
    border: 1px solid var(--border-base) !important;
    color: var(--text-main) !important;
    text-decoration: none !important;
}

/* --- (B) 소송 사건 기록 열람 센터 (legal_case_records_popup) --- */
html[data-theme-preset],
body[data-theme-preset] {
    --bg-main: var(--bg-body);
    --bg-surface: var(--bg-card);
    --bg-header: var(--bg-card-alt);
    --bg-active: var(--bg-card-alt);
    --border-hairline: var(--border-base);
    --border-strong: var(--border-base);
    --border-focus: var(--border-base);
    --text-primary: var(--text-main);
    --text-secondary: var(--text-sub);
}

html[data-theme-preset] body.records-popup-body,
body[data-theme-preset].records-popup-body,
html[data-theme-preset] .records-main-container,
body[data-theme-preset] .records-main-container {
    background-color: var(--bg-body) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .records-header-dark,
body[data-theme-preset] .records-header-dark {
    background-color: var(--bg-card-alt) !important;
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .records-header-dark .header-title,
body[data-theme-preset] .records-header-dark .header-title {
    color: var(--text-main) !important;
}

html[data-theme-preset] .records-search-card,
body[data-theme-preset] .records-search-card,
html[data-theme-preset] .records-summary-card,
body[data-theme-preset] .records-summary-card,
html[data-theme-preset] .records-col-left,
body[data-theme-preset] .records-col-left,
html[data-theme-preset] .records-col-center,
body[data-theme-preset] .records-col-center,
html[data-theme-preset] .right-card,
body[data-theme-preset] .right-card,
html[data-theme-preset] .modal-card-square,
body[data-theme-preset] .modal-card-square {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .rec-search-input,
body[data-theme-preset] .rec-search-input,
html[data-theme-preset] .rec-search-dropdown,
body[data-theme-preset] .rec-search-dropdown,
html[data-theme-preset] .pdf-page-jump-wrap,
body[data-theme-preset] .pdf-page-jump-wrap,
html[data-theme-preset] .pdf-page-jump-input,
body[data-theme-preset] .pdf-page-jump-input {
    background-color: var(--bg-input, var(--bg-card-alt)) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .rec-dropdown-item:hover,
body[data-theme-preset] .rec-dropdown-item:hover {
    background-color: var(--bg-sidebar-hover) !important;
}

html[data-theme-preset] .card-header-flex,
body[data-theme-preset] .card-header-flex,
html[data-theme-preset] .center-toolbar,
body[data-theme-preset] .center-toolbar,
html[data-theme-preset] .modal-header-dark,
body[data-theme-preset] .modal-header-dark,
html[data-theme-preset] .table-scroll-wrap .data-table th,
body[data-theme-preset] .table-scroll-wrap .data-table th {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .table-scroll-wrap .data-table td,
body[data-theme-preset] .table-scroll-wrap .data-table td {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .table-scroll-wrap .data-table tr.selected td,
body[data-theme-preset] .table-scroll-wrap .data-table tr.selected td {
    background-color: var(--nav-active-bg, rgba(37, 99, 235, 0.16)) !important;
}

html[data-theme-preset] .btn-icon-control,
body[data-theme-preset] .btn-icon-control,
html[data-theme-preset] .btn-zip-option,
body[data-theme-preset] .btn-zip-option {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .btn-zip-option:hover,
body[data-theme-preset] .btn-zip-option:hover {
    border-color: var(--btn-primary-bg, var(--color-primary)) !important;
    background-color: var(--bg-sidebar-hover) !important;
}

html[data-theme-preset] .center-viewer-frame,
body[data-theme-preset] .center-viewer-frame {
    background-color: var(--bg-sub, var(--bg-card-alt)) !important;
}

/* --- (C) 법무 통합 관리 센터 (legal_integrated_popup) --- */
html[data-theme-preset] .int-header-dark,
body[data-theme-preset] .int-header-dark {
    background-color: var(--bg-card-alt) !important;
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .int-header-title,
body[data-theme-preset] .int-header-title,
html[data-theme-preset] .srt-title-dark,
body[data-theme-preset] .srt-title-dark {
    color: var(--text-main) !important;
}

html[data-theme-preset] .int-header-badge,
body[data-theme-preset] .int-header-badge {
    background-color: var(--bg-card) !important;
    color: var(--text-sub) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .srt-3tier-grid,
body[data-theme-preset] .srt-3tier-grid,
html[data-theme-preset] .int-left-panel,
body[data-theme-preset] .int-left-panel,
html[data-theme-preset] .int-left-half,
body[data-theme-preset] .int-left-half,
html[data-theme-preset] .doc-manage-right,
body[data-theme-preset] .doc-manage-right {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .srt-tier-header,
body[data-theme-preset] .srt-tier-header,
html[data-theme-preset] .recent-list-header,
body[data-theme-preset] .recent-list-header,
html[data-theme-preset] .int-tabs-container,
body[data-theme-preset] .int-tabs-container {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .int-tabs-container .tab-link,
body[data-theme-preset] .int-tabs-container .tab-link {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] .int-tabs-container .tab-link:hover,
body[data-theme-preset] .int-tabs-container .tab-link:hover {
    background-color: var(--bg-sidebar-hover) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .int-tabs-container .tab-link.active,
body[data-theme-preset] .int-tabs-container .tab-link.active {
    background-color: var(--btn-primary-bg, var(--color-primary)) !important;
    border-color: var(--btn-primary-bg, var(--color-primary)) !important;
    color: #ffffff !important;
}

html[data-theme-preset] .int-tab-content-area,
body[data-theme-preset] .int-tab-content-area,
html[data-theme-preset] .tab-pane,
body[data-theme-preset] .tab-pane,
html[data-theme-preset] .basic-right-content,
body[data-theme-preset] .basic-right-content {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .basic-left-nav,
body[data-theme-preset] .basic-left-nav {
    background-color: var(--bg-sidebar) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .basic-nav-btn,
body[data-theme-preset] .basic-nav-btn {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] .basic-nav-btn.active,
body[data-theme-preset] .basic-nav-btn.active {
    background-color: var(--btn-primary-bg, var(--color-primary)) !important;
    border-color: var(--btn-primary-bg, var(--color-primary)) !important;
    color: #ffffff !important;
}

html[data-theme-preset] .ro-info-box,
body[data-theme-preset] .ro-info-box,
html[data-theme-preset] .party-section,
body[data-theme-preset] .party-section,
html[data-theme-preset] .trial-content-box,
body[data-theme-preset] .trial-content-box,
html[data-theme-preset] .agent-box,
body[data-theme-preset] .agent-box,
html[data-theme-preset] .form-card-box,
body[data-theme-preset] .form-card-box,
html[data-theme-preset] .sub-card-box,
body[data-theme-preset] .sub-card-box,
html[data-theme-preset] .doc-trial-card,
body[data-theme-preset] .doc-trial-card,
html[data-theme-preset] .closure-card-box,
body[data-theme-preset] .closure-card-box,
html[data-theme-preset] .stl-installment-row,
body[data-theme-preset] .stl-installment-row,
html[data-theme-preset] .doc-search-box,
body[data-theme-preset] .doc-search-box {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .srt-input,
body[data-theme-preset] .srt-input,
html[data-theme-preset] .srt-select,
body[data-theme-preset] .srt-select,
html[data-theme-preset] .srt-3tier-grid input[type="text"],
body[data-theme-preset] .srt-3tier-grid input[type="text"],
html[data-theme-preset] .srt-3tier-grid input[type="date"],
body[data-theme-preset] .srt-3tier-grid input[type="date"],
html[data-theme-preset] .srt-3tier-grid input[type="number"],
body[data-theme-preset] .srt-3tier-grid input[type="number"],
html[data-theme-preset] .srt-3tier-grid select,
body[data-theme-preset] .srt-3tier-grid select,
html[data-theme-preset] .srt-3tier-grid textarea,
body[data-theme-preset] .srt-3tier-grid textarea {
    background-color: var(--bg-input, var(--bg-card)) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .srt-drop-zone,
body[data-theme-preset] .srt-drop-zone,
html[data-theme-preset] .evidence-large-dropzone,
body[data-theme-preset] .evidence-large-dropzone {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] .sub-tab-btn,
body[data-theme-preset] .sub-tab-btn,
html[data-theme-preset] .btn-outline-gray,
body[data-theme-preset] .btn-outline-gray {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .sub-tab-btn.active,
body[data-theme-preset] .sub-tab-btn.active {
    background-color: var(--btn-primary-bg, var(--color-primary)) !important;
    border-color: var(--btn-primary-bg, var(--color-primary)) !important;
    color: #ffffff !important;
}

html[data-theme-preset] .doc-inner-table th,
body[data-theme-preset] .doc-inner-table th,
html[data-theme-preset] .doc-2col-table th,
body[data-theme-preset] .doc-2col-table th {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] .doc-inner-table td,
body[data-theme-preset] .doc-inner-table td,
html[data-theme-preset] .doc-2col-table td,
body[data-theme-preset] .doc-2col-table td {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

/* ==========================================================================
   📊 [전사 테마 프리셋 완전 일원화] 비용 분석: 비용 지출 요약 (FCC) & 비용 관리 (costs_management)
   ========================================================================== */

/* 1. 비용 지출 요약 (FCC) */
html[data-theme-preset] .fcc-dashboard-wrapper,
body[data-theme-preset] .fcc-dashboard-wrapper {
    background: transparent !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .fcc-live-badge,
body[data-theme-preset] .fcc-live-badge {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] #fcc-sync-time,
body[data-theme-preset] #fcc-sync-time {
    color: var(--accent-main, var(--color-primary)) !important;
}

html[data-theme-preset] .fcc-card,
body[data-theme-preset] .fcc-card {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .fcc-card-header,
body[data-theme-preset] .fcc-card-header {
    border-bottom-color: var(--border-base) !important;
}

html[data-theme-preset] .fcc-card-header h3,
html[data-theme-preset] .fcc-card-header h4,
body[data-theme-preset] .fcc-card-header h3,
body[data-theme-preset] .fcc-card-header h4 {
    color: var(--text-main) !important;
}

html[data-theme-preset] .fcc-pulse-card,
body[data-theme-preset] .fcc-pulse-card {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .fcc-pulse-card:hover,
html[data-theme-preset] .fcc-pulse-card.active,
body[data-theme-preset] .fcc-pulse-card:hover,
body[data-theme-preset] .fcc-pulse-card.active {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--accent-main, var(--color-primary)) !important;
}

html[data-theme-preset] .pulse-title,
body[data-theme-preset] .pulse-title {
    color: var(--text-sub) !important;
}

html[data-theme-preset] .pulse-amount,
body[data-theme-preset] .pulse-amount {
    color: var(--text-main) !important;
}

html[data-theme-preset] .pulse-yoy,
body[data-theme-preset] .pulse-yoy {
    border-top-color: var(--border-base) !important;
}

html[data-theme-preset] .fcc-monthly-card,
body[data-theme-preset] .fcc-monthly-card,
html[data-theme-preset] .fcc-substat-card,
body[data-theme-preset] .fcc-substat-card {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .btn-fcc-export,
body[data-theme-preset] .btn-fcc-export {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--accent-main, var(--color-primary)) !important;
}

html[data-theme-preset] .btn-fcc-export:hover,
body[data-theme-preset] .btn-fcc-export:hover {
    background-color: var(--accent-soft, rgba(59, 130, 246, 0.14)) !important;
    border-color: var(--accent-main, var(--color-primary)) !important;
}

html[data-theme-preset] .fcc-chart-select,
body[data-theme-preset] .fcc-chart-select,
html[data-theme-preset] .fcc-chart-region-filter,
body[data-theme-preset] .fcc-chart-region-filter {
    background-color: var(--bg-input, var(--bg-card-alt)) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #fcc-raw-data-modal .modal-content,
body[data-theme-preset] #fcc-raw-data-modal .modal-content,
html[data-theme-preset] #fcc-master-data-modal .fcc-center-modal-content,
body[data-theme-preset] #fcc-master-data-modal .fcc-center-modal-content,
html[data-theme-preset] #fcc-master-data-modal > div,
body[data-theme-preset] #fcc-master-data-modal > div {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .fcc-center-modal-header,
body[data-theme-preset] .fcc-center-modal-header,
html[data-theme-preset] .fcc-center-modal-footer,
body[data-theme-preset] .fcc-center-modal-footer {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .fcc-center-modal-title,
body[data-theme-preset] .fcc-center-modal-title {
    color: var(--text-main) !important;
}

html[data-theme-preset] .fcc-center-modal-body,
body[data-theme-preset] .fcc-center-modal-body {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .fcc-form-label,
body[data-theme-preset] .fcc-form-label {
    color: var(--text-main) !important;
}

html[data-theme-preset] .fcc-form-input,
body[data-theme-preset] .fcc-form-input,
html[data-theme-preset] .fcc-form-textarea,
body[data-theme-preset] .fcc-form-textarea {
    background-color: var(--bg-input, var(--bg-card-alt)) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .fcc-form-readonly,
body[data-theme-preset] .fcc-form-readonly,
html[data-theme-preset] .fcc-file-dropzone,
body[data-theme-preset] .fcc-file-dropzone,
html[data-theme-preset] .fcc-file-item,
body[data-theme-preset] .fcc-file-item {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .fcc-raw-th,
body[data-theme-preset] .fcc-raw-th,
html[data-theme-preset] .fcc-inline-table thead,
body[data-theme-preset] .fcc-inline-table thead {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] .fcc-raw-td,
body[data-theme-preset] .fcc-raw-td,
html[data-theme-preset] .fcc-inline-table td,
body[data-theme-preset] .fcc-inline-table td {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #fcc-raw-table tbody tr:hover .fcc-raw-td,
body[data-theme-preset] #fcc-raw-table tbody tr:hover .fcc-raw-td {
    background-color: var(--bg-hover, var(--bg-card-alt)) !important;
}

html[data-theme-preset] .footer-total-row .fcc-raw-td,
body[data-theme-preset] .footer-total-row .fcc-raw-td {
    background-color: var(--bg-card-alt) !important;
    border-top-color: var(--border-base) !important;
}

/* 2. 비용 관리 (costs_management) */
html[data-theme-preset] .cost-kpi-card,
body[data-theme-preset] .cost-kpi-card {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .cost-kpi-card .card-title,
body[data-theme-preset] .cost-kpi-card .card-title {
    color: var(--text-main) !important;
    border-bottom-color: var(--border-base) !important;
}

html[data-theme-preset] .cost-kpi-card .kpi-number,
body[data-theme-preset] .cost-kpi-card .kpi-number {
    color: var(--text-main) !important;
}

html[data-theme-preset] .costs-toolbar-card,
body[data-theme-preset] .costs-toolbar-card {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .costs-toolbar-card .search-box,
body[data-theme-preset] .costs-toolbar-card .search-box,
html[data-theme-preset] .costs-toolbar-card .search-box input,
body[data-theme-preset] .costs-toolbar-card .search-box input,
html[data-theme-preset] .costs-toolbar-card .toolbar-select,
body[data-theme-preset] .costs-toolbar-card .toolbar-select {
    background-color: var(--bg-input, var(--bg-card-alt)) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .costs-toolbar-card #cost-search-btn,
body[data-theme-preset] .costs-toolbar-card #cost-search-btn {
    background-color: var(--btn-primary-bg, var(--color-primary)) !important;
    border-color: var(--btn-primary-bg, var(--color-primary)) !important;
    color: #ffffff !important;
}

html[data-theme-preset] .costs-toolbar-card #cost-fullscreen-btn.btn-outline-primary,
body[data-theme-preset] .costs-toolbar-card #cost-fullscreen-btn.btn-outline-primary {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--accent-main, var(--color-primary)) !important;
    color: var(--accent-main, var(--color-primary)) !important;
}

html[data-theme-preset] .costs-toolbar-card #cost-export-btn,
body[data-theme-preset] .costs-toolbar-card #cost-export-btn {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .costs-main-matrix-section,
body[data-theme-preset] .costs-main-matrix-section {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .costs-section-header,
body[data-theme-preset] .costs-section-header {
    border-bottom-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .costs-summary-matrix-table th,
body[data-theme-preset] .costs-summary-matrix-table th,
html[data-theme-preset] #costs-table th,
body[data-theme-preset] #costs-table th {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] .costs-summary-matrix-table th.highlight-total-header,
body[data-theme-preset] .costs-summary-matrix-table th.highlight-total-header {
    background-color: var(--accent-soft, rgba(59, 130, 246, 0.14)) !important;
    color: var(--accent-main, var(--color-primary)) !important;
}

html[data-theme-preset] .costs-summary-matrix-table td,
body[data-theme-preset] .costs-summary-matrix-table td,
html[data-theme-preset] #costs-table td,
body[data-theme-preset] #costs-table td {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .costs-summary-matrix-table td.highlight-total-cell,
body[data-theme-preset] .costs-summary-matrix-table td.highlight-total-cell {
    background-color: var(--bg-card) !important;
    color: var(--accent-main, var(--color-primary)) !important;
}

html[data-theme-preset] .costs-summary-matrix-table td.empty-month-cell,
body[data-theme-preset] .costs-summary-matrix-table td.empty-month-cell {
    background-color: var(--bg-card) !important;
    color: var(--text-muted, var(--text-sub)) !important;
}

html[data-theme-preset] .costs-summary-matrix-table > tbody > tr:not(.costs-accordion-row):hover > td,
body[data-theme-preset] .costs-summary-matrix-table > tbody > tr:not(.costs-accordion-row):hover > td,
html[data-theme-preset] #costs-table > tbody > tr:hover > td,
body[data-theme-preset] #costs-table > tbody > tr:hover > td {
    background-color: var(--bg-hover, var(--bg-card-alt)) !important;
}

html[data-theme-preset] .costs-summary-matrix-table td.acc-active-cell,
body[data-theme-preset] .costs-summary-matrix-table td.acc-active-cell {
    background-color: var(--accent-soft, rgba(59, 130, 246, 0.16)) !important;
    color: var(--accent-main, var(--color-primary)) !important;
    border-color: var(--border-base) !important;
    box-shadow: inset 0 -2px 0 0 var(--accent-main, var(--color-primary)) !important;
}

html[data-theme-preset] .costs-summary-matrix-table td.costs-clickable-cell:hover,
body[data-theme-preset] .costs-summary-matrix-table td.costs-clickable-cell:hover {
    background-color: var(--accent-soft, rgba(59, 130, 246, 0.14)) !important;
    color: var(--accent-main, var(--color-primary)) !important;
}

html[data-theme-preset] tr.costs-parent-row.acc-row-open td,
body[data-theme-preset] tr.costs-parent-row.acc-row-open td {
    background-color: var(--accent-soft, rgba(59, 130, 246, 0.14)) !important;
}

html[data-theme-preset] .col-module-badge,
body[data-theme-preset] .col-module-badge,
html[data-theme-preset] .col-module-badge span,
body[data-theme-preset] .col-module-badge span {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] tr.costs-accordion-row > td.costs-accordion-td,
body[data-theme-preset] tr.costs-accordion-row > td.costs-accordion-td,
html[data-theme-preset] tr.costs-accordion-row:hover > td.costs-accordion-td,
body[data-theme-preset] tr.costs-accordion-row:hover > td.costs-accordion-td,
html[data-theme-preset] .costs-accordion-panel,
body[data-theme-preset] .costs-accordion-panel {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .costs-acc-header,
body[data-theme-preset] .costs-acc-header {
    border-bottom-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .acc-summary-pill,
body[data-theme-preset] .acc-summary-pill {
    background-color: var(--accent-soft, rgba(59, 130, 246, 0.14)) !important;
    border-color: var(--accent-main, var(--color-primary)) !important;
    color: var(--accent-main, var(--color-primary)) !important;
}

html[data-theme-preset] .costs-acc-table-container,
body[data-theme-preset] .costs-acc-table-container {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .costs-acc-table th,
body[data-theme-preset] .costs-acc-table th {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] .costs-acc-table td,
body[data-theme-preset] .costs-acc-table td {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .costs-acc-table > tbody > tr:hover > td,
body[data-theme-preset] .costs-acc-table > tbody > tr:hover > td {
    background-color: var(--bg-hover, var(--bg-card-alt)) !important;
}

html[data-theme-preset] .footer-total-row td,
body[data-theme-preset] .footer-total-row td,
html[data-theme-preset] #costs-tfoot td,
body[data-theme-preset] #costs-tfoot td {
    background-color: var(--bg-card-alt) !important;
    border-top-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

/* 3. 비용 관리 새창 전체화면 뷰 (costs_schedule_fullscreen.html) */
html[data-theme-preset] body.fullscreen-schedule-body,
body[data-theme-preset].fullscreen-schedule-body {
    background-color: var(--bg-body, var(--bg-card)) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .fullscreen-header-bar,
body[data-theme-preset] .fullscreen-header-bar,
html[data-theme-preset] .fullscreen-toolbar,
body[data-theme-preset] .fullscreen-toolbar {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .fullscreen-toolbar .search-box input,
body[data-theme-preset] .fullscreen-toolbar .search-box input,
html[data-theme-preset] .fs-table-toolbar .search-box input,
body[data-theme-preset] .fs-table-toolbar .search-box input,
html[data-theme-preset] .fs-select,
body[data-theme-preset] .fs-select {
    background-color: var(--bg-input, var(--bg-card-alt)) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .btn-outline-green,
body[data-theme-preset] .btn-outline-green {
    background-color: var(--bg-card) !important;
    border-color: var(--border-strong, #CBD5E1) !important;
    color: var(--text-main, #334155) !important;
}


/* ==========================================================================
   [합의금 입금일정 & 스마트 예약 라운지/인프라/내예약/퀵예약 테마 프리셋 통합 동기화]
   ========================================================================== */

/* 1. 비용 분석: 합의금 입금일정 (settlement_schedule) */
html[data-theme-preset] .settlement-kpi-summary-card,
body[data-theme-preset] .settlement-kpi-summary-card,
html[data-theme-preset] .settlement-detail-card,
body[data-theme-preset] .settlement-detail-card,
html[data-theme-preset] #settlement-case-details-modal .modal-content,
body[data-theme-preset] #settlement-case-details-modal .modal-content {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .settlement-kpi-card-header,
body[data-theme-preset] .settlement-kpi-card-header,
html[data-theme-preset] #settlement-case-details-modal .modal-header,
body[data-theme-preset] #settlement-case-details-modal .modal-header,
html[data-theme-preset] #settlement-case-details-modal .modal-footer,
body[data-theme-preset] #settlement-case-details-modal .modal-footer {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .settlement-kpi-card-header h3,
body[data-theme-preset] .settlement-kpi-card-header h3 {
    color: var(--text-main) !important;
}

html[data-theme-preset] .settlement-matrix-table th,
body[data-theme-preset] .settlement-matrix-table th {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] .settlement-matrix-table td,
body[data-theme-preset] .settlement-matrix-table td {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .settlement-matrix-table > tbody > tr:not(.settlement-accordion-row):hover > td,
body[data-theme-preset] .settlement-matrix-table > tbody > tr:not(.settlement-accordion-row):hover > td {
    background-color: var(--bg-hover, var(--bg-card-alt)) !important;
}

html[data-theme-preset] .settlement-matrix-table td.acc-active-cell,
body[data-theme-preset] .settlement-matrix-table td.acc-active-cell,
html[data-theme-preset] .settlement-matrix-table td.acc-active-cell.highlight-total-cell,
body[data-theme-preset] .settlement-matrix-table td.acc-active-cell.highlight-total-cell,
html[data-theme-preset] .settlement-matrix-table td.acc-active-cell span,
body[data-theme-preset] .settlement-matrix-table td.acc-active-cell span {
    background-color: var(--accent-soft, rgba(59, 130, 246, 0.16)) !important;
    color: var(--accent-main, var(--color-primary)) !important;
    border-color: var(--border-base) !important;
    box-shadow: inset 0 -2px 0 0 var(--accent-main, var(--color-primary)) !important;
}

html[data-theme-preset] .settlement-matrix-table td.stl-clickable-cell:hover,
body[data-theme-preset] .settlement-matrix-table td.stl-clickable-cell:hover {
    background-color: var(--accent-soft, rgba(59, 130, 246, 0.14)) !important;
    color: var(--accent-main, var(--color-primary)) !important;
}

html[data-theme-preset] .kpi-row-grandtotal td,
body[data-theme-preset] .kpi-row-grandtotal td {
    background-color: var(--bg-card-alt) !important;
    border-top-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] tr.settlement-accordion-row > td.settlement-accordion-td,
body[data-theme-preset] tr.settlement-accordion-row > td.settlement-accordion-td,
html[data-theme-preset] .settlement-accordion-panel,
body[data-theme-preset] .settlement-accordion-panel {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .settlement-acc-header,
body[data-theme-preset] .settlement-acc-header {
    border-bottom-color: var(--border-base) !important;
}

html[data-theme-preset] .settlement-acc-title-wrap,
body[data-theme-preset] .settlement-acc-title-wrap {
    color: var(--text-main) !important;
}

html[data-theme-preset] .settlement-acc-table-container,
body[data-theme-preset] .settlement-acc-table-container {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .settlement-acc-table th,
body[data-theme-preset] .settlement-acc-table th {
    background-color: var(--bg-card-alt) !important;
    border-bottom-color: var(--border-base) !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] .settlement-acc-table td,
body[data-theme-preset] .settlement-acc-table td {
    background-color: var(--bg-card) !important;
    border-bottom-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .settlement-acc-table > tbody > tr:hover > td,
body[data-theme-preset] .settlement-acc-table > tbody > tr:hover > td {
    background-color: var(--bg-hover, var(--bg-card-alt)) !important;
}

html[data-theme-preset] .btn-open-detail-sm,
body[data-theme-preset] .btn-open-detail-sm {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .btn-open-detail-sm:hover,
body[data-theme-preset] .btn-open-detail-sm:hover {
    background-color: var(--accent-main, var(--color-primary)) !important;
    border-color: var(--accent-main, var(--color-primary)) !important;
    color: #FFFFFF !important;
}

/* 2. 스마트 예약 라운지 (reservation_lounge) */
html[data-theme-preset] .srt-wrapper,
body[data-theme-preset] .srt-wrapper {
    background-color: var(--bg-body, var(--bg-card)) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .srt-control-panel,
body[data-theme-preset] .srt-control-panel,
html[data-theme-preset] .srt-dash-panel,
body[data-theme-preset] .srt-dash-panel,
html[data-theme-preset] .srt-calendar-section,
body[data-theme-preset] .srt-calendar-section,
html[data-theme-preset] .srt-calendar-grid,
body[data-theme-preset] .srt-calendar-grid,
html[data-theme-preset] .srt-calendar-cell,
body[data-theme-preset] .srt-calendar-cell,
html[data-theme-preset] .srt-3tier-grid,
body[data-theme-preset] .srt-3tier-grid,
html[data-theme-preset] .srt-grid-tier,
body[data-theme-preset] .srt-grid-tier,
html[data-theme-preset] #srt-my-meeting-slide-panel,
body[data-theme-preset] #srt-my-meeting-slide-panel,
html[data-theme-preset] .srt-mac-modal-overlay .srt-modal-wide-xl,
body[data-theme-preset] .srt-mac-modal-overlay .srt-modal-wide-xl,
html[data-theme-preset] .srt-center-modal-wrap .srt-center-modal-content,
body[data-theme-preset] .srt-center-modal-wrap .srt-center-modal-content,
html[data-theme-preset] #srt-meeting-detail-modal .srt-modal-md,
body[data-theme-preset] #srt-meeting-detail-modal .srt-modal-md,
html[data-theme-preset] #srt-quick-book-modal .srt-modal-md,
body[data-theme-preset] #srt-quick-book-modal .srt-modal-md,
html[data-theme-preset] #srt-tier-modal .srt-mac-modal-window,
body[data-theme-preset] #srt-tier-modal .srt-mac-modal-window,
html[data-theme-preset] .srt-res-modal-content,
body[data-theme-preset] .srt-res-modal-content,
html[data-theme-preset] .srt-fw-container,
body[data-theme-preset] .srt-fw-container,
html[data-theme-preset] .srt-fw-card,
body[data-theme-preset] .srt-fw-card {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .srt-dash-panel-title,
body[data-theme-preset] .srt-dash-panel-title,
html[data-theme-preset] .srt-cal-month-title,
body[data-theme-preset] .srt-cal-month-title,
html[data-theme-preset] .srt-dash-cal-title,
body[data-theme-preset] .srt-dash-cal-title,
html[data-theme-preset] .srt-device-title,
body[data-theme-preset] .srt-device-title,
html[data-theme-preset] .srt-res-modal-title,
body[data-theme-preset] .srt-res-modal-title,
html[data-theme-preset] .srt-fw-amenity-title,
body[data-theme-preset] .srt-fw-amenity-title {
    color: var(--text-main) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .srt-btn-infra-center,
body[data-theme-preset] .srt-btn-infra-center,
html[data-theme-preset] .srt-dash-cal-header,
body[data-theme-preset] .srt-dash-cal-header,
html[data-theme-preset] .srt-dash-cal-btn,
body[data-theme-preset] .srt-dash-cal-btn,
html[data-theme-preset] .srt-cal-nav-btn,
body[data-theme-preset] .srt-cal-nav-btn,
html[data-theme-preset] .srt-cal-today-btn,
body[data-theme-preset] .srt-cal-today-btn,
html[data-theme-preset] .srt-cal-center-nav-absolute,
body[data-theme-preset] .srt-cal-center-nav-absolute,
html[data-theme-preset] .srt-tier-header,
body[data-theme-preset] .srt-tier-header,
html[data-theme-preset] .srt-tier-header-main,
body[data-theme-preset] .srt-tier-header-main,
html[data-theme-preset] .srt-calendar-cell.other-month,
body[data-theme-preset] .srt-calendar-cell.other-month,
html[data-theme-preset] .srt-selected-room-device-card,
body[data-theme-preset] .srt-selected-room-device-card,
html[data-theme-preset] .srt-device-badge,
body[data-theme-preset] .srt-device-badge,
html[data-theme-preset] .srt-badge-label,
body[data-theme-preset] .srt-badge-label,
html[data-theme-preset] .srt-readonly-box-gray,
body[data-theme-preset] .srt-readonly-box-gray,
html[data-theme-preset] .srt-btn-outline,
body[data-theme-preset] .srt-btn-outline,
html[data-theme-preset] .srt-btn-room-info,
body[data-theme-preset] .srt-btn-room-info,
html[data-theme-preset] .srt-res-modal-header,
body[data-theme-preset] .srt-res-modal-header,
html[data-theme-preset] .srt-res-modal-footer,
body[data-theme-preset] .srt-res-modal-footer,
html[data-theme-preset] .srt-res-info-desc,
body[data-theme-preset] .srt-res-info-desc,
html[data-theme-preset] #srt-quick-book-modal .srt-modal-header-sm,
body[data-theme-preset] #srt-quick-book-modal .srt-modal-header-sm,
html[data-theme-preset] .srt-fw-header,
body[data-theme-preset] .srt-fw-header,
html[data-theme-preset] .srt-fw-footer,
body[data-theme-preset] .srt-fw-footer,
html[data-theme-preset] .srt-fw-address-text,
body[data-theme-preset] .srt-fw-address-text,
html[data-theme-preset] .srt-fw-info-item,
body[data-theme-preset] .srt-fw-info-item,
html[data-theme-preset] .srt-fw-amenity-group,
body[data-theme-preset] .srt-fw-amenity-group,
html[data-theme-preset] .srt-fw-badge,
body[data-theme-preset] .srt-fw-badge,
html[data-theme-preset] .srt-fw-guideline-box,
body[data-theme-preset] .srt-fw-guideline-box {
    background-color: var(--bg-card-alt) !important;
    background: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .srt-input,
body[data-theme-preset] .srt-input,
html[data-theme-preset] .srt-select,
body[data-theme-preset] .srt-select,
html[data-theme-preset] .srt-textarea,
body[data-theme-preset] .srt-textarea,
html[data-theme-preset] .srt-cal-filter-select,
body[data-theme-preset] .srt-cal-filter-select {
    background-color: var(--bg-input, var(--bg-card-alt)) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .srt-menu-list li,
body[data-theme-preset] .srt-menu-list li {
    color: var(--text-sub) !important;
}

html[data-theme-preset] .srt-menu-list li:hover,
body[data-theme-preset] .srt-menu-list li:hover {
    background-color: var(--bg-hover, var(--bg-card-alt)) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .srt-menu-list li.active,
body[data-theme-preset] .srt-menu-list li.active {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    border-left: 3px solid var(--accent-main, var(--color-primary)) !important;
    color: var(--accent-main, var(--color-primary)) !important;
}

html[data-theme-preset] .srt-meeting-specs-table tbody tr:hover td,
body[data-theme-preset] .srt-meeting-specs-table tbody tr:hover td {
    background-color: var(--bg-hover, var(--bg-card-alt)) !important;
}

html[data-theme-preset] .srt-res-modal-body,
body[data-theme-preset] .srt-res-modal-body,
html[data-theme-preset] #srt-quick-book-modal .srt-modal-body-sm,
body[data-theme-preset] #srt-quick-book-modal .srt-modal-body-sm {
    background-color: var(--bg-body, var(--bg-card)) !important;
}

html[data-theme-preset] .srt-res-info-row,
body[data-theme-preset] .srt-res-info-row {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .srt-res-info-label,
body[data-theme-preset] .srt-res-info-label,
html[data-theme-preset] .srt-fw-info-label,
body[data-theme-preset] .srt-fw-info-label {
    color: var(--text-sub) !important;
}

/* 3. 스마트 예약 인프라 자산 등록 & 정책 센터 (srt_infra_project_window.html) */
html[data-theme-preset] body.infra-win-body,
body[data-theme-preset].infra-win-body,
html[data-theme-preset] .infra-form-panel,
body[data-theme-preset] .infra-form-panel {
    background-color: var(--bg-body, var(--bg-card)) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .infra-top-header,
body[data-theme-preset] .infra-top-header,
html[data-theme-preset] .infra-list-panel,
body[data-theme-preset] .infra-list-panel,
html[data-theme-preset] .infra-form-status-bar,
body[data-theme-preset] .infra-form-status-bar,
html[data-theme-preset] .infra-section-box,
body[data-theme-preset] .infra-section-box,
html[data-theme-preset] .infra-form-footer,
body[data-theme-preset] .infra-form-footer,
html[data-theme-preset] .infra-table-wrap,
body[data-theme-preset] .infra-table-wrap {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .infra-list-header,
body[data-theme-preset] .infra-list-header,
html[data-theme-preset] .infra-section-title,
body[data-theme-preset] .infra-section-title,
html[data-theme-preset] .infra-table th,
body[data-theme-preset] .infra-table th,
html[data-theme-preset] .amenity-chip-container,
body[data-theme-preset] .amenity-chip-container,
html[data-theme-preset] .amenity-chip,
body[data-theme-preset] .amenity-chip,
html[data-theme-preset] .infra-cat-tab-btn,
body[data-theme-preset] .infra-cat-tab-btn,
html[data-theme-preset] .photo-dropzone,
body[data-theme-preset] .photo-dropzone {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .infra-cat-tab-btn.active,
body[data-theme-preset] .infra-cat-tab-btn.active,
html[data-theme-preset] .amenity-chip.selected,
body[data-theme-preset] .amenity-chip.selected {
    background-color: var(--accent-main, var(--color-primary)) !important;
    border-color: var(--accent-main, var(--color-primary)) !important;
    color: #FFFFFF !important;
}

html[data-theme-preset] .infra-search-box input,
body[data-theme-preset] .infra-search-box input,
html[data-theme-preset] .form-input-compact,
body[data-theme-preset] .form-input-compact,
html[data-theme-preset] .form-textarea-compact,
body[data-theme-preset] .form-textarea-compact {
    background-color: var(--bg-input, var(--bg-card-alt)) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .infra-table td,
body[data-theme-preset] .infra-table td {
    background-color: var(--bg-card) !important;
    border-bottom-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .infra-table tbody tr:hover td,
body[data-theme-preset] .infra-table tbody tr:hover td {
    background-color: var(--bg-hover, var(--bg-card-alt)) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .infra-table tbody tr.selected td,
body[data-theme-preset] .infra-table tbody tr.selected td {
    background-color: rgba(59, 130, 246, 0.16) !important;
    color: var(--text-main) !important;
}

/* 4. 내 예약 현황 & 인프라 자원 센터 (srt_my_reservations_window.html) */
html[data-theme-preset] body.myres-win-body,
body[data-theme-preset].myres-win-body,
html[data-theme-preset] .myres-content-body,
body[data-theme-preset] .myres-content-body {
    background-color: var(--bg-body, var(--bg-card)) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .myres-top-header,
body[data-theme-preset] .myres-top-header,
html[data-theme-preset] .myres-filter-bar,
body[data-theme-preset] .myres-filter-bar,
html[data-theme-preset] .myres-table,
body[data-theme-preset] .myres-table,
html[data-theme-preset] .myres-edit-card,
body[data-theme-preset] .myres-edit-card {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .btn-myres-header,
body[data-theme-preset] .btn-myres-header,
html[data-theme-preset] .myres-tab-btn,
body[data-theme-preset] .myres-tab-btn,
html[data-theme-preset] .myres-table th,
body[data-theme-preset] .myres-table th,
html[data-theme-preset] .myres-edit-header,
body[data-theme-preset] .myres-edit-header,
html[data-theme-preset] .myres-edit-form-footer,
body[data-theme-preset] .myres-edit-form-footer,
html[data-theme-preset] .btn-back-to-list,
body[data-theme-preset] .btn-back-to-list,
html[data-theme-preset] .btn-myres-cancel-edit,
body[data-theme-preset] .btn-myres-cancel-edit {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .myres-tab-btn.active,
body[data-theme-preset] .myres-tab-btn.active {
    background-color: var(--accent-main, var(--color-primary)) !important;
    border-color: var(--accent-main, var(--color-primary)) !important;
    color: #FFFFFF !important;
}

html[data-theme-preset] .myres-search-input,
body[data-theme-preset] .myres-search-input,
html[data-theme-preset] .myres-form-control,
body[data-theme-preset] .myres-form-control {
    background-color: var(--bg-input, var(--bg-card-alt)) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .myres-table td,
body[data-theme-preset] .myres-table td {
    background-color: var(--bg-card) !important;
    border-bottom-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .myres-table tr:hover td,
body[data-theme-preset] .myres-table tr:hover td {
    background-color: var(--bg-hover, var(--bg-card-alt)) !important;
}

/* 5. 스마트 회의실 퀵 예약 / 멤버십 & 차량 예약 (reservation_project_window.html) */
html[data-theme-preset] .res-body-scroll,
body[data-theme-preset] .res-body-scroll {
    background-color: var(--bg-body, var(--bg-card)) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .res-top-navbar,
body[data-theme-preset] .res-top-navbar,
html[data-theme-preset] .res-card,
body[data-theme-preset] .res-card,
html[data-theme-preset] .mini-cal-card,
body[data-theme-preset] .mini-cal-card {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .res-card-header,
body[data-theme-preset] .res-card-header,
html[data-theme-preset] .asset-info-banner,
body[data-theme-preset] .asset-info-banner,
html[data-theme-preset] .mini-cal-btn,
body[data-theme-preset] .mini-cal-btn,
html[data-theme-preset] .sharp-btn-secondary,
body[data-theme-preset] .sharp-btn-secondary {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .res-input,
body[data-theme-preset] .res-input,
html[data-theme-preset] .res-select,
body[data-theme-preset] .res-select,
html[data-theme-preset] .res-textarea,
body[data-theme-preset] .res-textarea {
    background-color: var(--bg-input, var(--bg-card-alt)) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .mini-cal-day:hover,
body[data-theme-preset] .mini-cal-day:hover {
    background-color: var(--bg-hover, var(--bg-card-alt)) !important;
}

/* 6. 전사 연수원 객실 상세 (resort_room_info_window.html) */
html[data-theme-preset] .resort-header,
body[data-theme-preset] .resort-header,
html[data-theme-preset] .resort-panel,
body[data-theme-preset] .resort-panel,
html[data-theme-preset] .resort-footer,
body[data-theme-preset] .resort-footer {
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .resort-panel .panel-header,
body[data-theme-preset] .resort-panel .panel-header,
html[data-theme-preset] .map-info-bar,
body[data-theme-preset] .map-info-bar,
html[data-theme-preset] .spec-item,
body[data-theme-preset] .spec-item,
html[data-theme-preset] .amenity-badge,
body[data-theme-preset] .amenity-badge,
html[data-theme-preset] .rules-content-box,
body[data-theme-preset] .rules-content-box,
html[data-theme-preset] .room-select-dropdown,
body[data-theme-preset] .room-select-dropdown {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}


/* ==========================================================================
   [공통 시맨틱 변수 보강 (--bg-hover / --bg-input / --border-light) + 공시/스튜디오/계약/수발신 프리셋 통합]
   ========================================================================== */
html[data-theme-preset]:not([data-theme="dark"]):not(.dark-mode),
html[data-theme-preset]:not([data-theme="dark"]):not(.dark-mode) body,
body[data-theme-preset]:not(.dark-mode) {
    --bg-hover: var(--bg-sub, var(--bg-card-alt));
    --bg-input: var(--ivory-input-bg, var(--bg-card));
    --border-light: var(--border-base);
    --accent-main: var(--color-primary);
}

html[data-theme-preset][data-theme="dark"],
html[data-theme-preset].dark-mode,
html[data-theme-preset][data-theme="dark"] body,
html[data-theme-preset].dark-mode body,
body[data-theme-preset].dark-mode,
body.dark-mode[data-theme-preset] {
    --bg-hover: var(--bg-sub, var(--bg-card-alt));
    --bg-input: var(--bg-card-alt);
    --border-light: var(--border-base);
    --accent-main: var(--color-primary);
}

/* 1. 공시 업무: 법인 서류 & 등기 대장 (corp_documents) */
html[data-theme-preset] .corp-gov-workspace,
body[data-theme-preset] .corp-gov-workspace {
    color: var(--text-main) !important;
}

html[data-theme-preset] .corp-gov-workspace .kpi-card,
body[data-theme-preset] .corp-gov-workspace .kpi-card,
html[data-theme-preset] .corp-gov-workspace .corp-main-workspace-card,
body[data-theme-preset] .corp-gov-workspace .corp-main-workspace-card,
html[data-theme-preset] .corp-gov-workspace .corp-bento-card,
body[data-theme-preset] .corp-gov-workspace .corp-bento-card,
html[data-theme-preset] .corp-gov-workspace .corp-calendar-panel,
body[data-theme-preset] .corp-gov-workspace .corp-calendar-panel,
html[data-theme-preset] .corp-gov-workspace .corp-split-master,
body[data-theme-preset] .corp-gov-workspace .corp-split-master,
html[data-theme-preset] .corp-gov-workspace .corp-split-master .table-container,
body[data-theme-preset] .corp-gov-workspace .corp-split-master .table-container,
html[data-theme-preset] .corp-gov-workspace .corp-split-detail,
body[data-theme-preset] .corp-gov-workspace .corp-split-detail,
html[data-theme-preset] .corp-gov-workspace .split-detail-card-wrap,
body[data-theme-preset] .corp-gov-workspace .split-detail-card-wrap,
html[data-theme-preset] .corp-gov-workspace .split-preview-doc-card,
body[data-theme-preset] .corp-gov-workspace .split-preview-doc-card,
html[data-theme-preset] #corp-scheduler-modal .interior-modal-content,
body[data-theme-preset] #corp-scheduler-modal .interior-modal-content,
html[data-theme-preset] #corp-basic-upload-modal .interior-modal-content,
body[data-theme-preset] #corp-basic-upload-modal .interior-modal-content,
html[data-theme-preset] #corp-meeting-detail-modal .interior-modal-content,
body[data-theme-preset] #corp-meeting-detail-modal .interior-modal-content,
html[data-theme-preset] .corp-studio-modal-content,
body[data-theme-preset] .corp-studio-modal-content {
    background-color: var(--bg-card) !important;
    background: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .corp-gov-workspace .kpi-card-header,
body[data-theme-preset] .corp-gov-workspace .kpi-card-header,
html[data-theme-preset] .corp-gov-workspace .corp-cockpit-item,
body[data-theme-preset] .corp-gov-workspace .corp-cockpit-item,
html[data-theme-preset] .corp-gov-workspace .search-result-stat-chip,
body[data-theme-preset] .corp-gov-workspace .search-result-stat-chip,
html[data-theme-preset] .corp-gov-workspace .corp-tab-bar,
body[data-theme-preset] .corp-gov-workspace .corp-tab-bar,
html[data-theme-preset] .corp-gov-workspace .corp-split-master .data-table th,
body[data-theme-preset] .corp-gov-workspace .corp-split-master .data-table th,
html[data-theme-preset] .corp-gov-workspace .split-card-header-bar,
body[data-theme-preset] .corp-gov-workspace .split-card-header-bar,
html[data-theme-preset] .corp-gov-workspace .split-preview-toolbar,
body[data-theme-preset] .corp-gov-workspace .split-preview-toolbar,
html[data-theme-preset] .corp-gov-workspace .split-meta-unit,
body[data-theme-preset] .corp-gov-workspace .split-meta-unit,
html[data-theme-preset] .corp-gov-workspace .split-empty-doc-box,
body[data-theme-preset] .corp-gov-workspace .split-empty-doc-box,
html[data-theme-preset] .corp-gov-workspace .officer-detail-box,
body[data-theme-preset] .corp-gov-workspace .officer-detail-box,
html[data-theme-preset] .corp-gov-workspace .shareholder-detail-box,
body[data-theme-preset] .corp-gov-workspace .shareholder-detail-box,
html[data-theme-preset] .gov-main-table th,
body[data-theme-preset] .gov-main-table th,
html[data-theme-preset] #corp-scheduler-modal .interior-modal-header,
body[data-theme-preset] #corp-scheduler-modal .interior-modal-header,
html[data-theme-preset] #corp-scheduler-modal .interior-modal-footer,
body[data-theme-preset] #corp-scheduler-modal .interior-modal-footer,
html[data-theme-preset] #corp-basic-upload-modal .interior-modal-header,
body[data-theme-preset] #corp-basic-upload-modal .interior-modal-header,
html[data-theme-preset] #corp-basic-upload-modal .interior-modal-footer,
body[data-theme-preset] #corp-basic-upload-modal .interior-modal-footer,
html[data-theme-preset] #corp-meeting-detail-modal .interior-modal-header,
body[data-theme-preset] #corp-meeting-detail-modal .interior-modal-header {
    background-color: var(--bg-card-alt) !important;
    background: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .corp-gov-workspace .corp-search-input-box,
body[data-theme-preset] .corp-gov-workspace .corp-search-input-box,
html[data-theme-preset] .corp-gov-workspace .corp-global-search-input,
body[data-theme-preset] .corp-gov-workspace .corp-global-search-input {
    background-color: var(--bg-input, var(--bg-card-alt)) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .gov-main-table td,
body[data-theme-preset] .gov-main-table td,
html[data-theme-preset] .corp-gov-workspace .corp-split-master .data-table td,
body[data-theme-preset] .corp-gov-workspace .corp-split-master .data-table td {
    background-color: var(--bg-card) !important;
    border-bottom-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .gov-main-table tbody tr:hover td,
body[data-theme-preset] .gov-main-table tbody tr:hover td,
html[data-theme-preset] .corp-gov-workspace .corp-split-master .data-table tbody tr:hover td,
body[data-theme-preset] .corp-gov-workspace .corp-split-master .data-table tbody tr:hover td {
    background-color: var(--bg-sub, var(--bg-card-alt)) !important;
}

/* 2. 법인 결의 & 의사록 자동화 스튜디오 (corp_meeting_studio.html) */
html[data-theme-preset] body.studio-body,
body[data-theme-preset].studio-body,
html[data-theme-preset] .studio-main-workspace,
body[data-theme-preset] .studio-main-workspace,
html[data-theme-preset] .a4-sheet-container,
body[data-theme-preset] .a4-sheet-container {
    background-color: var(--bg-body, var(--bg-card)) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .studio-top-nav,
body[data-theme-preset] .studio-top-nav,
html[data-theme-preset] .studio-sub-tab-bar,
body[data-theme-preset] .studio-sub-tab-bar,
html[data-theme-preset] .studio-card,
body[data-theme-preset] .studio-card,
html[data-theme-preset] .studio-modal-box,
body[data-theme-preset] .studio-modal-box,
html[data-theme-preset] .a4-sheet,
body[data-theme-preset] .a4-sheet,
html[data-theme-preset] .a4-ledger-sheet,
body[data-theme-preset] .a4-ledger-sheet,
html[data-theme-preset] .agenda-box,
body[data-theme-preset] .agenda-box,
html[data-theme-preset] .base-history-table-wrap,
body[data-theme-preset] .base-history-table-wrap {
    background-color: var(--bg-card) !important;
    background: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .studio-card-header,
body[data-theme-preset] .studio-card-header,
html[data-theme-preset] .studio-drop-box,
body[data-theme-preset] .studio-drop-box,
html[data-theme-preset] .studio-modal-head,
body[data-theme-preset] .studio-modal-head,
html[data-theme-preset] .studio-modal-foot,
body[data-theme-preset] .studio-modal-foot,
html[data-theme-preset] .agenda-box-head,
body[data-theme-preset] .agenda-box-head,
html[data-theme-preset] .agenda-preset-toolbar,
body[data-theme-preset] .agenda-preset-toolbar,
html[data-theme-preset] .studio-mini-table th,
body[data-theme-preset] .studio-mini-table th,
html[data-theme-preset] .base-history-header-bar,
body[data-theme-preset] .base-history-header-bar {
    background-color: var(--bg-card-alt) !important;
    background: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .studio-body input,
body[data-theme-preset] .studio-body input,
html[data-theme-preset] .studio-body select,
body[data-theme-preset] .studio-body select,
html[data-theme-preset] .studio-body textarea,
body[data-theme-preset] .studio-body textarea {
    background-color: var(--bg-input, var(--bg-card-alt)) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .studio-mini-table td,
body[data-theme-preset] .studio-mini-table td {
    background-color: var(--bg-card) !important;
    border-bottom-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .btn-sub-tab,
body[data-theme-preset] .btn-sub-tab {
    color: var(--text-sub) !important;
}

html[data-theme-preset] .btn-sub-tab:hover,
body[data-theme-preset] .btn-sub-tab:hover {
    background-color: var(--bg-sub, var(--bg-card-alt)) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .btn-sub-tab.active,
body[data-theme-preset] .btn-sub-tab.active {
    background-color: var(--color-primary-light) !important;
    color: var(--accent-main, var(--color-primary)) !important;
    border-color: var(--accent-main, var(--color-primary)) !important;
}

/* 3. 문서관리: 계약서 관리 & 계약서 수정/등록 팝업 */
html[data-theme-preset] .contract-kpi-card,
body[data-theme-preset] .contract-kpi-card,
html[data-theme-preset] .table-container:has(#contracts-table),
body[data-theme-preset] .table-container:has(#contracts-table),
html[data-theme-preset] .widget:has(#contracts-table) .table-container,
body[data-theme-preset] .widget:has(#contracts-table) .table-container,
html[data-theme-preset] #contract-detail-section,
body[data-theme-preset] #contract-detail-section,
html[data-theme-preset] #contract-edit-modal .modal-content,
body[data-theme-preset] #contract-edit-modal .modal-content {
    background-color: var(--bg-card) !important;
    background: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .contract-3yr-item,
body[data-theme-preset] .contract-3yr-item,
html[data-theme-preset] .contract-recent-tag,
body[data-theme-preset] .contract-recent-tag,
html[data-theme-preset] #contracts-table th,
body[data-theme-preset] #contracts-table th,
html[data-theme-preset] #contract-edit-modal .modal-header,
body[data-theme-preset] #contract-edit-modal .modal-header,
html[data-theme-preset] #contract-edit-modal .modal-footer,
body[data-theme-preset] #contract-edit-modal .modal-footer {
    background-color: var(--bg-card-alt) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #contracts-table td,
body[data-theme-preset] #contracts-table td {
    border-bottom-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #contracts-table tbody tr:hover td,
body[data-theme-preset] #contracts-table tbody tr:hover td {
    background-color: var(--bg-sub, var(--bg-card-alt)) !important;
}

/* 4. 문서관리: 수/발신 대장 (mail_log) */
html[data-theme-preset] .mail-kpi-card,
body[data-theme-preset] .mail-kpi-card,
html[data-theme-preset] .mail-log-container .widget,
body[data-theme-preset] .mail-log-container .widget,
html[data-theme-preset] #sent-log-section,
body[data-theme-preset] #sent-log-section,
html[data-theme-preset] #received-log-section,
body[data-theme-preset] #received-log-section,
html[data-theme-preset] .mail-log-container .table-container,
body[data-theme-preset] .mail-log-container .table-container,
html[data-theme-preset] #mail-log-modal .modal-content,
body[data-theme-preset] #mail-log-modal .modal-content {
    background-color: var(--bg-card) !important;
    background: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #sent-log-table th,
body[data-theme-preset] #sent-log-table th,
html[data-theme-preset] #received-log-table th,
body[data-theme-preset] #received-log-table th {
    background-color: var(--bg-card-alt) !important;
    border-bottom-color: var(--border-base) !important;
    color: var(--text-sub) !important;
}

html[data-theme-preset] #sent-log-table td,
body[data-theme-preset] #sent-log-table td,
html[data-theme-preset] #received-log-table td,
body[data-theme-preset] #received-log-table td {
    border-bottom-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #sent-log-table tbody tr:hover td,
body[data-theme-preset] #sent-log-table tbody tr:hover td,
html[data-theme-preset] #received-log-table tbody tr:hover td,
body[data-theme-preset] #received-log-table tbody tr:hover td {
    background-color: var(--bg-sub, var(--bg-card-alt)) !important;
}

/* ==========================================================================
   [마스터: 사용자 관리 & 보안 상세 인스펙터 & 시스템 기준/직급 팝업] 테마 프리셋 완전 연동
   ========================================================================== */
html[data-theme-preset] #user-security-panel.security-detail-wrapper,
body[data-theme-preset] #user-security-panel.security-detail-wrapper,
html[data-theme-preset] #user-security-panel .sec-history-full-card,
body[data-theme-preset] #user-security-panel .sec-history-full-card,
html[data-theme-preset] .sec-history-full-card,
body[data-theme-preset] .sec-history-full-card {
    background: var(--bg-card) !important;
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #user-security-panel .security-info-pane,
body[data-theme-preset] #user-security-panel .security-info-pane,
html[data-theme-preset] #user-security-panel .security-action-pane,
body[data-theme-preset] #user-security-panel .security-action-pane,
html[data-theme-preset] #user-security-panel .sec-card,
body[data-theme-preset] #user-security-panel .sec-card,
html[data-theme-preset] #user-security-panel .sec-history-table-box,
body[data-theme-preset] #user-security-panel .sec-history-table-box,
html[data-theme-preset] .sec-history-table-box,
body[data-theme-preset] .sec-history-table-box {
    background: var(--bg-card-alt, var(--bg-sub)) !important;
    background-color: var(--bg-card-alt, var(--bg-sub)) !important;
    border: 1px solid var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #user-security-panel .history-table th,
body[data-theme-preset] #user-security-panel .history-table th,
html[data-theme-preset] .history-table th,
body[data-theme-preset] .history-table th {
    background: var(--bg-card-alt, var(--bg-sub)) !important;
    background-color: var(--bg-card-alt, var(--bg-sub)) !important;
    color: var(--text-sub, var(--text-main)) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] #user-security-panel .history-table td,
body[data-theme-preset] #user-security-panel .history-table td,
html[data-theme-preset] .history-table td,
body[data-theme-preset] .history-table td {
    background: transparent !important;
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] #user-security-panel .sec-section-title,
body[data-theme-preset] #user-security-panel .sec-section-title,
html[data-theme-preset] #user-security-panel .detail-title-label,
body[data-theme-preset] #user-security-panel .detail-title-label,
html[data-theme-preset] #user-security-panel .sec-card-title,
body[data-theme-preset] #user-security-panel .sec-card-title,
html[data-theme-preset] #user-security-panel .sec-info-row strong,
body[data-theme-preset] #user-security-panel .sec-info-row strong {
    color: var(--text-main) !important;
}

html[data-theme-preset] #user-security-panel .sec-card-desc,
body[data-theme-preset] #user-security-panel .sec-card-desc,
html[data-theme-preset] #user-security-panel .sec-info-row .info-label,
body[data-theme-preset] #user-security-panel .sec-info-row .info-label,
html[data-theme-preset] #user-security-panel .role-guide-note,
body[data-theme-preset] #user-security-panel .role-guide-note {
    color: var(--text-muted) !important;
}

html[data-theme-preset] #user-security-panel .sec-tab-bar,
body[data-theme-preset] #user-security-panel .sec-tab-bar,
html[data-theme-preset] #user-security-panel .security-detail-header,
body[data-theme-preset] #user-security-panel .security-detail-header {
    border-bottom-color: var(--border-base) !important;
}

html[data-theme-preset] #user-security-panel .sec-tab-bar .tab-link,
body[data-theme-preset] #user-security-panel .sec-tab-bar .tab-link {
    background: var(--bg-card-alt, var(--bg-sub)) !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] #user-security-panel .sec-tab-bar .tab-link.active,
body[data-theme-preset] #user-security-panel .sec-tab-bar .tab-link.active {
    background: var(--bg-card) !important;
    color: var(--color-primary, #3B82F6) !important;
    border-color: var(--color-primary, #3B82F6) !important;
}

html[data-theme-preset] .btn-master-standard.btn-master-neutral,
body[data-theme-preset] .btn-master-standard.btn-master-neutral,
html[data-theme-preset] #user-security-panel .btn-master-standard.btn-master-neutral,
body[data-theme-preset] #user-security-panel .btn-master-standard.btn-master-neutral {
    background: var(--bg-card-alt, var(--bg-sub)) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .btn-master-standard.btn-master-neutral:hover,
body[data-theme-preset] .btn-master-standard.btn-master-neutral:hover,
html[data-theme-preset] #user-security-panel .btn-master-standard.btn-master-neutral:hover,
body[data-theme-preset] #user-security-panel .btn-master-standard.btn-master-neutral:hover {
    background: var(--bg-hover, var(--bg-sub)) !important;
    color: var(--text-main) !important;
}

/* 마스터 사용자 관리 모달 통합 (시스템 기준/권한, 직급/직책, 출퇴근, 퇴사, OTP, 기기신뢰, 알림창) */
html[data-theme-preset] #rank-role-order-modal .interior-modal-content,
body[data-theme-preset] #rank-role-order-modal .interior-modal-content,
html[data-theme-preset] #system-config-modal .interior-modal-content,
body[data-theme-preset] #system-config-modal .interior-modal-content,
html[data-theme-preset] #attendance-edit-modal .interior-modal-content,
body[data-theme-preset] #attendance-edit-modal .interior-modal-content,
html[data-theme-preset] #employee-retire-modal .interior-modal-content,
body[data-theme-preset] #employee-retire-modal .interior-modal-content,
html[data-theme-preset] #otp-qr-view-modal .interior-modal-content,
body[data-theme-preset] #otp-qr-view-modal .interior-modal-content,
html[data-theme-preset] #trust-device-modal .interior-modal-content,
body[data-theme-preset] #trust-device-modal .interior-modal-content,
html[data-theme-preset] #rank-order-modal .interior-modal-content,
body[data-theme-preset] #rank-order-modal .interior-modal-content,
html[data-theme-preset] #pop-custom-alert .custom-alert-box,
body[data-theme-preset] #pop-custom-alert .custom-alert-box {
    background: var(--bg-card) !important;
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #rank-role-order-modal .interior-modal-header,
body[data-theme-preset] #rank-role-order-modal .interior-modal-header,
html[data-theme-preset] #system-config-modal .interior-modal-header,
body[data-theme-preset] #system-config-modal .interior-modal-header,
html[data-theme-preset] #attendance-edit-modal .interior-modal-header,
body[data-theme-preset] #attendance-edit-modal .interior-modal-header,
html[data-theme-preset] #employee-retire-modal .interior-modal-header,
body[data-theme-preset] #employee-retire-modal .interior-modal-header,
html[data-theme-preset] #otp-qr-view-modal .interior-modal-header,
body[data-theme-preset] #otp-qr-view-modal .interior-modal-header,
html[data-theme-preset] #trust-device-modal .interior-modal-header,
body[data-theme-preset] #trust-device-modal .interior-modal-header,
html[data-theme-preset] #rank-order-modal .interior-modal-header,
body[data-theme-preset] #rank-order-modal .interior-modal-header {
    background: var(--bg-card-alt, var(--bg-sub)) !important;
    border-bottom: 1px solid var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #rank-role-order-modal .interior-modal-footer,
body[data-theme-preset] #rank-role-order-modal .interior-modal-footer,
html[data-theme-preset] #system-config-modal .interior-modal-footer,
body[data-theme-preset] #system-config-modal .interior-modal-footer,
html[data-theme-preset] #attendance-edit-modal .interior-modal-footer,
body[data-theme-preset] #attendance-edit-modal .interior-modal-footer,
html[data-theme-preset] #employee-retire-modal .interior-modal-footer,
body[data-theme-preset] #employee-retire-modal .interior-modal-footer,
html[data-theme-preset] #otp-qr-view-modal .interior-modal-footer,
body[data-theme-preset] #otp-qr-view-modal .interior-modal-footer,
html[data-theme-preset] #trust-device-modal .interior-modal-footer,
body[data-theme-preset] #trust-device-modal .interior-modal-footer,
html[data-theme-preset] #rank-order-modal .interior-modal-footer,
body[data-theme-preset] #rank-order-modal .interior-modal-footer {
    background: var(--bg-card-alt, var(--bg-sub)) !important;
    border-top: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .rank-role-tab-bar,
body[data-theme-preset] .rank-role-tab-bar,
html[data-theme-preset] .system-config-tab-bar,
body[data-theme-preset] .system-config-tab-bar {
    background-color: var(--bg-card-alt, var(--bg-sub)) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .rank-role-tab-bar .tab-link,
body[data-theme-preset] .rank-role-tab-bar .tab-link,
html[data-theme-preset] .system-config-tab-bar .tab-link,
body[data-theme-preset] .system-config-tab-bar .tab-link {
    color: var(--text-muted) !important;
}

html[data-theme-preset] .rank-role-tab-bar .tab-link.active,
body[data-theme-preset] .rank-role-tab-bar .tab-link.active,
html[data-theme-preset] .system-config-tab-bar .tab-link.active,
body[data-theme-preset] .system-config-tab-bar .tab-link.active {
    color: var(--color-primary, #60A5FA) !important;
    border-bottom-color: var(--color-primary, #60A5FA) !important;
}

html[data-theme-preset] .role-sidebar-pane,
body[data-theme-preset] .role-sidebar-pane {
    background: var(--bg-card-alt, var(--bg-sub)) !important;
    border-right: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .role-sidebar-header,
body[data-theme-preset] .role-sidebar-header {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .role-item-btn,
body[data-theme-preset] .role-item-btn,
html[data-theme-preset] .role-meta-card,
body[data-theme-preset] .role-meta-card,
html[data-theme-preset] .perm-compact-card,
body[data-theme-preset] .perm-compact-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-base) !important;
}

html[data-theme-preset] .role-editor-header,
body[data-theme-preset] .role-editor-header,
html[data-theme-preset] .perm-compact-header,
body[data-theme-preset] .perm-compact-header,
html[data-theme-preset] #pane-sys-emp-rule .emp-rule-tab-inner-box,
body[data-theme-preset] #pane-sys-emp-rule .emp-rule-tab-inner-box,
html[data-theme-preset] #pane-sys-emp-rule .emp-rule-preview-card,
body[data-theme-preset] #pane-sys-emp-rule .emp-rule-preview-card,
html[data-theme-preset] .pw-visual-display,
body[data-theme-preset] .pw-visual-display,
html[data-theme-preset] .pw-legend-box,
body[data-theme-preset] .pw-legend-box,
html[data-theme-preset] .otp-qr-display-card,
body[data-theme-preset] .otp-qr-display-card {
    background: var(--bg-card-alt, var(--bg-sub)) !important;
    background-color: var(--bg-card-alt, var(--bg-sub)) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #pane-sys-emp-rule .emp-rule-preview-card .preview-number,
body[data-theme-preset] #pane-sys-emp-rule .emp-rule-preview-card .preview-number,
html[data-theme-preset] .pw-char-box.char-alpha,
body[data-theme-preset] .pw-char-box.char-alpha {
    background: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .role-item-name,
body[data-theme-preset] .role-item-name,
html[data-theme-preset] .role-editor-heading,
body[data-theme-preset] .role-editor-heading,
html[data-theme-preset] .role-pane-heading,
body[data-theme-preset] .role-pane-heading,
html[data-theme-preset] #pane-sys-emp-rule .form-label,
body[data-theme-preset] #pane-sys-emp-rule .form-label,
html[data-theme-preset] .pw-legend-title,
body[data-theme-preset] .pw-legend-title {
    color: var(--text-main) !important;
}

html[data-theme-preset] .role-item-code,
body[data-theme-preset] .role-item-code,
html[data-theme-preset] .role-editor-subtext,
body[data-theme-preset] .role-editor-subtext,
html[data-theme-preset] #pane-sys-emp-rule .emp-rule-preview-card .preview-desc,
body[data-theme-preset] #pane-sys-emp-rule .emp-rule-preview-card .preview-desc,
html[data-theme-preset] .pw-legend-subtext,
body[data-theme-preset] .pw-legend-subtext {
    color: var(--text-muted) !important;
}

/* 표준 닫기 버튼 (.btn-close-ws-modern) 기본 골격 + 라이트/다크/프리셋 일관성 보장 */
.btn-close-ws-modern {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    height: 32px !important;
    padding: 0 12px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    border-radius: 6px !important;
    background: var(--bg-card, #ffffff) !important;
    background-color: var(--bg-card, #ffffff) !important;
    color: var(--text-main, #334155) !important;
    border: 1px solid var(--border-base, #cbd5e1) !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: all 0.15s ease !important;
    box-sizing: border-box !important;
}

.btn-close-ws-modern:hover {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border-color: #fca5a5 !important;
}

.btn-close-ws-modern i {
    font-size: 12px !important;
    color: inherit !important;
}

html[data-theme="dark"] .btn-close-ws-modern,
body.dark-mode .btn-close-ws-modern,
html[data-theme-preset][data-theme="dark"] .btn-close-ws-modern,
body[data-theme-preset].dark-mode .btn-close-ws-modern {
    background: var(--bg-card-alt, var(--bg-sub, #1E293B)) !important;
    background-color: var(--bg-card-alt, var(--bg-sub, #1E293B)) !important;
    color: var(--text-main, #F1F5F9) !important;
    border: 1px solid var(--border-base, #334155) !important;
}

html[data-theme-preset]:not([data-theme="dark"]) .btn-close-ws-modern,
body[data-theme-preset]:not(.dark-mode) .btn-close-ws-modern {
    background: var(--bg-card, #FFFFFF) !important;
    background-color: var(--bg-card, #FFFFFF) !important;
    color: var(--text-main, #334155) !important;
    border: 1px solid var(--border-base, #CBD5E1) !important;
}

html[data-theme="dark"] .btn-close-ws-modern:hover,
body.dark-mode .btn-close-ws-modern:hover,
html[data-theme-preset][data-theme="dark"] .btn-close-ws-modern:hover,
body[data-theme-preset].dark-mode .btn-close-ws-modern:hover {
    background: rgba(239, 68, 68, 0.16) !important;
    color: #FCA5A5 !important;
    border-color: rgba(239, 68, 68, 0.45) !important;
}

html[data-theme="dark"] .btn-close-ws-modern i,
body.dark-mode .btn-close-ws-modern i,
html[data-theme-preset] .btn-close-ws-modern i,
body[data-theme-preset] .btn-close-ws-modern i {
    color: inherit !important;
}

/* ============================================================================
   [정보 관리 등록: 공간/사업장 마스터 관제 센터 & 거래처 등록] 프리셋 테마 통합
   ============================================================================ */
html[data-theme-preset] .loc-master-all-in-one-container .loc-master-list-col,
body[data-theme-preset] .loc-master-all-in-one-container .loc-master-list-col,
html[data-theme-preset] .mc-card,
body[data-theme-preset] .mc-card,
html[data-theme-preset] .accounts-workspace .accounts-main-widget,
body[data-theme-preset] .accounts-workspace .accounts-main-widget,
html[data-theme-preset] #account-detail-section,
body[data-theme-preset] #account-detail-section {
    background: var(--bg-card) !important;
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .mc-card-header,
body[data-theme-preset] .mc-card-header,
html[data-theme-preset] .loc-master-split-container .table-container,
body[data-theme-preset] .loc-master-split-container .table-container,
html[data-theme-preset] .loc-master-list-col .table-container,
body[data-theme-preset] .loc-master-list-col .table-container,
html[data-theme-preset] .loc-master-list-col .loc-table-scroll-wrap,
body[data-theme-preset] .loc-master-list-col .loc-table-scroll-wrap,
html[data-theme-preset] .accounts-workspace .table-container,
body[data-theme-preset] .accounts-workspace .table-container {
    background: var(--bg-card) !important;
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .mc-card-header,
body[data-theme-preset] .mc-card-header {
    background: var(--bg-card-alt, var(--bg-sub)) !important;
    background-color: var(--bg-card-alt, var(--bg-sub)) !important;
    border-bottom-color: var(--border-base) !important;
}

html[data-theme-preset] .mc-card-title,
body[data-theme-preset] .mc-card-title {
    color: var(--text-main) !important;
}

html[data-theme-preset] .mc-card-subtitle,
body[data-theme-preset] .mc-card-subtitle {
    color: var(--text-muted) !important;
}

html[data-theme-preset] .accounts-toolbar,
body[data-theme-preset] .accounts-toolbar {
    border-bottom-color: var(--border-base) !important;
}

html[data-theme-preset] #locations-table th,
body[data-theme-preset] #locations-table th,
html[data-theme-preset] #accounts-table th,
body[data-theme-preset] #accounts-table th {
    background: var(--bg-card-alt, var(--bg-sub)) !important;
    background-color: var(--bg-card-alt, var(--bg-sub)) !important;
    color: var(--text-main) !important;
    border-bottom-color: var(--border-base) !important;
}

html[data-theme-preset] #locations-table td,
body[data-theme-preset] #locations-table td,
html[data-theme-preset] #accounts-table td,
body[data-theme-preset] #accounts-table td {
    background: var(--bg-card) !important;
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-bottom-color: var(--border-base) !important;
}

html[data-theme-preset] #locations-table tbody tr:hover td,
body[data-theme-preset] #locations-table tbody tr:hover td,
html[data-theme-preset] #accounts-table tbody tr:hover td,
body[data-theme-preset] #accounts-table tbody tr:hover td {
    background: var(--bg-hover, var(--bg-card-alt, rgba(59, 130, 246, 0.1))) !important;
    background-color: var(--bg-hover, var(--bg-card-alt, rgba(59, 130, 246, 0.1))) !important;
}

html[data-theme-preset] #locations-table tbody tr.selected-row td,
body[data-theme-preset] #locations-table tbody tr.selected-row td {
    background: rgba(59, 130, 246, 0.16) !important;
    background-color: rgba(59, 130, 246, 0.16) !important;
}

html[data-theme-preset] .btn-loc-manage-pill,
body[data-theme-preset] .btn-loc-manage-pill {
    background: var(--bg-card-alt, var(--bg-sub)) !important;
    background-color: var(--bg-card-alt, var(--bg-sub)) !important;
    border: 1px solid var(--border-base) !important;
    color: var(--color-primary-light, var(--color-primary)) !important;
}

html[data-theme-preset] .btn-loc-manage-pill:hover,
body[data-theme-preset] .btn-loc-manage-pill:hover {
    background: var(--color-primary) !important;
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #ffffff !important;
}

html[data-theme-preset] .btn-accounts-excel,
body[data-theme-preset] .btn-accounts-excel {
    background: var(--bg-card-alt, var(--bg-sub)) !important;
    background-color: var(--bg-card-alt, var(--bg-sub)) !important;
    border: 1px solid rgba(16, 185, 129, 0.48) !important;
    color: var(--color-success-text, #10b981) !important;
}

html[data-theme-preset][data-theme="dark"] .btn-accounts-excel,
body[data-theme-preset].dark-mode .btn-accounts-excel {
    color: #34d399 !important;
    border-color: rgba(52, 211, 153, 0.45) !important;
}

html[data-theme-preset] .btn-accounts-excel:hover,
body[data-theme-preset] .btn-accounts-excel:hover {
    background: rgba(16, 185, 129, 0.14) !important;
    border-color: rgba(16, 185, 129, 0.7) !important;
}

html[data-theme-preset] .btn-accounts-register,
body[data-theme-preset] .btn-accounts-register {
    background: var(--color-primary) !important;
    background-color: var(--color-primary) !important;
    color: #ffffff !important;
    border: 1px solid transparent !important;
}

html[data-theme-preset] .mc-map-iw-card,
body[data-theme-preset] .mc-map-iw-card {
    background: var(--bg-card) !important;
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .mc-map-iw-card::after,
body[data-theme-preset] .mc-map-iw-card::after {
    background: var(--bg-card) !important;
    border-right-color: var(--border-base) !important;
    border-bottom-color: var(--border-base) !important;
}

html[data-theme-preset] .mc-map-iw-addr,
body[data-theme-preset] .mc-map-iw-addr {
    color: var(--text-main) !important;
}

html[data-theme-preset] .mc-map-iw-meta,
body[data-theme-preset] .mc-map-iw-meta,
html[data-theme-preset] .mc-map-iw-branch,
body[data-theme-preset] .mc-map-iw-branch {
    color: var(--text-muted) !important;
}

html[data-theme-preset] .mc-combo-dropdown-list,
body[data-theme-preset] .mc-combo-dropdown-list {
    background: var(--bg-card) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .mc-combo-option-item,
body[data-theme-preset] .mc-combo-option-item {
    color: var(--text-main) !important;
    border-bottom-color: var(--border-base) !important;
}

/* [팝업 창] 공간/사업장 마스터 창 (master_location_window) 프리셋 연동 */
html[data-theme-preset] body.loc-win-body,
body[data-theme-preset].loc-win-body,
html[data-theme-preset] .loc-win-panel-center,
body[data-theme-preset] .loc-win-panel-center {
    background: var(--bg-body) !important;
    background-color: var(--bg-body) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .loc-win-shell,
body[data-theme-preset] .loc-win-shell,
html[data-theme-preset] .loc-win-panel-left,
body[data-theme-preset] .loc-win-panel-left,
html[data-theme-preset] .loc-win-panel-right,
body[data-theme-preset] .loc-win-panel-right,
html[data-theme-preset] .form-section-card,
body[data-theme-preset] .form-section-card,
html[data-theme-preset] .loc-item-card,
body[data-theme-preset] .loc-item-card {
    background: var(--bg-card) !important;
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .loc-panel-header,
body[data-theme-preset] .loc-panel-header,
html[data-theme-preset] .loc-list-count-badge,
body[data-theme-preset] .loc-list-count-badge,
html[data-theme-preset] .loc-win-search-input,
body[data-theme-preset] .loc-win-search-input,
html[data-theme-preset] .input-text-modern,
body[data-theme-preset] .input-text-modern,
html[data-theme-preset] .select-modern,
body[data-theme-preset] .select-modern,
html[data-theme-preset] .textarea-modern,
body[data-theme-preset] .textarea-modern,
html[data-theme-preset] .coord-indicator-badge,
body[data-theme-preset] .coord-indicator-badge,
html[data-theme-preset] .loc-map-footer-guide,
body[data-theme-preset] .loc-map-footer-guide,
html[data-theme-preset] .loc-form-footer-bar,
body[data-theme-preset] .loc-form-footer-bar,
html[data-theme-preset] .win-dyn-row,
body[data-theme-preset] .win-dyn-row,
html[data-theme-preset] .loc-win-dropzone,
body[data-theme-preset] .loc-win-dropzone {
    background: var(--bg-card-alt, var(--bg-sub)) !important;
    background-color: var(--bg-card-alt, var(--bg-sub)) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .panel-header-title,
body[data-theme-preset] .panel-header-title,
html[data-theme-preset] .section-card-title,
body[data-theme-preset] .section-card-title,
html[data-theme-preset] .form-field-label,
body[data-theme-preset] .form-field-label,
html[data-theme-preset] .loc-item-title,
body[data-theme-preset] .loc-item-title {
    color: var(--text-main) !important;
}

html[data-theme-preset] .loc-item-addr,
body[data-theme-preset] .loc-item-addr,
html[data-theme-preset] .loc-item-sub,
body[data-theme-preset] .loc-item-sub {
    color: var(--text-muted) !important;
}

/* [팝업 창] 거래처 퀵 등록/수정 창 (quick_register_popup) 프리셋 연동 */
html[data-theme-preset] body.qpop-body,
body[data-theme-preset].qpop-body,
html[data-theme-preset] .qpop-outer-container,
body[data-theme-preset] .qpop-outer-container {
    background: var(--bg-body) !important;
    background-color: var(--bg-body) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .qpop-left-panel,
body[data-theme-preset] .qpop-left-panel,
html[data-theme-preset] .qpop-right-panel,
body[data-theme-preset] .qpop-right-panel,
html[data-theme-preset] .qpop-card,
body[data-theme-preset] .qpop-card,
html[data-theme-preset] .qpop-recent-item,
body[data-theme-preset] .qpop-recent-item,
html[data-theme-preset] .qpop-footer-bar,
body[data-theme-preset] .qpop-footer-bar {
    background: var(--bg-card) !important;
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .qpop-panel-header,
body[data-theme-preset] .qpop-panel-header,
html[data-theme-preset] .qpop-input,
body[data-theme-preset] .qpop-input,
html[data-theme-preset] .qpop-select,
body[data-theme-preset] .qpop-select,
html[data-theme-preset] .qpop-textarea,
body[data-theme-preset] .qpop-textarea,
html[data-theme-preset] .qpop-dropzone,
body[data-theme-preset] .qpop-dropzone,
html[data-theme-preset] .qpop-file-chip,
body[data-theme-preset] .qpop-file-chip {
    background: var(--bg-card-alt, var(--bg-sub)) !important;
    background-color: var(--bg-card-alt, var(--bg-sub)) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .qpop-btn-submit,
body[data-theme-preset] .qpop-btn-submit {
    background: var(--color-primary) !important;
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #ffffff !important;
}

/* ==========================================================================
   [마스터: 활동 로그 (master_logs)] + [해외 접속 등록/수정 창] 프리셋 연동
   ========================================================================== */
html[data-theme-preset] .sec-workspace-container,
body[data-theme-preset] .sec-workspace-container {
    background: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .sec-sidebar,
body[data-theme-preset] .sec-sidebar {
    background: var(--bg-sidebar, var(--bg-card-alt, var(--bg-sub))) !important;
    border-right-color: var(--border-base) !important;
}

html[data-theme-preset] .sec-menu-item,
body[data-theme-preset] .sec-menu-item {
    color: var(--text-sub, var(--text-main)) !important;
}

html[data-theme-preset] .sec-menu-item:hover,
body[data-theme-preset] .sec-menu-item:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.06)) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .sec-menu-item.active,
body[data-theme-preset] .sec-menu-item.active {
    background: var(--color-primary) !important;
    color: #ffffff !important;
}

html[data-theme-preset] .sec-ksi-card,
body[data-theme-preset] .sec-ksi-card,
html[data-theme-preset] .sec-chart-card,
body[data-theme-preset] .sec-chart-card,
html[data-theme-preset] .sec-feed-card,
body[data-theme-preset] .sec-feed-card,
html[data-theme-preset] .archive-card,
body[data-theme-preset] .archive-card,
html[data-theme-preset] .archive-empty-guide-card,
body[data-theme-preset] .archive-empty-guide-card,
html[data-theme-preset] .policy-step-card,
body[data-theme-preset] .policy-step-card,
html[data-theme-preset] .sec-main-panel .widget,
body[data-theme-preset] .sec-main-panel .widget {
    background: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .policy-widget-box,
body[data-theme-preset] .policy-widget-box,
html[data-theme-preset] .step-period,
body[data-theme-preset] .step-period,
html[data-theme-preset] .feed-item,
body[data-theme-preset] .feed-item,
html[data-theme-preset] #sec-tab-logs .log-control-container,
body[data-theme-preset] #sec-tab-logs .log-control-container,
html[data-theme-preset] .archive-modal-toolbar,
body[data-theme-preset] .archive-modal-toolbar {
    background: var(--bg-card-alt, var(--bg-sub, var(--bg-body))) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #sec-tab-logs .log-search-input,
body[data-theme-preset] #sec-tab-logs .log-search-input,
html[data-theme-preset] .policy-select-large,
body[data-theme-preset] .policy-select-large {
    background: var(--bg-body) !important;
    border-color: var(--border-strong, var(--border-base)) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #sec-tab-logs .log-btn-search,
body[data-theme-preset] #sec-tab-logs .log-btn-search,
html[data-theme-preset] .sec-workspace-container .btn-standard:not(.btn-archive-excel),
body[data-theme-preset] .sec-workspace-container .btn-standard:not(.btn-archive-excel) {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #ffffff !important;
}

html[data-theme-preset] #sec-tab-logs .log-btn-excel,
body[data-theme-preset] #sec-tab-logs .log-btn-excel,
html[data-theme-preset] .btn-archive-excel,
body[data-theme-preset] .btn-archive-excel {
    background: var(--bg-card) !important;
    border-color: rgba(16, 185, 129, 0.45) !important;
    color: #10B981 !important;
}

html[data-theme-preset] #security-logs-table th,
body[data-theme-preset] #security-logs-table th,
html[data-theme-preset] #overseas-table th,
body[data-theme-preset] #overseas-table th,
html[data-theme-preset] #archive-modal-table th,
body[data-theme-preset] #archive-modal-table th,
html[data-theme-preset] .sec-data-table th,
body[data-theme-preset] .sec-data-table th {
    background: var(--bg-card-alt, var(--bg-sub, var(--bg-body))) !important;
    border-bottom-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] #security-logs-table td,
body[data-theme-preset] #security-logs-table td,
html[data-theme-preset] #overseas-table td,
body[data-theme-preset] #overseas-table td,
html[data-theme-preset] #archive-modal-table td,
body[data-theme-preset] #archive-modal-table td,
html[data-theme-preset] .sec-data-table td,
body[data-theme-preset] .sec-data-table td {
    background: var(--bg-card) !important;
    border-bottom-color: var(--border-base) !important;
    color: var(--text-sub, var(--text-main)) !important;
}

html[data-theme-preset] .ksi-title,
body[data-theme-preset] .ksi-title,
html[data-theme-preset] .step-subtitle,
body[data-theme-preset] .step-subtitle,
html[data-theme-preset] .step-desc,
body[data-theme-preset] .step-desc,
html[data-theme-preset] .policy-guide-text,
body[data-theme-preset] .policy-guide-text,
html[data-theme-preset] .ksi-subtext,
body[data-theme-preset] .ksi-subtext {
    color: var(--text-muted) !important;
}

/* [해외 접속 예외 등록/수정 독립 창] */
html[data-theme-preset] body:has(.window-wrapper),
html[data-theme-preset] .window-wrapper,
body[data-theme-preset] .window-wrapper {
    background: var(--bg-body) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .window-card,
body[data-theme-preset] .window-card,
html[data-theme-preset] .window-body,
body[data-theme-preset] .window-body {
    background: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .window-header,
body[data-theme-preset] .window-header,
html[data-theme-preset] .info-notice-bar,
body[data-theme-preset] .info-notice-bar,
html[data-theme-preset] .window-footer,
body[data-theme-preset] .window-footer {
    background: var(--bg-card-alt, var(--bg-sub, var(--bg-body))) !important;
    border-color: var(--border-base) !important;
    color: var(--text-sub, var(--text-main)) !important;
}

html[data-theme-preset] .window-header .header-title,
body[data-theme-preset] .window-header .header-title,
html[data-theme-preset] .window-body .label-text,
body[data-theme-preset] .window-body .label-text {
    color: var(--text-main) !important;
}

html[data-theme-preset] .window-body .input-text,
body[data-theme-preset] .window-body .input-text,
html[data-theme-preset] .window-body .textarea-box,
body[data-theme-preset] .window-body .textarea-box {
    background: var(--bg-body) !important;
    border-color: var(--border-strong, var(--border-base)) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .window-footer .btn-submit,
body[data-theme-preset] .window-footer .btn-submit {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #ffffff !important;
}

/* ==========================================================================
   [마스터: 조직/팀 관리 (master_departments)] + [조직도 에디터] + [Sharp Windows] 프리셋 연동
   ========================================================================== */
html[data-theme-preset] .org-visual-tree-container,
body[data-theme-preset] .org-visual-tree-container,
html[data-theme-preset] .widget .global-search-wrapper.org-action-toolbar,
body[data-theme-preset] .widget .global-search-wrapper.org-action-toolbar,
html[data-theme-preset] .org-node,
body[data-theme-preset] .org-node,
html[data-theme-preset] .dept-accordion-header,
body[data-theme-preset] .dept-accordion-header,
html[data-theme-preset] .org-modern-breadcrumb-card,
body[data-theme-preset] .org-modern-breadcrumb-card {
    background: var(--bg-card-alt, var(--bg-sub, var(--bg-body))) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .edit-card,
body[data-theme-preset] .edit-card,
html[data-theme-preset] .org-sidebar-card,
body[data-theme-preset] .org-sidebar-card,
html[data-theme-preset] .org-detail-card,
body[data-theme-preset] .org-detail-card,
html[data-theme-preset] .dept-tree-container,
body[data-theme-preset] .dept-tree-container,
html[data-theme-preset] .dept-tree-card,
body[data-theme-preset] .dept-tree-card,
html[data-theme-preset] .org-modern-members-card,
body[data-theme-preset] .org-modern-members-card {
    background: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .global-search-input,
body[data-theme-preset] .global-search-input,
html[data-theme-preset] .edit-dept-input,
body[data-theme-preset] .edit-dept-input {
    color: var(--text-main) !important;
}

html[data-theme-preset] .global-search-input,
body[data-theme-preset] .global-search-input {
    background: var(--bg-body) !important;
    border-color: var(--border-strong, var(--border-base)) !important;
}

html[data-theme-preset] .org-modern-table th,
body[data-theme-preset] .org-modern-table th {
    background: var(--bg-card-alt, var(--bg-sub)) !important;
    border-bottom-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .org-modern-table td,
body[data-theme-preset] .org-modern-table td {
    background: var(--bg-card) !important;
    border-bottom-color: var(--border-base) !important;
    color: var(--text-sub, var(--text-main)) !important;
}

html[data-theme-preset] .edit-tree-wrapper ul::before,
body[data-theme-preset] .edit-tree-wrapper ul::before,
html[data-theme-preset] .edit-tree-wrapper li::before,
body[data-theme-preset] .edit-tree-wrapper li::before,
html[data-theme-preset] .edit-tree-wrapper li::after,
body[data-theme-preset] .edit-tree-wrapper li::after,
html[data-theme-preset] .edit-tree-wrapper li:last-child::before,
body[data-theme-preset] .edit-tree-wrapper li:last-child::before,
html[data-theme-preset] .main-branches-ul::before,
body[data-theme-preset] .main-branches-ul::before {
    border-color: var(--border-strong, var(--border-base)) !important;
}

html[data-theme-preset] .clean-trunk-container.has-main-branches::after,
body[data-theme-preset] .clean-trunk-container.has-main-branches::after,
html[data-theme-preset] .clean-trunk-center,
body[data-theme-preset] .clean-trunk-center,
html[data-theme-preset] .clean-staff-connector,
body[data-theme-preset] .clean-staff-connector,
html[data-theme-preset] .lb-spine,
body[data-theme-preset] .lb-spine,
html[data-theme-preset] .lb-horizontal,
body[data-theme-preset] .lb-horizontal,
html[data-theme-preset] .lb-main-connector,
body[data-theme-preset] .lb-main-connector {
    background: var(--border-strong, var(--border-base)) !important;
}

/* [조직도 빌더 팝업 (org_editor)] */
html[data-theme-preset] body.editor-body,
body[data-theme-preset].editor-body {
    background: var(--bg-body) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .editor-toolbar,
body[data-theme-preset] .editor-toolbar {
    background: var(--bg-card) !important;
    border-bottom-color: var(--border-base) !important;
}

html[data-theme-preset] .editor-title,
body[data-theme-preset] .editor-title {
    color: var(--text-main) !important;
}

html[data-theme-preset] .editor-subtitle,
body[data-theme-preset] .editor-subtitle {
    color: var(--text-muted) !important;
}

/* [Sharp Windows 공통 (department_project_window 등)] */
html[data-theme-preset] body.sharp-win-body,
body[data-theme-preset].sharp-win-body,
html[data-theme-preset] .main-scroll-pane,
body[data-theme-preset] .main-scroll-pane,
html[data-theme-preset] .workspace-scroll-container,
body[data-theme-preset] .workspace-scroll-container {
    background: var(--bg-body) !important;
    background-color: var(--bg-body) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .sharp-win-sidebar,
body[data-theme-preset] .sharp-win-sidebar {
    background: var(--bg-sidebar, var(--bg-card-alt)) !important;
    background-color: var(--bg-sidebar, var(--bg-card-alt)) !important;
    border-right-color: var(--border-base) !important;
}

html[data-theme-preset] .sharp-win-main,
body[data-theme-preset] .sharp-win-main,
html[data-theme-preset] .main-top-navbar,
body[data-theme-preset] .main-top-navbar,
html[data-theme-preset] .sharp-section-card,
body[data-theme-preset] .sharp-section-card,
html[data-theme-preset] .sharp-section-body,
body[data-theme-preset] .sharp-section-body,
html[data-theme-preset] .sharp-win-sidebar .sidebar-menu-item.active,
body[data-theme-preset] .sharp-win-sidebar .sidebar-menu-item.active,
html[data-theme-preset] .main-form-footer,
body[data-theme-preset] .main-form-footer {
    background: var(--bg-card) !important;
    background-color: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .sharp-section-header,
body[data-theme-preset] .sharp-section-header {
    background: var(--bg-card-alt, var(--bg-sub)) !important;
    background-color: var(--bg-card-alt, var(--bg-sub)) !important;
    border-bottom-color: var(--border-base) !important;
    color: var(--color-primary) !important;
}

html[data-theme-preset] .sharp-input,
body[data-theme-preset] .sharp-input,
html[data-theme-preset] .sharp-select,
body[data-theme-preset] .sharp-select,
html[data-theme-preset] .sharp-textarea,
body[data-theme-preset] .sharp-textarea {
    background: var(--bg-body) !important;
    background-color: var(--bg-body) !important;
    border-color: var(--border-strong, var(--border-base)) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .sharp-btn-primary,
body[data-theme-preset] .sharp-btn-primary {
    background: var(--color-primary) !important;
    background-color: var(--color-primary) !important;
    color: #ffffff !important;
}

/* =========================================================================
   비용분석 > 비용 지출 요약 (expense_management) 누락 프리셋 보완
   ========================================================================= */
html[data-theme-preset] .content-body.exp-page-body-reset,
body[data-theme-preset] .content-body.exp-page-body-reset,
html[data-theme-preset] .expense-workspace-container.exp-page-body-reset,
body[data-theme-preset] .expense-workspace-container.exp-page-body-reset {
    background: var(--bg-body) !important;
    background-color: var(--bg-body) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .btn-month-nav,
body[data-theme-preset] .btn-month-nav {
    background: var(--bg-card-alt, var(--bg-sub, var(--bg-body))) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .btn-month-nav:hover,
body[data-theme-preset] .btn-month-nav:hover {
    background: var(--bg-hover) !important;
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
}

html[data-theme-preset] .btn-memo-add-mini,
body[data-theme-preset] .btn-memo-add-mini {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #ffffff !important;
}

html[data-theme-preset] .btn-memo-add-mini:hover,
body[data-theme-preset] .btn-memo-add-mini:hover {
    filter: brightness(1.06);
}

html[data-theme-preset] .exp-memo-item,
body[data-theme-preset] .exp-memo-item,
html[data-theme-preset] .exp-memo-scroll-area .memo-standard-card,
body[data-theme-preset] .exp-memo-scroll-area .memo-standard-card {
    background: var(--bg-card-alt, var(--bg-sub, var(--bg-body))) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .memo-card-empty,
body[data-theme-preset] .memo-card-empty {
    color: var(--text-muted) !important;
}

html[data-theme-preset] .exp-toolbar-2tier .btn-primary,
body[data-theme-preset] .exp-toolbar-2tier .btn-primary {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #ffffff !important;
}

html[data-theme-preset] .exp-toolbar-2tier .btn-secondary,
body[data-theme-preset] .exp-toolbar-2tier .btn-secondary,
html[data-theme-preset] .exp-toolbar-2tier .btn-outline-secondary,
body[data-theme-preset] .exp-toolbar-2tier .btn-outline-secondary {
    background: var(--bg-card-alt, var(--bg-sub, var(--bg-body))) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .exp-toolbar-2tier .btn-secondary:hover,
body[data-theme-preset] .exp-toolbar-2tier .btn-secondary:hover,
html[data-theme-preset] .exp-toolbar-2tier .btn-outline-secondary:hover,
body[data-theme-preset] .exp-toolbar-2tier .btn-outline-secondary:hover {
    background: var(--bg-hover) !important;
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
}

html[data-theme-preset] .exp-matrix-container,
body[data-theme-preset] .exp-matrix-container {
    background: var(--bg-card) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .exp-drilldown-tr > td,
body[data-theme-preset] .exp-drilldown-tr > td {
    background: var(--bg-body) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .exp-drilldown-body,
body[data-theme-preset] .exp-drilldown-body {
    background: var(--bg-card) !important;
}

html[data-theme-preset] .exp-btn-drilldown-close,
body[data-theme-preset] .exp-btn-drilldown-close,
html[data-theme-preset] .btn-table-action-mini,
body[data-theme-preset] .btn-table-action-mini {
    background: var(--bg-card-alt, var(--bg-sub, var(--bg-body))) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .exp-btn-drilldown-close:hover,
body[data-theme-preset] .exp-btn-drilldown-close:hover,
html[data-theme-preset] .btn-table-action-mini:hover,
body[data-theme-preset] .btn-table-action-mini:hover {
    background: var(--bg-hover) !important;
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
}

/* =========================================================================
   시스템 설정 (settings) 하단 2단 T자 그리드 & 테마 카드 프리셋 보완
   ========================================================================= */
html[data-theme-preset] .settings-t-grid-widget,
body[data-theme-preset] .settings-t-grid-widget,
html[data-theme-preset] .settings-workspace-2col,
body[data-theme-preset] .settings-workspace-2col,
html[data-theme-preset] .settings-col-detail,
body[data-theme-preset] .settings-col-detail {
    background: var(--bg-card) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .settings-col-menu,
body[data-theme-preset] .settings-col-menu {
    background: var(--bg-sidebar, var(--bg-card-alt, var(--bg-body))) !important;
    border-right-color: var(--border-base) !important;
    border-bottom-color: var(--border-base) !important;
}

html[data-theme-preset] .settings-menu-top-space,
body[data-theme-preset] .settings-menu-top-space {
    color: var(--text-muted) !important;
    border-bottom-color: var(--border-base) !important;
}

html[data-theme-preset] .settings-menu-list li,
body[data-theme-preset] .settings-menu-list li {
    color: var(--text-sub, var(--text-main)) !important;
}

html[data-theme-preset] .settings-menu-list li:hover,
body[data-theme-preset] .settings-menu-list li:hover {
    background-color: var(--bg-hover) !important;
    color: var(--color-primary) !important;
}

html[data-theme-preset] .settings-menu-list li.active,
body[data-theme-preset] .settings-menu-list li.active {
    background-color: var(--color-primary) !important;
    color: #ffffff !important;
}

html[data-theme-preset] .settings-current-theme-box,
body[data-theme-preset] .settings-current-theme-box {
    background: var(--bg-card-alt, var(--bg-sub, var(--bg-body))) !important;
    border-color: var(--border-base) !important;
}

html[data-theme-preset] .theme-badge-title,
body[data-theme-preset] .theme-badge-title {
    color: var(--text-main) !important;
}

html[data-theme-preset] .theme-option-card,
body[data-theme-preset] .theme-option-card {
    background: var(--bg-card-alt, var(--bg-card)) !important;
    border-color: var(--border-base) !important;
    color: var(--text-main) !important;
}

html[data-theme-preset] .theme-option-card:hover,
body[data-theme-preset] .theme-option-card:hover {
    border-color: var(--color-primary) !important;
}

html[data-theme-preset] .theme-option-card.active,
body[data-theme-preset] .theme-option-card.active {
    background: var(--accent-soft, rgba(59, 130, 246, 0.14)) !important;
    border-color: var(--color-primary) !important;
}

/* ----------------------------------------------------
   스마트 웹메일 (Smart WebMail) - 전역 테마 프리셋 연동
   ---------------------------------------------------- */
html[data-theme-preset] .omni-search-wrapper,
body[data-theme-preset] .omni-search-wrapper {
    background: transparent !important;
}

html[data-theme-preset] .omni-search-input,
body[data-theme-preset] .omni-search-input,
html[data-theme-preset] #omni-search-input,
body[data-theme-preset] #omni-search-input {
    background-color: var(--bg-input, var(--bg-card, #ffffff)) !important;
    border: 1.5px solid var(--border-color, var(--border-base, #dadce0)) !important;
    color: var(--text-primary, var(--text-main, #202124)) !important;
    padding: 0 32px 0 34px !important;
    height: 32px !important;
    border-radius: 6px !important;
}

html[data-theme-preset] .omni-search-input::placeholder,
body[data-theme-preset] .omni-search-input::placeholder {
    color: var(--text-muted, #5f6368) !important;
    opacity: 0.85;
}

html[data-theme-preset] .omni-search-icon,
body[data-theme-preset] .omni-search-icon {
    color: var(--text-muted, #5f6368) !important;
}

html[data-theme-preset] .omni-search-input:hover,
body[data-theme-preset] .omni-search-input:hover {
    border-color: var(--color-primary, #1a73e8) !important;
}

html[data-theme-preset] .omni-search-input:focus,
body[data-theme-preset] .omni-search-input:focus {
    background-color: var(--bg-input, var(--bg-card, #ffffff)) !important;
    border-color: var(--color-primary, #1a73e8) !important;
    box-shadow: 0 0 0 3px var(--color-primary-light, rgba(26, 115, 232, 0.2)) !important;
    color: var(--text-primary, var(--text-main, #202124)) !important;
}

html[data-theme-preset][data-theme="dark"] .omni-search-input,
html[data-theme-preset].dark-mode .omni-search-input,
body[data-theme-preset].dark-mode .omni-search-input {
    background-color: var(--bg-input, var(--bg-card-alt, #202124)) !important;
    border: 1.5px solid var(--border-color, var(--border-base, #3c4043)) !important;
    color: var(--text-primary, var(--text-main, #e8eaed)) !important;
}

html[data-theme-preset][data-theme="dark"] .omni-search-input::placeholder,
html[data-theme-preset].dark-mode .omni-search-input::placeholder,
body[data-theme-preset].dark-mode .omni-search-input::placeholder {
    color: var(--text-muted, #9aa0a6) !important;
}

html[data-theme-preset][data-theme="dark"] .omni-search-icon,
html[data-theme-preset].dark-mode .omni-search-icon,
body[data-theme-preset].dark-mode .omni-search-icon {
    color: var(--text-muted, #9aa0a6) !important;
}


