/* =============================================================================
   JES CRM · layout.css — the frame, drawn like vtiger v7 (docs/vtiger-look/02-ui-contract.md
   §b): the top bar (☰, home, calendar, pinned links, More ▾, search, quick create,
   gear, reports, user), the More ▾ mega menu, the slide-in app drawer, the icon
   rail, the module bar with its breadcrumb, the view area, the banners, the login
   page and the narrow-screen rules. The markup is in index.html, js/app.js and
   js/ui/shell-nav.js, ui/modulebar.js, ui/global-search.js, ui/quick-create.js,
   ui/user-menu.js. Every value comes from tokens.css.
   ============================================================================= */

/* ---------- the app accent: body[data-app] (and any element that names an app) ---------- */
[data-app="marketing"] { --color-app: var(--color-app-marketing); }
[data-app="sales"]     { --color-app: var(--color-app-sales); }
[data-app="inventory"] { --color-app: var(--color-app-inventory); }
[data-app="support"]   { --color-app: var(--color-app-support); }
[data-app="project"]   { --color-app: var(--color-app-project); }
[data-app="tools"]     { --color-app: var(--color-app-tools); }
[data-app="default"]   { --color-app: var(--color-app-default); }

/* ---------- the custom-module glyph (ui/icon.js 'abbr:Xy') ---------- */
.custom-module {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.7em; height: 1.7em; padding: 0 2px;
  border-radius: 4px; background: var(--color-custom-module); color: var(--color-app-text);
  font-family: var(--font-family); font-size: var(--font-size-sm); font-weight: 700; font-style: normal; line-height: 1;
  text-transform: uppercase;
}

/* ---------- shell ---------- */
.shell { display: flex; flex-direction: column; min-height: 100vh; }

/* ---------- top bar ---------- */
.vt-topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center;
  height: var(--shell-bar-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
}
.vt-topbar__drawer {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: var(--rail-width); height: var(--shell-bar-height); padding: 0;
  border: 0; border-radius: 0; background: var(--color-rail); color: var(--color-rail-text);
  font-size: var(--rail-icon-font); cursor: pointer;
}
.vt-topbar__drawer .fa { opacity: 0.8; }
.vt-topbar__drawer:hover, .vt-topbar__drawer[aria-expanded="true"] { background: var(--color-rail-hover); }
.vt-topbar__drawer:hover .fa { opacity: 1; }
.vt-topbar__icon {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: var(--shell-bar-height); padding: 0;
  border: 0; border-radius: 0; background: transparent; color: var(--color-text);
  font-size: var(--topbar-icon-font); text-decoration: none; cursor: pointer;
}
.vt-topbar__icon:hover { background: var(--color-surface-hover); color: var(--color-text-strong); text-decoration: none; }
/* The page shown is not marked in the top bar (live vtiger): pins, home and calendar keep aria-current for screen
   readers only. Home and calendar are bigger and wider apart than the icons on the right (live 01 / 10 at 1440 px:
   home centred at 87 px, calendar at 150 px, the first pin's text at 203 px, 32 px between pins). */
#home-link, #calendar-link { width: 46px; font-size: var(--topbar-nav-icon-font); }
#home-link { margin-left: 22px; }
#calendar-link { margin-left: 17px; }

.vt-pins { display: flex; align-items: center; min-width: 0; height: 100%; margin-left: 14px; }
.vt-pins__link, .vt-pins__more {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  height: 100%; padding: 0 16px;
  border: 0; border-radius: 0; background: transparent;
  color: var(--color-text); font-family: var(--font-family-nav); font-size: var(--font-size-md); font-weight: var(--font-weight-nav);
  white-space: nowrap; text-decoration: none; cursor: pointer;
}
.vt-pins__link:hover, .vt-pins__more:hover { background: var(--color-surface-hover); text-decoration: none; }
.vt-pins__more[aria-expanded="true"] { background: var(--color-surface-hover); }
.vt-topbar__spacer { flex: 1; min-width: 8px; }
.vt-topbar__actions { flex: none; display: flex; align-items: center; height: 100%; padding-right: 6px; }

