/* Seal Coatings corporate system for the native ERPNext Desk.
   Load after Frappe and Seal Desk styles. This themes native surfaces only;
   routes, workflow controls, permissions, and the user's theme preference are
   still owned by ERPNext. */

/* The switcher keeps native IDs; its branded preview markup is provided by seal_theme.js. */
.seal-theme-switch-dialog .theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.seal-theme-switch-dialog .seal-theme-choice { min-width: 0; cursor: pointer; }
.seal-theme-switch-dialog .theme-title { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 14px; line-height: 1.35; }
.seal-theme-mode-mark { display: inline-flex; flex: 0 0 20px; width: 20px; height: 20px; }
.seal-theme-mode-mark svg { display: block; width: 20px; height: 20px; }
.seal-theme-preview { overflow: hidden; border-radius: 12px; }
.seal-theme-preview .background { position: relative; height: 118px; overflow: hidden; background: #edf2f1; }
.seal-theme-preview[data-theme="dark"] .background { background: #1a2b35; }
.seal-theme-preview-brand { position: absolute; inset: 10px auto auto 10px; width: 100px; height: 32px; padding: 0; background: transparent; border-radius: 0; }
.seal-theme-preview-brand img { display: block; width: 100%; height: 100%; object-fit: contain; }
.seal-theme-preview .navbar { position: static; display: block; min-height: 0; height: 8px; width: 66%; margin: 48px 12px 8px; padding: 0; background: #124471; border: 0; box-shadow: none; }
.seal-theme-preview .foreground { width: 78%; height: 8px; margin: 6px 0; border-radius: 3px; background: #fff; }
.seal-theme-preview[data-theme="dark"] .foreground { background: #354a55; }
.seal-theme-preview .toolbar { display: none; }
.seal-theme-preview .preview-check { position: absolute; inset: auto 7px 7px auto; }
.seal-theme-choice .preview-check { opacity: 0; }
.seal-theme-choice.selected .preview-check { opacity: 1; }
.seal-theme-choice.selected .seal-theme-preview { outline: 2px solid var(--primary-color); outline-offset: 3px; }
@media (max-width: 480px) {
  .seal-theme-switch-dialog .theme-grid { gap: 9px; }
  .seal-theme-switch-dialog .theme-title { flex-direction: column; font-size: 12px; }
  .seal-theme-preview-brand { width: calc(100% - 16px); inset-inline-start: 8px; }
}
:root {
  color-scheme: light;
  --sidebar-width: 264px;

  /* Native Frappe design tokens */
  --bg-color: #edf2f1;
  --fg-color: #f9fbf9;
  --card-bg: #fbfcfa;
  --control-bg: #fbfcfa;
  --control-bg-on-gray: #f5f8f6;
  --control-bg-on-dark: #253943;
  --text-color: #263844;
  --heading-color: #124471;
  --subtle-fg: #677982;
  --muted-text: #677982;
  --border-color: #d4dfdf;
  --primary: #124471;
  --primary-color: #124471;
  --brand-color: #124471;
  --btn-primary-bg: #124471;
  --btn-primary-color: #fbfcfa;
  --btn-primary-border: #124471;
  --btn-primary-hover-bg: #0b3458;
  --btn-default-bg: #f9fbf9;
  --btn-default-hover-bg: #eef4f3;
  --btn-default-color: #263844;
  --input-bg: #fbfcfa;
  --navbar-bg: #f9fbf9;
  --sidebar-bg: #f7f9f7;
  --sidebar-item-active-bg: #e5eff6;
  --sidebar-item-active-color: #124471;
  --sidebar-item-hover-bg: #edf3f4;
  --sidebar-item-hover-color: #263844;
  --modal-bg: #fbfcfa;
  --popover-bg: #fbfcfa;
  --tooltip-bg: #263a45;
  --disabled-control-bg: #e9efed;
  --table-bg: #fbfcfa;
  --table-header-bg: #f1f5f3;
  --table-row-hover-bg: #eef4f3;
  --scrollbar-thumb-color: #b9c9ca;
  --icon-stroke: #52666f;
  --seal-success-bg: #e5f0e9;
  --seal-success-ink: #245840;
  --seal-warning-bg: #f4ecd6;
  --seal-warning-ink: #70500f;
  --seal-danger-bg: #f5e6e3;
  --seal-danger-ink: #873c36;
  --seal-info-bg: #e4eef4;
  --seal-info-ink: #164b76;
  --bs-body-bg: #edf2f1;
  --bs-body-color: #263844;
  --bs-emphasis-color: #124471;
  --bs-secondary-color: #677982;
  --bs-tertiary-color: #778890;
  --bs-secondary-bg: #f1f5f3;
  --bs-tertiary-bg: #e7eeec;
  --bs-border-color: #d4dfdf;
  --bs-link-color: #124471;
  --bs-link-hover-color: #0b3458;
  --bs-primary: #124471;
  --bs-primary-rgb: 18, 68, 113;
  --bs-font-sans-serif: "Seal Myriad", "Myriad Pro", sans-serif;

  /* Shared Seal system */
  --seal-blue: #124471;
  --seal-blue-deep: #0b3458;
  --seal-blue-soft: #eaf1f7;
  --seal-ink: #263844;
  --seal-muted: #677982;
  --seal-line: #d4dfdf;
  --seal-canvas: #edf2f1;
  --seal-surface: #fbfcfa;
  --seal-surface-alt: #f1f5f3;
  --seal-copper: #a86640;
  --seal-success: #28634d;
  --seal-warning: #82590d;
  --seal-danger: #9d3d37;
  --seal-radius-sm: 6px;
  --seal-radius: 10px;
  --seal-radius-lg: 14px;
  --seal-shadow-sm: 0 3px 12px rgba(28, 51, 61, .055);
  --seal-shadow: 0 12px 32px rgba(28, 51, 61, .09);
  --font-stack: "Seal Myriad", "Myriad Pro", sans-serif;
  --font-family: "Seal Myriad", "Myriad Pro", sans-serif;
}

:root:is([data-theme="dark"], [data-theme="timeless-night"], [data-theme="Timeless Night"], [data-theme-mode="dark"], [data-color-scheme="dark"]),
html:is(.dark, .theme-dark),
body:is(.dark, .theme-dark, [data-theme="dark"], [data-theme="timeless-night"], [data-theme="Timeless Night"], [data-theme-mode="dark"], [data-color-scheme="dark"]),
[data-theme="dark"], [data-theme="timeless-night"], [data-theme="Timeless Night"],
[data-theme-mode="dark"], [data-color-scheme="dark"], .dark, .theme-dark {
  color-scheme: dark;
  --bg-color: #17252d;
  --fg-color: #20313a;
  --card-bg: #22343e;
  --control-bg: #1c2d36;
  --control-bg-on-gray: #253943;
  --control-bg-on-dark: #16252d;
  --text-color: #e1e9e8;
  --heading-color: #c0dbea;
  --subtle-fg: #a5b6bb;
  --muted-text: #a5b6bb;
  --border-color: #3b505a;
  --primary: #8dbbd7;
  --primary-color: #8dbbd7;
  --brand-color: #8dbbd7;
  --btn-primary-bg: #245c7d;
  --btn-primary-color: #f7fbfc;
  --btn-primary-border: #39799b;
  --btn-primary-hover-bg: #316e90;
  --btn-default-bg: #293b44;
  --btn-default-hover-bg: #344a54;
  --btn-default-color: #e1e9e8;
  --input-bg: #1c2d36;
  --navbar-bg: #1e3039;
  --sidebar-bg: #13232c;
  --sidebar-item-active-bg: #2c414b;
  --sidebar-item-active-color: #d5e8f1;
  --sidebar-item-hover-bg: #263b45;
  --sidebar-item-hover-color: #eff5f4;
  --modal-bg: #22343e;
  --popover-bg: #22343e;
  --tooltip-bg: #0f1b21;
  --disabled-control-bg: #2a3b43;
  --table-bg: #22343e;
  --table-header-bg: #293e48;
  --table-row-hover-bg: #2a414b;
  --scrollbar-thumb-color: #526a74;
  --icon-stroke: #b4c4c8;
  --seal-success-bg: #294438;
  --seal-success-ink: #b8dcc5;
  --seal-warning-bg: #493e28;
  --seal-warning-ink: #ead79c;
  --seal-danger-bg: #4a3232;
  --seal-danger-ink: #e9bab5;
  --seal-info-bg: #2b414b;
  --seal-info-ink: #c2dfed;
  --bs-body-bg: #17252d;
  --bs-body-color: #e1e9e8;
  --bs-emphasis-color: #c0dbea;
  --bs-secondary-color: #a5b6bb;
  --bs-tertiary-color: #8fa3a9;
  --bs-secondary-bg: #293e48;
  --bs-tertiary-bg: #2e434d;
  --bs-border-color: #3b505a;
  --bs-link-color: #a4c9df;
  --bs-link-hover-color: #d1e7f1;
  --bs-primary: #8dbbd7;
  --bs-primary-rgb: 141, 187, 215;
  --bs-font-sans-serif: "Seal Myriad", "Myriad Pro", sans-serif;

  --seal-blue: #8dbbd7;
  --seal-blue-deep: #c0dbea;
  --seal-blue-soft: #2b414b;
  --seal-ink: #e1e9e8;
  --seal-muted: #a5b6bb;
  --seal-line: #3b505a;
  --seal-canvas: #17252d;
  --seal-surface: #22343e;
  --seal-surface-alt: #293e48;
  --seal-copper: #d19a74;
  --seal-success: #9ac7aa;
  --seal-warning: #dfc27a;
  --seal-danger: #e0a09a;
  --seal-shadow-sm: 0 3px 12px rgba(0, 0, 0, .16);
  --seal-shadow: 0 14px 36px rgba(0, 0, 0, .24);
}

@media (prefers-color-scheme: dark) {
  :root:is([data-theme="automatic"], [data-theme="auto"], [data-theme="system"], [data-theme-mode="automatic"], [data-theme-mode="auto"]),
  html:is(.theme-automatic, .theme-auto, .theme-system),
  body:is([data-theme="automatic"], [data-theme="auto"], [data-theme="system"], [data-theme-mode="automatic"], [data-theme-mode="auto"], .theme-automatic, .theme-auto, .theme-system) {
    color-scheme: dark;
    --bg-color: #17252d; --fg-color: #20313a; --card-bg: #22343e;
    --control-bg: #1c2d36; --control-bg-on-gray: #253943; --control-bg-on-dark: #16252d;
    --text-color: #e1e9e8; --heading-color: #c0dbea; --subtle-fg: #a5b6bb;
    --muted-text: #a5b6bb; --border-color: #3b505a;
    --primary: #8dbbd7; --primary-color: #8dbbd7; --brand-color: #8dbbd7;
    --btn-primary-bg: #245c7d; --btn-primary-color: #f7fbfc;
    --btn-primary-border: #39799b; --btn-primary-hover-bg: #316e90;
    --btn-default-bg: #293b44; --btn-default-hover-bg: #344a54;
    --btn-default-color: #e1e9e8; --input-bg: #1c2d36;
    --navbar-bg: #1e3039; --sidebar-bg: #13232c;
    --sidebar-item-active-bg: #2c414b; --sidebar-item-active-color: #d5e8f1;
    --sidebar-item-hover-bg: #263b45; --sidebar-item-hover-color: #eff5f4;
    --modal-bg: #22343e; --popover-bg: #22343e; --tooltip-bg: #0f1b21;
    --disabled-control-bg: #2a3b43; --table-bg: #22343e;
    --table-header-bg: #293e48; --table-row-hover-bg: #2a414b;
    --scrollbar-thumb-color: #526a74;
    --icon-stroke: #b4c4c8;
    --seal-success-bg: #294438; --seal-success-ink: #b8dcc5;
    --seal-warning-bg: #493e28; --seal-warning-ink: #ead79c;
    --seal-danger-bg: #4a3232; --seal-danger-ink: #e9bab5;
    --seal-info-bg: #2b414b; --seal-info-ink: #c2dfed;
    --bs-body-bg: #17252d; --bs-body-color: #e1e9e8; --bs-emphasis-color: #c0dbea;
    --bs-secondary-color: #a5b6bb; --bs-tertiary-color: #8fa3a9;
    --bs-secondary-bg: #293e48; --bs-tertiary-bg: #2e434d; --bs-border-color: #3b505a;
    --bs-link-color: #a4c9df; --bs-link-hover-color: #d1e7f1;
    --bs-primary: #8dbbd7; --bs-primary-rgb: 141, 187, 215;
    --bs-font-sans-serif: "Seal Myriad", "Myriad Pro", sans-serif;
    --seal-blue: #8dbbd7; --seal-blue-deep: #c0dbea; --seal-blue-soft: #2b414b;
    --seal-ink: #e1e9e8; --seal-muted: #a5b6bb; --seal-line: #3b505a;
    --seal-canvas: #17252d; --seal-surface: #22343e; --seal-surface-alt: #293e48;
    --seal-copper: #d19a74; --seal-success: #9ac7aa;
    --seal-warning: #dfc27a; --seal-danger: #e0a09a;
    --seal-shadow-sm: 0 3px 12px rgba(0, 0, 0, .16);
    --seal-shadow: 0 14px 36px rgba(0, 0, 0, .24);
  }
}

/* Actual ERP16 guest login structure:
   body[data-path=login] > #page-login > .page-content-wrapper > main.container
   > .page_content > div > section.for-login. JS adds the scoped body marker
   and a branded aside beside (never inside or instead of) Frappe's native
   login / recovery / email-link sections. */
body.seal-login-page {
  --seal-login-ink: #183747;
  --seal-login-muted: #617b86;
  --seal-login-rule: #d7e2e2;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  overflow-x: hidden;
  isolation: isolate;
  color: #eef5f4;
  background:
    radial-gradient(ellipse at 13% 82%, rgba(51, 117, 139, .24), transparent 37%),
    radial-gradient(ellipse at 78% 7%, rgba(168, 102, 64, .13), transparent 31%),
    linear-gradient(128deg, #102936 0%, #173b4c 54%, #214e60 100%);
  font-family: var(--font-stack);
}
body.seal-login-page::before,
body.seal-login-page::after {
  position: fixed;
  z-index: -1;
  content: "";
  pointer-events: none;
}
body.seal-login-page::before {
  inset: 0;
  background:
    linear-gradient(rgba(224, 239, 239, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224, 239, 239, .045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.6) 42%, transparent 78%);
}
body.seal-login-page::after {
  inset: auto auto -32vw -18vw;
  width: min(74vw, 920px);
  aspect-ratio: 1;
  border: 1px solid rgba(218, 236, 238, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 52px rgba(218, 236, 238, .035), 0 0 0 104px rgba(218, 236, 238, .025);
  animation: seal-entry-orbit 32s linear infinite;
}
body.seal-login-page .page-content-wrapper {
  position: relative;
  z-index: 0;
  flex: 1 0 auto;
  min-height: calc(100dvh - 72px);
  overflow: hidden;
  background: transparent;
}
body.seal-login-page #page-login > .page-content-wrapper > .page-breadcrumbs,
body.seal-login-page #page-login > .page-content-wrapper > main.container > .page-header-wrapper {
  display: none;
}
body.seal-login-page #page-login > .page-content-wrapper > main.container {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: none;
  min-height: calc(100dvh - 72px);
  margin: 0;
  padding: 0;
  background: transparent;
}
body.seal-login-page #page-login .page_content {
  display: flex;
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
}
body.seal-login-page #page-login .page_content > div:has(> .seal-login-hero) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  align-items: center;
  column-gap: clamp(48px, 8vw, 136px);
  width: min(1200px, calc(100% - 80px));
  margin: auto;
  padding-block: clamp(42px, 6vh, 76px);
}
body.seal-login-page #page-login .page_content > div > noscript { display: none; }
body.seal-login-page #page-login .page_content > div > .seal-login-hero {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  align-self: center;
  color: #eff6f4;
  animation: seal-entry-arrive .68s cubic-bezier(.2,.75,.25,1) both;
}
body.seal-login-page .seal-login-hero__logo {
  width: 150px;
  height: auto;
  background: transparent;
  filter: brightness(0) invert(1);
}
.seal-workspace .seal-logo {
  background: transparent;
  border: 0;
  box-shadow: none;
}
body.seal-login-page .seal-login-hero__identity {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: clamp(52px, 8vh, 92px);
}
body.seal-login-page .seal-login-hero__identity-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #e4b58f;
  border: 1px solid rgba(228, 240, 238, .25);
  border-radius: 12px;
  background: rgba(235, 246, 243, .07);
}
body.seal-login-page .seal-login-hero__identity-mark svg { width: 30px; height: 30px; }
body.seal-login-page .seal-login-hero__identity-name {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .16em;
}
body.seal-login-page .seal-login-hero__identity-name span {
  color: rgba(226, 239, 237, .63);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .19em;
}
body.seal-login-page .seal-login-hero__copy { max-width: 610px; }
body.seal-login-page .seal-login-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 23px;
  color: #d8ad8c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
}
body.seal-login-page .seal-login-hero__eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d8ad8c;
  box-shadow: 0 0 0 5px rgba(216, 173, 140, .12);
}
body.seal-login-page .seal-login-hero__copy h1 {
  margin: 0;
  color: #f2f6f3;
  font-size: clamp(46px, 5.8vw, 76px);
  font-weight: 550;
  letter-spacing: -.06em;
  line-height: .99;
}
body.seal-login-page .seal-login-hero__description {
  max-width: 440px;
  margin: 23px 0 0;
  color: rgba(226, 239, 237, .76);
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.65;
}
body.seal-login-page .seal-login-hero__visual {
  max-width: 610px;
  margin-top: 22px;
  color: #a9c7c9;
  animation: seal-entry-arrive .85s .1s cubic-bezier(.2,.75,.25,1) both;
}
body.seal-login-page .seal-login-hero__visual svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
body.seal-login-page .seal-login-hero__visual .hero-orbit {
  stroke-dasharray: 2 8;
  stroke-linecap: round;
  opacity: .42;
}
body.seal-login-page .seal-login-hero__disciplines {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  color: rgba(226, 239, 237, .59);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
}
body.seal-login-page .seal-login-hero__disciplines i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #d8ad8c;
}
body.seal-login-page #page-login .page_content > div > section:is(
  .for-login, .for-forgot, .for-reset-password, .for-signup, .for-login-with-email-link
) {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-height: 0;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: var(--seal-login-ink);
  background: transparent;
  overflow: visible;
  animation: seal-entry-arrive .72s .08s cubic-bezier(.2,.75,.25,1) both;
}
body.seal-login-page #page-login .page_content > div > section:is(
  .for-login, .for-forgot, .for-reset-password, .for-signup, .for-login-with-email-link
)::before,
body.seal-login-page #page-login .page_content > div > section:is(
  .for-login, .for-forgot, .for-reset-password, .for-signup, .for-login-with-email-link
)::after {
  display: none !important;
  content: none !important;
}
body.seal-login-page .login-content.page-card {
  width: 100%;
  max-width: none;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: clamp(29px, 3.5vw, 43px);
  color: var(--seal-login-ink);
  background: rgba(248, 250, 247, .97);
  border: 1px solid rgba(228, 240, 237, .62);
  border-top: 0;
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(7, 24, 32, .3), 0 2px 6px rgba(7,24,32,.08);
  backdrop-filter: blur(18px);
}
body.seal-login-page .login-content .page-card-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 0 29px;
  padding: 0 0 23px;
  border: 0;
  border-bottom: 1px solid var(--seal-login-rule);
}
body.seal-login-page .login-content .app-logo {
  flex: 0 0 auto;
  width: 132px;
  height: 38px;
  max-width: min(42vw, 148px);
  max-height: 40px;
  object-fit: contain;
  content: url("/assets/seal_workspace/images/seal-coatings-transparent-logo.png");
  filter: none;
}
body.seal-login-page .page-card-head-text { min-width: 0; }
body.seal-login-page .page-card-head h1,
body.seal-login-page .page-card-head h2,
body.seal-login-page .page-card-head h3,
body.seal-login-page .page-card-head h4 {
  margin: 0;
  color: #173b4c;
  font-size: clamp(22px, 2vw, 27px);
  font-weight: 680;
  letter-spacing: -.035em;
}
body.seal-login-page .page-card-subtitle {
  margin: 7px 0 0;
  color: var(--seal-login-muted);
  font-size: 13px;
  line-height: 1.45;
}
body.seal-login-page .login-content .form-signin { margin: 0; }
body.seal-login-page .login-content .form-group { margin-bottom: 18px; }
body.seal-login-page .login-content .form-label {
  display: block;
  margin-bottom: 7px;
  color: #294956;
  font-size: 12px;
  font-weight: 700;
}
body.seal-login-page .login-content input.form-control {
  box-sizing: border-box;
  min-height: 48px;
  padding: 11px 14px;
  color: #173140;
  background: #fff;
  border: 1px solid #d5e0e1;
  border-radius: 9px;
  box-shadow: none;
}
body.seal-login-page .login-content input.form-control:focus {
  color: #173140;
  background: #fff;
  border-color: #40839a;
  box-shadow: 0 0 0 3px rgba(45, 121, 148, .14);
}
body.seal-login-page .login-content input.form-control::placeholder { color: #94a7ac; opacity: 1; }
body.seal-login-page .login-content .forgot-password-message {
  margin: 9px 0 0;
  color: var(--seal-login-muted);
  font-size: 12px;
  text-align: end;
}
body.seal-login-page .login-content a:not(.btn) { color: #236982; text-decoration: none; }
body.seal-login-page .login-content a:not(.btn):hover { color: #144b63; text-decoration: underline; }
body.seal-login-page .login-content .page-card-actions {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}
body.seal-login-page .login-content .page-card-actions .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 47px;
  padding: 11px 15px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 680;
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s ease;
}
body.seal-login-page .login-content .page-card-actions button.btn-login[type="submit"],
body.seal-login-page .login-content .page-card-actions .btn-forgot {
  color: #f7faf8;
  background: #174d67;
  border: 1px solid #174d67;
}
body.seal-login-page .login-content .page-card-actions button.btn-login[type="submit"]:hover,
body.seal-login-page .login-content .page-card-actions .btn-forgot:hover:not(:disabled) {
  color: #fff;
  background: #103e56;
  border-color: #103e56;
  transform: translateY(-1px);
}
body.seal-login-page .login-content .page-card-actions .btn-login-option {
  color: #285566;
  background: #edf3f2;
  border: 1px solid #dbe5e4;
}
body.seal-login-page .login-content .page-card-actions .btn-login-option:hover {
  color: #163e50;
  background: #e4eeed;
  border-color: #c9d9d9;
}
body.seal-login-page .login-content :is(input, button, a):focus-visible {
  outline: 3px solid rgba(38, 117, 147, .4);
  outline-offset: 3px;
}
body.seal-login-page .login-content .login-error-banner,
body.seal-login-page .login-content .login-success-banner {
  border-radius: 8px;
}
body.seal-login-page .web-footer {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  color: rgba(225, 238, 236, .62);
  background: transparent;
}
body.seal-login-page .web-footer .container {
  width: min(1200px, calc(100% - 80px));
  max-width: none;
  padding: 0 0 18px;
}
body.seal-login-page .web-footer :is(.footer-info, .footer-info a) { color: inherit; }
@keyframes seal-entry-orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes seal-entry-arrive {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 900px) {
  body.seal-login-page .page-content-wrapper,
  body.seal-login-page #page-login > .page-content-wrapper > main.container { min-height: auto; }
  body.seal-login-page #page-login .page_content > div:has(> .seal-login-hero) {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 28px;
    width: min(560px, calc(100% - 40px));
    padding-block: 34px 44px;
  }
  body.seal-login-page #page-login .page_content > div > .seal-login-hero { grid-column: 1; grid-row: 1; }
  body.seal-login-page #page-login .page_content > div > section:is(
    .for-login, .for-forgot, .for-reset-password, .for-signup, .for-login-with-email-link
  ) { grid-column: 1; grid-row: 2; }
  body.seal-login-page .seal-login-hero__identity { margin-bottom: 31px; }
  body.seal-login-page .seal-login-hero__copy h1 { font-size: clamp(38px, 8vw, 58px); }
  body.seal-login-page .seal-login-hero__description { margin-top: 15px; }
  body.seal-login-page .seal-login-hero__visual { max-width: 490px; margin-top: 10px; }
  body.seal-login-page .seal-login-hero__disciplines { margin-top: 0; }
}
@media (max-width: 560px) {
  body.seal-login-page #page-login .page_content > div:has(> .seal-login-hero) {
    width: calc(100% - 32px);
    row-gap: 22px;
    padding-block: 26px 34px;
  }
  body.seal-login-page .seal-login-hero__identity { margin-bottom: 23px; }
  body.seal-login-page .seal-login-hero__copy h1 { font-size: clamp(36px, 10vw, 48px); }
  body.seal-login-page .seal-login-hero__description { font-size: 14px; }
  body.seal-login-page .seal-login-hero__visual { max-width: 100%; }
  body.seal-login-page .seal-login-hero__disciplines { gap: 8px; font-size: 8px; letter-spacing: .09em; }
  body.seal-login-page .login-content.page-card { padding: 24px 21px; }
  body.seal-login-page .login-content .page-card-head { align-items: flex-start; gap: 14px; margin-bottom: 22px; padding-bottom: 19px; }
  body.seal-login-page .login-content .app-logo { width: 112px; height: 32px; }
  body.seal-login-page .web-footer .container { width: calc(100% - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  body.seal-login-page::after,
  body.seal-login-page .seal-login-hero,
  body.seal-login-page .seal-login-hero__visual,
  body.seal-login-page #page-login .page_content > div > section:is(
    .for-login, .for-forgot, .for-reset-password, .for-signup, .for-login-with-email-link
  ) { animation: none; }
  body.seal-login-page .login-content .page-card-actions .btn { transition: none; }
}

