/* ==========================================================================
   Madhumita ERP — shared application skin.
   Loaded last on every page (see class.atkpage.inc), so it owns the cascade.
   The final light-workspace section below owns the current palette.
   ========================================================================== */

:root {
  --erp-bg: #0e151e; /* page background            */
  --erp-surface: #161f2b; /* header, nav, cards, panels */
  --erp-surface-2: #1e2a38; /* inputs, table heads, hover */
  --erp-surface-3: #263444; /* raised / active           */
  --erp-ink: #e7eef5; /* primary text              */
  --erp-ink-soft: #c4d0dc;
  --erp-muted: #8fa0b2; /* secondary text            */
  --erp-line: #2b3849; /* borders                   */
  --erp-line-soft: rgba(255, 255, 255, 0.06);
  --erp-accent: #28c7b9; /* teal accent               */
  --erp-accent-strong: #1aa89b;
  --erp-accent-weak: rgba(40, 199, 185, 0.15);
  --erp-on-accent: #042722; /* text on accent            */
  --erp-danger: #ff6b6b;
  --erp-radius: 14px;
  --erp-radius-sm: 9px;
  --erp-shadow: 0 14px 38px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

html {
  background: var(--erp-bg);
}
body {
  margin: 0;
  background: var(--erp-bg);
  color: var(--erp-ink);
  font: 14px/1.55 sans-serif;
  -webkit-font-smoothing: antialiased;
  text-transform: capitalize !important;
}
html,
body,
body * {
  font-family: sans-serif !important;
}
* {
  scrollbar-color: var(--erp-surface-3) transparent;
}
::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}
::-webkit-scrollbar-thumb {
  background: var(--erp-surface-3);
  border-radius: 8px;
  border: 2px solid var(--erp-bg);
}
::-webkit-scrollbar-thumb:hover {
  background: #33475c;
}
::selection {
  background: var(--erp-accent-weak);
  color: #fff;
}

h1,
h2,
h3,
h4,
h5 {
  color: var(--erp-ink);
}
hr {
  border: 0;
  border-top: 1px solid var(--erp-line);
}

input,
select,
textarea,
button {
  font: inherit;
  color: var(--erp-ink);
}
a:link,
a:visited,
a:active {
  color: #43d6c9;
  font-size: inherit;
  text-decoration: none;
}
a:hover {
  color: #7ee7dc;
  font-size: inherit;
  text-decoration: underline;
}
:focus-visible {
  outline: 2px solid var(--erp-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- form controls -------------------------------------------------------- */
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not(
    [type="submit"]
  ):not([type="button"]):not([type="image"]),
select,
textarea,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"] {
  box-sizing: border-box;
  max-width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--erp-line);
  border-radius: var(--erp-radius-sm);
  background: var(--erp-surface-2);
  color: var(--erp-ink);
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    background 0.15s;
}
input::placeholder,
textarea::placeholder {
  color: #6b7c8e;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--erp-accent);
  box-shadow: 0 0 0 3px var(--erp-accent-weak);
  background: var(--erp-surface-3);
}
select option {
  background: var(--erp-surface-2);
  color: var(--erp-ink);
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--erp-accent);
  width: 16px;
  height: 16px;
}

/* --- buttons -------------------------------------------------------------- */
input.button,
input[type="submit"],
input[type="button"],
button.button,
input.btn,
input.btn_save,
input.btn_saveandclose,
input.btn_saveandcontinue,
input.btn_saveandnext,
input.atkdefaultbutton {
  height: auto;
  min-height: 38px;
  padding: 9px 18px;
  background: var(--erp-accent);
  border: 1px solid var(--erp-accent);
  border-radius: var(--erp-radius-sm);
  color: var(--erp-on-accent);
  cursor: pointer;
  font-weight: 650;
  font-size: 13px;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 16px rgba(40, 199, 185, 0.2);
  transition:
    transform 0.08s,
    background 0.15s,
    box-shadow 0.15s;
}
input.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
button.button:hover,
input.btn:hover,
input.btn_save:hover,
input.btn_saveandclose:hover,
input.atkdefaultbutton:hover {
  background: #3ad7c9;
}
input.button:active,
input[type="submit"]:active,
button.button:active {
  transform: translateY(1px);
}
input.btn_cancel {
  background: transparent;
  border: 1px solid var(--erp-line);
  color: var(--erp-ink-soft);
  box-shadow: none;
}
input.btn_cancel:hover {
  background: var(--erp-surface-2);
  border-color: var(--erp-surface-3);
}
input:disabled,
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* --- header --------------------------------------------------------------- */
#banner {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  height: auto;
  min-height: 82px;
  padding: 18px 30px;
  background: var(--erp-surface);
  background-image: none;
  border-bottom: 1px solid var(--erp-line);
  z-index: 60;
}
a.erp-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--erp-ink);
  font-size: 20px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
