/*
 * DentalHub - premium SaaS brand applied to the legacy PHP app.
 * Mirror of /opt/stacks/cmd/branding/dentalhub/tokens.css plus component styles.
 * Loaded from admin/login.php and admin/welcome.php.
 */

:root {
  --dh-primary-900: #120c0d;
  --dh-primary-800: #1b1213;
  --dh-primary-700: #201516;
  --dh-primary-600: #2a1011;
  --dh-primary-500: #381213;
  --dh-primary-400: #6b3033;
  --dh-primary-300: #a56a6c;
  --dh-primary-100: #f3e6e6;
  --dh-primary-050: #faf5f5;

  --dh-accent-700: #004653;
  --dh-accent-500: #005869;
  --dh-accent-400: #1a7a8c;
  --dh-accent-300: #7ec4cf;
  --dh-accent-100: #e4f3f6;

  --dh-violet-700: #5e0042;
  --dh-violet-500: #7a1a58;
  --dh-violet-300: #d4a3c4;
  --dh-violet-100: #f8eef4;

  --dh-success: #16a34a;
  --dh-success-bg: #dcfce7;
  --dh-warning: #d97706;
  --dh-warning-bg: #fef3c7;
  --dh-danger: #dc2626;
  --dh-danger-bg: #fee2e2;
  --dh-info: #005869;
  --dh-info-bg: #e4f3f6;

  --dh-text: #1d222b;
  --dh-muted: #7f8080;
  --dh-muted-2: #9a9b9b;
  --dh-border: #e6e6e6;
  --dh-border-2: #d0d0d0;
  --dh-surface: #ffffff;
  --dh-surface-2: #f5f8fb;
  --dh-surface-3: #eeeeee;
  --dh-surface-bar: #f1f1f1;
  --dh-bg: #f5f8fb;

  --dh-radius-sm: 8px;
  --dh-radius: 10px;
  --dh-radius-lg: 14px;
  --dh-radius-pill: 9999px;

  --dh-shadow-sm: 0 1px 2px rgba(32, 21, 22, 0.06);
  --dh-shadow: 0 4px 12px rgba(32, 21, 22, 0.08);
  --dh-shadow-lg: 0 12px 32px rgba(56, 18, 19, 0.18);

  --dh-gradient-hero: linear-gradient(135deg, #1b1213 0%, #381213 100%);
  --dh-gradient-app: linear-gradient(180deg, #f5f8fb 0%, #ffffff 60%);
  --dh-gradient-card: linear-gradient(180deg, #ffffff 0%, #f5f8fb 100%);

  --dh-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --dh-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

/* ---------- Login page (full-screen scope) ---------- */

body.dh-login {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--dh-font);
  color: var(--dh-text);
  background: var(--dh-gradient-app);
}

.dh-login-shell {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}

.dh-login-brand {
  position: relative;
  background: var(--dh-gradient-hero);
  color: #ffffff;
  padding: 56px 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.dh-login-brand::before,
.dh-login-brand::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.45;
  pointer-events: none;
}

.dh-login-brand::before {
  width: 420px;
  height: 420px;
  right: -140px;
  top: -160px;
  background: radial-gradient(closest-side, rgba(165, 106, 108, 0.55), rgba(165, 106, 108, 0));
}

.dh-login-brand::after {
  width: 520px;
  height: 520px;
  left: -180px;
  bottom: -220px;
  background: radial-gradient(closest-side, rgba(94, 0, 66, 0.45), rgba(94, 0, 66, 0));
}

.dh-login-brand__top,
.dh-login-brand__mid,
.dh-login-brand__bot {
  position: relative;
  z-index: 1;
}

.dh-login-brand__logo svg,
.dh-login-brand__logo img {
  height: 52px;
  width: auto;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.dh-login-brand__mid {
  max-width: 460px;
}

.dh-login-brand__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--dh-accent-300);
  margin: 0 0 18px;
}

.dh-login-brand__headline {
  font-size: 38px;
  line-height: 1.1;
  font-weight: 700;
  margin: 0 0 18px;
  letter-spacing: -0.5px;
}

.dh-login-brand__sub {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.dh-trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.dh-trust {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 14px 16px;
  backdrop-filter: blur(4px);
}

.dh-trust__label {
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 6px;
  font-weight: 600;
}

.dh-trust__value {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.dh-login-brand__bot {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.dh-login-form-side {
  background: var(--dh-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
}

.dh-login-card {
  width: 100%;
  max-width: 420px;
}

.dh-login-card__title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--dh-text);
  letter-spacing: -0.3px;
}

.dh-login-card__sub {
  font-size: 14px;
  color: var(--dh-muted);
  margin: 0 0 28px;
}

.dh-field {
  margin-bottom: 18px;
}

.dh-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--dh-text);
  margin-bottom: 6px;
}

.dh-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  background: var(--dh-surface);
  font-family: var(--dh-font);
  font-size: 15px;
  color: var(--dh-text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.dh-input::placeholder {
  color: var(--dh-muted-2);
}

.dh-input:focus {
  border-color: var(--dh-primary-400);
  box-shadow: 0 0 0 4px rgba(56, 18, 19, 0.15);
}

.dh-input--error {
  border-color: var(--dh-danger);
}

.dh-error {
  display: block;
  font-size: 13px;
  color: var(--dh-danger);
  margin-top: 6px;
}

.dh-alert {
  border-radius: var(--dh-radius);
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 20px;
  border: 1px solid var(--dh-border);
  background: var(--dh-surface-2);
  color: var(--dh-text);
}

.dh-alert--danger {
  background: var(--dh-danger-bg);
  border-color: #fecaca;
  color: #991b1b;
}

.dh-alert--info {
  background: var(--dh-info-bg);
  border-color: #b7dce3;
  color: #004653;
}

.dh-alert--warning {
  background: var(--dh-warning-bg);
  border-color: #fde68a;
  color: #92400e;
}

.dh-alert--success {
  background: var(--dh-success-bg);
  border-color: #bbf7d0;
  color: #166534;
}

.dh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--dh-radius);
  font-family: var(--dh-font);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.05s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.dh-btn:active {
  transform: translateY(1px);
}

.dh-btn:focus-visible {
  outline: 2px solid var(--dh-primary-400);
  outline-offset: 2px;
}

.dh-btn--primary {
  background: var(--dh-primary-500);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(56, 18, 19, 0.28);
}

.dh-btn--primary:hover {
  background: var(--dh-primary-600);
}

.dh-btn--ghost {
  background: var(--dh-surface);
  color: var(--dh-text);
  border-color: var(--dh-border);
}

.dh-btn--ghost:hover {
  background: var(--dh-surface-3);
}

.dh-btn--danger {
  background: var(--dh-danger);
  color: #ffffff;
}

.dh-btn--block {
  width: 100%;
}

.dh-login-helper {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--dh-muted);
}

.dh-login-helper a {
  color: var(--dh-primary-500);
  text-decoration: none;
  font-weight: 500;
}

.dh-login-helper a:hover {
  text-decoration: underline;
}

.dh-login-foot {
  text-align: center;
  margin-top: 40px;
  font-size: 12px;
  color: var(--dh-muted-2);
}

/* Polish the legacy "Forget password" form rendered by class.user.php */
#forgetpassword_form h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--dh-text);
  margin: 14px 0 6px;
}

#forgetpassword_form #help_text {
  display: block;
  font-size: 13px;
  color: var(--dh-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

#forgetpassword_form input[type="text"] {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  background: var(--dh-surface);
  font-family: var(--dh-font);
  font-size: 15px;
  color: var(--dh-text);
  outline: none;
  margin-bottom: 12px;
  box-sizing: border-box;
}

#forgetpassword_form input[type="text"]:focus {
  border-color: var(--dh-primary-400);
  box-shadow: 0 0 0 4px rgba(56, 18, 19, 0.15);
}

#forgetpassword_form input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--dh-radius);
  background: var(--dh-primary-500);
  color: #ffffff;
  font-family: var(--dh-font);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(56, 18, 19, 0.28);
}