/* Corporate interior inherits the same deep teal architecture as the approved
   sign-in. Copper is reserved for emphasis; teal carries navigation and action. */
:root {
  --seal-blue: #174d67;
  --seal-blue-deep: #103c52;
  --seal-blue-soft: #e7f0f1;
  --seal-ink: #203b49;
  --seal-muted: #687e86;
  --seal-line: #d8e3e3;
  --seal-canvas: #edf3f2;
  --seal-surface: #fbfcfa;
  --seal-surface-alt: #f1f5f3;
  --seal-copper: #a86640;
  --primary: #174d67;
  --primary-color: #174d67;
  --brand-color: #174d67;
  --heading-color: #174d67;
  --text-color: #203b49;
  --bg-color: #edf3f2;
  --border-color: #d8e3e3;
  --btn-primary-bg: #174d67;
  --btn-primary-border: #174d67;
  --bs-primary: #174d67;
  --bs-primary-rgb: 23, 77, 103;
}

/* Seal sign-in: a full-viewport operations gateway, not a modal floating on
   Frappe's generic canvas. All form, OAuth, reset, and recovery markup remains
   native and interactive; only its presentation changes here. */
.for-login,
.for-forgot,
.for-reset-password,
.for-signup {
  --seal-entry-ink: #173140;
  --seal-entry-muted: #637b86;
  --seal-entry-line: #d6e1e2;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--seal-entry-ink);
  background:
    radial-gradient(ellipse at 12% 84%, rgba(57, 125, 148, .18), transparent 38%),
    radial-gradient(ellipse at 78% 8%, rgba(168, 102, 64, .12), transparent 32%),
    linear-gradient(128deg, #102936 0%, #173b4c 52%, #214e60 100%);
  font-family: var(--font-stack);
}
.for-login::before,
.for-forgot::before,
.for-reset-password::before,
.for-signup::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(rgba(224, 239, 239, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224, 239, 239, .045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.6) 42%, transparent 78%);
  content: "";
  pointer-events: none;
}
.for-login::after,
.for-forgot::after,
.for-reset-password::after,
.for-signup::after {
  position: fixed;
  inset: auto auto -32vw -18vw;
  width: min(74vw, 920px);
  aspect-ratio: 1;
  border: 1px solid rgba(218, 236, 238, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 52px rgba(218, 236, 238, .035), 0 0 0 104px rgba(218, 236, 238, .025);
  content: "";
  pointer-events: none;
  animation: seal-entry-orbit 28s linear infinite;
}
.for-login .page-card,
.for-forgot .page-card,
.for-reset-password .page-card,
.for-signup .page-card {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(30px, 4vw, 48px);
  color: #173140;
  background: rgba(247, 250, 247, .97);
  border: 1px solid rgba(228, 240, 237, .58);
  border-top: 0;
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(7, 24, 32, .28), 0 2px 6px rgba(7,24,32,.08);
  backdrop-filter: blur(18px);
  animation: seal-entry-arrive .72s .08s cubic-bezier(.2,.75,.25,1) both;
}
.for-login .page-card-head,
.for-forgot .page-card-head,
.for-reset-password .page-card-head,
.for-signup .page-card-head {
  margin-bottom: 24px;
  padding: 0;
  border: 0;
}
.for-login .page-card h1,
.for-login .page-card h2,
.for-forgot .page-card h1,
.for-forgot .page-card h2,
.for-reset-password .page-card h1,
.for-signup .page-card h1 {
  color: #173b4c;
  font-size: clamp(24px, 2.2vw, 30px);
  font-weight: 650;
  letter-spacing: -.035em;
}
.for-login .page-card .page-card-head .indicator,
.for-login .page-card .page-card-head p,
.for-forgot .page-card .page-card-head p { color: #637b86; }
.for-login .page-card .form-control,
.for-forgot .page-card .form-control,
.for-reset-password .page-card .form-control,
.for-signup .page-card .form-control,
.for-login .page-card input:not([type="checkbox"]):not([type="radio"]) {
  min-height: 48px;
  padding-inline: 14px;
  color: #173140;
  background: #fff;
  border: 1px solid #d6e1e2;
  border-radius: 9px;
  box-shadow: none;
}
.for-login .page-card :is(input, button, a):focus-visible,
.for-forgot .page-card :is(input, button, a):focus-visible,
.for-reset-password .page-card :is(input, button, a):focus-visible,
.for-signup .page-card :is(input, button, a):focus-visible {
  outline: 3px solid rgba(38, 117, 147, .38);
  outline-offset: 3px;
}
.for-login .page-card .btn-primary,
.for-forgot .page-card .btn-primary,
.for-reset-password .page-card .btn-primary,
.for-signup .page-card .btn-primary,
.for-login .page-card .btn-login {
  min-height: 48px;
  color: #f7faf8;
  background: #174d67;
  border: 1px solid #174d67;
  border-radius: 9px;
  font-weight: 650;
  transition: background-color .18s ease, transform .18s ease;
}
.for-login .page-card .btn-primary:hover,
.for-forgot .page-card .btn-primary:hover,
.for-reset-password .page-card .btn-primary:hover,
.for-signup .page-card .btn-primary:hover,
.for-login .page-card .btn-login:hover {
  color: #fff;
  background: #103e56;
  border-color: #103e56;
  transform: translateY(-1px);
}
.for-login .page-card .forgot-password-message,
.for-login .page-card .sign-up-message,
.for-login .page-card .social-logins,
.for-login .page-card .login-with-email-link,
.for-login .page-card .login-with-username-link,
.for-login .page-card .login-with-mobile-link {
  color: var(--seal-entry-muted);
}
.for-login .page-card .social-logins { margin-top: 22px; }
.for-login .page-card .social-logins .btn,
.for-login .page-card .social-login-buttons .btn { border-radius: 8px; }
.for-login .app-logo,
.for-forgot .app-logo,
.for-reset-password .app-logo,
.for-signup .app-logo {
  width: 132px;
  height: 36px;
  max-width: 100%;
  max-height: 42px;
  object-fit: contain;
  content: url("/assets/seal_workspace/images/seal-coatings-transparent-logo.png");
  filter: none;
}
.for-login .web-footer,
.for-forgot .web-footer,
.for-reset-password .web-footer,
.for-signup .web-footer {
  position: relative;
  z-index: 1;
  color: rgba(223, 238, 238, .66);
  background: transparent;
}
@keyframes seal-entry-orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes seal-entry-arrive {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 760px) {
  .for-login .page-card,
  .for-forgot .page-card,
  .for-reset-password .page-card,
  .for-signup .page-card { padding: 28px 24px; }
  .for-login::after,
  .for-forgot::after,
  .for-reset-password::after,
  .for-signup::after { inset: auto auto -32vw -38vw; width: 110vw; }
}
@media (prefers-reduced-motion: reduce) {
  .for-login::after,
  .for-forgot::after,
  .for-reset-password::after,
  .for-signup::after,
  .for-login .page-card,
  .for-forgot .page-card,
  .for-reset-password .page-card,
  .for-signup .page-card {
    animation: none;
  }
}

html, body, .app-container {
  color: var(--text-color);
  background-color: var(--bg-color);
  font-family: var(--font-stack);
}

/* Native icons inherit the Seal palette without replacing Frappe's SVG glyphs. */
.navbar .icon, .page-head .icon, .sidebar-item .icon, .standard-sidebar-item .icon,
.layout-side-section .icon, .desk-sidebar .icon, .list-sidebar .icon,
.form-sidebar .icon, .btn .icon {
  color: currentColor;
  --icon-stroke: currentColor;
}
.navbar .icon svg, .page-head .icon svg, .sidebar-item .icon svg,
.standard-sidebar-item .icon svg, .layout-side-section .icon svg,
.desk-sidebar .icon svg, .list-sidebar .icon svg, .form-sidebar .icon svg {
  width: 16px;
  height: 16px;
}
.body-sidebar .sidebar-item-icon svg,
.body-sidebar .standard-sidebar-item .icon svg {
  color: currentColor;
  --icon-stroke: currentColor;
}
@media (max-width: 767px) {
  .navbar .navbar-brand img, .app-logo, .brand-logo {
    max-width: min(42vw, 148px);
    max-height: 34px;
  }
  .page-head .page-actions { flex-wrap: wrap; }
}
body { min-height: 100dvh; }
* { scrollbar-color: var(--scrollbar-thumb-color) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb-color); border: 2px solid transparent;
  border-radius: 999px; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--scrollbar-thumb-color) 76%, var(--primary-color));
  background-clip: padding-box;
}
::selection { color: #fbfcfa; background: #124471; }
a { color: var(--primary-color); }
a:hover { color: var(--heading-color); }
hr, .divider, .border, [class*="border-bottom"] { border-color: var(--border-color) !important; }

/* Desk chrome and workspace navigation */
.navbar, .navbar-default, .navbar-expand,
.navbar .navbar-collapse, .navbar .navbar-brand {
  color: var(--text-color);
  background-color: var(--navbar-bg);
  border-color: var(--border-color);
}
.navbar { box-shadow: 0 3px 14px rgba(28, 51, 61, .055); }
.navbar a, .navbar .nav-link, .navbar .navbar-nav > li > a { color: var(--text-color); }
.navbar a:hover, .navbar .nav-link:hover, .navbar .navbar-nav > li > a:hover {
  color: var(--primary-color); background-color: var(--table-row-hover-bg);
}
.navbar .navbar-brand img, .app-logo, .brand-logo {
  max-height: 40px; width: auto; object-fit: contain;
}
.dropdown-menu, .popover, .tooltip-inner, .awesomplete ul,
.search-dialog, .search-bar .awesomplete ul {
  color: var(--text-color); background-color: var(--popover-bg);
  border: 1px solid var(--border-color); border-radius: var(--seal-radius);
  box-shadow: var(--seal-shadow);
}
.tooltip-inner { color: #f9fbf9; background-color: var(--tooltip-bg); }
.dropdown-menu > li > a, .dropdown-menu .dropdown-item { color: var(--text-color); }
.dropdown-menu > li > a:hover, .dropdown-menu .dropdown-item:hover,
.awesomplete li:hover, .awesomplete li[aria-selected="true"] {
  color: var(--text-color); background: var(--table-row-hover-bg);
}
.body-sidebar {
  color: var(--text-color); background: var(--sidebar-bg);
  border-color: var(--border-color);
}
.body-sidebar .sidebar-header { border-color: var(--border-color); }
.body-sidebar .sidebar-item-label, .body-sidebar .sidebar-item-icon,
.body-sidebar .header-title, .body-sidebar .standard-sidebar-item,
.body-sidebar .standard-sidebar-item a { color: inherit; }
.body-sidebar .standard-sidebar-item:hover, .body-sidebar .standard-sidebar-item.active-sidebar {
  color: var(--text-color); background: var(--sidebar-item-hover-bg);
}
.body-sidebar .sidebar-item-container,
.body-sidebar .sidebar-item-container .item-anchor {
  color: var(--text-color);
  border-radius: 8px;
}
.body-sidebar .sidebar-item-container:hover,
.body-sidebar .sidebar-item-container .item-anchor:hover {
  color: var(--sidebar-item-hover-color);
  background: var(--sidebar-item-hover-bg);
}
.body-sidebar .sidebar-item-container.selected,
.body-sidebar .sidebar-item-container.active,
.body-sidebar .sidebar-item-container .item-anchor[aria-current="page"],
.body-sidebar .sidebar-item-container.selected .item-anchor,
.body-sidebar .sidebar-item-container.active .item-anchor {
  color: var(--sidebar-item-active-color);
  background: var(--sidebar-item-active-bg);
}
.body-sidebar .sidebar-item-container :is(.item-anchor, .sidebar-item-label, .item-label, .sidebar-item-icon),
.body-sidebar .sidebar-item-container .item-anchor :is(.sidebar-item-label, .item-label, .sidebar-item-icon) {
  color: inherit;
  opacity: 1;
  --icon-stroke: currentColor;
}
.body-sidebar .standard-sidebar-item.selected,
.body-sidebar .standard-sidebar-item.selected a,
.body-sidebar .standard-sidebar-item.selected .item-label {
  color: var(--sidebar-item-active-color);
  background: var(--sidebar-item-active-bg);
}
.body-sidebar > a.sidebar-header {
  min-height: 112px;
  border-bottom: 1px solid var(--border-color);
}
.body-sidebar .standard-sidebar-item {
  min-height: 42px;
  margin: 0;
  padding-inline: 0;
  border-radius: 8px;
  font-size: 14px;
}
.body-sidebar .sidebar-item-container { margin: 3px 8px; }
.body-sidebar .standard-sidebar-item .item-anchor {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding-inline: 10px;
  border-radius: 8px;
  color: inherit;
  font-size: 14px;
}
.body-sidebar .standard-sidebar-item .sidebar-item-label,
.body-sidebar .standard-sidebar-item .item-label { font-size: 14px; line-height: 1.35; }
.body-sidebar .standard-sidebar-item.selected,
.body-sidebar .standard-sidebar-item.selected a,
.body-sidebar .standard-sidebar-item.selected .item-label,
.body-sidebar .standard-sidebar-item.active-sidebar {
  color: var(--sidebar-item-active-color);
  background: var(--sidebar-item-active-bg);
  box-shadow: inset 3px 0 0 var(--primary-color);
}
.body-sidebar .sidebar-item-container.selected,
.body-sidebar .sidebar-item-container.active,
.body-sidebar .sidebar-item-container .item-anchor[aria-current="page"] {
  box-shadow: inset 3px 0 0 var(--primary-color);
  font-weight: 650;
}
.body-sidebar .sidebar-item-icon svg { width: 18px; height: 18px; }
.body-sidebar .sidebar-header::after {
  background-color: transparent;
  background-image: url("/assets/seal_workspace/images/seal-coatings-transparent-logo.png");
  border: 0;
}
.standard-sidebar, .standard-sidebar-section, .desk-sidebar,
.layout-side-section, .list-sidebar, .form-sidebar {
  color: var(--text-color); background-color: var(--fg-color);
  border-color: var(--border-color);
}
.standard-sidebar-item, .layout-side-section .sidebar-item,
.list-sidebar .sidebar-item, .form-sidebar .sidebar-item,
.workspace-sidebar .sidebar-item {
  color: var(--text-color); border-radius: var(--seal-radius-sm);
}
.standard-sidebar-item:hover, .layout-side-section .sidebar-item:hover,
.list-sidebar .sidebar-item:hover, .form-sidebar .sidebar-item:hover {
  color: var(--text-color); background: var(--sidebar-item-hover-bg);
}
.standard-sidebar-item.selected, .layout-side-section .sidebar-item.selected,
.layout-side-section .sidebar-item[aria-current="page"],
.list-sidebar .sidebar-item.selected, .form-sidebar .sidebar-item.selected {
  color: var(--sidebar-item-active-color); background: var(--sidebar-item-active-bg);
}
.icon, .btn .icon, .navbar .icon {
  color: currentColor; --icon-stroke: currentColor;
}

/* Workspace canvas, page framing, and headings */
.main-section, #body, .page-container, .page-body, .page-body-content,
.layout-main-section-wrapper, .page-content, .desk-page, .page-card,
.workspace-page, .workspace-page .layout-main-section,
.layout-main-section {
  color: var(--text-color); background-color: var(--bg-color);
}
.layout-main-section {
  color: var(--text-color);
  background-color: var(--card-bg);
  border-color: var(--border-color);
  border-radius: var(--seal-radius);
  box-shadow: none;
}
.layout-main-section:has(.seal-workspace) { box-shadow: none; }
.page-head, .page-head .title-area, .page-head .page-head-content {
  color: var(--text-color); border-color: var(--border-color);
}
.page-head .title-text, .page-head h1, .page-title,
.page-head .title-text a, .page-head .indicator-pill {
  color: var(--heading-color);
}
.navbar-breadcrumbs, .navbar-breadcrumbs a, .page-breadcrumbs, .page-head .breadcrumb, .page-head .breadcrumb a,
.breadcrumb-item, .breadcrumb-item a {
  color: var(--subtle-fg);
  font-size: 13px;
  font-weight: 550;
  line-height: 1.35;
}
.navbar-breadcrumbs, .page-breadcrumbs, .page-head .breadcrumb {
  min-width: 0;
  margin: 0;
  font-size: 13px;
}
.navbar-breadcrumbs :is(a, span, li), .page-breadcrumbs :is(a, span, li),
.page-head .breadcrumb :is(a, span, li) {
  font-size: inherit;
  line-height: inherit;
}
.navbar-breadcrumbs li:last-child > a, .navbar-breadcrumbs a:last-child {
  color: var(--subtle-fg) !important;
  font-size: 13px;
  font-weight: 550;
}
.navbar-breadcrumbs li + li::before, .navbar-breadcrumbs li + li > a::before {
  color: var(--border-color);
  font-size: 11px;
}
.page-head .breadcrumb .breadcrumb-item + .breadcrumb-item::before,
.page-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
  color: var(--border-color);
  padding-inline: 7px;
}
.page-head .breadcrumb a:hover, .breadcrumb-item a:hover { color: var(--primary-color); }
.page-head .page-actions, .page-head .standard-actions { gap: 8px; }
.page-head .indicator-pill, .indicator-pill {
  border-radius: 999px; font-weight: 650;
}
.page-head .indicator-pill.blue, .indicator-pill.blue {
  color: var(--primary-color); background: var(--seal-blue-soft);
}

/* Native cards, dashboard widgets, section heads, and tabs */
.card, .widget, .widget-group, .dashboard-widget-box, .report-summary,
.form-section, .form-dashboard-section, .form-grid, .form-message,
.section-box, .section-head, .page-card, .list-row, .list-row-head,
.list-row-container, .frappe-card, .workspace-card {
  color: var(--text-color); border-color: var(--border-color);
}
.card, .widget, .widget-group, .dashboard-widget-box, .report-summary,
.form-section, .form-dashboard-section, .section-box, .frappe-card,
.workspace-card {
  background-color: var(--card-bg);
  border-radius: var(--seal-radius);
  box-shadow: none;
}
.form-section .section-head, .form-dashboard-section .section-head,
.section-head, .widget-head, .widget-title, .dashboard-widget-box .widget-head {
  color: var(--heading-color); background-color: transparent;
  border-color: var(--border-color);
}
.form-section .section-head { border-radius: var(--seal-radius-sm); }
.nav-tabs, .form-tabs-list, .form-tabs { border-color: var(--border-color); }
.nav-tabs > li > a, .nav-tabs > li > button.nav-link,
.form-tabs-list .nav-link, .form-tabs .nav-link {
  min-height: 42px;
  color: var(--subtle-fg);
  background: transparent;
  border-color: transparent;
  border-radius: 0;
}
.nav-tabs > li > a:hover, .nav-tabs > li > button.nav-link:hover,
.form-tabs-list .nav-link:hover,
.form-tabs .nav-link:hover {
  color: var(--primary-color);
  background: transparent;
}
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover,
.nav-tabs > li > .nav-link.active, .nav-tabs > li > .nav-link.active:hover,
.form-tabs-list .nav-link.active, .form-tabs .nav-link.active {
  color: var(--primary-color);
  background: transparent;
  border-color: transparent;
  box-shadow: inset 0 -2px 0 var(--primary-color);
}

@media screen {
/* Native item and invoice work surfaces: retain Frappe markup and behavior,
   but give filters, forms, and editable child rows a legible working rhythm. */
.layout-main-section:has(.list-row-container) .list-row-head {
  min-height: 44px;
  padding-block: 11px;
  font-size: 12px;
  letter-spacing: .025em;
}
.layout-main-section:has(.list-row-container) .list-row-container {
  box-sizing: border-box;
  min-height: 50px;
}
.layout-main-section:has(.list-row-container) .list-row-container .list-row {
  box-sizing: border-box;
  min-height: 50px;
  padding-block: 8px;
  font-size: 14px;
  line-height: 1.45;
}
.layout-main-section:has(.list-row-container) .list-row-container .list-row .level-item { line-height: 1.4; }
.layout-main-section:has(.list-row-container) .list-row-container:nth-child(even) {
  background: color-mix(in srgb, var(--table-header-bg) 32%, var(--table-bg));
}
.layout-main-section:has(.list-row-container) .list-row-container:hover { background: var(--table-row-hover-bg); }
.layout-main-section:has(.list-row-container) .filter-section,
.layout-main-section:has(.list-row-container) .list-filters,
.layout-main-section:has(.list-row-container) .list-view-filters {
  padding: 10px 12px;
  border-radius: var(--seal-radius-sm);
  background: var(--card-bg);
}
.layout-main-section:has(.list-row-container) .list-filters select,
.layout-main-section:has(.list-row-container) .filter-section select {
  min-height: 36px;
  font-size: 13px;
}
.layout-main-section:has(.list-row-container) .list-filters input:not([type="checkbox"]):not([type="radio"]),
.layout-main-section:has(.list-row-container) .filter-section input:not([type="checkbox"]):not([type="radio"]) {
  min-height: 36px;
  font-size: 13px;
}
.editable-form .form-tabs-list, .editable-form .form-tabs { gap: 14px; }
.editable-form .form-tabs-list .nav-link, .editable-form .form-tabs .nav-link {
  min-height: 42px;
  padding: 9px 5px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 600;
}
.editable-form .form-tabs-list .nav-link.active, .editable-form .form-tabs .nav-link.active {
  box-shadow: inset 0 -2px 0 var(--primary-color);
}
.editable-form .form-section, .editable-form .form-dashboard-section {
  margin-block: 14px;
  padding: 0 16px 16px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
}
.editable-form .form-section .section-head, .editable-form .form-dashboard-section .section-head {
  min-height: 46px;
  margin-inline: -16px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-color);
  border-radius: var(--seal-radius) var(--seal-radius) 0 0;
  font-size: 14px;
}
.editable-form .form-section .section-body { padding-top: 14px; }
.editable-form .form-column { padding-inline: 12px; }
.editable-form .frappe-control { margin-bottom: 14px; }
.editable-form .control-label, .editable-form .frappe-control label {
  margin-bottom: 6px;
  color: var(--text-color);
  font-size: 12px;
  font-weight: 650;
}
.editable-form .help-box, .editable-form .help-message { font-size: 12px; line-height: 1.45; }
.editable-form .form-control:not([type="checkbox"]):not([type="radio"]),
.editable-form .control-input input:not([type="checkbox"]):not([type="radio"]),
.editable-form .frappe-control input:not([type="checkbox"]):not([type="radio"]),
.editable-form .frappe-control select { min-height: 38px; }
.editable-form .form-grid .grid-heading-row { min-height: 40px; }
.editable-form .form-grid .grid-heading-row .grid-static-col { padding-block: 10px; font-size: 12px; font-weight: 700; }
.editable-form .form-grid .grid-row { min-height: 46px; }
.editable-form .form-grid .grid-row .grid-static-col,
.editable-form .form-grid .grid-row .data-row { min-height: 42px; padding-block: 5px; }
.editable-form .form-grid .grid-row .form-control:not([type="checkbox"]):not([type="radio"]),
.editable-form .form-grid .grid-row input:not([type="checkbox"]):not([type="radio"]) { min-height: 34px; }
.editable-form .form-grid .grid-add-row, .editable-form .form-grid .grid-footer { min-height: 40px; }
.editable-form input[type="checkbox"], .editable-form input[type="radio"] {
  box-sizing: border-box;
  inline-size: 18px;
  block-size: 18px;
  min-inline-size: 18px;
  min-block-size: 18px;
  max-inline-size: 18px;
  max-block-size: 18px;
  padding: 0;
  margin: 0;
  vertical-align: middle;
  flex: 0 0 18px;
}
.editable-form .checkbox label, .editable-form .form-check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.editable-form :is(.control-value, .like-disabled-input) {
  min-height: 38px;
  padding: 8px 10px;
  color: var(--text-color);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
}

/* Forms, searchable links, native controls, and field state */
.form-control, .input-with-feedback, .control-input input,
.control-input select, .control-input textarea, .frappe-control input,
.frappe-control select, .frappe-control textarea, .search-bar input,
.filter-input, .awesomplete input, .link-field input,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select, textarea {
  color: var(--text-color); background-color: var(--control-bg);
  border-color: var(--border-color); border-radius: var(--seal-radius-sm);
}
.form-control:focus, .input-with-feedback:focus, .control-input input:focus,
.control-input select:focus, .control-input textarea:focus,
.frappe-control input:focus, .frappe-control select:focus,
.frappe-control textarea:focus, .filter-input:focus, textarea:focus {
  color: var(--text-color); background-color: var(--control-bg);
  border-color: var(--primary-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 18%, transparent);
}
::placeholder, .form-control::placeholder { color: var(--subtle-fg); opacity: .82; }
input:disabled, select:disabled, textarea:disabled,
.form-control:disabled, .form-control[readonly] {
  color: var(--subtle-fg); background-color: var(--disabled-control-bg);
  opacity: .82;
}
.control-label, .form-group label, .frappe-control label,
.control-label small, .help-box, .help-message, .text-muted,
.text-muted a, .small.text-muted { color: var(--subtle-fg); }
.checkbox label, .radio label, .form-check-label { color: var(--text-color); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary-color); }
.control-value, .like-disabled-input { color: var(--text-color); }
.control-value { background: var(--control-bg-on-gray); border-radius: var(--seal-radius-sm); }

