/**
 * Dark / semi-dark overrides that beat Brand Book light surface.
 * Loaded last from index.html.
 */
html.dark-theme {
  --ucheto-surface: #212529;
  --ucheto-card: #2b3035;
  --ucheto-ink: #e4e5e6;
  --bs-body-bg: #212529;
  --bs-body-color: #e4e5e6;
  --bs-secondary-color: #a8adb0;
  --bs-border-color: rgba(255, 255, 255, 0.12);
  --bs-tertiary-bg: #2b3035;
  color-scheme: dark;
}

html.dark-theme,
html.dark-theme body,
html.dark-theme #app {
  background: #212529 !important;
  background-color: #212529 !important;
  color: #e4e5e6 !important;
}

html.dark-theme .wrapper,
html.dark-theme .page-wrapper,
html.dark-theme .page-content {
  background-color: transparent !important;
  min-height: calc(100vh - 60px);
}

html.dark-theme .page-footer,
html.dark-theme .footer {
  background-color: #2b3035 !important;
  color: #a8adb0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
}

html.dark-theme .card {
  background-color: #2b3035 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 0.1rem 0.7rem rgb(0 0 0 / 20%) !important;
}

html.dark-theme .breadcrumb-item,
html.dark-theme .breadcrumb-item.active,
html.dark-theme .breadcrumb-title {
  color: #c3c5c8 !important;
}

html.dark-theme .form-control,
html.dark-theme .form-select {
  background-color: #212529 !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #e4e5e6 !important;
}

html.dark-theme .form-control::placeholder {
  color: #8c969e !important;
}

html.dark-theme .form-select option {
  background-color: #212529;
  color: #e4e5e6;
}

html.dark-theme .input-group-text {
  background-color: #2b3035 !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #c3c5c8 !important;
}

html.dark-theme .modal-content {
  background-color: #2b3035 !important;
  color: #e4e5e6 !important;
}

html.dark-theme .modal-header,
html.dark-theme .modal-footer {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

html.dark-theme code {
  color: #9ecbff !important;
  background: rgba(255, 255, 255, 0.08) !important;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

html.dark-theme .text-muted {
  color: #8c969e !important;
}

html.dark-theme .btn-outline-primary {
  color: #8ec8e6;
  border-color: #1e80b4;
}

html.dark-theme .btn-outline-primary:hover {
  color: #fff;
  background-color: #1e80b4;
}

html.dark-theme .btn-outline-danger {
  color: #f1aeb5;
  border-color: #dc3545;
}

html.dark-theme .btn-secondary {
  background-color: #495057 !important;
  border-color: #495057 !important;
}

html.dark-theme .chat-wrapper,
html.dark-theme .chat-sidebar,
html.dark-theme .chat-sidebar-header,
html.dark-theme .chat-header,
html.dark-theme .chat-footer,
html.dark-theme .chat-empty-pane {
  background: #2b3035 !important;
  color: #e4e5e6 !important;
}

html.dark-theme .chat-list .list-group-item {
  color: #e4e5e6;
}

html.dark-theme .chat-day-separator span {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #a8adb0 !important;
}

html.dark-theme .chat-composer {
  background-color: #212529 !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #e4e5e6 !important;
}

/* Semi-dark: dark sidebar, keep light content but no broken white bleed */
html.semi-dark {
  --bs-body-bg: #f5f8fb;
}

html.semi-dark,
html.semi-dark body,
html.semi-dark #app {
  background: #f5f8fb !important;
}

/* Full-bleed chat page */
.page-content.page-content--chat {
  padding: 0.75rem 1rem 0.5rem !important;
}

.page-content.page-content--chat .chat-wrapper {
  height: calc(100vh - 60px - 36px - 1.25rem) !important;
  min-height: 480px;
  margin: 0 !important;
}

/* Virtual Office — true fullscreen (no sidebar / header / footer) */
.wrapper.wrapper--office-fs .sidebar-wrapper,
.wrapper.wrapper--office-fs > header,
.wrapper.wrapper--office-fs .overlay {
  display: none !important;
}

.wrapper.wrapper--office-fs .page-wrapper {
  margin-left: 0 !important;
  width: 100% !important;
}

.wrapper.wrapper--office-fs .page-content.page-content--office {
  padding: 0 !important;
  margin: 0 !important;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

.header-icon-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 42px !important;
  height: 42px !important;
  font-size: 22px !important;
  color: #6c757d !important;
  border: none !important;
  background: transparent !important;
  border-radius: 50%;
  padding: 0 !important;
  box-shadow: none !important;
}
.header-icon-btn:hover,
.header-icon-btn:focus {
  color: #1e80b4 !important;
  background: transparent !important;
}
.header-icon-btn i {
  line-height: 1;
}
html.dark-theme .header-icon-btn {
  color: #c3c5c8 !important;
  background: transparent !important;
  border: none !important;
}
.user-box .user-avatar-img.user-img,
.user-box .user-avatar-fallback.user-img {
  width: 45px !important;
  height: 45px !important;
}