#forgetpassword_form input[type="submit"]:hover {
  background: var(--dh-primary-600);
}

#forgetpassword_form p {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--dh-muted);
}

#forgetpassword_form p a {
  color: var(--dh-primary-500);
  text-decoration: none;
  font-weight: 500;
}

#forgetpassword_form p a:hover { text-decoration: underline; }

#error_message_email,
#error_message_username,
#error_message_password {
  font-size: 13px;
  color: var(--dh-danger);
  margin-bottom: 6px;
}

/* ---------- Global admin header ---------- */

.dh-header {
  width: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fb 100%);
  border-bottom: 1px solid var(--dh-border);
  box-shadow: var(--dh-shadow-sm);
  font-family: var(--dh-font);
  text-align: left;
  clear: both;
}

.dh-header,
.dh-header * {
  box-sizing: border-box;
}

.dh-header__inner {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  row-gap: 6px;
}

.dh-header__brand {
  display: inline-flex;
  align-items: center;
  min-width: 150px;
  text-decoration: none;
}

.dh-header__brand img {
  display: block;
  height: 36px;
  width: auto;
}

.dh-header__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  flex-basis: 100%;   /* always occupies its own full-width row */
  order: 3;
  flex-wrap: wrap;
  min-width: 0;
}

.dh-header__link,
.dh-header__utility a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: var(--dh-radius);
  color: var(--dh-muted);
  background: transparent;
  border: 1px solid transparent;
  font-family: var(--dh-font);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.dh-header__link:hover,
.dh-header__utility a:hover,
.dh-header__tools:focus-within .dh-header__tools-button,
.dh-header__tools:hover .dh-header__tools-button {
  color: var(--dh-primary-700);
  background: var(--dh-primary-050);
  border-color: var(--dh-primary-100);
  text-decoration: none;
}

.dh-header__link--active {
  color: var(--dh-primary-700);
  background: var(--dh-primary-100);
  border-color: var(--dh-primary-100);
}

.dh-header__tools {
  position: relative;
  display: inline-flex;
}

.dh-header__tools-button::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-left: 2px;
}

.dh-header__tools-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 520px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius-lg);
  box-shadow: var(--dh-shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
  z-index: 50;
}

.dh-header__tools:focus-within .dh-header__tools-menu,
.dh-header__tools:hover .dh-header__tools-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Nav-level dropdowns (Events, Team Members) — compact, left-aligned */
.dh-header__tools-menu--nav {
  left: 0;
  right: auto;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  padding: 8px;
  grid-template-columns: none;
}

.dh-gsearch__footer {
  grid-column: 1 / -1;
  padding: 6px 8px 2px;
  border-top: 1px solid var(--dh-border);
  margin-top: 4px;
  text-align: right;
}

.dh-gsearch__footer a {
  font-size: 12px;
  color: var(--dh-primary-700);
  text-decoration: none;
}

.dh-gsearch__footer a:hover {
  text-decoration: underline;
}

.dh-header__tools-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dh-header__tools-label {
  padding: 0 8px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--dh-muted-2);
}

.dh-header__tools-section a {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 0 8px;
  border-radius: var(--dh-radius-sm);
  color: var(--dh-text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.dh-header__tools-section a:hover {
  background: var(--dh-primary-050);
  color: var(--dh-primary-700);
  text-decoration: none;
}

.dh-header__utility {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  margin-left: auto;
}

.dh-header__env {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: var(--dh-radius-pill);
  background: var(--dh-surface-3);
  color: var(--dh-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.dh-header__search {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dh-header__search-inner {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dh-header__search-label {
  position: absolute;
  left: 12px;
  font-size: 12px;
  color: var(--dh-muted-2);
  pointer-events: none;
}

.dh-header .global_search {
  width: 200px;
  height: 36px;
  padding: 0 12px 0 56px;
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius-pill);
  background: var(--dh-surface);
  color: var(--dh-text);
  font-family: var(--dh-font);
  font-size: 13px;
  outline: none;
  box-shadow: none;
}

.dh-header .global_search:focus {
  border-color: var(--dh-primary-400);
  box-shadow: 0 0 0 3px rgba(56, 18, 19, 0.14);
}

/* ── Universal 3-column search panel ──────────────────────────────────────── */
.dh-gsearch__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 9999;
  display: flex;
  gap: 0;
  min-width: 640px;
  background: #fff;
  border: 1px solid var(--dh-border);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.08);
  overflow: hidden;
}

.dh-gsearch__panel[hidden] {
  display: none;
}

.dh-gsearch__none {
  display: none;
  padding: 14px 16px;
  font-size: 13px;
  color: #6b7280;
}

.dh-gsearch__panel--empty {
  display: block;
  min-width: 240px;
}

.dh-gsearch__panel--empty .dh-gsearch__col,
.dh-gsearch__panel--empty .dh-gsearch__footer {
  display: none;
}

.dh-gsearch__panel--empty .dh-gsearch__none {
  display: block;
}

.dh-gsearch__col {
  flex: 1 1 0;
  min-width: 0;
  border-right: 1px solid #eef0f3;
  padding: 10px 0 8px;
}

.dh-gsearch__col:last-child {
  border-right: none;
}

.dh-gsearch__col--empty {
  opacity: 0.45;
}

.dh-gsearch__col-head {
  padding: 2px 14px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #7f8080;
}

.dh-gsearch__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dh-gsearch__item {
  margin: 0;
  padding: 0;
}

.dh-gsearch__item a {
  display: flex;
  flex-direction: column;
  padding: 6px 14px;
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
  cursor: pointer;
}

.dh-gsearch__item a:hover {
  background: #faf5f5;
  text-decoration: none;
  color: inherit;
}

.dh-gsearch__label {
  font-size: 13px;
  font-weight: 600;
  color: #1d222b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dh-gsearch__label strong {
  color: #d4a017;
  font-weight: 700;
}

.dh-gsearch__sub {
  font-size: 11px;
  color: #7f8080;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dh-gsearch__sub strong {
  color: #d4a017;
  font-weight: 700;
}

.dh-header__signout {
  color: var(--dh-danger) !important;
}

.dh-header__help {
  min-width: 28px;
  min-height: 28px !important;
  padding: 0 !important;
  justify-content: center;
  border-radius: var(--dh-radius-pill) !important;
  border: 1px solid var(--dh-border-2) !important;
  color: var(--dh-muted) !important;
  font-size: 13px !important;
}

.dh-header__help:hover {
  color: var(--dh-primary-700) !important;
  border-color: var(--dh-primary-300) !important;
}

.dh-header .active_fct {
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--dh-radius-pill);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.dh-header .active_fct.overdue_fcts {
  padding: 0 6px;
  background: var(--dh-danger-bg);
  color: var(--dh-danger);
}

.dh-header .active_fct.hide_fct {
  display: none;
}

@media (max-width: 1100px) {
  .dh-header__inner {
    padding: 8px 16px;
  }

  .dh-header__utility {
    margin-left: auto;
  }
}

@media (max-width: 1180px) {
  .dh-header__link,
  .dh-header__utility a {
    padding: 0 8px;
    font-size: 12.5px;
  }

  .dh-header .global_search {
    width: 160px;
  }

  .dh-gsearch__panel {
    min-width: 480px;
  }
}

@media (max-width: 640px) {
  .dh-gsearch__panel {
    flex-direction: column;
    min-width: 280px;
  }

  .dh-gsearch__col {
    border-right: none;
    border-bottom: 1px solid #eef0f3;
  }

  .dh-gsearch__col:last-child {
    border-bottom: none;
  }
}

@media (max-width: 880px) {
  .dh-login-shell {
    grid-template-columns: 1fr;
  }

  .dh-login-brand {
    padding: 28px 24px 24px;
  }

  .dh-login-brand__headline {
    font-size: 28px;
  }

  .dh-trust-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .dh-trust {
    padding: 10px 12px;
  }

  .dh-login-form-side {
    padding: 32px 20px 56px;
  }
}

/* ---------- Dashboard surfaces (scoped to .dh-app inside legacy chrome) ---------- */

.dh-app {
  font-family: var(--dh-font);
  color: var(--dh-text);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 4px 0 16px;
}

.dh-app a {
  color: var(--dh-primary-500);
}

.dh-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--dh-accent-300);
  margin-bottom: 8px;
}

.dh-hero {
  position: relative;
  background: var(--dh-gradient-hero);
  border-radius: var(--dh-radius-lg);
  color: #ffffff;
  padding: 24px 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--dh-shadow-lg);
  overflow: hidden;
}

