/* ================================================
   ODAS Dark Mode Styles
   다크모드 전용 스타일 - 인라인 스타일 오버라이드 (옛 방식)
   ⭐2026-10-01 이행 중: 색 토큰(components/_theme_tokens.css)으로 옮긴 영역은 `.ord-themed` 표식을 달고,
     이 파일의 요소 단위 !important 규칙(입력칸·라벨·문단·표·구분선)은 `:not(.ord-themed *)` 로 그 영역을 건너뛴다.
     토큰 영역은 라이트/다크가 토큰으로 자동 — 여기에 새 규칙을 추가하지 말 것. 화면을 다 옮기면 이 파일은 퇴역.
   ================================================ */

/* ------------------------------------------------
   Color Variables
   ------------------------------------------------ */
html.dark:not(.ord-themed *) {
  --dark-bg-primary: #0f172a;
  --dark-bg-secondary: #1e293b;
  --dark-bg-tertiary: #334155;
  --dark-border: #334155;
  --dark-border-light: #475569;
  --dark-text-primary: #f1f5f9;
  --dark-text-secondary: #cbd5e1;
  --dark-text-muted: #94a3b8;
}

/* ------------------------------------------------
   Global Overrides - Background colors
   ------------------------------------------------ */
html.dark [style*="background: white"]:not(.ord-themed *),
html.dark [style*="background-color: white"]:not(.ord-themed *),
html.dark [style*="background:#fff"]:not(.ord-themed *),
html.dark [style*="background-color:#fff"]:not(.ord-themed *),
html.dark [style*="background: #fff"]:not(.ord-themed *),
html.dark [style*="background-color: #fff"]:not(.ord-themed *),
html.dark [style*="background:#ffffff"]:not(.ord-themed *),
html.dark [style*="background-color:#ffffff"]:not(.ord-themed *),
html.dark [style*="background: #ffffff"]:not(.ord-themed *),
html.dark [style*="background-color: #ffffff"]:not(.ord-themed *) {
  background: #1e293b !important;
}

html.dark [style*="background: #f9fafb"]:not(.ord-themed *),
html.dark [style*="background-color: #f9fafb"]:not(.ord-themed *),
html.dark [style*="background:#f9fafb"]:not(.ord-themed *),
html.dark [style*="background-color:#f9fafb"]:not(.ord-themed *) {
  background: #0f172a !important;
}

html.dark [style*="background: #f3f4f6"]:not(.ord-themed *),
html.dark [style*="background-color: #f3f4f6"]:not(.ord-themed *),
html.dark [style*="background:#f3f4f6"]:not(.ord-themed *),
html.dark [style*="background-color:#f3f4f6"]:not(.ord-themed *) {
  background: #1e293b !important;
}

html.dark [style*="background: #f8fafc"]:not(.ord-themed *),
html.dark [style*="background-color: #f8fafc"]:not(.ord-themed *) {
  background: #0f172a !important;
}

/* ------------------------------------------------
   Global Overrides - Border colors
   ------------------------------------------------ */
html.dark [style*="border: 1px solid #e5e7eb"]:not(.ord-themed *),
html.dark [style*="border-bottom: 1px solid #e5e7eb"]:not(.ord-themed *),
html.dark [style*="border-top: 1px solid #e5e7eb"]:not(.ord-themed *),
html.dark [style*="border-color: #e5e7eb"]:not(.ord-themed *),
html.dark [style*="border-color:#e5e7eb"]:not(.ord-themed *) {
  border-color: #334155 !important;
}

html.dark [style*="border: 1px solid #f3f4f6"]:not(.ord-themed *),
html.dark [style*="border-color: #f3f4f6"]:not(.ord-themed *),
html.dark [style*="border-color:#f3f4f6"]:not(.ord-themed *),
html.dark [style*="border-bottom: 1px solid #f3f4f6"]:not(.ord-themed *),
html.dark [style*="border-top: 1px solid #f3f4f6"]:not(.ord-themed *) {
  border-color: #334155 !important;
}

html.dark [style*="border: 1px solid #d1d5db"]:not(.ord-themed *),
html.dark [style*="border-color: #d1d5db"]:not(.ord-themed *) {
  border-color: #475569 !important;
}

/* ------------------------------------------------
   Global Overrides - Text colors
   ------------------------------------------------ */
html.dark [style*="color: #111827"]:not(.ord-themed *),
html.dark [style*="color:#111827"]:not(.ord-themed *) {
  color: #f1f5f9 !important;
}

html.dark [style*="color: #374151"]:not(.ord-themed *),
html.dark [style*="color:#374151"]:not(.ord-themed *) {
  color: #cbd5e1 !important;
}

html.dark [style*="color: #4b5563"]:not(.ord-themed *),
html.dark [style*="color:#4b5563"]:not(.ord-themed *) {
  color: #94a3b8 !important;
}

html.dark [style*="color: #6b7280"]:not(.ord-themed *),
html.dark [style*="color:#6b7280"]:not(.ord-themed *) {
  color: #94a3b8 !important;
}

html.dark [style*="color: #9ca3af"]:not(.ord-themed *),
html.dark [style*="color:#9ca3af"]:not(.ord-themed *) {
  color: #64748b !important;
}

/* ------------------------------------------------
   Cards
   ------------------------------------------------ */
html.dark .company-card:not(.ord-themed *),
html.dark .member-company-card:not(.ord-themed *) {
  background: #1e293b !important;
  border-color: #334155 !important;
}

