.bic-tbhm-site { min-height: 100vh; display: flex; flex-direction: column; }
.bic-tbhm-header { background: #fff; border-bottom: 1px solid var(--tbhm-line); position: relative; z-index: 50; }
.bic-tbhm-header__inner { max-width: var(--tbhm-content); min-height: 92px; margin: 0 auto; padding: 18px 28px; display: flex; align-items: center; gap: 28px; }
.bic-tbhm-brand { min-width: 0; flex: 1; }
.bic-tbhm-brand__link { display: inline-flex; align-items: center; gap: 16px; color: var(--tbhm-ink); text-decoration: none; }
.bic-tbhm-brand__logo .custom-logo-link { display: block; line-height: 0; }
.bic-tbhm-brand__logo img { display: block; width: auto; max-width: 118px; max-height: 60px; }
.bic-tbhm-brand__text { display: grid; gap: 2px; min-width: 0; }
.bic-tbhm-brand__text strong { font-size: clamp(1.18rem, 2.5vw, 1.55rem); letter-spacing: .015em; }
.bic-tbhm-brand__text small { color: var(--tbhm-muted); font-size: .82rem; }
.bic-tbhm-utility__menu, .bic-tbhm-primary__menu, .bic-tbhm-footer__menu { margin: 0; padding: 0; list-style: none; }
.bic-tbhm-utility__menu { display: flex; align-items: center; gap: 18px; }
.bic-tbhm-utility a { color: var(--tbhm-ink); text-decoration: none; font-size: .88rem; font-weight: 700; }
.bic-tbhm-primary { border-top: 1px solid #ececec; background: #fff; }
.bic-tbhm-primary__inner { max-width: var(--tbhm-content); margin: 0 auto; padding: 0 28px; }
.bic-tbhm-primary__menu { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 26px; }
.bic-tbhm-primary__menu > li > a { display: block; padding: 13px 0 11px; border-bottom: 2px solid transparent; color: var(--tbhm-ink); text-decoration: none; font-size: .92rem; font-weight: 700; }
.bic-tbhm-primary__menu > li.current-menu-item > a, .bic-tbhm-primary__menu > li > a:hover, .bic-tbhm-primary__menu > li > a:focus-visible { color: var(--tbhm-blue); border-color: var(--tbhm-orange); }
.bic-tbhm-menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--tbhm-line); border-radius: 6px; background: #fff; padding: 10px; cursor: pointer; }
.bic-tbhm-menu-toggle > span:not(.screen-reader-text) { display: block; height: 2px; margin: 4px 0; background: var(--tbhm-ink); }

.bic-tbhm-main { flex: 1; width: 100%; padding: clamp(28px, 5vw, 62px) 24px; }
.bic-tbhm-container { width: min(100%, var(--tbhm-content)); margin: 0 auto; }
.bic-tbhm-content-card { background: #fff; border: 1px solid #e4e4e4; border-radius: var(--tbhm-radius); box-shadow: var(--tbhm-shadow); padding: clamp(24px, 4vw, 52px); }
.bic-tbhm-entry__header h1 { margin: 0 0 28px; font-size: clamp(1.8rem, 4vw, 2.75rem); line-height: 1.15; }
.bic-tbhm-entry__content > :first-child { margin-top: 0; }
.bic-tbhm-entry__content > :last-child { margin-bottom: 0; }
.bic-tbhm-main--full { padding: 0; }
.bic-tbhm-full-entry { width: 100%; }
.bic-tbhm-workspace-shell { width: min(100%, 1240px); margin: 0 auto; }
.bic-tbhm-workspace { min-width: 0; }
.bic-tbhm-portal-shell { width: min(100%, 1120px); margin: 0 auto; }

.bic-tbhm-main h1, .bic-tbhm-main h2, .bic-tbhm-main h3, .bic-tbhm-main h4 { color: var(--tbhm-ink); line-height: 1.2; }
.bic-tbhm-main input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.bic-tbhm-main select,
.bic-tbhm-main textarea {
  max-width: 100%; min-height: 44px; border: 1px solid #777; border-radius: 0; background: #fff; color: var(--tbhm-ink); padding: 10px 12px;
}
.bic-tbhm-main textarea { min-height: 120px; resize: vertical; }
.bic-tbhm-main input:focus, .bic-tbhm-main select:focus, .bic-tbhm-main textarea:focus { outline: 3px solid rgba(33, 95, 154, .18); border-color: var(--tbhm-blue); }
.bic-tbhm-main button, .bic-tbhm-main input[type="submit"], .bic-tbhm-main .button, .bic-tbhm-main .wp-element-button {
  border: 0; border-radius: 3px; background: var(--tbhm-blue); color: #fff; min-height: 42px; padding: 10px 18px; font-weight: 700; cursor: pointer; text-decoration: none;
}
.bic-tbhm-main button:hover, .bic-tbhm-main input[type="submit"]:hover, .bic-tbhm-main .button:hover { background: var(--tbhm-blue-deep); color: #fff; }

.bic-tbhm-auth-page .bic-tbhm-primary, .bic-tbhm-portal-page .bic-tbhm-primary { display: none; }
.bic-tbhm-main--auth { padding-top: clamp(24px, 5vw, 56px); }
.bic-tbhm-auth-shell { width: min(100%, 1040px); margin: 0 auto; display: grid; grid-template-columns: minmax(0, .88fr) minmax(420px, 1.12fr); background: #fff; border: 1px solid #e2e2e2; box-shadow: var(--tbhm-shadow); }
.bic-tbhm-auth-intro { padding: clamp(32px, 5vw, 64px); background: linear-gradient(145deg, #fff 0%, #f3f6f9 100%); border-right: 1px solid #e4e4e4; }
.bic-tbhm-eyebrow { margin: 0 0 12px; color: var(--tbhm-orange); font-size: .82rem; font-weight: 800; letter-spacing: .14em; }
.bic-tbhm-auth-intro h1 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); }
.bic-tbhm-accent-line { display: block; width: 100%; max-width: 360px; height: 2px; margin: 22px 0; background: var(--tbhm-orange); }
.bic-tbhm-auth-card { min-width: 0; padding: clamp(28px, 5vw, 58px); }

.bic-tbhm-footer { background: #fff; border-top: 1px solid var(--tbhm-line); }
.bic-tbhm-footer__inner { max-width: var(--tbhm-content); margin: 0 auto; padding: 28px; display: grid; grid-template-columns: 1fr auto auto; gap: 28px; align-items: center; }
.bic-tbhm-footer__brand, .bic-tbhm-footer__copy { margin: 0; color: var(--tbhm-muted); font-size: .84rem; }
.bic-tbhm-footer__menu { display: flex; flex-wrap: wrap; gap: 14px; }
.bic-tbhm-footer__menu a { color: var(--tbhm-ink); font-size: .84rem; text-decoration: none; }

/* Bevar eksisterende BHM/BHG-uttrykk, men gi trygg responsiv grunnmur. */
.bhm-dashboard-wrapper { width: 100%; max-width: 1180px; }
.bhm-dashboard-columns { min-width: 0; }
.bhm-dashboard-column, .bhm-card { min-width: 0; }

@media (max-width: 980px) {
  .bic-tbhm-header__inner { min-height: 78px; padding: 14px 22px; }
  .bic-tbhm-utility { display: none; }
  .bic-tbhm-menu-toggle { display: block; }
  .bic-tbhm-primary { display: none; }
  .bic-tbhm-primary.is-open { display: block; }
  .bic-tbhm-primary__inner { padding: 8px 22px 18px; }
  .bic-tbhm-primary__menu { display: grid; gap: 0; }
  .bic-tbhm-primary__menu > li > a { padding: 12px 0; }
  .bic-tbhm-auth-shell { grid-template-columns: 1fr; }
  .bic-tbhm-auth-intro { border-right: 0; border-bottom: 1px solid #e4e4e4; }
  .bic-tbhm-footer__inner { grid-template-columns: 1fr; gap: 12px; }
  .bhm-dashboard-columns { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  body { font-size: 15px; }
  .bic-tbhm-header__inner { padding: 12px 16px; }
  .bic-tbhm-brand__text small { display: none; }
  .bic-tbhm-brand__logo img { max-width: 86px; max-height: 50px; }
  .bic-tbhm-main { padding: 24px 14px 38px; }
  .bic-tbhm-content-card { padding: 22px 18px; border-radius: 6px; }
  .bic-tbhm-auth-intro, .bic-tbhm-auth-card { padding: 26px 20px; }
  .bic-tbhm-main input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]), .bic-tbhm-main select, .bic-tbhm-main textarea { width: 100%; }
  .bic-tbhm-main button, .bic-tbhm-main input[type="submit"], .bic-tbhm-main .button { max-width: 100%; }
  .bhm-dashboard-columns { grid-template-columns: 1fr; gap: 18px !important; }
  .bhm-dashboard-wrapper { padding: 24px 14px 34px !important; }
  .bhm-dashboard-title::after { width: min(82vw, 450px) !important; }
}
