/* TORVIQO application frame. Keep layout separate from view-specific styles. */
.app-shell.torviqo-shell,
.app-shell.torviqo-shell.manager-shell {
  --shell-header-height: 72px;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  grid-template-rows: var(--shell-header-height) minmax(0, 1fr);
  min-height: 100vh;
  max-width: 100%;
  overflow: clip;
  background: #f7f9fa;
}

.app-shell.torviqo-shell.sidebar-collapsed,
.app-shell.torviqo-shell.manager-shell.sidebar-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.app-shell.torviqo-shell .sidebar {
  grid-column: 1;
  grid-row: 1 / 3;
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0 14px 14px;
  border: 0;
  border-right: 1px solid #e5eaef;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
  overflow: hidden;
  z-index: 30;
}

.app-shell.torviqo-shell .sidebar-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex: 0 0 95px;
  height: 95px;
  min-width: 0;
  margin: 0 0 8px;
  padding: 0 5px;
  gap: 0;
}

.torviqo-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: #111e34;
  white-space: nowrap;
}

.torviqo-symbol {
  display: block;
  flex: 0 0 32px;
  width: 32px;
  height: 37px;
}

.torviqo-wordmark {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  transition: opacity var(--sidebar-motion-duration, 200ms) var(--sidebar-motion-easing, ease-in-out);
}

.torviqo-brand .torviqo-wordmark strong {
  color: #111e34;
  font-size: 25px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -1.2px;
}

.torviqo-wordmark small {
  color: #748097;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: -.1px;
}

.app-shell.torviqo-shell .nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: 46px;
  align-content: start;
  margin: 0;
  gap: 5px;
  flex: 1 1 auto;
}

.app-shell.torviqo-shell .nav button {
  height: 46px;
  min-height: 46px;
  padding: 10px 13px;
  gap: 14px;
  border-radius: 8px;
  color: #34475f;
  font-size: 14px;
  font-weight: 400;
  background: transparent;
}

.app-shell.torviqo-shell .nav button b {
  font-size: 14px;
  white-space: nowrap;
  line-height: 1.35;
}

.app-shell.torviqo-shell .nav button:hover {
  background: #f1f7f4;
  color: #007e49;
}

.app-shell.torviqo-shell .nav button.active {
  color: #fff;
  background: #00864f;
  font-weight: 500;
  box-shadow: 0 2px 4px rgb(0 104 63 / 8%);
}

.app-shell.torviqo-shell .nav button.active::before { content: none; }

.app-shell.torviqo-shell .sidebar-toggle {
  display: flex;
  flex: 0 0 42px;
  justify-content: space-between;
  height: 42px;
  width: 100%;
  margin: 12px 0 0;
  padding: 10px 13px;
  gap: 10px;
  color: #738197;
  background: transparent;
  border-radius: 8px;
  box-shadow: none;
}