/* Action hierarchy: true primary actions, quiet utilities, clear destructive states */
.btn, button.btn, .btn-default, .btn-secondary,
.btn-light, .btn-link, .btn-group > .btn {
  color: var(--text-color); background-color: var(--fg-color);
  border-color: var(--border-color); border-radius: var(--seal-radius-sm);
  box-shadow: none; transition: color .16s ease, background-color .16s ease,
    border-color .16s ease, transform .16s ease;
}
.btn:hover:not(:disabled), button.btn:hover:not(:disabled),
.btn-default:hover:not(:disabled), .btn-secondary:hover:not(:disabled) {
  color: var(--heading-color); background-color: var(--table-row-hover-bg);
  border-color: color-mix(in srgb, var(--primary-color) 24%, var(--border-color));
}
.btn:active:not(:disabled), button.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-primary, .btn-primary-dark, .primary-action, .btn.btn-primary {
  color: var(--btn-primary-color); background-color: var(--btn-primary-bg);
  border-color: var(--btn-primary-border);
}
.btn-primary:hover:not(:disabled), .btn-primary-dark:hover:not(:disabled),
.primary-action:hover:not(:disabled), .btn.btn-primary:hover:not(:disabled) {
  color: var(--btn-primary-color); background-color: var(--btn-primary-hover-bg);
  border-color: var(--btn-primary-hover-bg);
}
.btn-danger, .btn.btn-danger, button.btn-danger,
.btn-danger:hover:not(:disabled), .btn-group .btn-danger {
  color: #fff; background-color: #9d3d37; border-color: #9d3d37;
}
.btn-success, .btn.btn-success, button.btn-success,
.btn-success:hover:not(:disabled) {
  color: #fff; background-color: #28634d; border-color: #28634d;
}
.btn-warning, .btn.btn-warning, button.btn-warning,
.btn-warning:hover:not(:disabled) {
  color: #fff; background-color: #82590d; border-color: #82590d;
}
.btn:disabled, button:disabled, .btn.disabled, .btn.loading {
  cursor: not-allowed; filter: saturate(.55); opacity: .58;
}
.btn-link { color: var(--primary-color); background: transparent; border-color: transparent; }
.btn-link:hover { color: var(--heading-color); background: var(--table-row-hover-bg); }