a.erp-brand:hover {
  text-decoration: none;
}
.erp-brand > span:last-child {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--erp-muted);
}
.erp-monogram {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--erp-accent), #1a9f93);
  color: var(--erp-on-accent);
  font-size: 22px;
  box-shadow: 0 6px 16px rgba(40, 199, 185, 0.3);
}
#topLinks {
  position: static;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  height: auto;
  color: var(--erp-muted);
  font-size: 12px;
}
#top-center {
  display: flex;
  gap: 14px;
}
#top-center a {
  color: var(--erp-ink-soft);
}
#top-username {
  font-weight: 600;
  color: var(--erp-ink);
}
.erp-signout {
  border: 1px solid var(--erp-line);
  border-radius: 7px;
  padding: 7px 13px;
  color: var(--erp-ink-soft) !important;
}
.erp-signout:hover {
  background: var(--erp-surface-2);
  text-decoration: none !important;
  border-color: var(--erp-surface-3);
}
#banner input {
  height: auto;
  font-size: 13px;
}

/* --- nav / dropdown menu -------------------------------------------------- */
#nav {
  position: relative;
  top: auto;
  left: auto;
  display: flow-root;
  height: auto;
  min-height: 46px;
  padding: 6px 24px;
  margin: 0;
  width: auto;
  background: var(--erp-surface);
  border-bottom: 1px solid var(--erp-line);
  z-index: 50;
  font: 13px/1.5 inherit;
}
#nav ul li {
  background: transparent;
  margin: 0 3px 0 0;
}
#nav ul li a {
  box-sizing: border-box;
  height: auto;
  padding: 10px 14px;
  border-radius: 8px;
  background: transparent;
  color: var(--erp-ink-soft);
  font-size: 13px;
  font-weight: 500;
}
#nav ul li:hover > a,
#nav ul li:focus-within > a,
#nav ul li a:hover {
  background: var(--erp-accent-weak);
  color: #7ee7dc;
  text-decoration: none;
}
#nav ul ul {
  top: 100%;
  width: 230px;
  padding: 7px;
  background: var(--erp-surface-2);
  border: 1px solid var(--erp-line);
  border-radius: 12px;
  box-shadow: var(--erp-shadow);
}
#nav ul li:hover > ul,
#nav ul li:focus-within > ul {
  display: block;
  top: 100%;
  left: 0;
}
#nav ul ul li {
  float: none;
  width: 100%;
  margin: 0;
}
#nav ul ul li a {
  float: none;
  display: block;
  width: 100%;
  border: 0;
  padding: 10px 12px;
  color: var(--erp-ink-soft);
}
#nav ul ul li:hover > ul,
#nav ul ul li:focus-within > ul {
  left: 100%;
  top: 0;
}
#nav li.separator div {
  width: 100%;
  border-bottom: 1px solid var(--erp-line);
  margin: 5px 0;
}

/* --- workspace / sidebar -------------------------------------------------- */
.erp-workspace {
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  gap: 22px;
  width: 100%;
  padding: 26px 30px;
}
.erp-workspace-content {
  flex: 1;
  min-width: 0;
}
.erp-sidebar {
  flex: 0 0 220px;
}
.erp-side-card {
  padding: 18px;
  margin-bottom: 18px;
  background: var(--erp-surface);
  border: 1px solid var(--erp-line);
  border-radius: var(--erp-radius);
  color: var(--erp-ink);
  text-align: center;
}
.erp-side-card img {
  max-width: 100%;
  border-radius: 10px;
}
.erp-side-card:empty {
  display: none;
}

/* --- panels / cards ------------------------------------------------------- */
.erp-panel,
.panel {
  box-sizing: border-box;
  float: none;
  margin: 0 0 22px;
  width: 100%;
  border: 1px solid var(--erp-line);
  border-radius: var(--erp-radius);
  background: var(--erp-surface);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.erp-panel .panelTitle,
.panelTitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: auto;
  min-height: 58px;
  padding: 0 22px;
  border-bottom: 1px solid var(--erp-line);
  background: transparent;
}
.erp-panel .panelTitleText,
.panelTitleText {
  float: none;
  background: none;
  color: var(--erp-ink);
  padding: 0;
  margin: 0;
  height: auto;
  font: 650 18px/1.4 sans-serif;
}
.erp-panel .panelContent,
.panelContent {
  border: 0;
  background: transparent;
}
.erp-panel .panelContent2,
.panelContent2 {
  padding: 22px;
  overflow-x: auto;
  background: transparent;
  color: var(--erp-ink);
}
.actionpageWrapper {
  width: 100%;
}

/* --- field labels --------------------------------------------------------- */
.fieldlabel,
.field {
  font-family: inherit;
  font-size: 13px;
  color: var(--erp-ink);
}
.fieldlabel {
  font-weight: 600 !important;
  color: var(--erp-ink) !important;
}

/* --- tabs ----------------------------------------------------------------- */
.tabsTabs,
.mainTabs {
  border: 0;
}
.tabsTabs td,
.mainTabs td {
  border: 0;
}
td.passivetab,
td.activetab,
.tab,
.tab_selected {
  border-radius: 9px 9px 0 0;
}
td.passivetab a,
.tab a {
  display: inline-block;
  padding: 9px 16px;
  color: var(--erp-muted);
  background: var(--erp-surface-2);
  border: 1px solid var(--erp-line);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  font-weight: 600;
}
td.activetab a,
.tab_selected a {
  display: inline-block;
  padding: 9px 16px;
  color: var(--erp-on-accent);
  background: var(--erp-accent);
  border: 1px solid var(--erp-accent);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  font-weight: 650;
  text-decoration: none;
}
td.passivetab a:hover {
  color: var(--erp-ink);
  background: var(--erp-surface-3);
  text-decoration: none;
}
.tabsContent {
  background: var(--erp-surface);
  border: 1px solid var(--erp-line);
  border-radius: 0 12px 12px 12px;
}
.tabsContent td {
  color: var(--erp-ink);
}