html.dark .company-card:hover:not(.ord-themed *),
html.dark .member-company-card:hover:not(.ord-themed *) {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

html.dark .company-card h3:not(.ord-themed *),
html.dark .member-company-card h3:not(.ord-themed *) {
  color: #f1f5f9 !important;
}

html.dark .company-card span:not(.ord-themed *),
html.dark .member-company-card span:not(.ord-themed *) {
  color: #cbd5e1;
}

html.dark .company-card svg:not(.ord-themed *),
html.dark .member-company-card svg:not(.ord-themed *) {
  stroke: #64748b !important;
}

/* Card footer */
html.dark .company-card > div:last-child:not(.ord-themed *),
html.dark .member-company-card > div:last-child:not(.ord-themed *) {
  background: #0f172a !important;
  border-top-color: #334155 !important;
}

/* ------------------------------------------------
   Buttons
   ------------------------------------------------ */
/* Primary buttons - keep original colors */
html.dark button[style*="background: #3b82f6"]:not(.ord-themed *),
html.dark button[style*="background-color: #3b82f6"]:not(.ord-themed *),
html.dark [style*="background: #2563eb"]:not(.ord-themed *),
html.dark [style*="background-color: #2563eb"]:not(.ord-themed *) {
  background: #2563eb !important;
}

/* Secondary/Cancel buttons */
html.dark button[style*="background: white"]:not(.ord-themed *),
html.dark button[style*="background-color: white"]:not(.ord-themed *) {
  background: #334155 !important;
  color: #e2e8f0 !important;
  border-color: #475569 !important;
}

/* Danger buttons - keep original */
html.dark button[style*="background: #dc2626"]:not(.ord-themed *),
html.dark button[style*="background-color: #dc2626"]:not(.ord-themed *),
html.dark button[style*="background: #ef4444"]:not(.ord-themed *),
html.dark button[style*="background-color: #ef4444"]:not(.ord-themed *) {
  background: #dc2626 !important;
}

/* ------------------------------------------------
   Forms and Inputs
   ------------------------------------------------ */
html.dark input:not([type="color"]):not(.ord-themed *),
html.dark select:not(.ord-themed *),
html.dark textarea:not(.ord-themed *) {
  background: #0f172a !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

html.dark input:focus:not(.ord-themed *),
html.dark select:focus:not(.ord-themed *),
html.dark textarea:focus:not(.ord-themed *) {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

html.dark input:not(.ord-themed *)::placeholder,
html.dark textarea:not(.ord-themed *)::placeholder {
  color: #64748b !important;
}

html.dark input:disabled:not(.ord-themed *),
html.dark select:disabled:not(.ord-themed *),
html.dark textarea:disabled:not(.ord-themed *) {
  background: #1e293b !important;
  color: #64748b !important;
}

/* Read-only inputs */
html.dark input[readonly]:not(.ord-themed *),
html.dark div[style*="background: #f9fafb"][style*="border"]:not(.ord-themed *) {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}

/* ------------------------------------------------
   Labels and text
   ------------------------------------------------ */
html.dark label:not(.ord-themed *) {
  color: #cbd5e1 !important;
}

html.dark p:not(.ord-themed *) {
  color: #94a3b8;
}

/* ------------------------------------------------
   Info boxes
   ------------------------------------------------ */
html.dark [style*="background: #eff6ff"]:not(.ord-themed *),
html.dark [style*="background-color: #eff6ff"]:not(.ord-themed *) {
  background: rgba(59, 130, 246, 0.1) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}

/* Gradient info boxes (linear-gradient with #eff6ff or #f0fdf4) */
html.dark [style*="linear-gradient"][style*="#eff6ff"]:not(.ord-themed *),
html.dark [style*="linear-gradient"][style*="#f0fdf4"]:not(.ord-themed *) {
  background: rgba(59, 130, 246, 0.1) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}

html.dark [style*="color: #1e40af"]:not(.ord-themed *) {
  color: #93c5fd !important;
}

/* Success boxes */
html.dark [style*="background: #f0fdf4"]:not(.ord-themed *),
html.dark [style*="background-color: #f0fdf4"]:not(.ord-themed *) {
  background: rgba(34, 197, 94, 0.1) !important;
  border-color: rgba(34, 197, 94, 0.3) !important;
}

html.dark [style*="color: #166534"]:not(.ord-themed *) {
  color: #4ade80 !important;
}

/* Warning boxes */
html.dark [style*="background: #fef3c7"]:not(.ord-themed *),
html.dark [style*="background-color: #fef3c7"]:not(.ord-themed *) {
  background: rgba(245, 158, 11, 0.15) !important;
}

html.dark [style*="color: #b45309"]:not(.ord-themed *) {
  color: #fbbf24 !important;
}

/* Error boxes */
html.dark [style*="background: #fef2f2"]:not(.ord-themed *),
html.dark [style*="background-color: #fef2f2"]:not(.ord-themed *) {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

/* ------------------------------------------------
   Tables
   ------------------------------------------------ */
html.dark table:not(.ord-themed *) {
  border-color: #334155 !important;
}

html.dark th:not(.ord-themed *) {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

html.dark td:not(.ord-themed *) {
  border-color: #334155 !important;
  color: #cbd5e1 !important;
  background: transparent !important;
}

html.dark tr:hover td:not(.ord-themed *) {
  background: rgba(59, 130, 246, 0.05) !important;
}

html.dark tbody tr:nth-child(even) td:not(.ord-themed *) {
  background: rgba(30, 41, 59, 0.5) !important;
}

/* ------------------------------------------------
   Modals (Rails Modal Manager)
   ⭐2026-10-01: 모달 «틀»(바탕·헤더·사이드바·서브메뉴·푸터·오버레이) 색은 components/_rmm_theme.css 가
     gem 변수를 테마 토큰에 묶어 맡는다 — 종전 이 자리의 !important 슬레이트 규칙은 삭제.
     아래는 옛 모달 «본문»의 인라인 흰 바탕을 지우는 규칙만 남긴다(토큰 영역 .ord-themed 는 제외).
   ------------------------------------------------ */
html.dark .rmm-modal:not(.ord-themed) .rmm-body > div:not(.rmm-sidebar):not(.rmm-sidebar-overlay):not(.ord-themed):not(.ord-themed *) {
  background: transparent !important;
}

/* ------------------------------------------------
   Modal content specific
   ------------------------------------------------ */
html.dark .rmm-modal h3:not(.ord-themed *),
html.dark .rmm-modal h4:not(.ord-themed *) {
  color: #f1f5f9 !important;
}

html.dark .rmm-modal label:not(.ord-themed *) {
  color: #cbd5e1 !important;
}

html.dark .rmm-modal p:not(.ord-themed *) {
  color: #94a3b8 !important;
}

/* Modal buttons */
html.dark .rmm-modal .rmm-footer button[style*="background: white"]:not(.ord-themed *),
html.dark .rmm-modal .rmm-footer button[style*="background-color: white"]:not(.ord-themed *),
html.dark .rmm-modal button[style*="background: #f3f4f6"]:not(.ord-themed *),
html.dark .rmm-modal button[style*="background-color: #f3f4f6"]:not(.ord-themed *) {
  background: #334155 !important;
  color: #e2e8f0 !important;
  border-color: #475569 !important;
}

/* ------------------------------------------------
   Color settings panel in profile modal
   ------------------------------------------------ */
html.dark .color-section:not(.ord-themed *) {
  border-color: #334155 !important;
}

html.dark .color-section-header:not(.ord-themed *) {
  background: #0f172a !important;
}

html.dark .color-section-header:hover:not(.ord-themed *) {
  background: #1e293b !important;
}

html.dark .color-section-title:not(.ord-themed *) {
  color: #e2e8f0 !important;
}

html.dark .color-section-body:not(.ord-themed *) {
  background: #1e293b !important;
  border-top-color: #334155 !important;
}

html.dark .color-label:not(.ord-themed *) {
  color: #94a3b8 !important;
}

html.dark .color-input:not(.ord-themed *) {
  border-color: #475569 !important;
}

html.dark .color-text:not(.ord-themed *) {
  background: #0f172a !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

html.dark .color-type-btn:not(.ord-themed *) {
  background: #0f172a !important;
  border-color: #475569 !important;
  color: #94a3b8 !important;
}

html.dark .color-type-btn.active:not(.ord-themed *) {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: white !important;
}

html.dark .gradient-settings:not(.ord-themed *) {
  background: #0f172a !important;
}

html.dark .recommended-section:not(.ord-themed *) {
  border-top-color: #334155 !important;
}

html.dark .recommended-title:not(.ord-themed *) {
  color: #e2e8f0 !important;
}

html.dark .mode-toggle-container:not(.ord-themed *) {
  background: #0f172a !important;
  border-color: #334155 !important;
}

html.dark .mode-toggle-btn:not(.ord-themed *) {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #94a3b8 !important;
}

html.dark .mode-toggle-btn:hover:not(.ord-themed *) {
  background: #334155 !important;
  color: #e2e8f0 !important;
}

html.dark .mode-toggle-btn.active:not(.ord-themed *) {
  background: #3b82f6 !important;
  border-color: #3b82f6 !important;
  color: white !important;
}

html.dark .mode-toggle-btn.active.dark-btn:not(.ord-themed *) {
  background: #475569 !important;
  border-color: #64748b !important;
}

/* ------------------------------------------------
   Taskbar
   ------------------------------------------------ */
html.dark .rmm-taskbar:not(.ord-themed *) {
  background: #1e293b !important;
  border-top-color: #334155 !important;
}

html.dark .rmm-taskbar-item:not(.ord-themed *) {
  background: #334155 !important;
  color: #e2e8f0 !important;
  border-color: #475569 !important;
}

html.dark .rmm-taskbar-item:hover:not(.ord-themed *) {
  background: #475569 !important;
}

html.dark .rmm-taskbar-item.active:not(.ord-themed *) {
  background: #3b82f6 !important;
}

/* ------------------------------------------------
   Scrollbar
   ------------------------------------------------ */
html.dark ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

html.dark ::-webkit-scrollbar-track {
  background: var(--ord-panel);
}

html.dark ::-webkit-scrollbar-thumb {
  background: var(--ord-line-2);
  border-radius: 4px;
}

html.dark ::-webkit-scrollbar-thumb:hover {
  background: var(--ord-text-4);
}

/* ------------------------------------------------
   Snackbar
   ------------------------------------------------ */
html.dark .snackbar:not(.ord-themed *) {
  background: #334155 !important;
  color: #e2e8f0 !important;
  border-color: #475569 !important;
}

/* ------------------------------------------------
   Badges and tags
   ------------------------------------------------ */
/* Keep colored badges mostly as-is but adjust for readability */
html.dark .company-type-badge.company-type-individual:not(.ord-themed *) {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #93c5fd !important;
}

html.dark .company-type-badge.company-type-sole_proprietor:not(.ord-themed *) {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #fcd34d !important;
}

html.dark .company-type-badge.company-type-corporation:not(.ord-themed *) {
  background: rgba(34, 197, 94, 0.2) !important;
  color: #86efac !important;
}

/* Status badges */
html.dark [style*="background: #dbeafe"]:not(.ord-themed *) {
  background: rgba(59, 130, 246, 0.2) !important;
}

html.dark [style*="color: #1d4ed8"]:not(.ord-themed *) {
  color: #93c5fd !important;
}

html.dark [style*="background: #dcfce7"]:not(.ord-themed *) {
  background: rgba(34, 197, 94, 0.2) !important;
}

html.dark [style*="color: #15803d"]:not(.ord-themed *) {
  color: #86efac !important;
}

/* ------------------------------------------------
   General Chat (일반 채팅)
   ------------------------------------------------ */
/* 채팅 목록 모달 */
html.dark .general-chat-list-header:not(.ord-themed *) {
  border-bottom-color: #334155 !important;
}

html.dark .general-chat-list-item:not(.ord-themed *) {
  border-bottom-color: #334155 !important;
}

html.dark .general-chat-list-item:hover:not(.ord-themed *) {
  background: #334155 !important;
}

html.dark .general-chat-list-item-name:not(.ord-themed *) {
  color: #f1f5f9 !important;
}

html.dark .general-chat-list-item-preview:not(.ord-themed *) {
  color: #94a3b8 !important;
}

html.dark .general-chat-list-item-time:not(.ord-themed *) {
  color: #64748b !important;
}

html.dark .general-chat-list-company-tag:not(.ord-themed *) {
  background: #334155 !important;
  color: #94a3b8 !important;
}

html.dark .general-chat-list-secure-tag:not(.ord-themed *) {
  background: rgba(34, 197, 94, 0.2) !important;
  color: #4ade80 !important;
}

html.dark .general-chat-list-empty:not(.ord-themed *) {
  color: #64748b !important;
}

html.dark .general-chat-list-empty svg:not(.ord-themed *) {
  color: #475569 !important;
}

/* 새 대화 모달 */
html.dark .general-chat-new-search-area:not(.ord-themed *) {
  border-bottom-color: #334155 !important;
}

html.dark .general-chat-new-company-select label:not(.ord-themed *) {
  color: #94a3b8 !important;
}

html.dark .general-chat-new-company-select select:not(.ord-themed *) {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

html.dark .general-chat-new-search-input-wrapper:not(.ord-themed *) {
  background: #1e293b !important;
}

html.dark .general-chat-new-search-input-wrapper input:not(.ord-themed *) {
  color: #e2e8f0 !important;
}

html.dark .general-chat-new-search-input-wrapper input:not(.ord-themed *)::placeholder {
  color: #64748b !important;
}

html.dark .general-chat-new-e2e-option:not(.ord-themed *) {
  background: rgba(34, 197, 94, 0.1) !important;
  border-color: rgba(34, 197, 94, 0.3) !important;
  color: #e2e8f0 !important;
}

html.dark .general-chat-new-e2e-option:hover:not(.ord-themed *) {
  background: rgba(34, 197, 94, 0.2) !important;
}

html.dark .general-chat-new-hint:not(.ord-themed *) {
  color: #64748b !important;
}

html.dark .general-chat-new-user-item:not(.ord-themed *) {
  border-bottom-color: #334155 !important;
}

html.dark .general-chat-new-user-item:hover:not(.ord-themed *) {
  background: #334155 !important;
}

html.dark .general-chat-new-user-avatar:not(.ord-themed *) {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #60a5fa !important;
}

html.dark .general-chat-new-user-name:not(.ord-themed *) {
  color: #f1f5f9 !important;
}

html.dark .general-chat-new-user-email:not(.ord-themed *) {
  color: #94a3b8 !important;
}

html.dark .general-chat-new-online-indicator:not(.ord-themed *) {
  border-color: #1e293b !important;
}

/* 대화 모달 (C 모달) */
html.dark .general-chat-room-messages:not(.ord-themed *) {
  background: #1e293b !important;
}

html.dark .general-chat-room-loading:not(.ord-themed *),
html.dark .general-chat-room-error:not(.ord-themed *) {
  color: #64748b !important;
}

/* 메시지 버블 - 상대방 */
html.dark [id^="general-chat-room-content-"] .general-chat-message.theirs .general-chat-message-bubble:not(.ord-themed *) {
  background: #334155 !important;
  color: #e2e8f0 !important;
  border-color: #475569 !important;
}

/* 시스템 메시지 */
html.dark [id^="general-chat-room-content-"] .general-chat-message.system .general-chat-message-bubble:not(.ord-themed *) {
  background: #334155 !important;
  color: #94a3b8 !important;
}

/* 메시지 발신자 */
html.dark [id^="general-chat-room-content-"] .general-chat-message-sender:not(.ord-themed *) {
  color: #94a3b8 !important;
}

/* 입력 영역 */
html.dark .general-chat-room-input:not(.ord-themed *) {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

/* 대화방 푸터 — 라이트에서 입력칸과 배경 통일(#ffffff)한 것의 다크 짝 */
html.dark [id^="general-chat-room-modal-"] .rmm-footer:not(.ord-themed *) {
  background: #1e293b !important;
}

html.dark .general-chat-room-input:focus:not(.ord-themed *) {
  background: #0f172a !important;
}

html.dark .general-chat-room-input:not(.ord-themed *)::placeholder {
  color: #64748b !important;
}

/* ------------------------------------------------
   Support Chat (고객지원 채팅)
   ------------------------------------------------ */
/* 공통 배경 */
html.dark .support-chat-user:not(.ord-themed *),
html.dark .support-chat-admin:not(.ord-themed *),
html.dark .support-chat-room-messages:not(.ord-themed *),
html.dark .support-chat-messages:not(.ord-themed *),
html.dark .support-chat-admin-messages:not(.ord-themed *) {
  background: #1e293b !important;
}

/* 문의 목록 모달 */
html.dark .support-chat-list-item:not(.ord-themed *) {
  border-bottom-color: #334155 !important;
}

html.dark .support-chat-list-item:hover:not(.ord-themed *) {
  background: #334155 !important;
}

html.dark .support-chat-list-item-name:not(.ord-themed *) {
  color: #f1f5f9 !important;
}

html.dark .support-chat-list-item-preview:not(.ord-themed *) {
  color: #94a3b8 !important;
}

/* 운영진용 채팅 사이드바 */
html.dark .support-chat-admin-sidebar:not(.ord-themed *) {
  background: #0f172a !important;
  border-right-color: #334155 !important;
}

html.dark .support-chat-admin-sidebar-header:not(.ord-themed *) {
  border-bottom-color: #334155 !important;
}

html.dark .support-chat-admin-sidebar-header h3:not(.ord-themed *) {
  color: #f1f5f9 !important;
}

html.dark .support-chat-admin-refresh:not(.ord-themed *) {
  background: #334155 !important;
  color: #94a3b8 !important;
}

html.dark .support-chat-admin-refresh:hover:not(.ord-themed *) {
  background: #475569 !important;
  color: #e2e8f0 !important;
}

html.dark .support-chat-admin-room-item:not(.ord-themed *) {
  border-bottom-color: #334155 !important;
}

html.dark .support-chat-admin-room-item:hover:not(.ord-themed *) {
  background: #334155 !important;
}

html.dark .support-chat-admin-room-item.active:not(.ord-themed *) {
  background: rgba(59, 130, 246, 0.2) !important;
}

html.dark .support-chat-admin-room-item-name:not(.ord-themed *) {
  color: #f1f5f9 !important;
}

html.dark .support-chat-admin-room-item-preview:not(.ord-themed *) {
  color: #94a3b8 !important;
}

html.dark .support-chat-admin-room-item-time:not(.ord-themed *),
html.dark .support-chat-admin-room-item-email:not(.ord-themed *) {
  color: #64748b !important;
}

html.dark .support-chat-admin-loading:not(.ord-themed *),
html.dark .support-chat-admin-no-rooms:not(.ord-themed *),
html.dark .support-chat-admin-empty:not(.ord-themed *) {
  color: #64748b !important;
}

html.dark .support-chat-admin-no-rooms svg:not(.ord-themed *),
html.dark .support-chat-admin-empty svg:not(.ord-themed *) {
  color: #475569 !important;
}

/* 운영진용 채팅 메인 영역 */
html.dark .support-chat-admin-chat-header:not(.ord-themed *) {
  background: #0f172a !important;
  border-bottom-color: #334155 !important;
}

html.dark .support-chat-admin-chat-header-name:not(.ord-themed *) {
  color: #f1f5f9 !important;
}

html.dark .support-chat-admin-chat-header-email:not(.ord-themed *) {
  color: #94a3b8 !important;
}

/* 채팅 입력 영역 */
html.dark .support-chat-input-area:not(.ord-themed *),
html.dark .support-chat-admin-input-area:not(.ord-themed *) {
  background: #0f172a !important;
  border-top-color: #334155 !important;
}

/* 일반 회원용 고객지원 입력 (새 구조) */
html.dark .support-chat-input:not(.ord-themed *) {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

html.dark .support-chat-input:focus:not(.ord-themed *) {
  background: #0f172a !important;
  border-color: #3b82f6 !important;
}

html.dark .support-chat-input:not(.ord-themed *)::placeholder {
  color: #64748b !important;
}

/* 운영진용 입력 (기존 wrapper 구조) */
html.dark .support-chat-admin-input-wrapper:not(.ord-themed *) {
  background: #1e293b !important;
}

html.dark .support-chat-admin-input-wrapper textarea:not(.ord-themed *) {
  color: #e2e8f0 !important;
  background: transparent !important;
}

html.dark .support-chat-admin-input-wrapper textarea:not(.ord-themed *)::placeholder {
  color: #64748b !important;
}

/* 채팅 룸 헤더 (동적 모달) */
html.dark .support-chat-room-header:not(.ord-themed *) {
  background: #0f172a !important;
  border-bottom-color: #334155 !important;
}

html.dark .support-chat-room-header-name:not(.ord-themed *) {
  color: #f1f5f9 !important;
}

html.dark .support-chat-room-header-email:not(.ord-themed *) {
  color: #94a3b8 !important;
}

/* 채팅 룸 입력 */
html.dark .support-chat-room-input:not(.ord-themed *) {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

html.dark .support-chat-room-input:focus:not(.ord-themed *) {
  background: #0f172a !important;
}

/* 메시지 버블 - 상대방 메시지 */
html.dark .support-chat-message.theirs .support-chat-message-bubble:not(.ord-themed *),
html.dark .support-chat-admin-messages .support-chat-message.theirs .support-chat-message-bubble:not(.ord-themed *),
html.dark [id^="support-chat-room-content-"] .support-chat-message.theirs .support-chat-message-bubble:not(.ord-themed *) {
  background: #334155 !important;
  color: #e2e8f0 !important;
  border-color: #475569 !important;
}

/* 시스템 메시지 */
html.dark .support-chat-message.system .support-chat-message-bubble:not(.ord-themed *),
html.dark [id^="support-chat-room-content-"] .support-chat-message.system .support-chat-message-bubble:not(.ord-themed *) {
  background: #334155 !important;
  color: #94a3b8 !important;
}

/* 메시지 발신자 */
html.dark .support-chat-message-sender:not(.ord-themed *),
html.dark .support-chat-admin-messages .support-chat-message-sender:not(.ord-themed *),
html.dark [id^="support-chat-room-content-"] .support-chat-message-sender:not(.ord-themed *) {
  color: #94a3b8 !important;
}

/* 환영 메시지 */
html.dark .support-chat-welcome:not(.ord-themed *) {
  color: #94a3b8 !important;
}

html.dark .support-chat-welcome-icon:not(.ord-themed *) {
  background: rgba(59, 130, 246, 0.2) !important;
}

html.dark .support-chat-welcome-title:not(.ord-themed *) {
  color: #f1f5f9 !important;
}

html.dark .support-chat-welcome-desc:not(.ord-themed *) {
  color: #94a3b8 !important;
}

/* 날짜 구분선 */
html.dark .support-chat-date-divider span:not(.ord-themed *) {
  background: #1e293b !important;
  color: #64748b !important;
}

html.dark .support-chat-date-divider:not(.ord-themed *)::before {
  background: #334155 !important;
}

/* 로딩/에러 상태 */
html.dark .support-chat-room-loading:not(.ord-themed *),
html.dark .support-chat-room-error:not(.ord-themed *),
html.dark .support-chat-loading:not(.ord-themed *) {
  color: #64748b !important;
}

html.dark .support-chat-list-empty:not(.ord-themed *) {
  color: #64748b !important;
}

html.dark .support-chat-list-empty svg:not(.ord-themed *) {
  color: #475569 !important;
}

/* ------------------------------------------------
   Misc
   ------------------------------------------------ */
/* Dividers */
html.dark hr:not(.ord-themed *) {
  border-color: #334155 !important;
}

/* Selection */
html.dark :not(.ord-themed *)::selection {
  background: rgba(59, 130, 246, 0.3);
  color: #f1f5f9;
}

/* Tooltips */
html.dark [data-tooltip]:not(.ord-themed *)::after {
  background: #475569 !important;
  color: #e2e8f0 !important;
}

/* Empty states */
html.dark .empty-state:not(.ord-themed *) {
  color: #64748b !important;
}

/* Links — :where() 로 특이도 0 (2026-10-01). 종전 (0,4,2) 가 사이드바 2차 메뉴·헤더 링크의 색 규칙을 이겨 전부 파랗게 칠했다.
   이제 화면·컴포넌트가 정한 링크 색이 항상 이기고, 색을 정하지 않은 옛 링크만 이 기본값을 받는다. */
:where(html.dark) a:where(:not(.ordars-logo:not(.ord-themed *), .ordars-sidebar-link:not(.ord-themed *), .ws-submenu-link)):not(.ord-themed *) {
  color: var(--ord-link);
}

:where(html.dark) a:where(:not(.ordars-logo:not(.ord-themed *), .ordars-sidebar-link:not(.ord-themed *), .ws-submenu-link)):hover:not(.ord-themed *) {
  color: var(--ord-accent-strong);
}

/* ------------------------------------------------
   System Settings - Sessions (접속현황)
   ------------------------------------------------ */

/* 제목/설명 */
html.dark .sessions-title:not(.ord-themed *) {
  color: #f1f5f9 !important;
}

html.dark .sessions-desc:not(.ord-themed *) {
  color: #94a3b8 !important;
}

/* 접속자 수 배지 */
html.dark .sessions-count-badge:not(.ord-themed *) {
  background: rgba(16, 185, 129, 0.15) !important;
}

html.dark .sessions-online-count:not(.ord-themed *) {
  color: #34d399 !important;
}

html.dark .sessions-total-count:not(.ord-themed *) {
  color: #94a3b8 !important;
}

/* 새로고침 버튼 */
html.dark .sessions-refresh-btn:not(.ord-themed *) {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

html.dark .sessions-refresh-btn:hover:not(.ord-themed *) {
  background: #475569 !important;
}

/* 팁 박스 */
html.dark .sessions-tip-box:not(.ord-themed *) {
  background: rgba(59, 130, 246, 0.1) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}

html.dark .sessions-tip-icon:not(.ord-themed *) {
  stroke: #60a5fa !important;
}

html.dark .sessions-tip-text:not(.ord-themed *) {
  color: #93c5fd !important;
}

/* 테이블 */
html.dark .sessions-table-wrapper:not(.ord-themed *) {
  border-color: #334155 !important;
}

html.dark .sessions-table th:not(.ord-themed *) {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border-bottom-color: #334155 !important;
}

html.dark .sessions-table td:not(.ord-themed *) {
  border-bottom-color: #334155 !important;
}

html.dark .sessions-user-name:not(.ord-themed *) {
  color: #f1f5f9 !important;
}

html.dark .sessions-user-email:not(.ord-themed *) {
  color: #94a3b8 !important;
}

html.dark .sessions-ip:not(.ord-themed *),
html.dark .sessions-time:not(.ord-themed *),
html.dark .sessions-datetime:not(.ord-themed *),
html.dark .sessions-duration:not(.ord-themed *) {
  color: #94a3b8 !important;
}

/* 기기 배지 */
html.dark .sessions-device-badge:not(.ord-themed *) {
  background: #334155 !important;
  color: #e2e8f0 !important;
}

/* 역할 배지 */
html.dark .sessions-role-developer:not(.ord-themed *) {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #fbbf24 !important;
}

html.dark .sessions-role-admin:not(.ord-themed *) {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #60a5fa !important;
}

/* 상태 배지 */
html.dark .sessions-status-active:not(.ord-themed *) {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
}

html.dark .sessions-status-logged-out:not(.ord-themed *) {
  background: #334155 !important;
  color: #94a3b8 !important;
}

html.dark .sessions-status-inactive:not(.ord-themed *) {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
}

/* 차단됨 배지 */
html.dark .sessions-blocked-badge:not(.ord-themed *) {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
}

/* 액션 버튼 */
html.dark .sessions-action-logout:not(.ord-themed *) {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
}

html.dark .sessions-action-logout:hover:not(.ord-themed *) {
  background: rgba(245, 158, 11, 0.25) !important;
}

html.dark .sessions-action-block:not(.ord-themed *) {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
}

html.dark .sessions-action-block:hover:not(.ord-themed *) {
  background: rgba(239, 68, 68, 0.25) !important;
}

html.dark .sessions-action-unblock:not(.ord-themed *) {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
}

html.dark .sessions-action-unblock:hover:not(.ord-themed *) {
  background: rgba(16, 185, 129, 0.25) !important;
}

/* 빈 상태 */
html.dark .sessions-empty:not(.ord-themed *) {
  background: #1e293b !important;
  color: #94a3b8 !important;
}

html.dark .sessions-empty-icon:not(.ord-themed *) {
  opacity: 0.6 !important;
}

/* 카드 뷰 (모바일) */
html.dark .sessions-card:not(.ord-themed *) {
  background: #1e293b !important;
  border-color: #334155 !important;
}

html.dark .sessions-card-header:not(.ord-themed *) {
  background: #0f172a !important;
  border-bottom-color: #334155 !important;
}

html.dark .sessions-card-body:not(.ord-themed *) {
  background: #1e293b !important;
}

html.dark .sessions-card-row:not(.ord-themed *) {
  border-bottom-color: #334155 !important;
}

html.dark .sessions-card-label:not(.ord-themed *) {
  color: #94a3b8 !important;
}

html.dark .sessions-card-value:not(.ord-themed *) {
  color: #e2e8f0 !important;
}

html.dark .sessions-card-footer:not(.ord-themed *) {
  border-top-color: #334155 !important;
}

/* ------------------------------------------------
   System Settings - Database (DB 관리)
   ------------------------------------------------ */

/* DB 정보 박스 */
html.dark .rmm-content [style*="background: #f9fafb"]:not(.ord-themed *) {
  background: #1e293b !important;
}

/* DB 정보 제목 */
html.dark .rmm-content [style*="color: #111827"]:not(.ord-themed *) {
  color: #f1f5f9 !important;
}

/* DB 정보 라벨 */
html.dark .rmm-content [style*="color: #6b7280"]:not(.ord-themed *) {
  color: #94a3b8 !important;
}

/* DB 정보 값 */
html.dark .rmm-content [style*="color: #374151"]:not(.ord-themed *) {
  color: #cbd5e1 !important;
}

/* 섹션 구분선 */
html.dark .rmm-content [style*="border-top: 1px solid #e5e7eb"]:not(.ord-themed *) {
  border-top-color: #334155 !important;
}

/* 백업/최적화 카드 */
html.dark .rmm-content [style*="border: 1px solid #e5e7eb"][style*="border-radius: 8px"]:not(.ord-themed *) {
  border-color: #334155 !important;
  background: #1e293b !important;
}

/* 주의사항 박스 (빨간색) */
html.dark .rmm-content [style*="background: #fef2f2"]:not(.ord-themed *) {
  background: rgba(239, 68, 68, 0.1) !important;
}

html.dark .rmm-content [style*="border: 1px solid #fecaca"]:not(.ord-themed *) {
  border-color: rgba(239, 68, 68, 0.3) !important;
}

html.dark .rmm-content [style*="color: #991b1b"]:not(.ord-themed *) {
  color: #fca5a5 !important;
}

/* 경고 텍스트 */
html.dark .rmm-content [style*="color: #f59e0b"]:not(.ord-themed *) {
  color: #fbbf24 !important;
}

/* DB 테이블 목록 */
html.dark .db-table-list:not(.ord-themed *) {
  border-color: #334155 !important;
  background: #1e293b !important;
}

html.dark .db-table-item:not(.ord-themed *) {
  border-bottom-color: #334155 !important;
}

html.dark .db-table-item:hover:not(.ord-themed *) {
  background: #334155 !important;
}

html.dark .db-table-item.active:not(.ord-themed *) {
  background: rgba(59, 130, 246, 0.15) !important;
  border-left-color: #3b82f6 !important;
}

html.dark .db-table-detail:not(.ord-themed *) {
  border-color: #334155 !important;
  background: #1e293b !important;
}

html.dark .db-table-detail.mobile-active:not(.ord-themed *) {
  background: #0f172a !important;
}

html.dark .db-select-hint:not(.ord-themed *) {
  color: #64748b !important;
}

/* DB 쿼리 탭 - 입력 영역 */
html.dark .rmm-content textarea[data-database-manager-target="queryInput"]:not(.ord-themed *) {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

html.dark .rmm-content textarea[data-database-manager-target="queryInput"]:not(.ord-themed *)::placeholder {
  color: #64748b !important;
}

/* 컬럼 구조 섹션 (노란색) */
html.dark .rmm-content [style*="background: #fefce8"]:not(.ord-themed *) {
  background: rgba(234, 179, 8, 0.1) !important;
}

html.dark .rmm-content [style*="border: 1px solid #fde047"]:not(.ord-themed *) {
  border-color: rgba(234, 179, 8, 0.3) !important;
}

html.dark .rmm-content [style*="color: #854d0e"]:not(.ord-themed *) {
  color: #fbbf24 !important;
}

/* 인덱스 섹션 (녹색) */
html.dark .rmm-content [style*="background: #f0fdf4"]:not(.ord-themed *) {
  background: rgba(34, 197, 94, 0.1) !important;
}

html.dark .rmm-content [style*="border: 1px solid #86efac"]:not(.ord-themed *) {
  border-color: rgba(34, 197, 94, 0.3) !important;
}

html.dark .rmm-content [style*="color: #166534"]:not(.ord-themed *) {
  color: #4ade80 !important;
}

/* 모바일 뒤로가기 버튼 */
html.dark .db-mobile-back-btn:not(.ord-themed *) {
  background: #334155 !important;
  border-color: #475569 !important;
}

html.dark .db-mobile-back-btn svg:not(.ord-themed *) {
  stroke: #e2e8f0 !important;
}

/* 지우기/이전/다음 버튼 */
html.dark .rmm-content button[style*="background: white"][style*="border: 1px solid #d1d5db"]:not(.ord-themed *) {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

html.dark .rmm-content button[style*="background: white"][style*="border: 1px solid #d1d5db"]:hover:not(.ord-themed *) {
  background: #475569 !important;
}

/* 쿼리 결과 영역 */
html.dark [data-database-manager-target="queryResult"]:not(.ord-themed *) {
  background: #1e293b !important;
}

/* 결과 안내 텍스트 */
html.dark .rmm-content [style*="color: #9ca3af"]:not(.ord-themed *) {
  color: #64748b !important;
}

/* 데이터 테이블 */
html.dark .rmm-content table thead[style*="background: #f9fafb"]:not(.ord-themed *) {
  background: #0f172a !important;
}

html.dark .rmm-content table th[style*="color: #374151"]:not(.ord-themed *) {
  color: #cbd5e1 !important;
}

html.dark .rmm-content table tr[style*="background: white"]:not(.ord-themed *) {
  background: #1e293b !important;
}

html.dark .rmm-content table td:not(.ord-themed *) {
  color: #e2e8f0 !important;
}

/* ------------------------------------------------
   Search Dropdowns (검색 드롭다운)
   ------------------------------------------------ */

/* 검색 결과 드롭다운 컨테이너 */
html.dark [data-company-search-form-target="searchResults"]:not(.ord-themed *),
html.dark [data-user-search-target="results"]:not(.ord-themed *),
html.dark [data-manager-appointment-target="searchResults"]:not(.ord-themed *),
html.dark [data-member-invitation-target="searchResults"]:not(.ord-themed *),
html.dark [data-member-invite-target="searchResults"]:not(.ord-themed *) {
  background: #1e293b !important;
  border-color: #475569 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* 검색 결과 아이템 */
html.dark .company-search-result:not(.ord-themed *),
html.dark .user-search-result:not(.ord-themed *) {
  border-bottom-color: #334155 !important;
}

/* 검색 결과 아이템 텍스트 */
html.dark .company-search-result [style*="color: #111827"]:not(.ord-themed *),
html.dark .user-search-result [style*="color: #111827"]:not(.ord-themed *) {
  color: #f1f5f9 !important;
}

html.dark .company-search-result [style*="color: #6b7280"]:not(.ord-themed *),
html.dark .user-search-result [style*="color: #6b7280"]:not(.ord-themed *) {
  color: #94a3b8 !important;
}

/* 검색 결과 업체 타입 배지 */
html.dark .company-search-result [style*="background: #f3f4f6"][style*="color: #6b7280"]:not(.ord-themed *) {
  background: #334155 !important;
  color: #cbd5e1 !important;
}

/* 검색 결과 없음 메시지 */
html.dark [data-company-search-form-target="searchResults"] [style*="color: #9ca3af"]:not(.ord-themed *),
html.dark [data-user-search-target="results"] [style*="color: #9ca3af"]:not(.ord-themed *),
html.dark [data-manager-appointment-target="searchResults"] [style*="color: #9ca3af"]:not(.ord-themed *) {
  color: #64748b !important;
}

/* ------------------------------------------------
   Form Inputs (폼 입력 요소)
   ------------------------------------------------ */

/* 입력 필드 */
html.dark .rmm-content input[type="text"][style*="border: 1px solid #d1d5db"]:not(.ord-themed *),
html.dark .rmm-content input[type="date"][style*="border: 1px solid #d1d5db"]:not(.ord-themed *),
html.dark .rmm-content input[type="number"][style*="border: 1px solid #d1d5db"]:not(.ord-themed *),
html.dark .rmm-content textarea[style*="border: 1px solid #d1d5db"]:not(.ord-themed *),
html.dark .rmm-content select[style*="border: 1px solid #d1d5db"]:not(.ord-themed *) {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

html.dark .rmm-content input:not(.ord-themed *)::placeholder,
html.dark .rmm-content textarea:not(.ord-themed *)::placeholder {
  color: #64748b !important;
}

/* ------------------------------------------------
   Modal Buttons (모달 버튼)
   ------------------------------------------------ */

/* 취소/변경 버튼 (흰색 배경, 회색 테두리) */
html.dark .rmm-content button[style*="background: white"][style*="border: 1px solid #d1d5db"]:not(.ord-themed *),
html.dark .rmm-content button[style*="background: white"][style*="color: #374151"]:not(.ord-themed *),
html.dark .rmm-content button[style*="background: white"][style*="color: #6b7280"]:not(.ord-themed *) {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

html.dark .rmm-content button[style*="background: white"][style*="border: 1px solid #d1d5db"]:hover:not(.ord-themed *) {
  background: #475569 !important;
}

/* 비활성 제출 버튼 (회색 배경) */
html.dark .rmm-content button[style*="background: #d1d5db"]:not(.ord-themed *) {
  background: #475569 !important;
}

/* 권한양도 버튼 */
html.dark .rmm-content button[style*="background: #f3f4f6"][style*="color: #374151"]:not(.ord-themed *),
html.dark .rmm-content input[type="submit"][style*="background: #f3f4f6"]:not(.ord-themed *) {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

/* 박탈/해임 버튼 (빨간색 계열) */
html.dark .rmm-content button[style*="color: #ef4444"][style*="border: 1px solid #fecaca"]:not(.ord-themed *),
html.dark .rmm-content input[type="submit"][style*="color: #ef4444"][style*="border: 1px solid #fecaca"]:not(.ord-themed *) {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #f87171 !important;
}

/* 정지 버튼 (주황색 계열) */
html.dark .rmm-content button[style*="color: #f97316"][style*="border: 1px solid #fed7aa"]:not(.ord-themed *),
html.dark .rmm-content input[type="submit"][style*="color: #f97316"][style*="border: 1px solid #fed7aa"]:not(.ord-themed *) {
  background: rgba(249, 115, 22, 0.1) !important;
  border-color: rgba(249, 115, 22, 0.3) !important;
  color: #fb923c !important;
}

/* 정지해제 버튼 (녹색 계열) */
html.dark .rmm-content button[style*="color: #16a34a"][style*="border: 1px solid #bbf7d0"]:not(.ord-themed *),
html.dark .rmm-content input[type="submit"][style*="color: #16a34a"][style*="border: 1px solid #bbf7d0"]:not(.ord-themed *) {
  background: rgba(22, 163, 74, 0.1) !important;
  border-color: rgba(22, 163, 74, 0.3) !important;
  color: #4ade80 !important;
}

/* ------------------------------------------------
   Manager/Owner Cards (관리자/소유자 카드)
   ------------------------------------------------ */

/* 카드 배경 (흰색) */
html.dark .rmm-content [style*="background: white"][style*="border: 1px solid #e5e7eb"][style*="border-radius"]:not(.ord-themed *) {
  background: #1e293b !important;
  border-color: #334155 !important;
}

/* 카드 내 아바타 배경 */
html.dark .rmm-content [style*="background: #e5e7eb"][style*="border-radius: 50%"]:not(.ord-themed *) {
  background: #475569 !important;
}

html.dark .rmm-content [style*="background: #dbeafe"][style*="border-radius: 50%"]:not(.ord-themed *) {
  background: rgba(59, 130, 246, 0.2) !important;
}

html.dark .rmm-content [style*="background: #fed7aa"][style*="border-radius: 50%"]:not(.ord-themed *) {
  background: rgba(251, 146, 60, 0.2) !important;
}

html.dark .rmm-content [style*="background: #f3f4f6"][style*="border-radius: 50%"]:not(.ord-themed *) {
  background: #334155 !important;
}

/* 카드 내 구분선 */
html.dark .rmm-content [style*="border-top: 1px solid #f3f4f6"]:not(.ord-themed *) {
  border-top-color: #334155 !important;
}

/* 임기변경 버튼 */
html.dark .rmm-content button[style*="background: #f3f4f6"][style*="color: #6b7280"][style*="border: 1px solid #e5e7eb"]:not(.ord-themed *) {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #94a3b8 !important;
}

/* ------------------------------------------------
   Selected Company/User (선택된 업체/사용자)
   ------------------------------------------------ */

/* 선택된 업체 (녹색 테마) */
html.dark .rmm-content [style*="background: #f0fdf4"][style*="border: 1px solid #bbf7d0"]:not(.ord-themed *) {
  background: rgba(22, 163, 74, 0.15) !important;
  border-color: rgba(22, 163, 74, 0.3) !important;
}

html.dark .rmm-content [style*="color: #166534"]:not(.ord-themed *) {
  color: #4ade80 !important;
}

html.dark .rmm-content [style*="color: #16a34a"]:not(.ord-themed *) {
  color: #4ade80 !important;
}

html.dark .rmm-content [style*="background: #dcfce7"][style*="color: #15803d"]:not(.ord-themed *) {
  background: rgba(22, 163, 74, 0.2) !important;
  color: #4ade80 !important;
}

/* 빈 상태 영역 */
html.dark .rmm-content [style*="background: #f9fafb"][style*="border: 2px dashed #e5e7eb"]:not(.ord-themed *) {
  background: #0f172a !important;
  border-color: #334155 !important;
}

/* ------------------------------------------------
   Company Membership Modals (업체 관련 모달)
   ------------------------------------------------ */

/* 소유자/관리자 초대 섹션 배경 */
html.dark #company-owners-content [style*="background: #f9fafb"]:not(.ord-themed *),
html.dark #company-managers-content [style*="background: #f9fafb"]:not(.ord-themed *) {
  background: #0f172a !important;
}

/* 선택된 사용자 텍스트 */
html.dark [data-user-search-target="selectedUser"]:not(.ord-themed *) {
  color: #94a3b8 !important;
}

/* 임기 종료일 표시 영역 */
html.dark .rmm-content [style*="background: #f9fafb"][style*="border: 1px solid #e5e7eb"][style*="border-radius: 8px"]:not(.ord-themed *) {
  background: #0f172a !important;
  border-color: #334155 !important;
}

/* 선택된 사용자 칩 (파란색 테마) */
html.dark .rmm-content [style*="background: #eff6ff"][style*="border: 1px solid #bfdbfe"]:not(.ord-themed *) {
  background: rgba(59, 130, 246, 0.15) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}

html.dark .rmm-content [style*="color: #1e40af"]:not(.ord-themed *) {
  color: #93c5fd !important;
}

html.dark .rmm-content [style*="color: #3b82f6"]:not(.ord-themed *) {
  color: #60a5fa !important;
}

/* 개발자 검색 드롭다운 */
html.dark [data-developer-search-target="results"]:not(.ord-themed *) {
  background: #1e293b !important;
  border-color: #475569 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

html.dark .developer-search-result:not(.ord-themed *) {
  border-bottom-color: #334155 !important;
}

html.dark .developer-search-result [style*="color: #111827"]:not(.ord-themed *) {
  color: #f1f5f9 !important;
}

html.dark .developer-search-result [style*="color: #6b7280"]:not(.ord-themed *) {
  color: #94a3b8 !important;
}