/* Native Frappe list views, query reports, DataTable and child-table grids */
.list-view-container, .list-view, .list-paging-area, .list-row-head,
.list-row-container, .list-row, .report-wrapper, .report-container,
.datatable, .dt-scrollable, .dt-scrollable .dt-row,
.grid-body, .grid-heading-row, .grid-row, .grid-footer,
.form-grid .grid-heading-row, .form-grid .grid-row {
  color: var(--text-color); border-color: var(--border-color);
}
.list-view-container, .list-view, .report-wrapper, .report-container,
.datatable, .grid-body, .form-grid {
  background-color: var(--card-bg);
}
.list-row-head, .list-row-container .list-row-head, .list-view-container .list-row-head,
.dt-header .dt-row, .dt-row-header, .report-wrapper .dt-row-header, .grid-heading-row,
.form-grid .grid-heading-row {
  color: var(--heading-color); background-color: var(--table-header-bg);
  border-color: var(--border-color);
}
.list-row, .list-row-container, .dt-row, .grid-row,
.form-grid .grid-row, .report-wrapper .dt-row {
  background-color: var(--table-bg); border-color: var(--border-color);
}
.list-row:hover, .list-row-container:hover, .dt-row:hover,
.grid-row:hover, .form-grid .grid-row:hover {
  background-color: var(--table-row-hover-bg);
}
.list-row-head .level-left, .list-row-head .level-right,
.list-row-container .level-left, .list-row-container .level-right {
  color: inherit;
}
.dt-cell, .dt-cell__content, .grid-static-col, .grid-static-col .static-area {
  color: var(--text-color); border-color: var(--border-color);
}
.datatable {
  --dt-cell-bg: var(--table-bg);
  --dt-cell-color: var(--text-color);
  --dt-border-color: var(--border-color);
  --dt-row-hover-bg: var(--table-row-hover-bg);
  --dt-header-bg: var(--table-header-bg);
}
.table, table.table, .report-wrapper table, .form-grid table,
.grid-body table {
  color: var(--text-color); background-color: var(--table-bg);
}
.table > :not(caption) > * > *, table th, table td {
  color: inherit; border-color: var(--border-color);
}
.table thead th, .table thead td, table thead th,
.form-grid table thead th {
  color: var(--heading-color); background-color: var(--table-header-bg);
}
.table-striped > tbody > tr:nth-of-type(odd) > *,
table.table tbody tr:nth-of-type(odd) > * {
  background-color: color-mix(in srgb, var(--table-header-bg) 52%, var(--table-bg));
}
.table-hover > tbody > tr:hover > *, .table tbody tr:hover > *,
table tbody tr:hover > * { background-color: var(--table-row-hover-bg); }
.grid-row .grid-static-col, .grid-row .data-row,
.grid-row .row-index, .grid-heading-row .grid-static-col {
  border-color: var(--border-color);
}
.grid-add-row, .grid-footer, .grid-footer .grid-add-row {
  color: var(--subtle-fg); background: var(--table-header-bg); border-color: var(--border-color);
}
.sort-order, .sort-selector, .list-row-head .sort-order { color: var(--subtle-fg); }

