/* 사이트 다크 테마 (html[data-bs-theme="dark"])
   흰색으로 박아둔 요소들을 다크 톤으로 덮어씁니다. */

html {
  color-scheme: light dark;
}

/* ===== 로고 ===== */
.logo-swap .logo-theme-dark.is-active {
  opacity: 0;
  pointer-events: none;
}

html[data-bs-theme="dark"] .logo-swap .logo-theme-light.is-active {
  opacity: 0 !important;
  pointer-events: none !important;
}

html[data-bs-theme="dark"] .logo-swap .logo-theme-dark.is-active {
  opacity: 1 !important;
  pointer-events: auto !important;
}

html[data-bs-theme="light"] .logo-swap .logo-theme-dark.is-active {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ===== 기본 톤 ===== */
html[data-bs-theme="dark"] body {
  background-color: #0b1220 !important;
  color: #e5e7eb !important;
}

html[data-bs-theme="dark"] .cards-hours-badge {
  background: linear-gradient(180deg, #1a2336 0%, #111827 100%) !important;
  border-color: rgba(55, 125, 255, 0.45) !important;
  box-shadow:
    0 0 0 1px rgba(55, 125, 255, 0.08),
    0 0 18px rgba(55, 125, 255, 0.28),
    0 8px 20px rgba(0, 0, 0, 0.35) !important;
  color: #dbeafe !important;
}

html[data-bs-theme="dark"] .cards-hours-label {
  color: #93c5fd !important;
}

html[data-bs-theme="dark"] .cards-hours-time {
  color: #f3f4f6 !important;
}

html[data-bs-theme="dark"] .cards-hours-badge .bi-clock-fill {
  color: #60a5fa !important;
  filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.65));
}

html[data-bs-theme="dark"] .cards-hours-sep {
  background: rgba(96, 165, 250, 0.4) !important;
}

html[data-bs-theme="dark"] .cards-hours-line {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(96, 165, 250, 0.5) 50%,
    transparent 100%
  ) !important;
}

html[data-bs-theme="dark"] .bg-white,
html[data-bs-theme="dark"] .bg-light {
  background-color: #111827 !important;
  color: #e5e7eb !important;
}

html[data-bs-theme="dark"] .text-dark,
html[data-bs-theme="dark"] .text-black {
  color: #e5e7eb !important;
}

html[data-bs-theme="dark"] .text-secondary,
html[data-bs-theme="dark"] .text-muted {
  color: #9ca3af !important;
}

html[data-bs-theme="dark"] .border,
html[data-bs-theme="dark"] .border-top,
html[data-bs-theme="dark"] .border-bottom,
html[data-bs-theme="dark"] .border-start,
html[data-bs-theme="dark"] .border-end {
  border-color: #374151 !important;
}

html[data-bs-theme="dark"] .table {
  --bs-table-bg: #111827;
  --bs-table-color: #e5e7eb;
  --bs-table-border-color: #374151;
  --bs-table-striped-bg: #1f2937;
  --bs-table-hover-bg: #1f2937;
  color: #e5e7eb;
}

html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select,
html[data-bs-theme="dark"] input,
html[data-bs-theme="dark"] textarea,
html[data-bs-theme="dark"] select {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

html[data-bs-theme="dark"] .form-control::placeholder,
html[data-bs-theme="dark"] input::placeholder,
html[data-bs-theme="dark"] textarea::placeholder {
  color: #9ca3af !important;
}

/* ===== 네비 ===== */
html[data-bs-theme="dark"] #navbar .navbar.bg-white {
  background-color: #111827 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}

html[data-bs-theme="dark"] #navbar .logo-swap-btn {
  background: #1f2937;
  border-color: #374151;
  color: #d1d5db;
}

html[data-bs-theme="dark"] #navbar .navbar-toggler-icon {
  filter: invert(1);
}

html[data-bs-theme="dark"] #navbar .dropdown-menu {
  background-color: #1f2937;
  color: #e5e7eb;
}

html[data-bs-theme="dark"] #navbar .dropdown-item {
  color: #e5e7eb;
}

html[data-bs-theme="dark"] #navbar .dropdown-item:hover,
html[data-bs-theme="dark"] #navbar .dropdown-item:focus {
  background-color: #374151;
  color: #fff;
}