.app-shell.torviqo-shell .sidebar-toggle:hover { background: #f5f7f9; }
.app-shell.torviqo-shell .sidebar-toggle-label { display: inline-flex; color: inherit; font-size: 13px; font-weight: 400; }

.app-shell.torviqo-shell .user-box {
  min-height: 140px;
  flex: 0 0 140px;
  gap: 12px;
  margin-top: 0;
  padding: 14px 6px 0;
  border: 0;
  border-top: 1px solid #edf0f3;
  border-radius: 0;
  background: transparent;
}

.sidebar-brand-footer { display: flex; flex-direction: column; gap: 4px; overflow: hidden; white-space: nowrap; }
.sidebar-brand-line { width: 32px; height: 3px; margin-bottom: 8px; background: #00864f; border-radius: 2px; }
.sidebar-brand-footer strong { font-size: 12px; color: #1a2b42; }
.sidebar-brand-footer > span:not(.sidebar-brand-line), .sidebar-brand-footer small { font-size: 10px; color: #758398; }
.sidebar-brand-footer small { font-size: 9px; }

.app-shell.torviqo-shell .user-box .btn {
  justify-content: flex-start;
  gap: 12px;
  padding: 6px;
  height: 36px;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #607089;
  font-size: 12px;
}

.app-shell.torviqo-shell .user-box .btn:hover { background: #f1f5f3; color: #007e49; }

.app-shell.torviqo-shell.sidebar-collapsed .sidebar { padding-inline: 10px; }
.app-shell.torviqo-shell.sidebar-collapsed .sidebar-header { padding-inline: 12px; }
.app-shell.torviqo-shell.sidebar-collapsed .torviqo-wordmark { opacity: 0; }
.app-shell.torviqo-shell.sidebar-collapsed .nav button { padding-inline: 17px; gap: 0; }
.app-shell.torviqo-shell.sidebar-collapsed .sidebar-toggle { padding-inline: 17px; gap: 0; }
.app-shell.torviqo-shell.sidebar-collapsed .sidebar-toggle-label { flex: 0 1 0; }
.app-shell.torviqo-shell.sidebar-collapsed .user-box { padding-inline: 0; }
.app-shell.torviqo-shell.sidebar-collapsed .sidebar-brand-footer { opacity: 0; }
.app-shell.torviqo-shell.sidebar-collapsed .user-box .btn { padding-inline: 17px; gap: 0; }

.shell-topbar {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--shell-header-height);
  min-width: 0;
  padding: 0 26px;
  gap: 24px;
  border-bottom: 1px solid #e8edf1;
  background: #fff;
  z-index: 20;
}

.shell-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 510px;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #edf0f3;
  border-radius: 7px;
  background: #f5f7f9;
  color: #91a0b3;
  cursor: default;
}

.shell-search .ui-icon { width: 18px; height: 18px; }
.shell-search input:disabled { height: 36px; min-width: 0; padding: 0; border: 0; background: transparent; color: #7b8ba0; font-size: 12px; opacity: 1; box-shadow: none; cursor: default; }
.shell-search input::placeholder { color: #94a0b2; opacity: 1; }
.shell-search > span { font-size: 9px; padding: 2px 5px; border: 1px solid #e2e7ee; border-radius: 4px; color: #8593a5; }
.shell-profile-area { display: flex; align-items: center; gap: 22px; margin-left: auto; min-width: 0; }
.shell-notifications { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; color: #7f8ba0; background: transparent; cursor: default; opacity: .7; }
.shell-notifications .ui-icon { width: 22px; height: 22px; }
.shell-profile { display: flex; align-items: center; gap: 10px; padding-left: 24px; border-left: 1px solid #e0e6ed; min-width: 0; }
.shell-avatar { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 50%; background: #e9f2ed; color: #067447; font-size: 13px; font-weight: 700; }
.shell-profile-copy { min-width: 0; max-width: 210px; display: flex; flex-direction: column; gap: 3px; }
.shell-profile-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; color: #17273c; }
.shell-profile-copy > span { font-size: 10px; color: #7a879d; }
.shell-menu-toggle, .sidebar-mobile-close, .shell-mobile-brand, .sidebar-scrim { display: none; }

.app-shell.torviqo-shell .main {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  z-index: 0;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 24px 26px 32px;
  overflow-x: clip;
}

.app-shell.torviqo-shell .manager-view-frame { margin: 0; }

/* Sign-in refinements use the existing Manrope family and brand palette. */
.login-screen {
  --login-hero-size: clamp(48px, 4.5vw, 72px);
  --login-title-size: clamp(30px, 2.65vw, 42px);
  --login-subtitle-size: 18px;
  --login-control-height: 56px;
  --login-control-radius: 11px;
  --login-secondary: #66758b;
  --login-space-sm: 8px;
  --login-space-md: 16px;
  --login-space-lg: 24px;
  --login-space-xl: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "brand form" "art form";
  column-gap: clamp(28px, 4vw, 64px);
  row-gap: var(--login-space-lg);
  min-height: 100vh;
  min-height: 100svh;
  padding: 32px clamp(28px, 4vw, 64px) 40px;
  background: #f7f6f2;
  font-family: Manrope, system-ui, sans-serif;
  color: #101a30;
}
.login-header { grid-area: brand; min-width: 0; padding-left: 22px; }
.login-header .torviqo-brand.login-brand {
  align-self: auto;
  width: fit-content;
  height: auto;
  margin: 0;
  padding: 0;
  gap: 12px;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.login-brand .torviqo-symbol { width: 42px; height: 48px; flex-basis: 42px; }
.login-brand .torviqo-wordmark { gap: 4px; }
.login-brand .torviqo-wordmark strong { color: #0c1529; font-size: 28px; font-weight: 700; line-height: 1.1; letter-spacing: -.03em; }
.login-brand .torviqo-wordmark small { color: var(--login-secondary); font-size: 13px; font-weight: 400; line-height: 1.4; letter-spacing: 0; }
.login-art {
  grid-area: art;
  display: grid;
  grid-template-rows: auto minmax(240px, 1fr) auto;
  row-gap: var(--login-space-md);
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 20px 0 0 22px;
  background: none;
}
.login-art-copy { position: relative; z-index: 1; }
.login-art-copy h2 {
  margin: 0;
  color: #075044;
  font-size: var(--login-hero-size);
  font-weight: 700;
  font-family: inherit;
  line-height: 1;
  letter-spacing: -.02em;
}
.login-art-illustration { position: relative; min-width: 0; min-height: 0; margin: 0; }
.login-art-illustration img {
  display: block;
  position: absolute;
  inset: 0 auto 0 -5%;
  width: 110%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: darken;
  mask-image: linear-gradient(transparent, #000 12%, #000 86%, transparent), linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
  mask-composite: intersect;
}
.login-art-caption {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #748195;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.login-panel {
  grid-area: form;
  align-self: center;
  justify-self: end;
  position: relative;
  /* Balance the page's 32px top / 40px bottom padding. */
  top: 4px;
  margin-right: 22px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  width: calc(94% - 22px);
  max-width: 620px;
  padding: 48px clamp(28px, 3vw, 48px) 32px;
  border: 1px solid #e6e8ea;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 12px 44px rgb(29 49 40 / 3%);
}
.login-panel > *, .login-panel form, .login-panel h1 { width: 100%; max-width: none; }
.login-panel h1 {
  margin: 0;
  color: #0d172c;
  font-size: var(--login-title-size);
  font-weight: 700;
  font-family: inherit;
  line-height: 1.1;
  letter-spacing: -.025em;
}
.login-heading p { margin: 12px 0 var(--login-space-xl); color: var(--login-secondary); font-size: var(--login-subtitle-size); font-weight: 400; line-height: 1.4; }
.login-panel form { margin: 0; }
.login-panel .field { gap: var(--login-space-sm); margin-bottom: var(--login-space-lg); }
.login-panel .field span { color: #182338; font-size: 15px; font-weight: 600; line-height: 1.3; }
.login-panel .field input {
  height: var(--login-control-height);
  min-height: 48px;
  padding: 0 var(--login-space-md);
  border: 1px solid #d4dbe4;
  border-radius: var(--login-control-radius);
  background: #fff;
  color: #142238;
  font-size: 16px;
  font-weight: 400;
  box-shadow: 0 1px 2px rgb(25 44 63 / 2%);
}
.login-panel .field input::placeholder { color: #7c899d; }
.login-panel .field input:focus { outline: none; border-color: #168365; box-shadow: 0 0 0 2px rgb(0 112 76 / 8%); }
.login-panel .btn {
  width: 100%;
  height: var(--login-control-height);
  min-height: 48px;
  margin-top: 0;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--login-control-radius);
  background: #086a51;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  box-shadow: none;
}
.login-panel .btn:hover { background: #055a44; box-shadow: none; }
.login-panel .btn:active { background: #044e3b; transform: translateY(1px); box-shadow: none; }
.login-panel .btn:focus-visible { outline: 3px solid #67ba9e; outline-offset: 4px; }
.login-panel .error { margin-top: var(--login-space-md); overflow-wrap: anywhere; }
.login-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: var(--login-space-md); border-top: 1px solid #e8ebef; }
.login-footer .login-about-link { min-height: 36px; margin: 0; padding: 4px 0; color: var(--login-secondary); font-size: 14px; font-weight: 500; background: transparent; }
.login-footer .login-about-link:hover, .login-footer .login-about-link:focus-visible { color: #086a51; }

@media (max-height: 840px) and (min-width: 901px) {
  .login-screen { --login-hero-size: clamp(44px, 4.2vw, 64px); padding-block: 24px; row-gap: 18px; }
  .login-art { padding-top: 10px; }
  .login-panel { top: 0; padding-block: 40px 28px; }
}
@media (min-width: 901px) and (max-width: 1200px) {
  .login-screen { --login-subtitle-size: 17px; }
  .login-panel { width: calc(100% - 22px); padding-inline: 28px; }
}
@media (max-width: 900px) {
  .login-screen { --login-title-size: 34px; --login-subtitle-size: 17px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "brand" "form"; gap: 32px; padding: 28px 32px 40px; }
  .login-header { width: 100%; max-width: 540px; margin-inline: auto; padding-left: 0; }
  .login-art { display: none; }
  .login-panel { top: 0; width: 100%; max-width: 540px; margin-inline: auto; padding: 40px 32px 28px; }
}
@media (max-width: 480px) {
  .login-screen { --login-title-size: 30px; --login-subtitle-size: 16px; padding: 24px 16px 28px; row-gap: 28px; }
  .login-header { padding-inline: 6px; }
  .login-brand .torviqo-symbol { width: 37px; height: 43px; flex-basis: 37px; }
  .login-brand .torviqo-wordmark strong { font-size: 27px; }
  .login-brand .torviqo-wordmark small { font-size: 12px; }
  .login-panel { padding: 32px 24px 24px; border-radius: 24px; }
  .login-footer { margin-top: 32px; }
}
@media (max-width: 350px) {
  .login-screen { --login-title-size: 28px; padding-inline: 12px; }
  .login-panel { padding-inline: 20px; }
  .login-brand .torviqo-wordmark small { font-size: 11px; }
}
.about-product-mark { background: #00834d; letter-spacing: -.4px; }

@media (max-height: 790px) and (min-width: 1101px) {
  .app-shell.torviqo-shell .sidebar-header { height: 84px; flex-basis: 84px; }
  .app-shell.torviqo-shell .user-box { min-height: 70px; flex-basis: 70px; padding-top: 8px; gap: 5px; }
  .sidebar-brand-footer { flex-direction: row; align-items: center; gap: 8px; }
  .sidebar-brand-line { margin: 0; flex: 0 0 20px; width: 20px; }
  .sidebar-brand-footer > span:not(.sidebar-brand-line), .sidebar-brand-footer small { display: none; }
}

@media (max-width: 1100px) {
  .app-shell.torviqo-shell,
  .app-shell.torviqo-shell.manager-shell,
  .app-shell.torviqo-shell.sidebar-collapsed,
  .app-shell.torviqo-shell.manager-shell.sidebar-collapsed { --shell-header-height: 64px; display: grid; grid-template-columns: minmax(0, 1fr); overflow: clip; }
  .app-shell.torviqo-shell .sidebar,
  .app-shell.torviqo-shell.sidebar-collapsed .sidebar { position: fixed; inset: 0 auto 0 0; width: 264px; max-width: calc(100vw - 40px); height: 100dvh; padding: 0 14px 14px; transform: translateX(-100%); transition: transform 200ms ease; z-index: 100; }
  .app-shell.torviqo-shell.mobile-menu-open .sidebar { transform: translateX(0); }
  .app-shell.torviqo-shell .sidebar-header,
  .app-shell.torviqo-shell.sidebar-collapsed .sidebar-header { display: flex; justify-content: space-between; height: 88px; flex-basis: 88px; padding-inline: 3px; }
  .app-shell.torviqo-shell.sidebar-collapsed .torviqo-wordmark { opacity: 1; }
  .app-shell.torviqo-shell .sidebar-mobile-close { display: grid; place-items: center; width: 28px; height: 36px; padding: 0; flex: 0 0 28px; margin-left: 7px; background: transparent; color: #718297; }
  .sidebar-mobile-close .ui-icon { width: 20px; height: 20px; }
  .app-shell.torviqo-shell .nav { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 46px; }
  .app-shell.torviqo-shell.sidebar-collapsed .nav button { padding: 10px 13px; gap: 14px; }
  .app-shell.torviqo-shell .sidebar-toggle { display: none; }
  .app-shell.torviqo-shell.sidebar-collapsed .sidebar-brand-footer { opacity: 1; }
  .app-shell.torviqo-shell.sidebar-collapsed .user-box { padding-inline: 6px; }
  .app-shell.torviqo-shell.sidebar-collapsed .user-box .btn { padding: 6px; gap: 12px; }
  .shell-topbar { grid-column: 1; padding-inline: 20px; gap: 16px; }
  .shell-menu-toggle { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 38px; padding: 0; color: #41536a; background: transparent; }
  .shell-menu-toggle .ui-icon { width: 22px; height: 22px; }
  .shell-search { flex: 1 1 auto; }
  .shell-search > span { display: none; }
  .shell-profile-area { gap: 14px; }
  .shell-profile { padding-left: 14px; }
  .shell-profile-copy { max-width: 160px; }
  .app-shell.torviqo-shell .main { grid-column: 1; padding: 20px; max-width: 100%; overflow-x: clip; }
  .app-shell.torviqo-shell.mobile-menu-open .sidebar-scrim { display: block; position: fixed; inset: 0; background: rgb(17 31 47 / 30%); z-index: 90; cursor: default; }
  body.torviqo-menu-open { overflow: hidden; }
}

@media (max-width: 640px) {
  .shell-topbar { padding-inline: 16px; gap: 10px; }
  .shell-search { display: none; }
  .shell-mobile-brand { display: block; font-weight: 800; color: #16263b; font-size: 18px; letter-spacing: -.65px; }
  .shell-profile-area { gap: 8px; }
  .shell-profile { border-left: 0; padding-left: 0; gap: 8px; }
  .shell-profile-copy { display: none; }
  .shell-notifications { width: 28px; }
  .shell-avatar { width: 34px; height: 34px; flex-basis: 34px; font-size: 12px; }
  .app-shell.torviqo-shell .main { padding: 18px 14px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell.torviqo-shell .sidebar, .torviqo-wordmark { transition: none; }
}

/* The login language choice persists across sessions. */
.login-language { display: inline-flex; align-items: center; gap: 7px; color: #617467; }
.login-language svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.login-language select { min-height: 36px; width: auto; margin: 0; padding: 6px 22px 6px 4px; border: 0; border-radius: 6px; color: #426251; background-color: transparent; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.login-language select:focus-visible { outline: 2px solid #168459; outline-offset: 3px; }