/* Modal workflows, autocomplete, notifications, and theme chooser */
.modal-content, .frappe-dialog .modal-content, .modal-header,
.modal-footer, .modal-body, .frappe-dialog .modal-body {
  color: var(--text-color); background-color: var(--modal-bg); border-color: var(--border-color);
}
.modal-content, .frappe-dialog .modal-content {
  border-radius: var(--seal-radius-lg); box-shadow: var(--seal-shadow);
}
.modal-header { border-bottom-color: var(--border-color); }
.modal-title, .modal-header h1, .modal-header h2 { color: var(--heading-color); }
.modal-backdrop { background-color: #10232d; }
.modal-backdrop.show { opacity: .54; }
.frappe-dialog .modal-footer, .modal-footer { border-top-color: var(--border-color); }
.notification-center, .notifications-list, .notification-item,
.dropdown-menu .notification-item, .navbar .popover {
  color: var(--text-color); background-color: var(--popover-bg); border-color: var(--border-color);
}
.notification-item:hover, .notifications-list .notification-item:hover {
  background: var(--table-row-hover-bg);
}
.theme-switcher, .theme-switcher-dialog, .theme-switcher-modal,
.theme-selector, .theme-selection, .seal-theme-switcher, [data-theme-switcher] {
  color: var(--text-color); background-color: var(--modal-bg);
}
.theme-switcher .modal-title, .theme-switcher-dialog .modal-title,
.theme-switcher-modal .modal-title, .theme-selector h1, .theme-selector h2 {
  color: var(--heading-color);
}
.theme-switcher button, .theme-switcher-dialog button,
.theme-switcher-modal button, .theme-selector button,
[data-theme-switcher] button, .seal-theme-switcher button {
  color: var(--text-color); background-color: var(--fg-color);
  border-color: var(--border-color); border-radius: var(--seal-radius-sm);
}
.theme-switcher button:hover, .theme-switcher-dialog button:hover,
.theme-switcher-modal button:hover, .theme-selector button:hover,
[data-theme-switcher] button:hover, .seal-theme-switcher button:hover {
  background-color: var(--table-row-hover-bg); border-color: var(--primary-color);
}
.theme-switcher button[aria-pressed="true"], .theme-selector [aria-checked="true"],
.theme-switcher .selected, .theme-selector .selected,
.seal-theme-switcher [aria-checked="true"], .seal-theme-switcher .selected {
  outline: 2px solid var(--primary-color); outline-offset: 2px;
}
.modal:has(.theme-preview, [data-theme-option]) .modal-content {
  border-top: 3px solid var(--primary-color);
}
.theme-switcher :is(.theme-item, .theme-card, .theme-choice, .theme-tile, .theme-option,
  .theme-preview-card, [role="radio"], [data-theme-option], [data-theme-choice]),
.theme-selector :is(.theme-item, .theme-card, .theme-choice, .theme-option, [role="radio"]),
.seal-theme-switcher :is(.seal-theme-card, .theme-card, [role="radio"]),
.theme-preview, .theme-card, .theme-option, [data-theme-option] {
  border-radius: var(--seal-radius); border-color: var(--border-color);
}
.theme-switcher :is(.theme-label, .theme-name, .theme-title),
.seal-theme-switcher :is(.seal-theme-label, .seal-theme-name) {
  color: var(--text-color); font-weight: 650;
}

/* Status and data signals use meaning, never color alone. */
.indicator-pill, .badge, .label, .status-badge, .pill {
  border-radius: 999px; font-weight: 650;
}
.indicator-pill.green, .badge-success, .label-success, .status-success {
  color: #245840; background-color: #e5f0e9;
}
.indicator-pill.orange, .badge-warning, .label-warning, .status-warning {
  color: #70500f; background-color: #f4ecd6;
}
.indicator-pill.red, .badge-danger, .label-danger, .status-danger {
  color: #873c36; background-color: #f5e6e3;
}
.indicator-pill.blue, .badge-info, .label-info, .status-info {
  color: #164b76; background-color: #e4eef4;
}
.progress { background: var(--disabled-control-bg); }
.progress-bar { background: var(--primary-color); }
.alert, .msgprint, .form-message {
  border: 1px solid var(--border-color); border-radius: var(--seal-radius-sm);
}
.alert-success, .msgprint.alert-success, .indicator-pill.green,
.badge-success, .label-success, .status-success {
  color: var(--seal-success-ink); background-color: var(--seal-success-bg);
  border-color: color-mix(in srgb, var(--seal-success-ink) 22%, var(--seal-success-bg));
}
.alert-warning, .msgprint.alert-warning, .indicator-pill.orange,
.badge-warning, .label-warning, .status-warning {
  color: var(--seal-warning-ink); background-color: var(--seal-warning-bg);
  border-color: color-mix(in srgb, var(--seal-warning-ink) 22%, var(--seal-warning-bg));
}
.alert-danger, .alert-error, .msgprint.alert-danger,
.indicator-pill.red, .badge-danger, .label-danger, .status-danger {
  color: var(--seal-danger-ink); background-color: var(--seal-danger-bg);
  border-color: color-mix(in srgb, var(--seal-danger-ink) 22%, var(--seal-danger-bg));
}
.alert-info, .msgprint.alert-info, .indicator-pill.blue,
.badge-info, .label-info, .status-info {
  color: var(--seal-info-ink); background-color: var(--seal-info-bg);
  border-color: color-mix(in srgb, var(--seal-info-ink) 22%, var(--seal-info-bg));
}
.chart-container, .chart-legend, .chart-legend text { color: var(--text-color); }

/* Official identity for authenticated shell and first-run entry screens */
.for-login, .for-forgot, .for-reset-password, .for-signup,
.for-login .page-content, .for-forgot .page-content,
.for-reset-password .page-content, .for-signup .page-content {
  color: var(--text-color); background: var(--bg-color);
  font-family: var(--font-stack);
}
.for-login .page-card, .for-forgot .page-card,
.for-reset-password .page-card, .for-signup .page-card {
  color: var(--text-color); background: var(--card-bg);
  border: 1px solid var(--border-color); border-top: 4px solid var(--primary-color);
  border-radius: var(--seal-radius-lg); box-shadow: var(--seal-shadow);
}
.for-login .page-card h1, .for-login .page-card h2,
.for-forgot .page-card h1, .for-forgot .page-card h2 { color: var(--heading-color); }
.for-login .app-logo, .for-forgot .app-logo,
.for-reset-password .app-logo, .for-signup .app-logo {
  max-width: 240px; max-height: 90px; width: auto; object-fit: contain;
}

/* Accessible focus, native RTL, motion, and paper output */
:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary-color) 78%, #5b98a7);
  outline-offset: 2px;
}
button:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none; }
[dir="rtl"] .navbar, [dir="rtl"] .page-head, [dir="rtl"] .modal-header,
[dir="rtl"] .modal-footer, [dir="rtl"] .form-tabs-list { direction: rtl; }
[dir="rtl"] table th, [dir="rtl"] table td { text-align: start; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media print {
  :root, html, body, .app-container, .layout-main-section,
  .page-container, .page-body, .form-section, .form-dashboard-section,
  .list-row, .list-row-container, table, .table, .report-wrapper {
    color: #1d2e37 !important; background: #fbfcfa !important;
    box-shadow: none !important; print-color-adjust: exact;
  }
  .navbar, .body-sidebar, .standard-sidebar, .layout-side-section,
  .list-sidebar, .form-sidebar, .modal-backdrop,
  .seal-oracle-launcher, .seal-oracle-panel { display: none !important; }
  .page-head, .form-section, table, tr { break-inside: avoid; }
  a { color: #124471 !important; text-decoration: underline; }
}

/* Native ERP16 sidebar text follows the selected theme rather than a fixed
   navy-only foreground; active state remains signaled by its own token. */
.body-sidebar .sidebar-item-label, .body-sidebar .sidebar-item-icon,
.body-sidebar .sidebar-item-icon svg, .body-sidebar .sidebar-item-control {
  color: var(--text-color);
}
.body-sidebar .standard-sidebar-item.selected .sidebar-item-label,
.body-sidebar .standard-sidebar-item.selected .sidebar-item-icon,
.body-sidebar .standard-sidebar-item.active .sidebar-item-label,
.body-sidebar .standard-sidebar-item.active .sidebar-item-icon {
  color: var(--sidebar-item-active-color);
}
html[data-theme="dark"] .control-input .form-control,
html[data-theme="dark"] .frappe-control .input-with-feedback,
html[data-theme="dark"] .page-form .form-control {
  background-color: #20343e !important; color: #dce8ed !important;
  border-color: #435964 !important;
}
html[data-theme="dark"] .control-input .form-control:disabled,
html[data-theme="dark"] .control-input .form-control[readonly] {
  background-color: #2a3d47 !important;
}
html[data-theme="dark"] .grid-heading-row,
html[data-theme="dark"] .grid-heading-row .grid-row,
html[data-theme="dark"] .dt-cell--header,
html[data-theme="dark"] .grid-heading-row .grid-static-col,
html[data-theme="dark"] .grid-heading-row .row-index,
html[data-theme="dark"] .grid-heading-row .row-check {
  background-color: #314956 !important; color: #dce8ed !important;
}

/* System-following dark mode keeps the light corporate navigation reversible. */
@media (prefers-color-scheme: dark) {
  :root:is([data-theme="automatic"], [data-theme="auto"], [data-theme="system"],
    [data-theme-mode="automatic"], [data-theme-mode="auto"]) .body-sidebar,
  html:is(.theme-automatic, .theme-auto, .theme-system) .body-sidebar,
  body:is([data-theme="automatic"], [data-theme="auto"], [data-theme="system"],
    [data-theme-mode="automatic"], [data-theme-mode="auto"],
    .theme-automatic, .theme-auto, .theme-system) .body-sidebar {
    background: #172832;
    color: #e4ecee;
    border-color: #3b505a;
  }
  :root:is([data-theme="automatic"], [data-theme="auto"], [data-theme="system"],
    [data-theme-mode="automatic"], [data-theme-mode="auto"]) .body-sidebar .header-title,
  html:is(.theme-automatic, .theme-auto, .theme-system) .body-sidebar .header-title,
  body:is([data-theme="automatic"], [data-theme="auto"], [data-theme="system"],
    [data-theme-mode="automatic"], [data-theme-mode="auto"],
    .theme-automatic, .theme-auto, .theme-system) .body-sidebar .header-title { color: #e4ecee; }
}

/* Keep the native module title and dropdown intact while adding clear
   workspace context above the active module name. The native header remains
   the clickable workspace switcher. */
.body-sidebar-container.expanded .body-sidebar > a.sidebar-header .title-container::before {
  display: block;
  margin-bottom: 3px;
  color: var(--seal-blue);
  content: "Seal Workspace";
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .045em;
  line-height: 1.25;
}
.body-sidebar-container.expanded .body-sidebar > a.sidebar-header .header-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--subtle-fg);
}
.body-sidebar-container .body-sidebar .sidebar-item-icon[data-seal-custom-icon] {
  color: color-mix(in srgb, var(--seal-blue) 65%, #6caec9);
}
.body-sidebar-container .body-sidebar .sidebar-item-icon[data-seal-custom-icon] svg {
  color: color-mix(in srgb, var(--seal-blue) 65%, #6caec9);
  stroke: currentColor;
}

/* Expanded navigation: predictable 42px targets and a full-size, calm blue
   outline for Seal's known custom glyphs. Native and unknown icon SVGs remain
   untouched. */
.body-sidebar-container.expanded .body-sidebar .standard-sidebar-item,
.body-sidebar-container.expanded .body-sidebar .sidebar-item-container {
  min-height: 42px;
  margin-block: 0;
  padding-block: 0;
}
.body-sidebar-container.expanded .body-sidebar .standard-sidebar-item .item-anchor,
.body-sidebar-container.expanded .body-sidebar .sidebar-item-container .item-anchor {
  box-sizing: border-box;
  min-height: 42px;
  padding-block: 0;
}
.body-sidebar-container.expanded .body-sidebar .sidebar-item-icon[data-seal-custom-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 20px;
  min-width: 20px;
  max-width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  flex: 0 0 20px;
  color: color-mix(in srgb, var(--seal-blue) 65%, #6caec9);
}
.body-sidebar-container.expanded .body-sidebar .sidebar-item-icon[data-seal-custom-icon] svg {
  display: block;
  width: 20px;
  min-width: 20px;
  max-width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  fill: none;
  stroke: currentColor;
  flex: 0 0 20px;
}

/* List pages keep one outer surface; internal Frappe result wrappers should
   not read as a stack of separate cards. Native paging, selection and scroll
   containers are left in place. */
.layout-main-section:has(.frappe-list) :is(.frappe-list, .list-view-result, .list-view-container),
.layout-main-section:has(.list-view-result) :is(.frappe-list, .list-view-result, .list-view-container) {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.layout-main-section:has(.frappe-list) .list-row-head,
.layout-main-section:has(.list-view-result) .list-row-head {
  min-height: 44px;
  padding: 10px 12px;
  color: var(--heading-color);
  background: var(--table-header-bg);
  border: 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .025em;
}
.layout-main-section:has(.frappe-list) .list-row-container,
.layout-main-section:has(.list-view-result) .list-row-container {
  min-height: 48px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-color);
  border-radius: 0;
  box-shadow: none;
}
.layout-main-section:has(.frappe-list) .list-row-container .list-row,
.layout-main-section:has(.list-view-result) .list-row-container .list-row {
  box-sizing: border-box;
  min-height: 48px;
  padding: 6px 12px;
  color: var(--text-color);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 14px;
  line-height: 1.4;
}
.layout-main-section:has(.frappe-list) .list-row-container:hover,
.layout-main-section:has(.frappe-list) .list-row-container:hover .list-row,
.layout-main-section:has(.list-view-result) .list-row-container:hover,
.layout-main-section:has(.list-view-result) .list-row-container:hover .list-row {
  background: var(--table-row-hover-bg);
}

/* Native ERP16 interior repair.
   Submitted forms do not carry .editable-form. Target the native form layout,
   not Oracle components. Frappe owns column widths, sticky offsets, scrolling,
   row editor lifecycle and native status indicators. */
@media screen {
  .body-sidebar > a.sidebar-header:is(:hover, :focus-visible, .hover, [aria-expanded="true"]) {
    color: #edf4f3 !important;
    background: #1b4351 !important;
  }
  .body-sidebar > a.sidebar-header .title-container::before,
  .body-sidebar > a.sidebar-header .header-title,
  .body-sidebar > a.sidebar-header .drop-icon,
  .body-sidebar > a.sidebar-header:hover .drop-icon {
    color: #edf4f3 !important;
    --icon-stroke: currentColor;
  }
  .navbar .navbar-brand:is(:hover, :focus-visible) { background: var(--navbar-bg); }
  .body-sidebar > a.sidebar-header:focus-within {
    background: #1b4351 !important;
    outline: 2px solid #b8deea;
    outline-offset: -3px;
  }

  /* The metadata rail is deliberately navy in both appearances. Its local
     tokens must match that surface; never change visibility or permissions. */
  .form-sidebar {
    --text-color: #edf4f3;
    --text-muted: #c3d6db;
    --subtle-fg: #c3d6db;
    --muted-text: #c3d6db;
    --heading-color: #fff;
    --control-bg: #1b4351;
    --control-bg-on-gray: #1b4351;
    --disabled-control-bg: #214652;
    --primary-color: #b8deea;
    --icon-stroke: currentColor;
    color: #edf4f3 !important;
  }
  .form-sidebar :is(.sidebar-label, .sidebar-label span, .modified-by, .created-by,
    .user-action, .text-muted, .sidebar-menu, .document-follow, .indicator) {
    color: #c3d6db;
  }
  .form-sidebar .sidebar-label,
  .form-sidebar :is(.modified-by, .created-by) :is(a, span) { color: #edf4f3; }
  .form-sidebar :is(.btn, .btn-default) {
    color: #edf4f3 !important;
    background-color: #1e4a59;
    border-color: #668995;
  }
  .form-sidebar :is(.btn, .btn-default):hover:not(:disabled) {
    color: #fff !important;
    background-color: #285b6b;
  }
  .form-sidebar .icon { color: #edf4f3; --icon-stroke: currentColor; }
  .form-sidebar :is(.icon, .es-icon) use { --icon-stroke: #c3d6db; }
  .form-sidebar :is(a, button):focus-visible { outline-color: #b8deea; }
  .layout-main-section:has(.form-layout, .report-wrapper) {
    background-color: var(--card-bg) !important;
    border-color: var(--border-color) !important;
  }
  /* Native list paging must remain reachable beside the floating assistant. */
  .list-paging-area { padding-block-end: 72px !important; }
  .form-sidebar :is(.frappe-timestamp, .text-muted, .text-extra-muted) {
    color: #c3d6db !important;
  }
  /* Native print/settings side controls share the existing navy side rail. */
  .layout-side-section {
    --text-color: #edf4f3;
    --text-muted: #c3d6db;
    --subtle-fg: #c3d6db;
    --heading-color: #fff;
    --control-bg: #1b4351;
    --disabled-control-bg: #214652;
  }

  /* Popup surfaces are separate from the navy rail's inherited text tokens. */
  :is(.body-sidebar, .form-sidebar) :is(.dropdown-menu, .popover) {
    --text-color: var(--seal-ink);
    --subtle-fg: var(--seal-muted);
    color: var(--seal-ink);
    background-color: var(--popover-bg);
  }
  :is(.body-sidebar, .form-sidebar) .dropdown-menu :is(a, .dropdown-item) {
    color: var(--seal-ink) !important;
  }
  :is(.form-layout, .page-form, .list-view-container, .modal) select option,
  :is(.form-layout, .page-form, .list-view-container, .modal) select optgroup {
    color: var(--seal-ink);
    background-color: var(--seal-surface);
  }
  :is(.form-layout, .page-form, .list-view-container, .modal) ::selection {
    color: #fff;
    background: #124471;
  }
  .awesomplete > ul > li[aria-selected="true"],
  .awesomplete > ul > li[aria-selected="true"] :is(a, mark, span),
  .awesomplete [role="option"][aria-selected="true"],
  .awesomplete [role="option"][aria-selected="true"] :is(a, mark, span) {
    color: var(--text-color);
    background-color: var(--table-row-hover-bg);
  }

  /* Compact controls must override earlier text-input rules, including the
     !important dark input rule. Preserve native check glyph/appearance. */
  :is(.form-layout, .form-sidebar, .layout-side-section, .list-view-container, .modal, .page-form)
    input:is([type="checkbox"], [type="radio"]) {
    box-sizing: border-box;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    inline-size: 18px !important;
    block-size: 18px !important;
    min-inline-size: 18px !important;
    min-block-size: 18px !important;
    max-inline-size: 18px !important;
    max-block-size: 18px !important;
    flex: 0 0 18px;
    padding: 0 !important;
    vertical-align: middle;
    border-radius: 3px !important;
    accent-color: var(--primary-color);
  }
  :is(.form-layout, .form-sidebar, .layout-side-section, .list-view-container, .modal, .page-form)
    input[type="radio"] { border-radius: 50% !important; }

  /* One row background at a time. Never paint the .grid-row wrapper: it may
     contain the editor, nested tables, header or footer. */
  :is(.form-layout, .modal) .form-grid {
    --table-border-color: var(--border-color);
    --text-muted: var(--text-color);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
  }
  :is(.form-layout, .modal) .form-grid .grid-row,
  :is(.form-layout, .modal) .form-grid .grid-row:hover {
    min-height: 0;
    background: transparent;
  }
  :is(.form-layout, .modal) .form-grid .grid-heading-row {
    height: auto;
    min-height: 42px;
    background: var(--table-header-bg);
  }
  :is(.form-layout, .modal) .form-grid .data-row {
    min-height: 44px;
    padding-block: 0;
    align-items: stretch;
    color: var(--text-color);
    background: var(--table-bg);
  }
  :is(.form-layout, .modal) .form-grid .grid-heading-row .data-row,
  :is(.form-layout, .modal) .form-grid .grid-heading-row .data-row > .col {
    min-height: 42px;
    height: auto;
    color: var(--heading-color) !important;
    background: var(--table-header-bg) !important;
    font-size: 12px;
    font-weight: 650;
  }
  :is(.form-layout, .modal) .form-grid .data-row > .col {
    box-sizing: border-box;
    height: auto;
    min-height: 44px;
    max-height: none;
    padding-block: 11px !important;
    line-height: 20px;
    background: inherit;
    border-color: var(--border-color);
  }
  :is(.form-layout, .modal) .form-grid .data-row > .row-check {
    flex: 0 0 31px;
    width: 31px;
    min-width: 31px;
    max-width: 31px;
    padding-inline: 6px !important;
  }
  :is(.form-layout, .modal) .form-grid .grid-row-check {
    margin: 0 !important;
    position: relative;
  }
  :is(.form-layout, .modal) .form-grid .data-row > .col:last-child {
    flex: 0 0 36px;
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    padding-inline: 4px !important;
  }
  :is(.form-layout, .modal) .form-grid .grid-body .data-row:hover,
  :is(.form-layout, .modal) .form-grid .grid-body .data-row:hover > .col {
    background: var(--table-row-hover-bg);
  }
  :is(.form-layout, .modal) .form-grid .grid-body .data-row:has(.grid-row-check:checked),
  :is(.form-layout, .modal) .form-grid .grid-body .data-row:has(.grid-row-check:checked) > .col {
    background: var(--seal-blue-soft);
  }
  :is(.form-layout, .modal) .form-grid .grid-body .data-row:focus-within {
    box-shadow: inset 0 0 0 2px var(--primary-color);
  }
  :is(.form-layout, .modal) .form-grid .data-row > .grid-static-col.invalid,
  :is(.form-layout, .modal) .form-grid .data-row > .grid-static-col.error {
    background: var(--seal-danger-bg);
    color: var(--seal-danger-ink);
  }
  :is(.form-layout, .modal) .form-grid .grid-body .editable-row {
    --control-bg: var(--seal-surface);
    --input-disabled-bg: var(--disabled-control-bg);
  }
  :is(.form-layout, .modal) .form-grid .grid-body .editable-row > .grid-static-col:not(.row-index) {
    padding: 0 !important;
  }
  :is(.form-layout, .modal) .form-grid .text-right,
  :is(.form-layout, .modal) .form-grid .text-right :is(.static-area, input) {
    text-align: end;
    font-variant-numeric: tabular-nums;
  }
  .form-layout .form-grid-container { overscroll-behavior-inline: contain; }
  .form-layout :is(.control-value, .like-disabled-input) {
    color: var(--text-color);
    font-size: 14px;
  }
  .form-layout .form-section > .section-head {
    color: var(--heading-color);
    font-weight: 650;
  }
  .form-layout :is(.help-box, .help-message, .control-label),
  .list-view-container .text-muted { color: var(--text-color); }
  .form-layout .form-control[readonly] { color: var(--text-color); opacity: 1; }
  .form-layout .form-grid .grid-empty { color: var(--text-color); }
  .report-wrapper .dt-cell--header,
  .report-wrapper .dt-cell--header .dt-cell__content {
    color: var(--heading-color) !important;
    background-color: var(--table-header-bg) !important;
  }
  .report-wrapper .dt-cell__content {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
  }

  /* Native icon variables: transparent is Frappe's outline default.
     .es-icon remains deliberately filled; symbol paths with explicit fills
     (e.g. hearts and close glyphs) retain those native declarations. */
  :is(.navbar, .page-head, .body-sidebar, .form-sidebar, .form-layout,
    .list-view-container, .report-wrapper, .modal) .icon:not(.es-icon) {
    --icon-fill: transparent;
  }
  :is(.navbar, .page-head, .body-sidebar, .form-sidebar, .form-layout,
    .list-view-container, .report-wrapper, .modal) .es-icon {
    fill: var(--icon-stroke);
    stroke-width: 0;
  }

  /* Finish only: no size/position transitions and no fabricated loading UI.
     Do not match Oracle or branded workspace descendants. */
  :is(.form-layout, .page-head, .page-form, .list-view-container, .report-wrapper,
    .form-sidebar, .body-sidebar, .navbar) :is(.btn, .form-control, .nav-link,
    .item-anchor, .sidebar-header, .data-row):not(:where(
      .seal-workspace *, .seal-oracle-workbench *, .seal-oracle-panel *)) {
    transition: color .16s ease, background-color .16s ease, border-color .16s ease;
  }
  :is(.form-layout, .page-head, .page-form, .list-view-container, .report-wrapper)
    .btn:active:not(:disabled) { transform: none; }
  .dropdown-menu.show:not(:where(.seal-workspace *, .seal-oracle-workbench *, .seal-oracle-panel *)) {
    animation: seal-native-menu .14s ease-out;
  }
  @keyframes seal-native-menu { from { opacity: .3; } to { opacity: 1; } }
  @media (prefers-reduced-motion: reduce) {
    :is(.form-layout, .page-head, .page-form, .list-view-container, .report-wrapper,
      .form-sidebar, .body-sidebar, .navbar) *,
    .dropdown-menu.show { transition: none !important; animation: none !important; }
  }
}


/* Journal Entry width repair. The verified page-route marker keeps this
   limited to this doctype; accounts also exists on unrelated native forms. */
.page-container[data-page-route="Journal Entry"] .std-form-layout .section-body {
  width: 100%;
  max-width: none;
  min-width: 0;
}

/* Reclaim repeated Bootstrap gutters at the accounts grid only. The native
   form-column flex-basis and grid column configuration remain untouched. */
.page-container[data-page-route="Journal Entry"]
  .form-section:has(.frappe-control[data-fieldname="accounts"] .form-grid-container)
  .section-body > .form-column {
  min-width: 0;
  padding-inline: 0;
}

/* Preserve native grid columns/editor, but keep horizontal overflow inside
   the accounts table viewport so phone users can scroll rows, not the page. */
.page-container[data-page-route="Journal Entry"]
  .frappe-control[data-fieldname="accounts"] .form-grid-container {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

/* Native saved column layouts can contain many fields. Keep a readable table
   canvas inside its bounded viewport, rather than squeezing currency values
   into narrow cells. This does not alter anyone's saved column configuration. */
.page-container[data-page-route="Journal Entry"]
  .frappe-control[data-fieldname="accounts"] .form-grid-container > .form-grid:not(:has(.grid-row-open)) {
  min-width: 1200px;
}

/* Long ledger names must be readable without widening every native column.
   Only static account labels wrap; Link inputs and the native row editor keep
   their own dimensions and editing behavior. */
.page-container[data-page-route="Journal Entry"]
  .frappe-control[data-fieldname="accounts"]
  .grid-static-col[data-fieldname="account"] .static-area,
.page-container[data-page-route="Journal Entry"]
  .frappe-control[data-fieldname="accounts"]
  .grid-static-col[data-fieldname="account"] .static-area a {
  white-space: normal;
  overflow-wrap: anywhere;
  overflow: visible;
  text-overflow: clip;
  height: auto;
  max-height: none;
}

/* Below 1400px the native record rail consumes width needed by the journal.
   Stack, rather than hide, that rail so Assign/attachments and other native
   actions remain available below the full-width primary form. */
@media (max-width: 1399px) {
  .page-container[data-page-route="Journal Entry"] .layout-main.layout-two-column {
    flex-direction: column;
  }
  .page-container[data-page-route="Journal Entry"] .layout-main-section-wrapper {
    order: 0;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: 0 0 100%;
  }
  .page-container[data-page-route="Journal Entry"] .layout-side-section {
    order: 1;
    position: static;
    inset: auto;
    align-self: stretch;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-width: 0;
    height: auto;
    min-height: 0;
    max-height: none;
    flex: 0 0 auto;
  }
  .page-container[data-page-route="Journal Entry"] .layout-side-section .form-sidebar {
    position: static;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }
}