/* quick create: the dark fa-plus-circle of the live top bar (01 / 10), like the icons beside it */
.vt-topbar__quick {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: var(--shell-bar-height); padding: 0; border: 0; border-radius: 0; background: transparent;
  color: var(--color-text); font-size: var(--topbar-icon-font); cursor: pointer;
}
.vt-topbar__quick:hover, .vt-topbar__quick[aria-expanded="true"] { background: var(--color-surface-hover); color: var(--color-text-strong); }

/* global search: "Type to search" with the Advanced Search icon */
.vt-search { position: relative; flex: none; display: flex; align-items: center; width: 240px; height: 30px; margin: 0 8px; }
.vt-search__icon { position: absolute; left: 9px; color: var(--color-text-muted); font-size: var(--font-size-md); pointer-events: none; }
.vt-search__input {
  width: 100%; height: 30px; min-height: 0; padding: 3px 30px 3px 26px;
  border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface);
  font-size: var(--font-size-md);
}
.vt-search__input::-webkit-search-cancel-button { display: none; }
.vt-search__advanced {
  position: absolute; right: 2px; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; min-height: 0; padding: 0; border: 0; background: transparent;
  color: var(--color-text-muted); font-size: var(--font-size-md); cursor: pointer;
}
.vt-search__advanced:hover { background: transparent; color: var(--color-text-strong); }
.vt-search__results { left: 0; right: auto; width: max(100%, 320px); max-height: calc(100vh - var(--shell-bar-height) - 20px); overflow: auto; padding: 6px 0; }
.vt-search__group { padding: 4px 0 6px; border-bottom: 1px solid var(--color-border-light); }
.vt-search__group:last-child { border-bottom: 0; }
.vt-search__group > h3 { margin: 0; padding: 4px 12px; color: var(--color-title); font-size: var(--font-size-md); font-weight: var(--font-weight-semibold); text-transform: uppercase; }
.vt-search__group ul { margin: 0; padding: 0; list-style: none; }
.vt-search__group li a, .vt-search__all { display: block; padding: 3px 20px; color: var(--color-text); overflow-wrap: anywhere; }
.vt-search__group li a:hover, .vt-search__group li a:focus-visible, .vt-search__all:hover, .vt-search__all:focus-visible {
  background: var(--color-surface-hover); text-decoration: none; }
.vt-search__all { color: var(--color-link); font-size: var(--font-size-sm); }
.vt-search__detail { color: var(--color-text-muted); }
.vt-search__note { margin: 0; padding: 6px 12px; color: var(--color-text-muted); }

/* a panel opened from the top bar (quick create grid, user menu, search results) */
.vt-popover {
  position: absolute; z-index: 45; top: 100%; right: 0;
  min-width: 220px; margin-top: 1px; padding: 10px 0;
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface); box-shadow: var(--shadow-dropdown);
  color: var(--color-text); font-size: var(--font-size-btn); text-align: left;
}
.vt-topbar__slot { position: relative; height: 100%; display: flex; align-items: center; }

/* quick-create grid: three columns of page icon + label */
.vt-quick { display: grid; grid-template-columns: repeat(3, minmax(9rem, 1fr)); gap: 2px; width: min(34rem, calc(100vw - 20px)); padding: 6px 10px; }
.vt-quick__title { grid-column: 1 / -1; margin: 0 0 6px; padding: 0 4px 6px; border-bottom: 1px solid var(--color-border-light);
  font-size: var(--font-size-btn); font-weight: var(--font-weight-semibold); }
.vt-quick__item {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  border-radius: var(--radius-sm); color: var(--color-text); text-decoration: none; overflow-wrap: anywhere;
}
.vt-quick__item:hover, .vt-quick__item:focus-visible { background: var(--color-surface-hover); text-decoration: none; }
.vt-quick__item .fa, .vt-quick__item [class^="vicon-"], .vt-quick__item .custom-module { flex: none; width: 22px; font-size: 16px; text-align: center; color: var(--color-title); }
.vt-quick__item .custom-module { color: var(--color-app-text); font-size: 9px; }