.dh-hero::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -120px;
  top: -160px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(165, 106, 108, 0.45), rgba(165, 106, 108, 0));
  pointer-events: none;
}

.dh-hero__text {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.dh-hero h1 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.3px;
  color: #ffffff;
}

.dh-hero p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.55;
}

.dh-hero__actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.dh-hero__actions a.dh-btn--primary {
  background: #ffffff;
  color: var(--dh-primary-700) !important;
  box-shadow: 0 8px 18px rgba(27, 18, 19, 0.25);
}

.dh-hero__actions .dh-btn--primary:hover {
  background: var(--dh-accent-100);
  color: var(--dh-primary-800);
}

.dh-hero__actions .dh-btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.dh-hero__actions .dh-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

.dh-findadd {
  display: flex !important;
  flex-direction: row !important;
  gap: 16px;
  margin-bottom: 0;
  width: 100%;
}
.dh-fa-card {
  flex: 1 1 0 !important;
  width: 0 !important;
  min-width: 0 !important;
}
.dh-fa-card .dh-card__head { padding-bottom: 0; border-bottom: none; }
.dh-fa-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 16px;
  min-height: 68px;
}
.dh-fa-search {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.dh-fa-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  font-size: 14px;
  background: var(--dh-surface-2);
  color: var(--dh-text);
}
.dh-fa-input:focus { outline: 2px solid var(--dh-primary-400); outline-offset: 1px; }
.dh-fa-add { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 1024px) { .dh-findadd { flex-direction: column; } }

/* ── Dashboard greeting (replaces bold-blue hero) ── */
.dh-greeting {
  padding: 20px 4px 4px;
}
.dh-greeting h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--dh-text);
  margin: 0 0 4px;
}
.dh-greeting__sub {
  font-size: 14px;
  color: var(--dh-muted);
  margin: 0;
}

/* ── Dashboard wide-screen 2-column layout ── */
/* Action-needed + credentialing sit side-by-side;
   8-week table + openings table sit side-by-side;
   everything else (KPIs, pipeline tables) spans full width.
   Scoped to the dashboard only: other screens reuse .dh-app with
   .dh-legacy-page, and the 2-col grid left a tall empty column beside
   the page hero (e.g. advance_staff_search.php). */
@media (min-width: 1100px) {
  .dh-app:not(.dh-legacy-page) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
  }
  /* Full-width rows */
  .dh-greeting,
  .dh-kpis,
  .dh-pipeline-section,
  .dh-hero,
  .dh-page-hero {
    grid-column: 1 / -1;
  }
  /* The two paired cards each naturally occupy one column */
  .dh-actions-needed,
  .dh-cred-strip,
  .dh-week-table,
  .dh-openings-table {
    /* default: span 1 column — pairs sit next to each other automatically */
  }
}

.dh-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dh-kpi {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 18px 16px;
  background: var(--dh-gradient-card);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius-lg);
  box-shadow: var(--dh-shadow-sm);
  text-decoration: none;
  color: var(--dh-text);
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
  min-height: 116px;
}

.dh-kpi__metric {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dh-kpi:hover {
  transform: translateY(-1px);
  box-shadow: var(--dh-shadow);
  border-color: var(--dh-primary-100);
}

.dh-kpi__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--dh-primary-100);
  color: var(--dh-primary-600);
  flex-shrink: 0;
}

.dh-kpi__icon[data-tone="accent"]   { background: var(--dh-accent-100); color: var(--dh-accent-700); }
.dh-kpi__icon[data-tone="violet"]   { background: var(--dh-violet-100); color: var(--dh-violet-700); }
.dh-kpi__icon[data-tone="success"]  { background: var(--dh-success-bg); color: var(--dh-success); }
.dh-kpi__icon[data-tone="warning"]  { background: var(--dh-warning-bg); color: var(--dh-warning); }
.dh-kpi__icon[data-tone="danger"]   { background: var(--dh-danger-bg); color: var(--dh-danger); }

.dh-kpi__value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.5px;
  color: var(--dh-text);
}

.dh-kpi__label {
  font-size: 13px;
  color: var(--dh-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.dh-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--dh-radius-pill);
  font-size: 11px;
  font-weight: 600;
  background: var(--dh-surface-3);
  color: var(--dh-muted);
  letter-spacing: 0.2px;
}

.dh-chip--info { background: var(--dh-primary-100); color: var(--dh-primary-600); }
.dh-chip--accent { background: var(--dh-accent-100); color: var(--dh-accent-700); }
.dh-chip--violet { background: var(--dh-violet-100); color: var(--dh-violet-700); }
.dh-chip--success { background: var(--dh-success-bg); color: var(--dh-success); }
.dh-chip--warning { background: var(--dh-warning-bg); color: var(--dh-warning); }
.dh-chip--danger { background: var(--dh-danger-bg); color: var(--dh-danger); }

.dh-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
}

.dh-card {
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius-lg);
  box-shadow: var(--dh-shadow-sm);
  overflow: hidden;
}

.dh-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--dh-border);
  background: var(--dh-surface);
}

.dh-card__title {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.dh-card__head h2,
.dh-card__head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--dh-text);
}

.dh-card__sub {
  margin: 0;
  color: var(--dh-muted);
  font-size: 12px;
  line-height: 1.4;
}

.dh-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dh-card__link {
  font-size: 13px;
  color: var(--dh-primary-500);
  text-decoration: none;
  font-weight: 500;
}

.dh-card__link:hover { text-decoration: underline; }

.dh-card__body {
  padding: 12px 18px 16px;
}

.dh-card__body--flush {
  padding: 0;
}

/* Wrapper to polish the legacy event tables without rewriting them */
.dh-table-wrap {
  overflow-x: auto;
}

.dh-table-wrap--portal .dh-empty {
  border-top: 1px solid var(--dh-border);
}

.dh-table-wrap table {
  width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--dh-font);
  font-size: 13px;
  color: var(--dh-text);
}

.dh-table-wrap th,
.dh-table-wrap td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--dh-border);
}

.dh-table-wrap th,
.dh-table-wrap th.header {
  background: var(--dh-surface-3);
  color: var(--dh-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--dh-border);
}

.dh-table-wrap tr:last-child td {
  border-bottom: none;
}

.dh-table-wrap tbody tr:hover td {
  background: var(--dh-primary-050);
}

.dh-table-wrap a {
  color: var(--dh-primary-500);
  font-weight: 500;
}

.dh-table-wrap .dh-empty-cell {
  padding: 0;
}

.dh-mono { font-family: var(--dh-font-mono); font-size: 12.5px; }

/* Quick actions list (right column on dashboard) */
.dh-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dh-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  background: var(--dh-surface);
  text-decoration: none;
  color: var(--dh-text);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.dh-action:hover {
  border-color: var(--dh-primary-300);
  background: var(--dh-primary-050);
  text-decoration: none;
}