/* --- record lists --------------------------------------------------------- */
table.recordList {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
}
table.recordList th,
table.recordList td {
  border: 0;
  border-bottom: 1px solid var(--erp-line);
  padding: 11px 12px !important;
  text-align: left;
  color: var(--erp-ink);
}
table.recordList th {
  background: var(--erp-surface-2);
  color: var(--erp-muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
table.recordList th,
table.recordList td,
table.recordList a {
  font-family: inherit;
}
table.recordList .row1 {
  background: var(--erp-surface);
}
table.recordList .row2 {
  background: #141d28;
}
table.recordList tr:hover td {
  background: var(--erp-accent-weak);
}
.atkdatagrid-container > table,
.recordListContainer {
  width: 100%;
}
.recordList th a:link,
.recordList th a:visited {
  color: var(--erp-muted);
  text-decoration: none;
}
.recordList th.recordListSearch {
  background: var(--erp-surface-3);
}
.recordList th.recordListSearch a {
  color: #43d6c9;
}
.recordList td {
  font-size: 13px;
}
.recordList th {
  font-size: 12px;
}

/* --- legacy document / line-item tables (inline #749ABE) ------------------ */
table[style*="749ABE"],
table[style*="749abe"],
td[style*="749ABE"],
td[style*="749abe"],
[style*="#749ABE"],
[style*="#749abe"] {
  background: var(--erp-surface-3) !important;
  background-color: var(--erp-surface-3) !important;
  color: var(--erp-ink) !important;
  border-color: var(--erp-line) !important;
}
table[style*="749ABE"] a,
td[style*="749ABE"] a {
  color: #7ee7dc !important;
}
/* legacy inline dashed/dotted boxes (customer/date panels on documents) */
[style*="dashed"],
[style*="dotted"] {
  border-color: var(--erp-line) !important;
}
/* neutralise stray hardcoded light backgrounds so nothing flashes white */
[bgcolor="#FFFFFF"],
[bgcolor="#ffffff"],
[bgcolor="white"] {
  background-color: transparent !important;
}

/* --- messages / alerts / errors ------------------------------------------ */
.atkmessages {
  margin: 20px 30px 0;
  background: none;
  font: inherit;
}
.atkmessages_general,
.atkmessages_success,
.atkmessages_failure,
.erp-alert {
  padding: 12px 16px;
  border-radius: 9px;
  margin: 0 0 12px;
  border: 1px solid transparent;
}
.atkmessages_general {
  background: rgba(64, 120, 180, 0.15);
  color: #9cc4f0;
  border-color: rgba(64, 120, 180, 0.35);
}
.atkmessages_success {
  background: rgba(40, 180, 120, 0.15);
  color: #7ee0a8;
  border-color: rgba(40, 180, 120, 0.35);
}
.atkmessages_failure,
.erp-alert {
  background: rgba(255, 90, 80, 0.13);
  color: #ff9c94;
  border-color: rgba(255, 90, 80, 0.32);
}
.error,
.errorlabel {
  color: var(--erp-danger) !important;
}

/* --- dialogs -------------------------------------------------------------- */
.atkdialog .content {
  background: var(--erp-surface) !important;
  color: var(--erp-ink) !important;
  border: 1px solid var(--erp-line);
  border-radius: var(--erp-radius);
  box-shadow: var(--erp-shadow);
}
.atkdialog .buttons {
  background: transparent;
}

/* --- login ---------------------------------------------------------------- */
.erp-login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--erp-bg);
}
.erp-login-story {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 10%;
  color: #fff;
  background:
    radial-gradient(ellipse at 100% 100%, #1a9f93 0, transparent 60%),
    radial-gradient(ellipse at 0 0, #16324a 0, transparent 55%), #0b1520;
}
.erp-login-story .erp-brand {
  color: #fff;
}
.erp-login-story .erp-monogram {
  background: #ffffff26;
  box-shadow: none;
}
.erp-story-copy {
  padding: 65px 0;
  max-width: 470px;
}
.erp-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: var(--erp-accent);
  margin: 0 0 18px;
}
.erp-login-story .erp-eyebrow {
  color: #8fe6da;
}
.erp-story-copy h1 {
  font-size: clamp(32px, 3.5vw, 54px);
  line-height: 1.12;
  letter-spacing: -1.8px;
  font-weight: 650;
  margin: 0 0 26px;
  color: #fff;
}
.erp-story-copy > p:not(.erp-eyebrow) {
  max-width: 370px;
  font-size: 16px;
  color: #bcd4dc;
  line-height: 1.8;
}
.erp-feature-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding-top: 20px;
  color: #cfe6ea;
  font-size: 13px;
}
.erp-feature-list span:before {
  content: "\2713";
  display: inline-block;
  margin-right: 12px;
  color: #8fe6da;
}
.erp-story-footer {
  color: #93b3bd;
  font-size: 12px;
}
.erp-login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 30px;
  background: var(--erp-surface);
}
.erp-login #loginform,
.erp-login #loginform form {
  box-sizing: border-box;
  background: transparent;
  border: 0;
  padding: 0;
  width: 100%;
  max-width: 380px;
  margin: auto 0;
  float: none;
}
.erp-login h2 {
  font-size: 27px;
  line-height: 1.3;
  letter-spacing: -0.7px;
  margin: 0 0 10px;
  color: var(--erp-ink);
}
.erp-muted {
  color: var(--erp-muted);
  margin: 0 0 32px;
}
.erp-login-field {
  margin: 0 0 20px;
}
.erp-login-field label {
  display: block;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--erp-ink);
}
.erp-login-field input,
.erp-login-field select {
  width: 100%;
  min-height: 46px !important;
}
.erp-login .erp-signin {
  width: 100%;
  min-height: 46px;
  margin-top: 6px;
}
.erp-login .erp-secondary {
  margin-top: 12px;
  width: 100%;
  background: transparent;
  color: var(--erp-accent);
  border: 1px solid var(--erp-line);
  box-shadow: none;
}
.erp-login-help {
  font-size: 12px;
  color: var(--erp-muted);
  text-align: center;
  margin-top: 24px;
}
.erp-login-footer {
  padding-top: 40px;
  color: var(--erp-muted);
  font-size: 11px;
  text-align: center;
}