/* user menu: vtiger's .logout-content (Topbar.tpl): the photo square left, name (h4), user name (h5) and role right,
   then a rule and two plain links — fa-cogs My Preferences on the left, fa-power-off Sign Out on the right */
.vt-user { width: min(350px, calc(100vw - 20px)); padding: 10px; }
.vt-user__who { display: flex; gap: 15px; align-items: flex-start; }
.vt-user__photo { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 90px; height: 90px;
  background: var(--color-user-photo-bg); color: var(--color-app-text); font-size: 60px; line-height: 1; }
.vt-user__photo [class^="vicon-"] { font-size: 60px; }
.vt-user__card { min-width: 0; }
.vt-user__name { margin: 0 0 6px; font-size: var(--font-size-lg); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); overflow-wrap: anywhere; }
.vt-user__login { margin: 0 0 6px; overflow: hidden; font-size: var(--font-size-btn); font-weight: normal; color: var(--color-text);
  text-overflow: ellipsis; white-space: nowrap; }
.vt-user__role { margin: 0; color: var(--color-text-muted); overflow-wrap: anywhere; }
.vt-user__actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--color-border-light); }
.vt-user__action {
  display: inline-flex; align-items: center; gap: 5px; min-height: 0; padding: 0;
  border: 0; border-radius: 0; background: transparent; color: var(--color-link);
  font-family: var(--font-family); font-size: var(--font-size-btn); font-weight: normal; cursor: pointer;
}
.vt-user__action .fa { color: var(--color-text); }
.vt-user__action:hover { background: transparent; text-decoration: underline; }
/* the look of the whole system: "Look  Classic | Clean" (ui/look.js) */
.vt-user__look { display: flex; align-items: center; gap: 0; margin-top: 10px; }
.vt-user__look-label { flex: 1; color: var(--color-field-label); font-size: var(--font-size-md); }
.vt-user__look-item {
  min-height: 0; padding: 4px 12px; border: 1px solid var(--color-btn-border); background: var(--color-btn-bg);
  color: var(--color-text); font-family: var(--font-family); font-size: var(--font-size-md); cursor: pointer;
}
.vt-user__look-item:first-of-type { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.vt-user__look-item:last-of-type { margin-left: -1px; border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.vt-user__look-item.is-active { background: var(--color-primary); border-color: var(--color-primary-border); color: var(--color-primary-text); }
.vt-user__look-item:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 1px; }

/* ---------- More ▾ mega menu ---------- */
.vt-mega {
  position: fixed; z-index: 40; top: var(--shell-bar-height); left: 280px;
  /* four columns of about 217 px, centred under More ▾ by shell-nav.js (live 05: x 463–1361 at 1440 px) */
  display: grid; grid-template-columns: repeat(4, minmax(9.5rem, var(--mega-column-width))); gap: 18px 0;
  width: max-content; max-width: calc(100vw - 20px); max-height: calc(100vh - var(--shell-bar-height) - 10px); overflow: auto;
  padding: 15px 15px 20px;
  border: 1px solid var(--color-border); background: var(--color-surface); box-shadow: var(--shadow-dropdown);
}
.vt-mega__group { min-width: 0; }
.vt-mega__title {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 10px;
  font-size: 14px; font-weight: var(--font-weight-semibold); color: var(--color-text-strong);
}
.vt-mega__title .fa, .vt-mega__title [class^="vicon-"] { font-size: 20px; color: var(--color-title); }
.vt-mega__list { margin: 0; padding: 0; list-style: none; text-align: center; }
.vt-mega__link { display: block; padding: 10px 4px; color: var(--color-text); font-size: var(--font-size-md); text-decoration: none; }
.vt-mega__link:hover, .vt-mega__link:focus-visible { background: var(--color-surface-hover); color: var(--color-link); text-decoration: none; }
.vt-mega__link--unset { color: var(--color-text-muted); font-style: italic; }
/* a red second line under a link: the entry's `note` ("(Updated 01-Apr 2024)"), or "address not set" */
.vt-mega__note { display: block; color: var(--color-required); font-size: var(--font-size-md); }
/* the pins, offered here when the top bar has no room for them (narrow screens) */
.vt-mega__group--pins { display: none; }

/* ---------- the app drawer ---------- */
.vt-drawer {
  position: fixed; z-index: 50; top: 0; left: 0; bottom: 0;
  width: var(--shell-menu-width);
  background: var(--color-rail); color: var(--color-rail-text); box-shadow: var(--shadow-drawer);
}
.vt-drawer__head { display: flex; align-items: center; height: var(--shell-bar-height); }
.vt-drawer__close {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--rail-width); height: var(--shell-bar-height); padding: 0;
  border: 0; border-radius: 0; background: transparent; color: var(--color-rail-text); font-size: var(--rail-icon-font); cursor: pointer;
}
.vt-drawer__close:hover { background: var(--color-rail-hover); }
.vt-drawer__list { margin: 0; padding: 0; list-style: none; }
.vt-drawer__item { position: static; }
.vt-drawer__link {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 46px; padding: 0 12px 0 15px;
  border: 0; border-left: 4px solid transparent; border-radius: 0; background: transparent;
  color: var(--color-rail-text); font-family: var(--font-family); font-size: var(--font-size-md); font-weight: var(--font-weight-semibold);
  text-align: left; text-decoration: none; cursor: pointer;
}
.vt-drawer__link:hover, .vt-drawer__link:focus-visible, .vt-drawer__link[aria-expanded="true"] {
  background: var(--color-rail-hover); color: var(--color-rail-text); text-decoration: none;
}
.vt-drawer__app > .vt-drawer__link { border-left-color: var(--color-app); text-transform: uppercase; }
.vt-drawer__link .fa, .vt-drawer__link [class^="vicon-"] { flex: none; width: 20px; font-size: 16px; text-align: center; }
.vt-drawer__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-drawer__link .vt-drawer__chevron { flex: none; width: auto; font-size: 10px; opacity: 0.8; }
/* Settings › is a fixed item of vtiger's drawer, not an app: no stripe, no capitals */
.vt-drawer__app[data-key="settings"] > .vt-drawer__link { border-left-color: transparent; text-transform: none; }
.vt-drawer__modules {
  position: fixed; top: 0; bottom: 0; left: var(--shell-menu-width);
  width: var(--shell-menu-width); margin: 0; padding: 4px 0; list-style: none; overflow-y: auto;
  background: var(--color-rail); box-shadow: var(--shadow-drawer);
}
.vt-drawer__module {
  display: flex; align-items: center; gap: 10px; padding: 9px 15px;
  color: var(--color-rail-text); font-size: var(--font-size-md); font-weight: var(--font-weight-semibold);
  opacity: 0.7; text-decoration: none;
}
.vt-drawer__module:hover, .vt-drawer__module:focus-visible { background: var(--color-rail-hover); color: var(--color-rail-text); opacity: 1; text-decoration: none; }
.vt-drawer__module .fa, .vt-drawer__module [class^="vicon-"], .vt-drawer__module .custom-module { flex: none; width: 20px; font-size: 16px; text-align: center; opacity: 0.4; }
.vt-drawer__module[aria-current="page"] { opacity: 1; }
.vt-drawer__unset { font-size: var(--font-size-sm); font-style: italic; opacity: 0.8; }