/* ===== 홈: 후기/소개 섹션 ===== */
html[data-bs-theme="dark"] .testimonial-section {
  background: #0f172a !important;
}

html[data-bs-theme="dark"] .testimonial-quote {
  color: #e5e7eb !important;
}

html[data-bs-theme="dark"] .info-left h2 {
  color: #e5e7eb !important;
}

html[data-bs-theme="dark"] .info-left p {
  color: #9ca3af !important;
}

/* ===== 문의 카드 ===== */
html[data-bs-theme="dark"] .card {
  background-color: #111827 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

html[data-bs-theme="dark"] .card-title,
html[data-bs-theme="dark"] .card-text {
  color: #e5e7eb !important;
}

/* ===== 팝업/모달 ===== */
html[data-bs-theme="dark"] .generic-modal,
html[data-bs-theme="dark"] .generic-modal-content,
html[data-bs-theme="dark"] .sidebar-modal,
html[data-bs-theme="dark"] #loginModal .modal-content,
html[data-bs-theme="dark"] .modal-content {
  background-color: #111827 !important;
  color: #e5e7eb !important;
  border-color: #374151 !important;
}

html[data-bs-theme="dark"] .generic-modal-title,
html[data-bs-theme="dark"] .generic-modal-body,
html[data-bs-theme="dark"] .generic-modal-body p,
html[data-bs-theme="dark"] .sidebar-modal-title {
  color: #e5e7eb !important;
}

html[data-bs-theme="dark"] .generic-modal-close-btn,
html[data-bs-theme="dark"] .sidebar-modal-close-btn {
  color: #9ca3af !important;
}

html[data-bs-theme="dark"] .generic-modal-footer {
  border-color: #374151 !important;
}

html[data-bs-theme="dark"] .notice-sticker-modal-body {
  color: #d1d5db;
}

/* ===== 게시판 ===== */
html[data-bs-theme="dark"] .board-topbar {
  --board-text: #f3f4f6;
  --board-muted: #9ca3af;
}

html[data-bs-theme="dark"] .board-topbar-left h1,
html[data-bs-theme="dark"] .board-topbar-left .split-text {
  color: #f3f4f6 !important;
}

html[data-bs-theme="dark"] .board-topbar-left .subtitle,
html[data-bs-theme="dark"] .board-topbar-left p.split-text.subtitle,
html[data-bs-theme="dark"] .board-subtitle {
  color: #9ca3af !important;
}

html[data-bs-theme="dark"] .board-container {
  --board-border: #374151;
  --board-muted: #9ca3af;
  --board-text: #e5e7eb;
  --board-bg: #111827;
  --board-soft: #1f2937;
  color: #e5e7eb;
}

html[data-bs-theme="dark"] .board-sidebar {
  --board-border: #374151;
  --board-muted: #9ca3af;
  --board-text: #e5e7eb;
  --board-soft: #1f2937;
  background-color: #111827 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

html[data-bs-theme="dark"] .sidebar-section-title {
  color: #9ca3af !important;
}

html[data-bs-theme="dark"] .sidebar-nav a {
  color: #e5e7eb !important;
}

html[data-bs-theme="dark"] .sidebar-nav li.active a,
html[data-bs-theme="dark"] .sidebar-nav a:hover {
  color: #93c5fd !important;
  background-color: rgba(55, 125, 255, 0.16) !important;
}

html[data-bs-theme="dark"] .board-container,
html[data-bs-theme="dark"] .board-content,
html[data-bs-theme="dark"] .board-main,
html[data-bs-theme="dark"] .board-panel,
html[data-bs-theme="dark"] .board-table-wrap,
html[data-bs-theme="dark"] .board-table,
html[data-bs-theme="dark"] .board-toolbar,
html[data-bs-theme="dark"] .board-search,
html[data-bs-theme="dark"] .board-pagination,
html[data-bs-theme="dark"] .post-card,
html[data-bs-theme="dark"] .read-wrap,
html[data-bs-theme="dark"] .read-card,
html[data-bs-theme="dark"] .comment-box,
html[data-bs-theme="dark"] .comment-item,
html[data-bs-theme="dark"] .board-topbar {
  background-color: transparent !important;
  color: #e5e7eb !important;
  border-color: #374151 !important;
}

html[data-bs-theme="dark"] .board-content,
html[data-bs-theme="dark"] .board-panel {
  background-color: #111827 !important;
}

html[data-bs-theme="dark"] .post-panel,
html[data-bs-theme="dark"] .post-header,
html[data-bs-theme="dark"] .post-info h2,
html[data-bs-theme="dark"] .post-body,
html[data-bs-theme="dark"] .post-body *,
html[data-bs-theme="dark"] .comment-title,
html[data-bs-theme="dark"] .c-author,
html[data-bs-theme="dark"] .c-text,
html[data-bs-theme="dark"] .writer-btn {
  color: #e5e7eb !important;
}

html[data-bs-theme="dark"] .post-body a,
html[data-bs-theme="dark"] .writer-btn:hover {
  color: #93c5fd !important;
}

html[data-bs-theme="dark"] .post-meta,
html[data-bs-theme="dark"] .post-ip,
html[data-bs-theme="dark"] .c-meta,
html[data-bs-theme="dark"] .c-badge {
  color: #9ca3af !important;
}

html[data-bs-theme="dark"] .c-badge {
  background: #1f2937 !important;
}

html[data-bs-theme="dark"] .writer-popover {
  background: #1f2937 !important;
  border-color: #374151 !important;
}

html[data-bs-theme="dark"] .writer-popover-link {
  color: #e5e7eb !important;
}

html[data-bs-theme="dark"] .search-wrapper {
  background: #1f2937 !important;
  border-color: #374151 !important;
}

html[data-bs-theme="dark"] .search-wrapper input[type="text"],
html[data-bs-theme="dark"] .search-wrapper input {
  background: transparent !important;
  color: #e5e7eb !important;
}

html[data-bs-theme="dark"] .search-wrapper input::placeholder {
  color: #9ca3af !important;
}

html[data-bs-theme="dark"] .search-icon {
  color: #9ca3af !important;
}

html[data-bs-theme="dark"] .board-table th,
html[data-bs-theme="dark"] .board-table td,
html[data-bs-theme="dark"] .board-table tr,
html[data-bs-theme="dark"] .board-table thead th {
  background-color: #111827 !important;
  color: #e5e7eb !important;
  border-color: #374151 !important;
}

html[data-bs-theme="dark"] .board-table .col-title a,
html[data-bs-theme="dark"] .board-table .title-text {
  color: #e5e7eb !important;
}

html[data-bs-theme="dark"] .board-table tr:hover td,
html[data-bs-theme="dark"] .hover-row:hover td,
html[data-bs-theme="dark"] .notice-row td,
html[data-bs-theme="dark"] .notice-row:hover td {
  background-color: #1f2937 !important;
}

html[data-bs-theme="dark"] .board-search input,
html[data-bs-theme="dark"] .board-search .form-control,
html[data-bs-theme="dark"] .comment-form textarea,
html[data-bs-theme="dark"] .write-form input,
html[data-bs-theme="dark"] .write-form textarea {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

html[data-bs-theme="dark"] .pagination {
  background: #111827 !important;
  border-top-color: #374151 !important;
}

html[data-bs-theme="dark"] .page-link,
html[data-bs-theme="dark"] .page-btn,
html[data-bs-theme="dark"] .pagination a,
html[data-bs-theme="dark"] .pagination span {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
  color: #9ca3af !important;
}

html[data-bs-theme="dark"] .pagination a:hover {
  background-color: #273549 !important;
  border-color: #4b5563 !important;
  color: #e5e7eb !important;
}

html[data-bs-theme="dark"] .page-item.active .page-link,
html[data-bs-theme="dark"] .pagination a.active,
html[data-bs-theme="dark"] .pagination .active {
  background-color: #377dff !important;
  border-color: #377dff !important;
  color: #fff !important;
}

/* ===== 상태 카드 / 쿨타임 ===== */
html[data-bs-theme="dark"] .boss-status-card,
html[data-bs-theme="dark"] .bsq-card,
html[data-bs-theme="dark"] .cd-card {
  background: #111827 !important;
  border-color: #374151 !important;
  color: #e5e7eb;
}

html[data-bs-theme="dark"] .boss-status-label,
html[data-bs-theme="dark"] .cd-header h1,
html[data-bs-theme="dark"] .bsq-header h1,
html[data-bs-theme="dark"] .cd-section-title,
html[data-bs-theme="dark"] .cd-mode-name,
html[data-bs-theme="dark"] .cd-field label,
html[data-bs-theme="dark"] .cd-field-label,
html[data-bs-theme="dark"] .cd-result-row strong,
html[data-bs-theme="dark"] .cd-remain-value {
  color: #f9fafb !important;
}

html[data-bs-theme="dark"] .boss-status-message,
html[data-bs-theme="dark"] .boss-status-eyebrow,
html[data-bs-theme="dark"] .cd-header p,
html[data-bs-theme="dark"] .bsq-header p,
html[data-bs-theme="dark"] .cd-mode-desc,
html[data-bs-theme="dark"] .cd-help,
html[data-bs-theme="dark"] .cd-back-btn,
html[data-bs-theme="dark"] .cd-result-label,
html[data-bs-theme="dark"] .cd-wheel-hint,
html[data-bs-theme="dark"] .cd-wheel-sep {
  color: #9ca3af !important;
}

html[data-bs-theme="dark"] .boss-status-picker,
html[data-bs-theme="dark"] .boss-status-preset,
html[data-bs-theme="dark"] .boss-status-field input,
html[data-bs-theme="dark"] .boss-status-field textarea,
html[data-bs-theme="dark"] .bs-time-trigger,
html[data-bs-theme="dark"] .bs-wheel,
html[data-bs-theme="dark"] .cd-mode-btn,
html[data-bs-theme="dark"] .cd-field input,
html[data-bs-theme="dark"] .cd-time-trigger,
html[data-bs-theme="dark"] .cd-wheel {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

html[data-bs-theme="dark"] .bsq-preview {
  background: color-mix(in srgb, var(--boss-color, #16a34a) 18%, #0f172a) !important;
  border: 1px solid #374151;
}

html[data-bs-theme="dark"] .bsq-preview .boss-status-avatar {
  background: color-mix(in srgb, var(--boss-color, #16a34a) 24%, #1f2937) !important;
  border-color: color-mix(in srgb, var(--boss-color, #16a34a) 42%, #374151) !important;
}

html[data-bs-theme="dark"] .bsq-header p,
html[data-bs-theme="dark"] .bsq-desc,
html[data-bs-theme="dark"] .bsq-section-label,
html[data-bs-theme="dark"] .bsq-field > span {
  color: #9ca3af !important;
}

html[data-bs-theme="dark"] .bsq-field input,
html[data-bs-theme="dark"] .bsq-primary {
  border-color: #374151;
}

html[data-bs-theme="dark"] .bsq-field input {
  background: #1f2937 !important;
  color: #e5e7eb !important;
}

html[data-bs-theme="dark"] .boss-status-preset.is-active {
  background: color-mix(in srgb, var(--preset-color, #16a34a) 22%, #1f2937) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--preset-color, #16a34a) 35%, #1f2937) !important;
}

html[data-bs-theme="dark"] .boss-status-preset:hover {
  background: #273549 !important;
}

html[data-bs-theme="dark"] .cd-mode-btn:hover {
  background: #273549 !important;
  border-color: #4b5563 !important;
}

html[data-bs-theme="dark"] .cd-tip {
  background: #1c1917 !important;
  border-color: #78350f !important;
}

html[data-bs-theme="dark"] .cd-tip-text {
  color: #fdba74 !important;
}

html[data-bs-theme="dark"] .cd-tip-btn {
  background: #292524 !important;
  border-color: #78350f !important;
  color: #fdba74 !important;
}

html[data-bs-theme="dark"] .cd-tip-btn:hover,
html[data-bs-theme="dark"] .cd-tip-btn.is-paused {
  background: #44403c !important;
  border-color: #92400e !important;
  color: #fed7aa !important;
}

html[data-bs-theme="dark"] .bs-time-sheet,
html[data-bs-theme="dark"] .cd-time-sheet {
  background: linear-gradient(180deg, #1f2937 0%, #111827 100%) !important;
  border-color: #374151 !important;
}

html[data-bs-theme="dark"] .bs-wheel::before,
html[data-bs-theme="dark"] .cd-wheel::before {
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.98) 0%, rgba(31, 41, 55, 0.15) 100%);
}

html[data-bs-theme="dark"] .bs-wheel::after,
html[data-bs-theme="dark"] .cd-wheel::after {
  background: linear-gradient(0deg, rgba(31, 41, 55, 0.98) 0%, rgba(31, 41, 55, 0.15) 100%);
}

html[data-bs-theme="dark"] .bs-wheel-item,
html[data-bs-theme="dark"] .cd-wheel-item {
  color: #6b7280;
}

html[data-bs-theme="dark"] .bs-wheel-item.is-active,
html[data-bs-theme="dark"] .cd-wheel-item.is-active {
  color: #f9fafb;
}

html[data-bs-theme="dark"] .bs-wheel-highlight,
html[data-bs-theme="dark"] .cd-wheel-highlight {
  background: rgba(55, 125, 255, 0.18);
  border-color: rgba(55, 125, 255, 0.35);
}

html[data-bs-theme="dark"] .cd-result-row {
  border-bottom-color: #374151;
}

html[data-bs-theme="dark"] .cd-remain {
  background: #292524 !important;
  border-color: #78350f !important;
}

html[data-bs-theme="dark"] .cd-remain.is-ready {
  background: #14261f !important;
  border-color: #065f46 !important;
}

html[data-bs-theme="dark"] .cd-remain-title {
  color: #fdba74 !important;
}

html[data-bs-theme="dark"] .cd-remain.is-ready .cd-remain-title {
  color: #6ee7b7 !important;
}

html[data-bs-theme="dark"] .cd-submit.cd-secondary {
  background: #1f2937 !important;
  color: #e5e7eb !important;
  border-color: #374151 !important;
}

html[data-bs-theme="dark"] .cd-submit.cd-secondary:hover {
  background: #273549 !important;
}

/* ===== 푸터 ===== */
html[data-bs-theme="dark"] footer,
html[data-bs-theme="dark"] .footer {
  background-color: #070b14 !important;
  color: #9ca3af;
}

/* ===== 회원가입: 약관 동의 ===== */
html[data-bs-theme="dark"] .agreement-container {
  color: #e5e7eb;
}

html[data-bs-theme="dark"] .agreement-container > h3 {
  color: #f3f4f6 !important;
}

html[data-bs-theme="dark"] .agreement-warning {
  color: #fca5a5 !important;
}

html[data-bs-theme="dark"] .agreement-section {
  background: #111827 !important;
  color: #e5e7eb !important;
  box-shadow: 0 0 0 1px #374151 !important;
}

html[data-bs-theme="dark"] .agreement-title {
  color: #f3f4f6 !important;
}

html[data-bs-theme="dark"] .agreement-section textarea,
html[data-bs-theme="dark"] .legal-view textarea,
html[data-bs-theme="dark"] .agreement-section .terms-box,
html[data-bs-theme="dark"] .agreement-section .privacy-box {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #d1d5db !important;
}

html[data-bs-theme="dark"] .switch {
  background: #4b5563;
}

html[data-bs-theme="dark"] .switch::before {
  background: #e5e7eb;
}

html[data-bs-theme="dark"] .switch.on {
  background: #4d7cff;
}

html[data-bs-theme="dark"] .register-btn.disabled {
  background: #4b5563 !important;
  color: #9ca3af !important;
}

/* ===== 회원가입: 이용정보 입력 ===== */
html[data-bs-theme="dark"] .container.my-5 {
  background: #111827 !important;
  color: #e5e7eb !important;
  box-shadow: 0 0 0 1px #374151 !important;
}

html[data-bs-theme="dark"] .container.my-5 h3,
html[data-bs-theme="dark"] .container.my-5 label,
html[data-bs-theme="dark"] .container.my-5 .form-label {
  color: #f3f4f6 !important;
}

html[data-bs-theme="dark"] .container.my-5 .form-control,
html[data-bs-theme="dark"] .container.my-5 input,
html[data-bs-theme="dark"] .container.my-5 select {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

html[data-bs-theme="dark"] .error-message {
  background: #3f1d1d !important;
  border-color: #7f1d1d !important;
  color: #fca5a5 !important;
}

/* ===== 회원가입 완료 ===== */
html[data-bs-theme="dark"] .register-success-wrap h2 {
  color: #f3f4f6 !important;
}

html[data-bs-theme="dark"] .register-success-wrap,
html[data-bs-theme="dark"] .register-success-wrap p,
html[data-bs-theme="dark"] .register-success-desc {
  color: #9ca3af !important;
}