/* --- dashboard shortcuts -------------------------------------------------- */
.erp-action-footer {
  padding: 8px 0 24px;
  color: var(--erp-muted);
  text-align: center;
}
.erp-dashboard-heading {
  padding: 6px 0 28px;
}
.erp-dashboard-heading h1 {
  font-size: 30px;
  letter-spacing: -0.8px;
  line-height: 1.25;
  margin: 0 0 10px;
}
.erp-dashboard-heading > p:last-child {
  color: var(--erp-muted);
  margin: 0;
}
.erp-dashboard-heading .erp-eyebrow {
  margin-bottom: 10px;
}
.erp-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
a.erp-shortcut {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  padding: 22px;
  border: 1px solid var(--erp-line);
  border-radius: 12px;
  color: var(--erp-ink);
  background: var(--erp-surface);
  text-decoration: none;
  transition:
    box-shadow 0.15s,
    border-color 0.15s,
    transform 0.1s;
}
a.erp-shortcut:hover {
  border-color: var(--erp-accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
  text-decoration: none;
}
.erp-shortcut-icon {
  display: grid;
  place-items: center;
  height: 40px;
  width: 40px;
  border-radius: 10px;
  background: var(--erp-accent-weak);
  color: var(--erp-accent);
  font-size: 23px;
  margin-bottom: 12px;
}
.erp-icon-sales {
  background: rgba(70, 110, 174, 0.2);
  color: #7aa5e0;
}
.erp-icon-people {
  background: rgba(120, 83, 165, 0.2);
  color: #b592e0;
}
.erp-icon-finance {
  background: rgba(164, 103, 19, 0.2);
  color: #e0b070;
}
.erp-shortcut-label {
  font-weight: 650;
  font-size: 14px;
}
.erp-shortcut-description {
  color: var(--erp-muted);
  font-size: 12px;
  line-height: 1.6;
}
.erp-shortcut-arrow {
  position: absolute;
  top: 22px;
  right: 20px;
  color: var(--erp-muted);
}

.erp-top-search {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
}
.erp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- responsive ----------------------------------------------------------- */
@media (max-width: 1150px) {
  .erp-shortcuts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  #banner {
    padding: 16px 20px;
    flex-wrap: wrap;
    gap: 14px;
  }
  #topLinks {
    justify-content: flex-start;
  }
  #nav {
    padding: 5px 10px;
  }
  .erp-workspace {
    padding: 20px;
    flex-direction: column;
  }
  .erp-sidebar {
    flex: auto;
    width: 100%;
  }
  .erp-workspace-content {
    width: 100%;
  }
  .erp-login-story {
    padding: 35px 9%;
  }
  .erp-story-copy h1 {
    font-size: 36px;
  }
}
@media (max-width: 760px) {
  .erp-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  a.erp-shortcut {
    padding: 18px;
  }
}
@media (max-width: 620px) {
  .erp-login {
    grid-template-columns: 1fr;
  }
  .erp-login-story {
    padding: 24px;
  }
  .erp-story-copy {
    padding: 30px 0 0;
  }
  .erp-story-copy h1 {
    font-size: 32px;
  }
  .erp-story-copy > p:not(.erp-eyebrow),
  .erp-feature-list,
  .erp-story-footer {
    display: none;
  }
  .erp-login-panel {
    padding: 35px 24px;
  }
  .erp-login h2 {
    font-size: 24px;
  }
  .erp-panel .panelContent2 {
    padding: 14px;
  }
  .erp-workspace {
    padding: 14px;
  }
  #top-center {
    flex-wrap: wrap;
  }
  #nav ul li a {
    padding: 10px;
  }
}
@media (max-width: 420px) {
  .erp-shortcuts {
    grid-template-columns: 1fr;
  }
  .erp-dashboard-heading h1 {
    font-size: 25px;
  }
}