/* ---------- module bar ---------- */
.vt-modulebar {
  position: sticky; top: var(--shell-bar-height); z-index: 20;
  display: flex; align-items: center; gap: 0;
  min-height: calc(var(--modulebar-height) + 1px);
  border-top: 1px solid var(--color-app);
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-modulebar-bg);
}
.vt-modulebar__square {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: var(--rail-width); height: var(--modulebar-height);
  background: var(--color-app); color: var(--color-app-text); font-size: var(--rail-icon-font);
}
.vt-modulebar__square [class^="vicon-"] { font-size: var(--rail-icon-font); }
.vt-modulebar__square .custom-module { background: transparent; font-size: var(--font-size-btn); }
.vt-modulebar__title {
  flex: none; max-width: 223px; margin: 0 0 0 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--font-family-title); font-size: var(--font-size-lg); font-weight: 500; line-height: 1.2;
  text-transform: uppercase; color: var(--color-title);
}
.vt-modulebar__home, .vt-modulebar__home:hover { color: inherit; text-decoration: none; }
.vt-crumbs { display: flex; align-items: center; min-width: 0; margin: 0; padding: 0; list-style: none; font-size: var(--font-size-md); }
.vt-crumbs__item { display: flex; align-items: center; min-width: 0; color: var(--color-text); }
.vt-crumbs__item::before { content: "\203A"; flex: none; padding: 0 6px; color: var(--color-text-muted); font-size: 14px; }
.vt-crumbs__item > a, .vt-crumbs__item > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vt-crumbs__item--list { max-width: 190px; }
.vt-crumbs__item--record { max-width: 350px; }
.vt-crumbs__item > a { color: var(--color-text); }
.vt-modulebar__buttons { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px; margin-left: auto; padding: 4px 10px; }
/* vtiger's .module-buttons.btn: white, 1 px #ddd, grey #666 text in normal weight (live 10 / 11); a coloured button a
   view puts there (green Save, blue) keeps its colour */
