/* HFB15-A — Helios Modern CRM/Admin UI. Foundation overrides only: keep feature CSS intact. */
:root {
  --bg: #f3f5f3;
  --surface: #ffffff;
  --surface-soft: #f8faf8;
  --line: #dfe6e1;
  --ink: #17231c;
  --muted: #6c776f;
  --brand: #284936;
  --brand-2: #3e6b4e;
  --shadow: 0 10px 30px rgba(15,23,42,.06);
}
html { scroll-behavior: smooth; }
body { background: var(--bg); font-family: Inter,system-ui,sans-serif; font-size: 14px; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid #668a72; outline-offset: 2px; }
.app-shell { grid-template-columns: 280px minmax(0,1fr); transition: grid-template-columns .2s ease; }
.sidebar {
  width: 280px; height: 100vh; height: 100dvh;
  padding: 20px 16px 16px;
  position: sticky; top: 0;
  background: #fff; color: var(--ink);
  border-right: 1px solid var(--line);
  box-shadow: 1px 0 12px rgba(27,49,35,.018);
  transition: width .2s ease,transform .2s ease;
}
.sidebar .brand { padding: 0 8px 20px; border-bottom: 1px solid #e9eeea; gap: 11px; }
.sidebar .brand-logo { width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(135deg,#284936,#3e6b4e); padding: 6px; }
.sidebar .brand-logo img { filter: brightness(0) invert(1); }
.sidebar .brand-copy { min-width: 0; }
.sidebar .brand-name { color: #17231c; font: 700 16px/1.25 Inter,sans-serif; letter-spacing: -.025em; }
.sidebar .brand-sub { color: #8a978e; font-size: 10px; letter-spacing: 0; text-transform: none; }
.sidebar .sidebar-nav { padding: 15px 0 8px; scrollbar-width: thin; scrollbar-color: #d6e0d9 transparent; }
.sidebar .nav-category { color: #8a978e; font-size: 10px; text-transform: uppercase; letter-spacing: .13em; font-weight: 750; padding: 19px 11px 7px; }
.sidebar .nav-category:first-of-type { padding-top: 11px; }
.sidebar .nav-link { min-height: 38px; padding: 9px 11px; margin: 2px 0; border-radius: 11px; color: #5f6c63; gap: 10px; font-size: 12px; font-weight: 550; transition: background .14s ease,color .14s ease; }
.sidebar .nav-link:hover { color: #17231c; background: #f7f9f7; }
.sidebar .nav-link.active { background: #eef5f0; color: #284936; font-weight: 750; }
.sidebar .nav-link.disabled { opacity: .44; }
.sidebar .nav-icon { display: grid; place-items: center; flex: 0 0 20px; width: 20px; }
.sidebar .nav-icon i { font-size: 14px; }
.sidebar .nav-section { margin: 2px 0; }
.sidebar .nav-section > summary.nav-group-toggle {
  width: 100%; min-height: 38px; display: flex; gap: 8px; align-items: center;
  padding: 9px 11px; border-radius: 11px;
  color: #5f6c63; font-size: 12px; font-weight: 650;
  letter-spacing: normal; text-transform: none;
}
.sidebar .nav-section > summary.nav-group-toggle:hover,
.sidebar .nav-section[open] > summary.nav-group-toggle { color: #284936; background: #f7f9f7; }
.sidebar .nav-section:has(.nav-link.active) > summary.nav-group-toggle { color: #284936; background: #eef5f0; }
.sidebar .nav-section > summary.nav-group-toggle:focus-visible { outline: 2px solid #8aaf94; outline-offset: 2px; }
.sidebar .nav-group-name { display: flex; min-width: 0; gap: 10px; align-items: center; flex: 1; }
.sidebar .nav-group-name > i { flex: 0 0 20px; text-align: center; font-size: 14px; }
.sidebar .nav-group-text { min-width: 0; white-space: nowrap; }
.sidebar .nav-section-chevron { flex: 0 0 auto; color: #99a59d; font-size: 10px; }
.sidebar .nav-section[open] > summary.nav-group-toggle .nav-section-chevron { transform: rotate(90deg); }
.sidebar .nav-group-content { display: grid; padding: 2px 0 6px 23px; }
.sidebar .nav-group-content .nav-link { min-height: 34px; padding: 8px 10px; font-weight: 450; font-size: 11px; margin: 1px 0; }
.sidebar .hfb-module-state { margin-left: auto; font-size: 9px; min-width: 32px; line-height: 16px; padding: 1px 6px; }
.sidebar .hfb-module-state.is-on { background: #e7f5eb; color: #2d6d45; }
.sidebar .hfb-module-state.is-off { background: #eff1ef; color: #78857c; }
.sidebar .hfb-nav-entitlement-row { color: #64746a; background: #f8faf8; border: 1px solid #e5ebe6; font-size: 10px; padding: 9px 11px; margin: 4px 0 7px; }
.sidebar .hfb-mini-status.is-on { color: #26734a; }
.sidebar .hfb-mini-status.is-off { color: #89978c; }
.sidebar .sidebar-footer { border-top: 1px solid #e9eeea; padding: 14px 4px 0; }
.sidebar .user-card { padding: 10px; border: 1px solid #dfe6e1; border-radius: 14px; background: #f3f5f3; }
.sidebar .user-avatar { color: #43584a; background: #e3eae5; }
.sidebar .user-meta strong { color: #22352a; font-size: 12px; }
.sidebar .user-meta span { color: #8a978e; font-size: 10px; }
.sidebar .logout-btn { padding: 9px; font-size: 11px; color: #66746b; border: 1px solid transparent; }
.sidebar .logout-btn:hover { color: #9d2929; background: #fff1f1; border-color: #f2dddd; }
.sidebar-mobile-close { display: none; }
.main-column { min-width: 0; }
.topbar { height: 70px; padding: 0 25px; background: rgba(243,245,243,.92); border-bottom: 1px solid var(--line); gap: 15px; z-index: 40; backdrop-filter: blur(12px); }
.sidebar-edge-toggle { flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; color: #5e6d63; border: 1px solid #dfe6e1; background: #fff; border-radius: 11px; box-shadow: 0 2px 8px rgba(20,37,28,.035); }
.sidebar-edge-toggle:hover { background: #eef5f0; color: #284936; }
.sidebar-edge-toggle i { transition: transform .2s ease; font-size: 14px; }
.topbar .context-switcher-trigger { min-height: 44px; }
.topbar-spacer { flex: 1; min-width: 0; }
.topbar .topbar-preview { min-height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; font-size: 11px; }
.topbar .topbar-preview i { margin-right: 0; }
.page-content { max-width: 1500px; padding: 27px 28px 40px; }
.page-heading { gap: 20px; margin-bottom: 23px; }
.page-heading h1 { font: 700 clamp(23px,2vw,29px)/1.25 Inter,sans-serif; letter-spacing: -.035em; }
.page-heading .eyebrow { font-size: 10px; }
.panel, .entity-card, .stat-card { box-shadow: 0 10px 30px rgba(15,23,42,.042); }
.panel, .entity-card, .stat-card { border-color: #dfe6e1; }
.sidebar-backdrop[hidden] { display: none !important; }
.sidebar-backdrop { position: fixed; inset: 0; z-index: 49; background: rgba(20,37,28,.32); backdrop-filter: blur(2px); }
/* Compact mode is presentation-only. It does not disable or hide a module at the server. */
@media (min-width: 901px) {
  body.sidebar-collapsed .app-shell { grid-template-columns: 76px minmax(0,1fr); }
  body.sidebar-collapsed .sidebar { width: 76px; padding: 20px 10px 14px; }
  body.sidebar-collapsed .sidebar .brand { justify-content: center; padding: 0 0 20px; }
  body.sidebar-collapsed .sidebar .brand-copy,
  body.sidebar-collapsed .sidebar .nav-category,
  body.sidebar-collapsed .sidebar .nav-link > span:not(.nav-icon),
  body.sidebar-collapsed .sidebar .nav-group-text,
  body.sidebar-collapsed .sidebar .hfb-module-state,
  body.sidebar-collapsed .sidebar .nav-section-chevron,
  body.sidebar-collapsed .sidebar .nav-group-content,
  body.sidebar-collapsed .sidebar .sidebar-footer .user-meta,
  body.sidebar-collapsed .sidebar .sidebar-footer .hfb-logout span { display: none !important; }
  body.sidebar-collapsed .sidebar .sidebar-nav { overflow-x: hidden; }
  body.sidebar-collapsed .sidebar .nav-link { justify-content: center; }
  body.sidebar-collapsed .sidebar .nav-section > summary.nav-group-toggle { justify-content: center; }
  body.sidebar-collapsed .sidebar .nav-group-name { flex: 0 0 auto; }
  body.sidebar-collapsed .sidebar .user-card { padding: 8px; justify-content: center; }
  body.sidebar-collapsed .sidebar .logout-btn { justify-content: center; }
  body.sidebar-collapsed .sidebar .logout-btn i { margin: 0; }
}
@media (max-width: 1100px) {
  .page-content { padding: 24px 22px 36px; }
  .topbar { padding: 0 18px; }
}
@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 60; width: min(310px,90vw); height: 100dvh; transform: translateX(-105%); box-shadow: 20px 0 50px rgba(20,37,28,.13); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-modal-open { overflow: hidden; }
  .sidebar-mobile-close { display: grid; margin-left: auto; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border: 1px solid #e4eae5; border-radius: 9px; background: #fff; color: #758279; }
  .topbar { padding: 0 15px; gap: 9px; }
  .sidebar-edge-toggle { width: 38px; height: 38px; flex-basis: 38px; }
}
@media (max-width: 600px) {
  .topbar .context-switcher-trigger { min-width: 0; max-width: min(210px,58vw); padding: 5px; }
  .topbar .context-switcher-trigger-copy strong { font-size: 10px; }
  .topbar .context-switcher-trigger-copy small { font-size: 9px; }
  .topbar .context-switcher-trigger-logo { width: 30px; height: 30px; flex-basis: 30px; }
  .topbar .topbar-preview { padding: 9px; }
  .topbar .topbar-preview span { display: none; }
  .page-content { padding: 22px 15px 30px; }
  .page-heading { flex-direction: column; gap: 12px; }
}
/* The login adopts light surfaces while preserving its existing authentication form. */
.login-body { background: #f3f5f3; }
.login-brand-panel { background: linear-gradient(145deg,#284936,#3e6b4e 58%,#1b3225); }
.login-brand-wrap h1 { letter-spacing: -.035em; }
.login-form-panel { background: #f3f5f3; }
.login-form-panel .auth-form { padding: 30px; max-width: 470px; width: 100%; border-radius: 22px; border: 1px solid #dfe6e1; background: #fff; box-shadow: 0 16px 50px rgba(20,37,28,.06); }
.login-form-panel .auth-form h2 { font-family: Inter, sans-serif; letter-spacing: -.035em; }
@media (max-width: 700px) {
  .login-panel { padding: 20px; }
  .login-form-panel .auth-form { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-shell, .sidebar, .sidebar-edge-toggle i { transition: none !important; }
}
/* Closed details never expose their content, regardless of legacy component styles. */
.sidebar .nav-section:not([open]) > .nav-group-content { display: none !important; }