/* --- usability-first light workspace ------------------------------------- */
:root {
  --erp-bg: #f3f6fa;
  --erp-surface: #ffffff;
  --erp-surface-2: #f7f9fc;
  --erp-surface-3: #e8eef5;
  --erp-ink: #172033;
  --erp-ink-soft: #334155;
  --erp-muted: #64748b;
  --erp-line: #d7e0ea;
  --erp-line-soft: #edf1f5;
  --erp-accent: #0f766e;
  --erp-accent-strong: #0b5f59;
  --erp-accent-weak: #dff5f1;
  --erp-on-accent: #ffffff;
  --erp-danger: #c62828;
  --erp-shadow: 0 14px 34px rgba(31, 50, 75, 0.1);
  color-scheme: light;
}

html,
body {
  background: var(--erp-bg);
  color: var(--erp-ink);
}
body {
  font-size: 15px;
  line-height: 1.5;
}
* {
  scrollbar-color: #b8c5d3 transparent;
}
::-webkit-scrollbar-thumb {
  background: #b8c5d3;
  border-color: var(--erp-bg);
}
::selection {
  background: #b9ebe4;
  color: #102a2a;
}
a:link,
a:visited,
a:active {
  color: var(--erp-accent);
}
a:hover {
  color: var(--erp-accent-strong);
}

input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not(
    [type="submit"]
  ):not([type="button"]):not([type="image"]),
select,
textarea,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"] {
  min-height: 42px;
  padding: 9px 12px;
  background: #fff;
  color: var(--erp-ink);
  border-color: #c9d4df;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
input::placeholder,
textarea::placeholder {
  color: #94a3b8;
}
input:focus,
select:focus,
textarea:focus {
  background: #fff;
  border-color: var(--erp-accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.13);
}
select option {
  background: #fff;
  color: var(--erp-ink);
}

input.button,
input[type="submit"],
input[type="button"],
button.button,
input.btn,
input.btn_save,
input.btn_saveandclose,
input.btn_saveandcontinue,
input.btn_saveandnext,
input.atkdefaultbutton {
  min-height: 42px;
  padding: 10px 18px;
  background: var(--erp-accent);
  border-color: var(--erp-accent);
  color: #fff;
  box-shadow: 0 5px 14px rgba(15, 118, 110, 0.18);
}
input.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
button.button:hover,
input.btn:hover,
input.btn_save:hover,
input.btn_saveandclose:hover,
input.atkdefaultbutton:hover {
  background: var(--erp-accent-strong);
}
input.btn_cancel {
  background: #fff;
  border-color: #cbd5e1;
  color: var(--erp-ink-soft);
}
input.btn_cancel:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

#banner {
  position: sticky;
  top: 0;
  min-height: 68px;
  padding: 12px 28px;
  background: #fff;
  border-bottom: 1px solid var(--erp-line);
  box-shadow: 0 2px 10px rgba(31, 50, 75, 0.05);
  z-index: 70;
}
a.erp-brand {
  color: var(--erp-ink);
  font-size: 19px;
}
.erp-monogram {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  color: #fff;
  box-shadow: 0 5px 14px rgba(15, 118, 110, 0.22);
}
#topLinks {
  color: var(--erp-muted);
  gap: 14px;
  font-size: 13px;
}
#top-center a {
  color: var(--erp-muted);
}
#top-username {
  color: var(--erp-ink);
  padding: 7px 2px;
}
.erp-signout {
  background: #fff;
  border-color: #cbd5e1;
  color: var(--erp-ink-soft) !important;
  padding: 8px 14px;
}
.erp-signout:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.erp-top-search input {
  width: 190px;
}

#nav {
  position: sticky;
  top: 68px;
  min-height: 48px;
  padding: 5px 26px;
  background: #fff;
  border-bottom: 1px solid var(--erp-line);
  box-shadow: 0 3px 10px rgba(31, 50, 75, 0.035);
  z-index: 60;
}
#nav ul li {
  background: transparent !important;
}
#nav ul li a {
  padding: 10px 14px;
  color: var(--erp-ink-soft);
  font-size: 14px;
  font-weight: 600;
  background: transparent !important;
}
#nav ul li:hover > a,
#nav ul li:focus-within > a,
#nav ul li a:hover {
  background: var(--erp-accent-weak) !important;
  color: var(--erp-accent-strong) !important;
}
#nav ul ul {
  width: 240px;
  padding: 8px;
  background: #fff;
  border-color: var(--erp-line);
  box-shadow: 0 18px 40px rgba(31, 50, 75, 0.16);
}
#nav ul ul ul {
  width: 200px;
}
#nav ul ul li,
#nav ul ul li a {
  width: 100% !important;
  height: auto !important;
  float: none !important;
}
#nav ul ul li a {
  box-sizing: border-box;
  padding: 10px 12px !important;
  background: #fff !important;
  color: var(--erp-ink-soft) !important;
  border: 0 !important;
  border-radius: 7px;
  font-weight: bold;
  font-size: 14px;
}
#nav ul ul li a:hover {
  background: var(--erp-accent-weak) !important;
  color: var(--erp-accent-strong) !important;
}