.vt-modulebar__buttons .btn:not(.btn--success):not(.btn--primary):not(.btn--link) {
  padding: var(--modulebar-btn-padding);
  border-color: var(--color-modulebar-btn-border); background: var(--color-modulebar-btn-bg); color: var(--color-modulebar-btn-text);
  font-weight: var(--font-weight-btn);
}
.vt-modulebar__buttons .btn--danger:not(.btn--success):not(.btn--primary) { color: var(--color-danger); }
.vt-modulebar__buttons .btn:not(.btn--success):not(.btn--primary):not(.btn--link):hover,
.vt-modulebar__buttons .btn:not(.btn--success):not(.btn--primary):not(.btn--link)[aria-expanded="true"] {
  border-color: var(--color-modulebar-btn-hover-border); background: var(--color-modulebar-btn-hover-bg); box-shadow: none;
}

/* ---------- banners, view, icon rail ---------- */
.vt-banners:empty { display: none; }
.vt-banners { padding: 8px 20px 0 calc(var(--rail-width) + 20px); }
.shell-banner {
  margin: 0 0 var(--space-2); padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-warning); border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.vt-body { display: flex; flex: 1; align-items: stretch; min-height: 0; }
.vt-rail { flex: none; width: var(--rail-width); background: var(--color-rail); }
.vt-rail__list {
  position: sticky; top: calc(var(--shell-bar-height) + var(--modulebar-height) + 1px);
  margin: 0; padding: 0; list-style: none;
}
.vt-rail__link {
  display: flex; align-items: center; justify-content: center;
  width: var(--rail-width); height: var(--rail-width);
  color: var(--color-rail-text); font-size: var(--rail-icon-font); opacity: 0.6; text-decoration: none;
}
.vt-rail__link [class^="vicon-"] { font-size: var(--rail-icon-font); }
.vt-rail__link .custom-module { background: transparent; border: 1px solid var(--color-rail-text); font-size: 10px; }
.vt-rail__link:hover, .vt-rail__link:focus-visible { background: var(--color-rail-hover); opacity: 1; text-decoration: none; }
.vt-rail__link[aria-current="page"] { background: var(--color-rail-active); opacity: 1; }

.shell-view { flex: 1; min-width: 0; padding: 15px 20px 30px; background: var(--color-bg); }
.shell-view:focus { outline: none; }
/* a list sits flush under the module bar and against the rail (live 10 / 51): its LISTS sidebar or "›" handle
   touches the rail; list.css spaces the action bar and the table itself. app.js writes the route's view in data-view. */
.shell-view[data-view="list"] { padding: 0 0 30px; }
.shell-view[data-view="list"] > .state, .shell-view[data-view="list"] > .shell-message { margin: 15px 20px 0; }
.shell-view > * { max-width: var(--content-max-width); }

/* what the shell shows before the application has started, and when it cannot start */
.boot { padding: var(--space-8) var(--space-4); text-align: center; color: var(--color-text-muted); }
.boot--error { color: var(--color-danger); }