.dh-action__icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--dh-primary-100);
  color: var(--dh-primary-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.dh-action__icon[data-tone="accent"]  { background: var(--dh-accent-100); color: var(--dh-accent-700); }
.dh-action__icon[data-tone="violet"]  { background: var(--dh-violet-100); color: var(--dh-violet-700); }
.dh-action__icon[data-tone="success"] { background: var(--dh-success-bg); color: var(--dh-success); }
.dh-action__icon[data-tone="warning"] { background: var(--dh-warning-bg); color: var(--dh-warning); }

/* Inline SVG bar chart */
.dh-chart {
  padding: 6px 6px 4px;
}

.dh-chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.dh-chart__legend {
  font-size: 12px;
  color: var(--dh-muted);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.dh-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  background: var(--dh-primary-500);
  vertical-align: middle;
}
.dh-dot[data-tone="accent"] { background: var(--dh-accent-500); }
.dh-dot[data-tone="violet"] { background: var(--dh-violet-500); }

.dh-chart__axis {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  font-size: 10.5px;
  color: var(--dh-muted-2);
  margin-top: 6px;
  text-align: center;
}

/* Empty state */
.dh-empty {
  text-align: center;
  padding: 28px 16px;
  color: var(--dh-muted);
}

.dh-empty--compact {
  padding: 22px 16px;
}

.dh-empty__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--dh-text);
  margin: 0 0 4px;
}

.dh-empty__copy { margin: 0; font-size: 13px; }

/* ---------- Legacy admin page modernization ---------- */

/* ── 16:9 / widescreen baseline fixes ──────────────────────────────────────
 * The legacy main_style.php sets:
 *   html  { text-align: center }   ← causes text to center on huge viewports
 *   body  { width: 1200px; margin: 0 auto }  ← hard cap at 1200px
 *   #content_column { width: 68%; float: left }
 *   #info_column    { width: 30%; float: left; margin-left: 1.5% }
 * We override all of these here so the DentalHub styles win.
 * ────────────────────────────────────────────────────────────────────────── */
html {
  text-align: left !important;
}
body {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 320px;
  background: var(--dh-gradient-app);
}

/* ── Content area: modernise to CSS Grid, discard old floats ── */
.dh-content-area {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 1800px;
  margin: 0 auto;
  padding: 18px 24px;
  font-family: var(--dh-font);
  color: var(--dh-text);
  /* Two-column grid: main grows, sidebar is fixed-width */
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-areas: "main sidebar";
  gap: 0 20px;
  align-items: start;
}

/* Assign grid areas to the legacy IDs */
#content_column {
  grid-area: main;
  /* kill legacy float */
  float: none !important;
  width: auto !important;
  min-width: 0;
}
#info_column {
  grid-area: sidebar;
  /* kill legacy float */
  float: none !important;
  width: auto !important;
  margin-left: 0 !important;
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}
/* Full-width content columns keep spanning both areas */
#content_column_ful,
.dh-content-main--full {
  grid-column: 1 / -1;
  float: none !important;
  width: 100% !important;
}

/* Collapse to single column below 900px */
@media (max-width: 900px) {
  .dh-content-area {
    grid-template-columns: 1fr;
    grid-template-areas: "main" "sidebar";
    padding: 12px 14px;
  }
  #info_column {
    position: static;
    max-height: none;
  }
}

.dh-content-area *,
.dh-content-area *::before,
.dh-content-area *::after {
  box-sizing: border-box;
}

.dh-content-main {
  min-width: 0;
}

.dh-content-main--full {
  width: 100%;
}

.dh-info-column {
  font-family: var(--dh-font);
  color: var(--dh-text);
}

.dh-legacy-page {
  padding-top: 0;
}

.dh-page-hero {
  background: var(--dh-gradient-card);
  border: 1px solid var(--dh-border);
  border-left: 4px solid var(--dh-primary-500);
  border-radius: var(--dh-radius-lg);
  box-shadow: var(--dh-shadow-sm);
  padding: 18px 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.dh-page-hero h1 {
  color: var(--dh-text);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
  margin: 0 0 6px;
}

.dh-page-hero p {
  color: var(--dh-muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.dh-page-hero .dh-eyebrow {
  color: var(--dh-primary-500);
}

.dh-page-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.dh-card--soft {
  background: var(--dh-gradient-card);
}

.dh-card + .dh-card,
.dh-card + .form_main,
.form_main + .dh-card {
  margin-top: 16px;
}

.dh-card__body > .form_bg,
.dh-card__body > .form_main,
.dh-card__body > .contact_form {
  margin: 0;
}

.dh-card__body--iframe {
  padding: 0;
  background: var(--dh-surface-2);
}

.dh-card__body--iframe iframe {
  display: block;
  width: 100%;
  min-height: 640px;
  border: 0;
}

.dh-section-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dh-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr);
  gap: 16px;
}

.dh-sidebar-card {
  margin-bottom: 16px;
}

.dh-sidebar-card h2,
.dh-sidebar-card h3,
.dh-info-column h3,
.dh-info-column h4 {
  margin: 0;
  color: var(--dh-text);
  font-size: 15px;
  font-weight: 600;
}

.dh-info-column .form_main,
.dh-info-column .form_bg,
.dh-info-column .data_list {
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius-lg);
  box-shadow: var(--dh-shadow-sm);
  padding: 14px;
  margin-bottom: 16px;
}

#info_column input[type="text"],
#info_column input[type="password"],
#info_column input[type="email"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.um-add-user {
  display: block;
}
.um-add-user .um-add-user__hint {
  font-size: 13px;
  color: var(--dh-muted);
  line-height: 1.4;
  margin: 0 0 16px;
}
.um-add-user .dh-field {
  margin-bottom: 14px;
}
.um-add-user .dh-input {
  width: 100%;
  height: 44px;
  font-size: 15px;
}
.um-add-user .um-add-user__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.um-add-user .um-add-user__actions {
  margin-top: 8px;
}
.um-add-user .um-add-user__actions input[type="submit"],
.um-add-user .um-add-user__actions .dh-btn {
  width: 100%;
}
.um-add-user ul {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}

.dh-info-column > h3,
.dh-info-column > h4 {
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius-lg) var(--dh-radius-lg) 0 0;
  border-bottom: 0;
  padding: 14px 14px 0;
}

#content_column_header,
.dh-content-area #content_column_header {
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius-lg);
  box-shadow: var(--dh-shadow-sm);
  color: var(--dh-text);
  font-family: var(--dh-font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 14px;
  padding: 14px 16px;
}

#content_column_header .heading,
#content_column_header h2 {
  color: var(--dh-text);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

#content_column_header img.image_border,
#content_column_header .heading img {
  display: none;
}

/* Legacy main_style.php sets #content_column_header a { color: white } which
   was correct for the old dark header but is invisible on the modern white
   surface — override it here to use the primary brand colour. */
#content_column_header a {
  color: var(--dh-primary-500);
  font-size: 12px;
  text-decoration: none;
}
#content_column_header a:hover {
  color: var(--dh-primary-700);
  text-decoration: underline;
}
/* The ID-level rules above outrank .dh-btn's own colours, so button links
   inside the header restate them. */
#content_column_header a.dh-btn,
#content_column_header a.dh-btn:hover {
  text-decoration: none;
}
#content_column_header a.dh-btn--primary,
#content_column_header a.dh-btn--primary:hover {
  color: #ffffff;
}
#content_column_header a.dh-btn--ghost,
#content_column_header a.dh-btn--ghost:hover {
  color: var(--dh-text);
}

/* Staff messaging: unread flash + notification prefs (see js/dh-messaging-notify.js) */
.dh-header__link--messages.dh-msg-nav-flash,
.dh-header__link--team-comms.dh-team-nav-flash {
  animation: dhMsgNavFlash 1.1s ease-in-out infinite;
}
@keyframes dhMsgNavFlash {
  0%, 100% {
    color: var(--dh-muted);
    background: transparent;
  }
  50% {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
  }
}
.dh-msg-notify-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
#dh-msg-notify-btn {
  width: 100%;
  margin-top: 6px;
  padding: 6px 10px;
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  background: var(--dh-surface);
  color: var(--dh-text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
#dh-msg-notify-btn:hover {
  background: var(--dh-surface-3);
}
.dh-msg-notify-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  box-shadow: var(--dh-shadow);
  padding: 10px 12px;
  z-index: 200;
  font-size: 12px;
}
.dh-msg-notify-menu label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 2px;
  cursor: pointer;
  font-weight: 500;
  color: var(--dh-text);
}
.dh-msg-notify-menu label input {
  margin: 0;
}