.erp-workspace {
  gap: 18px;
  padding: 22px 26px 32px;
}
.erp-sidebar {
  flex-basis: 190px;
  position: sticky;
  top: 138px;
}
.erp-side-card {
  padding: 15px;
  margin-bottom: 14px;
  background: #fff;
  border-color: var(--erp-line);
  box-shadow: 0 5px 18px rgba(31, 50, 75, 0.05);
}
.erp-side-card img {
  width: auto !important;
  max-width: 94px !important;
  max-height: 94px;
  object-fit: contain;
}

.erp-panel,
.panel {
  margin-bottom: 18px;
  background: #fff;
  border-color: var(--erp-line);
  box-shadow: 0 8px 24px rgba(31, 50, 75, 0.07);
}
.erp-panel .panelTitle,
.panelTitle {
  min-height: 56px;
  padding: 0 24px;
  background: #fff;
  border-color: var(--erp-line);
}
.erp-panel .panelTitleText,
.panelTitleText {
  color: var(--erp-ink);
  font-size: 19px;
}
.erp-panel .panelContent2,
.panelContent2 {
  padding: 24px 26px 28px;
  background: #fff;
  color: var(--erp-ink);
}
.panelContent2 > table,
.panelContent2 > form,
.panelContent2 > form > table {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.fieldlabel,
.field {
  color: var(--erp-ink);
  font-size: 14px;
}
.fieldlabel {
  color: var(--erp-ink-soft) !important;
  padding: 8px 12px 8px 0 !important;
}
#editform {
  width: 100%;
  max-width: none;
  border-collapse: separate;
  border-spacing: 0 7px;
}
#editform td.field {
  padding: 4px 0 4px 10px;
}
#editform > tbody > tr > td:first-child {
  width: 100%;
}
#editform > tbody > tr > td > table,
#editform td.field > table {
  width: 100% !important;
}

/* Keep ticket customer and date panels balanced across the full-width form. */
#editform td[id$="_group_top"].field > table {
  table-layout: fixed;
}
#editform
  td[id$="_group_top"].field
  > table
  > tbody
  > tr:first-child
  > td:first-child {
  width: 60%;
  padding-right: 18px;
}
#editform
  td[id$="_group_top"].field
  > table
  > tbody
  > tr:first-child
  > td:last-child {
  width: 40%;
  padding-left: 18px;
}
#editform
  td[id$="_group_top"].field
  > table
  > tbody
  > tr:first-child
  > td
  > table {
  width: 100%;
}
#editform
  td[id$="_group_top"].field
  > table
  > tbody
  > tr:first-child
  > td:first-child
  input[type="text"] {
  width: 70% !important;
}
#editform
  td[id$="_group_top"].field
  > table
  > tbody
  > tr:first-child
  > td:last-child
  > table {
  table-layout: fixed;
}
#editform
  td[id$="_group_top"].field
  > table
  > tbody
  > tr:first-child
  > td:last-child
  > table
  td:first-child {
  width: 36%;
  padding-right: 10px;
  white-space: nowrap;
  text-align: left !important;
}
#editform
  td[id$="_group_top"].field
  > table
  > tbody
  > tr:first-child
  > td:last-child
  > table
  td:last-child {
  width: 64%;
  text-align: left;
}
#editform td[id$="_group_top"].field select.atkdateattribute:nth-of-type(1) {
  width: 22%;
}
#editform td[id$="_group_top"].field select.atkdateattribute:nth-of-type(2) {
  width: 46%;
  margin-left: 3%;
}
#editform td[id$="_group_top"].field select.atkdateattribute:nth-of-type(3) {
  width: 26%;
  margin-left: 3%;
}