/* the shell's own pages (not found, no access, an error): a short text under the module bar */
.shell-message { max-width: 48rem; padding: 10px 0; }
.shell-message__title { margin: 0 0 var(--space-3); font-size: var(--font-size-xl); font-weight: var(--font-weight-semibold); }

/* ---------- page header (kept for screens not yet moved to the module bar) ---------- */
.page-header { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.page-header__title { margin: 0; font-size: var(--font-size-xl); overflow-wrap: anywhere; }
.page-header__note { color: var(--color-text-muted); }
.page-header__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-left: auto; }

/* ---------- two columns: the record on the left, side panels on the right ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem); gap: var(--space-6); align-items: start; }
.two-col__side { display: flex; flex-direction: column; gap: var(--space-4); }

/* ---------- a list of links as cards ---------- */
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.link-grid__item {
  display: block; height: 100%; padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface); color: var(--color-text); text-decoration: none;
}
.link-grid__item:hover { background: var(--color-row-hover); text-decoration: none; }
.link-grid__item--off, .link-grid__item--off:hover { background: var(--color-surface-alt); border-style: dashed; }
.link-grid__item--off .link-grid__title { color: var(--color-text-muted); }
.link-grid__title { display: block; font-weight: 600; color: var(--color-link); }
.link-grid__note { display: block; font-size: var(--font-size-sm); color: var(--color-text-muted); }

/* ---------- login page (its tokens: public.css, the look of before the vtiger-look wave) ---------- */
.login { display: flex; align-items: flex-start; justify-content: center; min-height: 100vh; padding: var(--space-8) var(--space-4); }
.login__box {
  width: min(24rem, 100%); margin-top: 8vh; padding: var(--space-6);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface); box-shadow: var(--shadow-1);
}
.login__brand { margin: 0 0 var(--space-1); font-size: var(--font-size-xl); }
.login__intro { margin: 0 0 var(--space-4); color: var(--color-text-muted); }
.login__form { display: flex; flex-direction: column; gap: var(--space-3); }
.login__field { display: flex; flex-direction: column; gap: var(--space-1); }
.login__field > span { font-size: var(--font-size-sm); color: var(--color-text-muted); }
.login__field > input { width: 100%; padding: var(--space-2) var(--space-3); }
.login__error { min-height: 1.5em; margin: 0; color: var(--color-danger); }
.login__submit {
  padding: var(--space-2) var(--space-4);
  border-color: var(--color-primary); background: var(--color-primary); color: var(--color-primary-text);
  font-weight: 600;
}
.login__submit:hover { background: var(--color-primary); box-shadow: var(--shadow-1); }
.login__submit:disabled { opacity: 0.6; }
.login__links { display: flex; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-3); font-size: var(--font-size-sm); }

/* ---------- narrow screens (01-defaults G.5) ---------- */
/* below 992 px the pinned links fold into More ▾ */
@media (max-width: 991px) {
  .vt-pins__link { display: none; }
  .vt-mega__group--pins { display: block; }
  .vt-mega { left: 10px; grid-template-columns: repeat(3, minmax(8rem, 1fr)); }
  .vt-search { width: 180px; }
}
/* below 768 px the icon rail is hidden; the drawer opens from ☰ */
@media (max-width: 767px) {
  .vt-rail { display: none; }
  .vt-banners { padding-left: 12px; }
  .vt-topbar__icon, #home-link { width: 32px; }
  #home-link { margin-left: 0; }
  #calendar-link { display: none; }
  .vt-search { width: 96px; }
  .vt-search__input { padding-right: 6px; }
  .vt-search__advanced { display: none; }
  .vt-mega { left: 0; right: 0; width: auto; max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vt-modulebar { flex-wrap: wrap; }
  .vt-modulebar__title { max-width: 50vw; }
  .vt-crumbs__item--list { max-width: 30vw; }
  .vt-crumbs__item--record { max-width: 60vw; }
  .vt-modulebar__buttons { margin-left: 0; width: 100%; justify-content: flex-start; padding-top: 0; }
  .shell-view { padding: 12px 12px 30px; }
  .vt-drawer__modules { left: 0; width: 100vw; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
}