.form_main,
.form_bg,
.contact_form,
.data_list {
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius-lg);
  box-shadow: var(--dh-shadow-sm);
  color: var(--dh-text);
  font-family: var(--dh-font);
  margin-bottom: 16px;
  padding: 16px;
}

.form_bg {
  background: var(--dh-surface-2);
}

.data_list h3,
.form_main h3,
.form_main h4 {
  color: var(--dh-text);
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px;
}

.view_all_link,
.dh-content-area a {
  color: var(--dh-primary-500);
  text-decoration: none;
}

.view_all_link:hover,
.dh-content-area a:hover {
  text-decoration: underline;
}

.dh-content-area a.dh-btn,
.dh-content-area a.dh-btn:hover {
  text-decoration: none;
}

.dh-content-area a.dh-btn--primary,
.dh-content-area a.dh-btn--primary:hover {
  color: #ffffff;
}

.dh-content-area a.dh-btn--ghost,
.dh-content-area a.dh-btn--ghost:hover {
  color: var(--dh-text);
}

.main_button,
a.main_button,
input[type="submit"],
input[type="button"],
button {
  border-radius: var(--dh-radius) !important;
  border: 1px solid var(--dh-primary-500) !important;
  background: var(--dh-primary-500) !important;
  color: #ffffff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px !important;
  font-family: var(--dh-font);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none !important;
  box-shadow: 0 6px 18px rgba(56, 18, 19, 0.18);
  cursor: pointer;
}

.main_button:hover,
a.main_button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
button:hover {
  background: var(--dh-primary-600) !important;
  border-color: var(--dh-primary-600) !important;
}

.main_button.light,
.dh-btn--secondary {
  background: var(--dh-surface) !important;
  border-color: var(--dh-border) !important;
  color: var(--dh-text) !important;
  box-shadow: none;
}

.main_button .image,
a.main_button .image {
  display: none;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="number"],
select,
textarea,
.info_column_search {
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  background: var(--dh-surface);
  color: var(--dh-text);
  font-family: var(--dh-font);
  font-size: 13px;
  min-height: 36px;
  padding: 7px 10px;
  outline: none;
}

textarea {
  min-height: 90px;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus,
.info_column_search:focus {
  border-color: var(--dh-primary-400);
  box-shadow: 0 0 0 3px rgba(56, 18, 19, 0.14);
}

table.event_form,
table.small_text,
table.table,
#search_table,
#search_event,
#search_unstaffedEvent,
#search_ExpiredLicensesList,
#search_equip,
#search_issue {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius-lg);
  overflow: hidden;
  color: var(--dh-text);
  font-family: var(--dh-font);
  font-size: 12.5px;
}

table.event_form th,
table.event_form td,
table.small_text th,
table.small_text td,
table.table th,
table.table td,
#search_table th,
#search_table td,
#search_event th,
#search_event td,
#search_unstaffedEvent th,
#search_unstaffedEvent td,
#search_ExpiredLicensesList th,
#search_ExpiredLicensesList td,
#search_equip th,
#search_equip td,
#search_issue th,
#search_issue td {
  border-bottom: 1px solid var(--dh-border);
  padding: 9px 11px;
  text-align: left;
}

table.event_form th,
table.event_form th.header,
table.small_text th,
table.table th,
#search_table th,
#search_event th,
#search_unstaffedEvent th,
#search_ExpiredLicensesList th,
#search_equip th,
#search_issue th {
  background: var(--dh-surface-3) !important;
  color: var(--dh-muted) !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

table.event_form tr:hover td,
table.small_text tr:hover td,
table.table tr:hover td,
#search_table tr:hover td,
#search_event tr:hover td,
#search_unstaffedEvent tr:hover td,
#search_ExpiredLicensesList tr:hover td,
#search_equip tr:hover td,
#search_issue tr:hover td {
  background: var(--dh-primary-050);
}

.tablesorter .header,
.tablesorter th.header {
  cursor: pointer;
}

.profile_box1 {
  background: var(--dh-surface-3) !important;
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  color: var(--dh-text);
  font-family: var(--dh-font);
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0 10px;
  padding: 11px 13px;
}

/* !important: legacy markup sets an inline background-color on .ajax_heading,
   and main_style.php forces white text on .contact_header. */
.ajax_heading,
.full_bar_header,
.data_list h3,
.content_column_box h3,
.contact_header {
  background: var(--dh-surface-bar) !important;
  border: 1px solid var(--dh-border);
  border-left: 4px solid var(--dh-primary-500);
  border-radius: var(--dh-radius);
  color: var(--dh-text) !important;
  font-family: var(--dh-font);
  font-weight: 600;
}

.ajax_heading,
.full_bar_header {
  font-size: 14px;
  margin: 16px 0 10px;
  padding: 11px 13px;
}

.full_bar_header {
  width: auto;
}

.data_list h3 {
  padding: 9px 12px;
}

.profile_box1 a {
  font-size: 13px;
  font-weight: 600;
}

.showhide {
  color: var(--dh-primary-500);
  cursor: pointer;
}

#modal-overlay .modal,
.lightbox,
.white_content {
  border-radius: var(--dh-radius-lg) !important;
  border: 1px solid var(--dh-border) !important;
  box-shadow: var(--dh-shadow-lg) !important;
  font-family: var(--dh-font);
}

#modal-overlay .modal-header,
.TB_ajaxWindowTitle {
  background: var(--dh-gradient-hero) !important;
  color: #ffffff !important;
  font-weight: 600;
}

/* Dialogs use id="TB_ajaxWindowTitle". form.php paints that id white, and
   .ajax_heading is a light surface, so the title disappeared. */
#lightbox #TB_ajaxWindowTitle,
.ajax_heading #TB_ajaxWindowTitle {
  background: transparent !important;
  color: var(--dh-text) !important;
}

#notification-error-message {
  background: var(--dh-danger-bg);
  border: 1px solid #fecaca;
  border-radius: var(--dh-radius);
  color: #991b1b;
  margin-bottom: 12px;
  padding: 10px 12px;
}

#notification-warning-message {
  background: var(--dh-success-bg);
  border: 1px solid #bbf7d0;
  border-radius: var(--dh-radius);
  color: #166534;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.item_list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.item_list li {
  border-bottom: 1px solid var(--dh-border);
  padding: 9px 0;
}

.item_list li:last-child {
  border-bottom: 0;
}

.dh-link-card {
  align-items: center;
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  color: var(--dh-text);
  display: flex;
  font-weight: 600;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  text-decoration: none;
}

.dh-link-card:hover {
  background: var(--dh-primary-050);
  border-color: var(--dh-primary-100);
  text-decoration: none;
}

/* Event profile operations page */
.dh-event-profile {
  gap: 18px;
}

.dh-event-profile .dh-card {
  overflow: visible;
}

.dh-event-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dh-event-section {
  overflow: hidden;
}

.dh-event-section .dh-card__head {
  background: var(--dh-gradient-card);
}

.dh-event-section .dh-card__body {
  padding: 16px;
}

.dh-event-section--compact .dh-card__body {
  padding: 0;
}

.dh-event-section__actions,
.dh-action-row {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.dh-event-action,
.dh-event-profile .dh-card__link,
.dh-event-profile .showhide {
  color: var(--dh-primary-500);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.dh-event-action:hover,
.dh-event-profile .dh-card__link:hover,
.dh-event-profile .showhide:hover {
  text-decoration: underline;
}

.dh-event-status-card .dh-card__body {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 14px 16px;
}

.dh-event-status-card .dh-label-inline {
  color: var(--dh-text);
  font-size: 14px;
  font-weight: 700;
}

.dh-status-value {
  background: var(--dh-primary-100);
  border-radius: var(--dh-radius-pill);
  color: var(--dh-primary-600);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 12px;
}

.dh-event-table,
.dh-event-table-wrap {
  overflow-x: auto;
}

.dh-event-table form {
  margin: 0;
}

.dh-event-table table,
.dh-event-profile #documents table,
.dh-event-profile #event_equip table,
.dh-event-profile #shipping table {
  width: 100% !important;
}

.dh-event-profile #open_position {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-width: 680px;
}