table.recordList {
  background: #fff;
  border: 1px solid var(--erp-line);
  border-radius: 10px;
  overflow: hidden;
}
table.recordList th,
table.recordList td {
  padding: 12px 14px !important;
  color: var(--erp-ink-soft);
  border-bottom-color: #e7edf3;
}
table.recordList th {
  background: #edf3f8;
  color: #42526a;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.025em;
}
table.recordList .row1,
table.recordList .row2 {
  background: #fff;
}
table.recordList tr:nth-child(even) td {
  background: #fafbfd;
}
table.recordList tr:hover td {
  background: #eaf7f4 !important;
}
.recordList th.recordListSearch {
  background: #f6f8fb;
}
.recordList th.recordListSearch input,
.recordList th.recordListSearch select {
  width: 100%;
  min-width: 110px;
  min-height: 40px;
}
.recordList td {
  font-size: 14px;
}
.recordList td img {
  min-width: 18px;
  min-height: 18px;
  padding: 5px;
  border-radius: 6px;
  background: #edf3f8;
  vertical-align: middle;
}
.atk-action-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #e6f3f1;
  color: var(--erp-accent);
  vertical-align: middle;
  font: 700 17px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.atk-action-icon:hover { background: #ccebe6; }
.atk-icon-add::before { content: "+"; }
.atk-icon-select::before { content: "⌕"; }
.atk-icon-edit::before { content: "✎"; }
.required-mark { color: #c62828; font-weight: 800; margin-left: 4px; }
.atkdatagrid-container > table,
.recordListContainer {
  width: 100%;
}
.recordListContainer > tbody > tr:first-child > td {
  padding-bottom: 12px;
  color: var(--erp-muted);
}

/* Keep relation controls on one line; the legacy GIF controls used to wrap
   the add button below the item field on narrow document columns. */
.atk-relation-control {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  vertical-align: middle;
}
.atkmanytoonerelation_search {
  width: auto !important;
  flex: 1 1 auto;
  min-width: 110px;
  vertical-align: middle;
}
.atk-relation-control a {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 3px;
  white-space: nowrap;
}
.atk-relation-spinner { display: none; }

.ticket-top-group {
  width: 100% !important;
  max-width: none !important;
  table-layout: fixed;
}
.ticket-document-layout {
  width: 100% !important;
  table-layout: fixed;
}
.ticket-document-layout > tbody > tr > td {
  width: 100%;
}
.ticket-top-group > tbody > tr > .ticket-party-cell {
  width: 60%;
  padding-right: 20px;
}
.ticket-top-group > tbody > tr > .ticket-dates-cell {
  width: 40%;
  padding-left: 20px;
}
.ticket-top-group .ticket-party-cell > table,
.ticket-top-group .ticket-dates-cell > table {
  box-sizing: border-box;
  width: 100% !important;
  min-height: 176px;
}
.ticket-top-group .ticket-party-cell .atk-relation-control {
  max-width: 620px;
}

/* The customer/vendor and date summary boxes share a row on documents. */
.panelContent2 > table:first-of-type > tbody > tr > td,
.panelContent2 > form > table:first-of-type > tbody > tr > td {
  vertical-align: top;
}

/* Legacy sales and purchase documents use inline fixed-width tables. */
.panelContent2 table[width="762"],
.panelContent2 table[width="760"] {
  width: 100% !important;
  max-width: 1050px;
}
table[style*="749ABE"],
table[style*="749abe"],
td[style*="749ABE"],
td[style*="749abe"],
[style*="#749ABE"],
[style*="#749abe"] {
  background: #e6efef !important;
  background-color: #e6efef !important;
  color: var(--erp-ink) !important;
  border-color: #c5d6d4 !important;
}
table[style*="749ABE"] a,
td[style*="749ABE"] a {
  color: var(--erp-accent-strong) !important;
}
[style*="dashed"],
[style*="dotted"] {
  border-color: #cbd5e1 !important;
  border-style: solid !important;
  border-radius: 10px;
}
[bgcolor="#FFFFFF"],
[bgcolor="#ffffff"],
[bgcolor="white"] {
  background-color: #fff !important;
}
.panelContent2 table input[type="text"],
.panelContent2 table select {
  min-height: 42px;
}

.tabsContent {
  background: #fff;
  border-color: var(--erp-line);
}
td.passivetab a,
.tab a {
  color: var(--erp-muted);
  background: #edf2f7;
  border-color: var(--erp-line);
}
td.activetab a,
.tab_selected a {
  color: #fff;
  background: var(--erp-accent);
  border-color: var(--erp-accent);
}
.atkdialog .content {
  background: #fff !important;
  color: var(--erp-ink) !important;
  box-shadow: var(--erp-shadow);
}
.atkmessages_general {
  background: #eaf3ff;
  color: #24578c;
  border-color: #bdd7f0;
}
.atkmessages_success {
  background: #e7f7ee;
  color: #216e43;
  border-color: #b9e4ca;
}
.atkmessages_failure,
.erp-alert {
  background: #fff0ef;
  color: #a52a22;
  border-color: #efc4c0;
}

.erp-dashboard-heading {
  padding: 2px 0 22px;
}
.erp-dashboard-heading h1 {
  color: var(--erp-ink);
  font-size: 28px;
}
.erp-shortcuts {
  gap: 14px;
}
a.erp-shortcut {
  min-height: 112px;
  padding: 19px;
  background: #fff;
  border-color: var(--erp-line);
  color: var(--erp-ink);
  box-shadow: 0 4px 14px rgba(31, 50, 75, 0.04);
}
a.erp-shortcut:hover {
  border-color: #82c9c1;
  background: #fbfefd;
  box-shadow: 0 10px 24px rgba(31, 50, 75, 0.1);
}
.erp-shortcut-icon {
  margin-bottom: 5px;
  background: #e3f5f2;
  color: var(--erp-accent);
}
.erp-icon-sales {
  background: #e8f0fb;
  color: #356ca5;
}
.erp-icon-people {
  background: #f0eafb;
  color: #7650a6;
}
.erp-icon-finance {
  background: #fff2dc;
  color: #9a5d0a;
}
.erp-shortcut-label {
  color: var(--erp-ink);
  font-size: 15px;
}
.erp-shortcut-description,
.erp-shortcut-arrow {
  color: var(--erp-muted);
}

/* ==========================================================================
   Targeted UI fixes — see class.atkdropdownmenu.inc, steelblue/styles/tabs.css
   & recordlist.css, and ticket_base drawTopGroup/drawHeader for the sources.
   ========================================================================== */

/* [1] Dropdown menu spacing. atkDropdownMenu appends a <br> after every item
   (config menu_delimiter="<br>"), which doubled each row's height. Drop it. */
#nav br {
  display: none;
}
#nav ul li a {
  line-height: 1.4;
}

