/* Shared local faces. SIL OFL notices ship beside the original font files. */
@font-face{font-family:"Manrope";font-style:normal;font-weight:200 800;font-display:swap;src:url("/assets/lily_workspace/fonts/questionnaire/Manrope.ttf") format("truetype")}
@font-face{font-family:"Cormorant Garamond";font-style:normal;font-weight:300 700;font-display:swap;src:url("/assets/lily_workspace/fonts/questionnaire/CormorantGaramond.ttf") format("truetype")}

/* Native Frappe authentication controls keep their behavior and layout. */
html.lily-login-page body {
  background: var(--brand-bg); color: var(--brand-ink);
  font-family: var(--brand-body-family, system-ui, sans-serif);
}
html.lily-login-page :is(.for-login, .for-forgot, .for-signup) .page-card {
  background: var(--brand-surface); border-color: var(--brand-border);
}
html.lily-login-page .page-card-head h4 {
  color: var(--brand-ink); font-family: var(--brand-heading-family, system-ui, sans-serif);
}
html.lily-login-page .page-card-head .app-logo {
  content: var(--brand-logo); object-fit: contain;
}
html.lily-login-page .page-card .btn-primary {
  background: var(--brand-action); border-color: var(--brand-action);
}
html.lily-login-page .page-card input {
  color: var(--brand-ink); background: var(--brand-surface); border-color: var(--brand-border);
}

/* Suite look (template default for every branded workspace). The header is the brand shell bar: lockup | pill
   modules | tools on --lily-shell, as on the suite header. Colours stay workspace data (role tokens only).
   Moderno light mode only; Leitura, dark mode and unbranded installs keep their own header. */
html[data-lily-style="moderno"][data-lily-mode="light"] body.lily-branded:is(.lily-suite-page, .lily-portal-page) :is(.lily-suite-header, .lily-portal-header) {
  background: var(--lily-shell); color: var(--lily-shell-ink); border-bottom-color: transparent;
}
/* /lily on desktop keeps the section tabs (row 2) on the page surface; only row 1 is the bar.
   Phones put the module links in row 2 (sections live in the bottom bar), so the whole header stays the bar. */
@media (min-width: 720px) {
  html[data-lily-style="moderno"][data-lily-mode="light"] body.lily-branded.lily-has-suite.lily-portal-page .lily-portal-header {
    background: linear-gradient(var(--lily-shell) 56px, var(--lily-surface) 56px); border-bottom-color: var(--lily-hairline);
  }
}
html[data-lily-style="moderno"][data-lily-mode="light"] body.lily-branded:is(.lily-suite-page, .lily-portal-page) .lily-portal-brand { --k-plate: transparent; }
html[data-lily-style="moderno"][data-lily-mode="light"] body.lily-branded:is(.lily-suite-page, .lily-portal-page) .lily-suite-nav a {
  height: 36px; min-height: 36px; align-self: center; border: 1px solid transparent; border-radius: 999px; color: var(--lily-c-nav-ink);
}
/* phones: the module pills keep the 44px touch floor */
@media (max-width: 719.98px) {
  html[data-lily-style="moderno"][data-lily-mode="light"] body.lily-branded:is(.lily-suite-page, .lily-portal-page) .lily-suite-nav a { height: 44px; min-height: 44px; }
}
html[data-lily-style="moderno"][data-lily-mode="light"] body.lily-branded:is(.lily-suite-page, .lily-portal-page) .lily-suite-nav a:hover { color: var(--lily-c-nav-ink); background: var(--lily-c-nav-hover-bg); }
html[data-lily-style="moderno"][data-lily-mode="light"] body.lily-branded:is(.lily-suite-page, .lily-portal-page) .lily-suite-nav a[aria-current="page"] {
  color: var(--lily-c-nav-active-ink); background: var(--lily-c-nav-active-bg); border-color: color-mix(in srgb, var(--brand-detail) 60%, transparent);
}
html[data-lily-style="moderno"][data-lily-mode="light"] body.lily-branded:is(.lily-suite-page, .lily-portal-page) .lily-suite-nav a[aria-current="page"]::after { content: none; }
html[data-lily-style="moderno"][data-lily-mode="light"] body.lily-branded:is(.lily-suite-page, .lily-portal-page) .lily-suite-nav a[aria-current="page"] .lily-suite-nav-icon { color: var(--brand-detail); }
/* the tools carry an id in Moderno; match it so the account and appearance controls read on the bar */
html[data-lily-style="moderno"][data-lily-mode="light"] body.lily-branded:is(.lily-suite-page, .lily-portal-page) #lily-header-tools :is(span, .lily-appearance-menu > button) { color: var(--lily-shell-ink); }
html[data-lily-style="moderno"][data-lily-mode="light"] body.lily-branded:is(.lily-suite-page, .lily-portal-page) #lily-header-tools .lily-portal-account button,
html[data-lily-style="moderno"][data-lily-mode="light"] body.lily-branded.lily-suite-page #lily-header-tools.lily-portal-account button {
  border: 1px solid color-mix(in srgb, var(--brand-detail) 70%, transparent); border-radius: 999px; background: transparent; color: var(--lily-shell-ink);
}
html[data-lily-style="moderno"][data-lily-mode="light"] body.lily-branded:is(.lily-suite-page, .lily-portal-page) #lily-header-tools :is(.lily-portal-account button, .lily-appearance-menu > button):hover { background: var(--lily-c-nav-hover-bg); color: var(--lily-shell-ink); }

/* Frappe CRM loads the suite header without lily_tokens.css: give it the shell tokens from the brand data,
   otherwise the bar is transparent and the light wordmark disappears on the page. */
html.lily-suite-crm .lily-suite-header {
  --lily-shell: var(--brand-shell); --lily-shell-ink: var(--brand-shell-text); --lily-font: var(--brand-body-family);
  --lily-c-nav-ink: var(--brand-shell-text); --lily-c-nav-hover-bg: color-mix(in srgb, var(--brand-shell-text) 11%, transparent);
  --lily-c-nav-active-bg: var(--brand-active); --lily-c-nav-active-ink: var(--brand-selected-text);
  --lily-chrome-control-edge: var(--brand-detail); --lily-border-control: transparent;
}

/* Desk: a collapsed sidebar has no room for the brand text (it wrapped one letter per line). */
html.lily-suite .body-sidebar-container:not(.expanded) .sidebar-header :is(.header-title, .header-subtitle) { display: none; }