.dh-event-profile #open_position th,
.dh-event-profile #open_position td {
  vertical-align: middle;
}

.dh-event-profile #open_position thead th:first-child,
.dh-event-profile #open_position tbody td:first-child {
  width: 8px;
  padding-left: 8px;
  padding-right: 0;
}

.dh-event-profile #open_position tbody tr.confirmed td {
  background: rgba(220, 252, 231, 0.35);
}

.dh-event-profile #open_position tbody tr.waitingconfirmation td {
  background: rgba(228, 243, 246, 0.6);
}

.dh-event-profile #open_position tbody tr.exception td {
  background: var(--dh-danger-bg) !important;
}

.dh-event-profile #open_position input[type="checkbox"] {
  accent-color: var(--dh-primary-500);
}

.dh-event-profile #eventstaff + .dh-section-footer,
.dh-section-footer {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
}

.dh-event-two-col {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr);
}

.dh-event-two-col > * {
  min-width: 0;
}

.dh-event-profile #eventhotel,
.dh-event-profile #suggesthotel {
  float: none !important;
}

.dh-event-profile #car_rental:empty,
.dh-event-profile #event_equip:empty,
.dh-event-profile #shipping:empty {
  color: var(--dh-muted);
  font-size: 13px;
}

.dh-event-profile #event_equip > a,
.dh-event-profile #shipping > a {
  display: inline-flex;
  margin-bottom: 8px;
}

.dh-event-profile #documents table,
.dh-event-profile #event_equip table,
.dh-event-profile #shipping table {
  border: 0;
  border-radius: 0;
}

.dh-event-profile textarea,
.dh-event-profile #message,
.dh-event-profile input[name="message"] {
  width: 100%;
}

.dh-sidebar-logo-card {
  padding: 16px;
  text-align: center;
}

.dh-sidebar-logo-card img {
  display: inline-block;
  max-width: 140px;
  width: 50%;
}

.dh-sidebar-task-area {
  color: var(--dh-text);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dh-sidebar-task-area .main_button,
.dh-sidebar-task-area input[type="button"],
.dh-sidebar-task-area button {
  width: 100%;
}

.dh-sidebar-task-area a.main_button,
.dh-sidebar-task-area a.main_button:hover,
.dh-sidebar-task-area a[style*="background"],
.dh-sidebar-task-area a[style*="background"]:hover {
  color: #ffffff !important;
  text-decoration: none !important;
}

.dh-sidebar-task-area h2,
.dh-sidebar-task-area h3,
.dh-sidebar-task-area h4 {
  background: transparent !important;
  border: 0;
  color: var(--dh-text) !important;
  font-size: 14px;
  margin: 0;
  padding: 0;
}

.dh-sidebar-task-area:empty::after,
.dh-sidebar-detail-card .dh-card__body:empty::after {
  color: var(--dh-muted);
  content: "No records";
  font-size: 13px;
}

.dh-sidebar-detail-card .dh-card__body {
  color: var(--dh-text);
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
  line-height: 1.45;
}

.dh-sidebar-detail-card #event_info,
.dh-sidebar-detail-card #event_date,
.dh-sidebar-detail-card #event_services,
.dh-sidebar-detail-card #event_note {
  border-bottom: 1px solid var(--dh-border);
  padding-bottom: 12px;
}

.dh-sidebar-detail-card #event_note {
  border-bottom: 0;
  padding-bottom: 0;
}

.dh-sidebar-detail-card b,
.dh-sidebar-detail-card strong {
  color: var(--dh-text);
  font-weight: 700;
}

.dh-sidebar-detail-card a {
  color: var(--dh-primary-500);
  font-weight: 600;
}

.dh-sidebar-detail-card table {
  width: 100% !important;
  border: 0;
  color: var(--dh-text);
  font-family: var(--dh-font);
  font-size: 13px;
}

.dh-sidebar-detail-card td,
.dh-sidebar-detail-card th {
  border-bottom: 1px solid var(--dh-border);
  padding: 6px 0;
  text-align: left;
  vertical-align: top;
}

.dh-visually-hidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (max-width: 1200px) and (min-width: 1081px) {
  .dh-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.dh-docs {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-weight: 500;
}

.dh-docs th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid var(--dh-border);
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--dh-muted);
}

.dh-docs td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--dh-border);
  vertical-align: top;
}

.dh-docs__new {
  background: var(--dh-primary-050);
}

.dh-docs__flag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--dh-primary-100);
  color: var(--dh-primary-700);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
@media (max-width: 1080px) {
  .dh-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dh-grid { grid-template-columns: 1fr; }
  .dh-panel-grid { grid-template-columns: 1fr; }
  .dh-event-two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .dh-header__inner {
    padding: 10px 12px;
  }

  .dh-header__brand {
    min-width: 132px;
  }

  .dh-header__brand img {
    height: 32px;
  }

  .dh-header__utility {
    width: 100%;
    flex-wrap: wrap;
    margin-left: 0;
  }

  .dh-header__search,
  .dh-header .global_search {
    width: 100%;
  }

  .dh-header__tools-menu {
    left: 0;
    right: auto;
    min-width: min(92vw, 360px);
    grid-template-columns: 1fr;
  }

  .dh-card__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .dh-card__meta {
    justify-content: flex-start;
  }

  .dh-hero { flex-direction: column; align-items: flex-start; }
  .dh-page-hero { flex-direction: column; align-items: flex-start; }
  .dh-page-actions { justify-content: flex-start; }
  .dh-kpis { grid-template-columns: 1fr; }
  .dh-kpi { min-height: auto; }
  .dh-event-section__actions,
  .dh-action-row {
    align-items: stretch;
    grid-template-columns: 1fr;
    justify-content: flex-start;
  }
}

/* ── BigBiller Job Detail Row ────────────────────────────────────────────── */

.bb-job-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--dh-primary-500);
  font-size: 13px;
  font-family: var(--dh-font);
  font-weight: 500;
  text-decoration: none;
}

.bb-job-toggle:hover { text-decoration: underline; }

.bb-job-empty { color: var(--dh-muted); }

.bb-job-detail > td {
  padding: 0 !important;
  border-bottom: 2px solid var(--dh-primary-300) !important;
}

.bb-job-panel {
  border-left: 4px solid var(--dh-primary-500);
  background: var(--dh-surface-3);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bb-job-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.bb-job-panel__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--dh-text);
}

.bb-job-panel__co {
  font-size: 13px;
  color: var(--dh-muted);
}

.bb-job-panel__loc {
  font-size: 13px;
  color: var(--dh-muted);
}

.bb-job-panel__loc::before { content: "📍 "; }

.bb-job-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 20px;
  margin: 0;
  padding: 14px 16px;
  background: var(--dh-surface-2, #fff);
  border: 1px solid var(--dh-border);
  border-radius: 6px;
}

.bb-job-meta > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bb-job-meta dt {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--dh-muted);
}

.bb-job-meta dd {
  font-size: 13px;
  color: var(--dh-text);
  margin: 0;
}

.bb-job-section__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--dh-muted);
  margin: 0 0 8px;
  background: none;
  padding: 0;
}

.bb-job-body {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}

.bb-job-body--split {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}

@media (max-width: 1100px) {
  .bb-job-body--split { grid-template-columns: minmax(0, 1fr); }
}

.bb-job-section {
  min-width: 0;
}

.bb-job-desc {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  line-height: 1.65;
  font-family: var(--dh-font);
  color: var(--dh-text);
  max-width: none;
  max-height: 32em;
  overflow: auto;
  margin: 0;
  padding: 14px 16px;
  background: var(--dh-surface-2, #fff);
  border: 1px solid var(--dh-border);
  border-radius: 6px;
}

/* ================================================================
 * Onboarding Kanban Board (onboarding.php)
 * ================================================================ */

/* ── Board wrapper ── */
.dh-kanban {
  display: flex;
  flex-direction: row;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 24px;
  align-items: flex-start;
}

/* ── Column ── */
.dh-kb-col {
  flex: 0 0 270px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--dh-surface-3);
  border-radius: var(--dh-radius);
  border: 1px solid var(--dh-border);
  overflow: hidden;
}