/* [2] Tab strip. steelblue/tabs.css paints each tab cell with a fixed 142px
   gif (subtabon/subtaboff) that showed through the new pills. Neutralise the
   cells so the anchor pills hug their labels and sit flush on the content. */
.tabsTabs,
.mainTabs,
.tabbedPane .tabsTabs {
  background: none !important;
}
.mainTabs {
  margin: 0 !important;
}
td.activetab,
td.passivetab,
.tab,
.tab_selected {
  width: auto !important;
  height: auto !important;
  padding: 0 5px 0 0 !important;
  background: none !important;
  text-align: left !important;
}
td.activetab a,
td.passivetab a,
.tab a,
.tab_selected a,
.tabbedPane .tabsTabs .activetab a,
.tabbedPane .tabsTabs .passivetab a {
  display: inline-block !important;
  height: auto !important;
  font-size: 14px !important;
}
.tabsContent {
  border-top-left-radius: 0;
  margin-top: -1px;
}

/* [3] Sales/purchase documents (invoice, quote, PO, credit note, receipt) are
   built from fixed-width tables. Let them span the full workspace width. */
.panelContent2 table[width="762"],
.panelContent2 table[width="760"] {
  max-width: none !important;
}
.panelContent2 table[style*="749ABE"],
.panelContent2 table[style*="749abe"] {
  width: 100% !important;
  table-layout: fixed;
}
.panelContent2 table[style*="749ABE"] th,
.panelContent2 table[style*="749ABE"] td,
.panelContent2 table[style*="749abe"] th,
.panelContent2 table[style*="749abe"] td {
  box-sizing: border-box;
}
.panelContent2 table[style*="749ABE"] td input[type="text"],
.panelContent2 table[style*="749abe"] td input[type="text"] {
  width: 100% !important;
  min-width: 0;
}
.panelContent2 table[style*="749ABE"] td:first-child input[type="text"],
.panelContent2 table[style*="749abe"] td:first-child input[type="text"] {
  width: calc(100% - 48px) !important;
}

/* [4] Record-list headers. steelblue/recordlist.css forces white header text
   with !important, so labels vanished on the light header band. Restore it. */
table.recordList th,
.recordList th,
.recordListTh,
.recordListThFirst {
  background: #edf3f8 !important;
}
table.recordList th,
table.recordList th a,
.recordList th,
.recordList th a,
.recordListTh,
.recordListTh a,
.recordListThFirst,
.recordListThFirst a {
  color: #42526a !important;
}
.recordList th a {
  text-decoration: none !important;
  font-weight: 700 !important;
}
.recordList th a:hover {
  color: var(--erp-accent-strong) !important;
  text-decoration: underline !important;
}

@media (max-width: 1100px) {
  #banner {
    position: relative;
  }
  #nav {
    position: relative;
    top: auto;
  }
  .erp-sidebar {
    display: none;
  }
  .erp-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  #banner {
    padding: 12px 16px;
  }
  #topLinks {
    width: 100%;
  }
  #top-center {
    display: none;
  }
  #top-username {
    display: none;
  }
  .erp-top-search {
    flex: 1;
  }
  .erp-top-search input {
    width: 100%;
  }
  #nav {
    padding: 5px 8px;
    overflow: visible;
  }
  #nav > ul {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  #nav ul li {
    flex: 0 0 auto;
  }
  .erp-workspace {
    padding: 12px;
  }
  .erp-panel .panelTitle,
  .panelTitle {
    padding: 0 16px;
  }
  .erp-panel .panelContent2,
  .panelContent2 {
    padding: 16px 12px 20px;
  }
  .erp-shortcuts {
    grid-template-columns: 1fr;
  }
  table.recordList th,
  table.recordList td {
    padding: 10px !important;
  }
  .ticket-top-group,
  .ticket-top-group > tbody,
  .ticket-top-group > tbody > tr,
  .ticket-top-group > tbody > tr > td {
    display: block;
    width: 100% !important;
  }
  .ticket-top-group > tbody > tr > .ticket-party-cell,
  .ticket-top-group > tbody > tr > .ticket-dates-cell {
    padding: 0 0 12px;
  }
}

/* --- print: force light, readable documents ------------------------------- */
@media print {
  #banner,
  #nav,
  .erp-sidebar {
    display: none;
  }
  html,
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .erp-workspace,
  .erp-panel .panelContent2 {
    padding: 0;
  }
  .erp-panel,
  .panel {
    border: 0;
    box-shadow: none;
    background: #fff !important;
  }
  .erp-panel .panelContent2 {
    overflow: visible;
  }
  .panelTitleText,
  .fieldlabel,
  .field,
  td,
  th,
  p,
  h1,
  h2,
  h3 {
    color: #000 !important;
  }
  table[style*="749ABE"],
  td[style*="749ABE"] {
    background: #749abe !important;
    color: #fff !important;
  }
}