.dh-kb-col--drag-over {
  outline: 2px dashed var(--dh-primary-400);
  outline-offset: -2px;
}

.dh-kb-col__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 9px;
  background: var(--dh-surface);
  border-bottom: 1px solid var(--dh-border);
  position: sticky;
  top: 0;
  z-index: 2;
}

.dh-kb-col__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--dh-text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dh-kb-col__count {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  background: var(--dh-primary-100);
  color: var(--dh-primary-600);
  margin-left: 6px;
}

.dh-kb-col__cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 10px 14px;
  min-height: 80px;
}

/* ── Card ── */
.dh-kb-card {
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius-sm);
  padding: 11px 13px 10px;
  box-shadow: var(--dh-shadow-sm);
  cursor: grab;
  transition: box-shadow .15s, transform .15s;
  user-select: none;
}

.dh-kb-card:hover {
  box-shadow: var(--dh-shadow);
}

.dh-kb-card.dh-kb-card--dragging {
  opacity: .55;
  box-shadow: var(--dh-shadow-lg);
  transform: rotate(1.5deg) scale(1.02);
  cursor: grabbing;
}

.dh-kb-card__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--dh-primary-500);
  text-decoration: none;
  display: block;
  margin-bottom: 2px;
  cursor: pointer;
}

.dh-kb-card__name:hover { color: var(--dh-primary-700); text-decoration: underline; }

.dh-kb-card__meta {
  font-size: 11px;
  color: var(--dh-muted);
  margin-bottom: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dh-kb-card__position {
  font-size: 11px;
  font-weight: 600;
  color: var(--dh-text);
  line-height: 1.35;
  margin: -3px 0 7px;
}

.dh-kb-contracts { display: flex; flex-wrap: wrap; gap: 3px; margin: -3px 0 7px; }
.dh-kb-contract {
  padding: 1px 6px;
  border: 1px solid var(--dh-border, #e4e7ec);
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.4;
  color: var(--dh-muted);
}
.dh-kb-contract--set {
  border-color: var(--dh-violet-300, #c4b5fd);
  background: var(--dh-violet-100, #ede9fe);
  color: var(--dh-violet-700, #6d28d9);
  font-weight: 600;
}

/* ── Progress bar inside card ── */
.dh-kb-progress {
  margin: 7px 0 6px;
}

.dh-kb-progress__track {
  height: 5px;
  background: var(--dh-border-2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 3px;
}

.dh-kb-progress__fill {
  height: 100%;
  border-radius: 3px;
  background: var(--dh-primary-500);
  transition: width .4s;
}

.dh-kb-progress__fill--warn {
  background: var(--dh-warning);
}

.dh-kb-progress__fill--done {
  background: var(--dh-success);
}

.dh-kb-progress__label {
  font-size: 10px;
  color: var(--dh-muted);
}

/* ── Pending checklist items ── */
.dh-kb-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dh-kb-item {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 11px;
  color: var(--dh-text);
  line-height: 1.4;
}

.dh-kb-item input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 1px;
  cursor: pointer;
}

.dh-kb-item--required {
  font-weight: 700;
}

/* ── Activity badge inside card ── */
.dh-kb-activity {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  font-size: 10px;
  color: var(--dh-muted);
  flex-wrap: wrap;
}

.dh-kb-activity__warn {
  color: var(--dh-danger);
  font-weight: 600;
}

/* ── Promote / Archive buttons on New cards ── */
.dh-kb-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.dh-kb-btn {
  flex: 1 1 auto;
  padding: 4px 8px;
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius-sm);
  background: var(--dh-surface);
  color: var(--dh-text);
  font-family: var(--dh-font);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s;
}

.dh-kb-btn:hover { background: var(--dh-surface-3); }

.dh-kb-btn:focus-visible {
  outline: 2px solid var(--dh-primary-400);
  outline-offset: 1px;
}

.dh-kb-btn--primary {
  background: var(--dh-primary-500);
  border-color: var(--dh-primary-500);
  color: #ffffff;
}

.dh-kb-btn--primary:hover { background: var(--dh-primary-600); }

/* ── Empty column placeholder ── */
.dh-kb-empty {
  padding: 18px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--dh-muted-2);
  font-style: italic;
}

/* ── Search box on the board hero ── */
.dh-kb-search {
  position: relative;
  max-width: 340px;
}

.dh-kb-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 14px 9px 36px;
  font-size: 13px;
  border: 1px solid var(--dh-border-2);
  border-radius: var(--dh-radius-pill);
  background: var(--dh-surface);
  color: var(--dh-text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.dh-kb-search input:focus {
  border-color: var(--dh-primary-400);
  box-shadow: 0 0 0 3px rgba(56, 18, 19, .12);
}

.dh-kb-search__icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dh-muted);
  font-size: 14px;
  pointer-events: none;
}

/* ── Stage counts above the board: count circle with the stage name beside it ── */
.dh-kb-kpis {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}

/* .dh-kb-kpis prefix: .dh-app a / .dh-content-area a would win the colour otherwise */
.dh-kb-kpis .dh-kb-kpi {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  line-height: 18px;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  color: var(--dh-text);
}

.dh-kb-kpis .dh-kb-kpi:hover {
  color: var(--dh-primary-600);
}

.dh-kb-kpi__count {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  background: var(--dh-primary-100);
  color: var(--dh-primary-600);
  transition: background .15s, color .15s;
}

.dh-kb-kpi:hover .dh-kb-kpi__count {
  background: var(--dh-primary-500);
  color: #fff;
}

/* ── Show-completed toggle ── */
.dh-kb-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--dh-muted);
  cursor: pointer;
  user-select: none;
}

.dh-kb-toggle input { cursor: pointer; }

/* Responsive: allow horizontal scroll on narrow screens */
@media (max-width: 900px) {
  .dh-kanban { gap: 10px; }
  .dh-kb-col { flex: 0 0 230px; }
}

/* ── Action-needed list ── */
.dh-an-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 !important;
}
.dh-an-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  text-decoration: none;
  color: var(--dh-text);
  border-top: 1px solid var(--dh-border);
  transition: background 0.1s;
  font-size: 14px;
}
.dh-an-row:first-child { border-top: none; }
.dh-an-row:hover { background: var(--dh-surface-2); }

.dh-an-dot[data-tone="danger"]  { color: var(--dh-danger); }
.dh-an-dot[data-tone="warning"] { color: var(--dh-warning); }
.dh-an-dot[data-tone="notice"]  { color: #ca8a04; }
.dh-an-dot[data-tone="ok"]      { color: var(--dh-border-2); }
.dh-an-dot { font-size: 12px; flex-shrink: 0; }

.dh-an-count {
  font-size: 18px;
  font-weight: 700;
  min-width: 28px;
  text-align: right;
  flex-shrink: 0;
}
.dh-an-row--ok .dh-an-count { color: var(--dh-muted); }
.dh-an-row--danger  .dh-an-count { color: var(--dh-danger); }
.dh-an-row--warning .dh-an-count { color: var(--dh-warning); }
.dh-an-row--notice  .dh-an-count { color: #ca8a04; }

.dh-an-label { flex: 1; }
.dh-an-row--ok .dh-an-label  { color: var(--dh-muted); }
.dh-an-arrow { color: var(--dh-muted-2); font-size: 13px; flex-shrink: 0; }

/* ── Credentialing strip ── */
.dh-cred-body {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.dh-cred-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--dh-radius-pill);
  font-size: 13px;
  text-decoration: none;
  border: 1px solid var(--dh-border);
  background: var(--dh-surface-2);
  color: var(--dh-text);
  transition: background 0.12s, border-color 0.12s;
}
.dh-cred-chip:hover { background: var(--dh-surface-3); border-color: var(--dh-border-2); }
.dh-cred-chip--warning {
  background: var(--dh-warning-bg);
  border-color: #fde68a;
  color: #92400e;
}
.dh-cred-chip--warning:hover { background: #fef08a; }
.dh-cred-chip--notice {
  background: #fefce8;
  border-color: #fde68a;
  color: #713f12;
}
.dh-cred-chip--ok {
  background: var(--dh-success-bg);
  border-color: #bbf7d0;
  color: var(--dh-success);
}
.dh-cred-chip strong { font-weight: 700; }

/* ── Site footer ── */
.dh-site-footer {
  text-align: center;
  padding: 16px 24px 20px;
  margin-top: 24px;
  font-size: 12px;
  color: var(--dh-muted);
  border-top: 1px solid var(--dh-border);
}
.dh-site-footer a {
  color: var(--dh-muted);
  text-decoration: none;
}
.dh-site-footer a:hover {
  color: var(--dh-primary-500);
  text-decoration: underline;
}

/* ---------- Third-party widget themes ---------- */
/* Selectors mirror the vendor sheets (jQuery UI, JSCal2, tablesorter,
   TextboxList, datagrid), which are @imported before this file. */

.ui-widget-header {
  background: var(--dh-primary-500);
  border-color: var(--dh-primary-600);
  color: #ffffff;
}
.ui-widget-header a { color: #ffffff; }

.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default {
  background: var(--dh-surface-bar);
  border-color: var(--dh-border-2);
  color: var(--dh-text);
}
.ui-state-default a,
.ui-state-default a:link,
.ui-state-default a:visited { color: var(--dh-text); }

.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus {
  background: var(--dh-primary-100);
  border-color: var(--dh-primary-300);
  color: var(--dh-primary-700);
}
.ui-state-hover a,
.ui-state-hover a:hover { color: var(--dh-primary-700); }

.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active {
  background: var(--dh-primary-500);
  border-color: var(--dh-primary-600);
  color: #ffffff;
}
.ui-state-active a,
.ui-state-active a:link,
.ui-state-active a:visited { color: #ffffff; }

.ui-state-highlight,
.ui-widget-content .ui-state-highlight,
.ui-widget-header .ui-state-highlight {
  background: var(--dh-primary-050);
  border-color: var(--dh-primary-300);
  color: var(--dh-primary-700);
}
.ui-state-highlight a,
.ui-widget-content .ui-state-highlight a,
.ui-widget-header .ui-state-highlight a { color: var(--dh-primary-700); }

.ui-widget-overlay,
.ui-widget-shadow {
  background: var(--dh-primary-800);
}

.DynarchCalendar,
.DynarchCalendar-menu {
  background-color: #ffffff;
  border-color: var(--dh-border-2);
}
.DynarchCalendar-focused {
  background-color: #ffffff;
  border-color: var(--dh-primary-500);
}
.DynarchCalendar-topBar,
.DynarchCalendar-bottomBar,
.DynarchCalendar-focused .DynarchCalendar-topBar,
.DynarchCalendar-focused .DynarchCalendar-bottomBar {
  background-color: var(--dh-primary-500);
  border-color: var(--dh-primary-600);
  color: #ffffff;
}
.DynarchCalendar-title div {
  color: #ffffff;
  text-shadow: none;
}
.DynarchCalendar-dayNames { background-color: var(--dh-surface-bar); }
.DynarchCalendar-dayNames div {
  color: var(--dh-text);
  text-shadow: none;
}
.DynarchCalendar-hover-navBtn div,
.DynarchCalendar-hover-title div,
.DynarchCalendar-hover-bottomBar-today,
.DynarchCalendar-menu table td div.DynarchCalendar-hover-navBtn {
  background-color: var(--dh-primary-100);
  border-color: var(--dh-primary-300);
  color: var(--dh-primary-700);
}
.DynarchCalendar-pressed-navBtn div,
.DynarchCalendar-pressed-title div,
.DynarchCalendar-pressed-bottomBar-today,
.DynarchCalendar-menu table td div.DynarchCalendar-pressed-navBtn {
  background-color: var(--dh-primary-700);
  border-color: var(--dh-primary-800);
  color: #ffffff;
}
.DynarchCalendar-day-today { color: var(--dh-primary-500); }
.DynarchCalendar-weekend,
.DynarchCalendar-dayNames .DynarchCalendar-weekend { color: var(--dh-primary-400); }
.DynarchCalendar-day-othermonth.DynarchCalendar-weekend { color: var(--dh-primary-300); }
.DynarchCalendar-hover-date {
  background-color: var(--dh-primary-100);
  border-color: var(--dh-primary-300);
}
.DynarchCalendar-hover-week { background-color: var(--dh-primary-050) !important; }
.DynarchCalendar-day-disabled { background: var(--dh-surface-3); }
.DynarchCalendar-day-selected,
.DynarchCalendar-day-today.DynarchCalendar-day-selected {
  background-color: var(--dh-primary-500);
  border-color: var(--dh-primary-600);
  color: #ffffff !important;
}
.DynarchCalendar-hover-time { background-color: var(--dh-primary-500); }
.DynarchCalendar-pressed-time { background-color: var(--dh-primary-700); }

table.event_form tbody tr.odd td {
  background-color: var(--dh-surface-2);
}
table.event_form tbody tr.odd:hover td {
  background: var(--dh-primary-050);
}

ul.holder li.bit-box {
  background: var(--dh-primary-050);
  border-color: var(--dh-primary-100);
}
ul.holder li.bit-hover {
  background: var(--dh-primary-100);
  border-color: var(--dh-primary-300);
}
ul.holder li.bit-box-focus {
  background: var(--dh-primary-500);
  border-color: var(--dh-primary-500);
  color: #ffffff;
}
/* !important: the vendor .deleted rule is !important. */
ul.holder li.bit-box.deleted {
  background-color: var(--dh-primary-500) !important;
  color: #ffffff !important;
}
.facebook-auto ul li.auto-focus,
#facebook-auto ul li.auto-focus,
#facebook-auto1 ul li.auto-focus {
  background: var(--dh-primary-500);
  color: #ffffff;
}

tr.rowmouseover td.tdeven,
tr.rowmouseover td.tdodd {
  background: var(--dh-primary-050);
}
tr.rowselected td.tdeven,
tr.rowselected td.tdodd {
  background: var(--dh-primary-100);
}
td#colslider.visible,
div.knob,
div.up,
div.down {
  border-color: var(--dh-border-2);
}
div.knobmouseover,
div.upmouseover,
div.downmouseover {
  border-color: var(--dh-primary-300);
}

.autocomplete strong { color: var(--dh-primary-500); }

/* js/301a.js (colour picker) is licensed as unmodifiable, so its inline
   palette-header colour can only be overridden from here. */
td[style*="background:#6666CC"] {
  background: var(--dh-primary-500) !important;
}

/* ---------- Typography: one typeface, one weight ---------- */
/* !important beats the inline style="font-weight" attributes and page-level
   <style> blocks. Exclusions sit in :where() so they add no specificity and
   the title rule below wins. SVG keeps the logo wordmark's weight; message
   bodies keep the bold users type. */
html body,
html body *:where(:not(svg *, .fa, [class^="icon-"], [class*=" icon-"],
    code, pre, kbd, samp, .dh-mono, #bb-response, [style*="monospace"])) {
  font-family: var(--dh-font) !important;
}

html body *:where(:not(svg *, .dh-msg-bubble *, .cw-bubble *,
    #dh-conv-body *, #cw-body *, .dh-fmt-btn *, .cw-fmt-btn *)) {
  font-weight: 400 !important;
}

html body :is(h1, h2, h3, h4, h5, h6, optgroup, .heading, .modal-title,
    .ui-dialog-title, #TB_ajaxWindowTitle, .TB_ajaxWindowTitle, .contact_name,
    #content_column_header, #content_column_header > span:first-child) {
  font-weight: 600 !important;
}

#content_column_header a[aria-current="page"] {
  color: var(--dh-text);
  text-decoration: underline;
}
