/* ============================================================
   JTEL WEB SUITE
   Build 015
   ============================================================ */

:root {
  --bg-deep: #0f1821;
  --bg-deeper: #091018;
  --graphite: #17232e;
  --graphite-2: #223342;
  --steel: #4d6578;
  --steel-light: #7f96a8;
  --silver: #d8e0e6;
  --panel: #ffffff;
  --panel-soft: #f3f6f8;
  --text: #1d2934;
  --text-muted: #697987;
  --line: #d7e0e6;
  --jtel-red: #c92f38;
  --jtel-red-dark: #9f2028;
  --jtel-red-soft: #fae9eb;
  --success: #2c865d;
  --warning: #b87917;
  --danger: #bd2e38;
  --shadow-lg: 0 24px 70px rgba(6, 17, 27, 0.24);
  --shadow-md: 0 12px 30px rgba(14, 29, 42, 0.13);
  --shadow-sm: 0 5px 16px rgba(15, 31, 46, 0.10);
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --header-height: 78px;
  --footer-height: 34px;
  --sidebar-width: 250px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.hidden {
  display: none !important;
}

.app-shell,
.screen {
  width: 100%;
  height: 100%;
}

.screen {
  display: none;
}

.screen.is-active {
  display: flex;
}

/* ============================================================
   [module-login] START
   ============================================================ */

.screen-login {
  position: relative;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(138deg, rgba(10, 18, 26, 0.98), rgba(25, 39, 51, 0.98)),
    var(--bg-deep);
}

.login-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.login-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.17;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.login-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(4px);
}

.login-glow-one {
  width: 540px;
  height: 540px;
  left: -180px;
  top: -200px;
  background: radial-gradient(circle, rgba(201, 47, 56, 0.25), transparent 68%);
}

.login-glow-two {
  width: 700px;
  height: 700px;
  right: -290px;
  bottom: -360px;
  background: radial-gradient(circle, rgba(93, 129, 153, 0.28), transparent 67%);
}

.login-stage {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 72px;
  align-items: center;
}

.login-brand-panel {
  color: white;
  padding: 34px 18px;
}

.brand-badge {
  width: min(520px, 92%);
  min-height: 170px;
  padding: 28px 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.97), rgba(232,238,242,0.92));
  border: 1px solid rgba(255,255,255,0.74);
  border-radius: 23px;
  box-shadow:
    inset 0 1px 0 white,
    0 22px 55px rgba(0,0,0,0.22);
}

.brand-logo {
  display: block;
  width: 100%;
  max-height: 130px;
  object-fit: contain;
}

.brand-copy {
  margin-top: 34px;
  max-width: 590px;
}

.eyebrow,
.section-kicker {
  display: inline-block;
  color: var(--jtel-red);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-copy h1 {
  margin: 8px 0 12px;
  font-size: clamp(2.2rem, 4vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.brand-copy p {
  max-width: 560px;
  margin: 0;
  color: rgba(231, 239, 245, 0.78);
  font-size: 1.06rem;
  line-height: 1.75;
}

.brand-features {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 30px;
}

.feature-chip {
  min-width: 160px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 15px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  backdrop-filter: blur(7px);
}

.feature-icon {
  color: #e25a61;
  font-size: 1.15rem;
}

.feature-chip strong,
.feature-chip small {
  display: block;
}

.feature-chip strong {
  font-size: 0.85rem;
}

.feature-chip small {
  margin-top: 2px;
  color: rgba(232,239,244,0.62);
  font-size: 0.71rem;
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  justify-self: end;
  padding: 39px 38px 25px;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(255,255,255,0.99), rgba(240,245,248,0.98));
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.login-card-topline {
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, #8c1e25, #e24c54, #8c1e25);
}

.login-card-header {
  margin-bottom: 27px;
}

.login-card-header h2 {
  margin: 7px 0 7px;
  color: var(--text);
  font-size: 2rem;
  letter-spacing: -0.035em;
}

.login-card-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.91rem;
  line-height: 1.6;
}

.login-form {
  display: flex;
  flex-direction: column;
}

.field-label {
  margin: 0 0 7px;
  color: #41515f;
  font-size: 0.78rem;
  font-weight: 750;
}

.field-label:not(:first-child) {
  margin-top: 17px;
}

.field-shell {
  position: relative;
  display: flex;
  align-items: center;
  height: 52px;
  background: white;
  border: 1px solid #ccd7df;
  border-radius: 12px;
  box-shadow: inset 0 1px 2px rgba(20, 39, 54, 0.04);
  transition: 160ms ease;
}

.field-shell:focus-within {
  border-color: #718b9f;
  box-shadow:
    0 0 0 3px rgba(86, 116, 139, 0.13),
    inset 0 1px 2px rgba(20, 39, 54, 0.04);
}

.field-icon {
  width: 48px;
  color: #6f8291;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.field-shell input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 48px 0 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
}

.field-shell input::placeholder {
  color: #a1adb6;
}

.password-toggle {
  position: absolute;
  right: 8px;
  width: 38px;
  height: 38px;
  color: #71818e;
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--jtel-red);
  background: var(--jtel-red-soft);
}

.login-preferences {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 11px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5f6f7b;
  font-size: 0.77rem;
  cursor: pointer;
}

.checkbox-label input {
  accent-color: var(--jtel-red);
}

.server-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
}

.server-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.server-pill-neutral {
  color: #61717e;
  background: #edf2f5;
}

.server-pill-neutral::before {
  background: #80919e;
}

.server-pill-success {
  color: #27724f;
  background: #e4f4ec;
}

.server-pill-success::before {
  background: #2e9668;
}

.server-pill-error {
  color: #9b2931;
  background: #f9e7e9;
}

.server-pill-error::before {
  background: #bd2e38;
}

.form-message {
  min-height: 21px;
  margin-top: 2px;
  color: var(--danger);
  font-size: 0.76rem;
  line-height: 1.4;
}

.form-message.is-success {
  color: var(--success);
}

.primary-button {
  height: 52px;
  margin-top: 5px;
  padding: 0 18px 0 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  background:
    linear-gradient(180deg, #db4650 0%, #bf2832 52%, #a51f28 100%);
  border: 1px solid #9d1c24;
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.34),
    0 10px 20px rgba(181, 34, 44, 0.22);
  font-weight: 800;
  cursor: pointer;
  transition: 150ms ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.34),
    0 13px 24px rgba(181, 34, 44, 0.26);
}

.primary-button:active {
  transform: translateY(1px);
}

.primary-button:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.button-arrow {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 8px;
}

.login-card-footer {
  margin-top: 25px;
  padding-top: 17px;
  display: flex;
  justify-content: center;
  gap: 8px;
  color: #8a98a3;
  border-top: 1px solid #dce4e9;
  font-size: 0.68rem;
  font-weight: 650;
}

.footer-dot {
  color: var(--jtel-red);
}

/* ============================================================
   [module-login] END
   ============================================================ */


/* ============================================================
   [module-landing] START
   ============================================================ */

.screen-landing {
  flex-direction: column;
  background: #edf2f5;
}

.app-header {
  position: relative;
  z-index: 20;
  height: var(--header-height);
  flex: 0 0 var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 23px;
  color: white;
  background:
    linear-gradient(180deg, #334a5d 0%, #243746 48%, #182632 100%);
  border-bottom: 1px solid #0e1820;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.13),
    0 4px 14px rgba(8, 20, 30, 0.22);
}

.header-brand,
.header-actions {
  min-width: 0;
  display: flex;
  align-items: center;
}

.header-brand {
  gap: 15px;
}

.header-logo-shell {
  width: 150px;
  height: 56px;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #fff, #e8edf1);
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 white,
    0 5px 15px rgba(0,0,0,0.18);
}

.header-logo {
  max-width: 100%;
  max-height: 44px;
  object-fit: contain;
}

.header-title-block {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.header-suite-name {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.header-page-name {
  margin-top: 3px;
  color: rgba(231,239,245,0.64);
  font-size: 0.7rem;
}

.header-actions {
  gap: 15px;
}

.branch-selector-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.branch-selector-wrap label {
  color: rgba(229,238,245,0.62);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.branch-selector-wrap select {
  min-width: 190px;
  height: 35px;
  padding: 0 35px 0 11px;
  color: #f3f7f9;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  outline: none;
}

.branch-selector-wrap select option {
  color: var(--text);
  background: white;
}

.profile-button {
  min-width: 175px;
  height: 52px;
  padding: 5px 10px 5px 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  background: rgba(255,255,255,0.065);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  cursor: default;
}

.profile-avatar {
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  display: grid;
  place-items: center;
  color: white;
  background:
    linear-gradient(145deg, #e34a53, #9f2028);
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28);
  font-size: 0.76rem;
  font-weight: 900;
}

.profile-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.profile-copy strong,
.profile-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy strong {
  font-size: 0.78rem;
}

.profile-copy small {
  margin-top: 3px;
  color: rgba(231,239,245,0.62);
  font-size: 0.65rem;
}

.app-body {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  overflow: hidden;
}

.app-sidebar {
  position: relative;
  z-index: 15;
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  display: flex;
  flex-direction: column;
  color: white;
  background:
    linear-gradient(180deg, #1b2a36 0%, #111d26 100%);
  border-right: 1px solid #0b141b;
  box-shadow:
    inset -1px 0 0 rgba(255,255,255,0.04),
    4px 0 15px rgba(11,24,34,0.11);
}

.sidebar-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 16px 11px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-item {
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(234,241,246,0.72);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 680;
  text-align: left;
  cursor: pointer;
}

.nav-item:hover {
  color: white;
  background: rgba(255,255,255,0.06);
}

.nav-item.is-active {
  color: white;
  background:
    linear-gradient(180deg, rgba(91,119,139,0.46), rgba(53,76,94,0.46));
  border-color: rgba(255,255,255,0.09);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.nav-item.is-active::before {
  content: "";
  width: 3px;
  height: 24px;
  margin-left: -12px;
  background: var(--jtel-red);
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  color: #dce7ee;
  background: rgba(255,255,255,0.07);
  border-radius: 7px;
  font-size: 0.79rem;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.logout-button {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #f2c7ca;
  background: rgba(201,47,56,0.10);
  border: 1px solid rgba(215,73,82,0.22);
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 750;
  cursor: pointer;
}

.logout-button:hover {
  color: white;
  background: rgba(201,47,56,0.21);
}

.workspace {
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  background:
    linear-gradient(180deg, #edf2f5, #e5ebef);
}

.workspace-scroll {
  height: 100%;
  overflow-y: auto;
  padding: 22px;
}

.welcome-banner {
  min-height: 172px;
  padding: 28px 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  color: white;
  overflow: hidden;
  background:
    radial-gradient(circle at 84% 10%, rgba(220,65,75,0.22), transparent 32%),
    linear-gradient(125deg, #263b4c 0%, #1a2a36 54%, #111c25 100%);
  border: 1px solid rgba(11,26,37,0.5);
  border-radius: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    var(--shadow-md);
}

.light-kicker {
  color: #ec7077;
}

.welcome-banner h1 {
  margin: 8px 0 7px;
  font-size: clamp(1.65rem, 3vw, 2.65rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.welcome-banner p {
  margin: 0;
  color: rgba(231,239,245,0.69);
  font-size: 0.88rem;
}

.welcome-meta {
  min-width: 270px;
  display: grid;
  grid-template-columns: repeat(2, minmax(115px, 1fr));
  gap: 10px;
}

.meta-card {
  min-height: 84px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 13px;
  backdrop-filter: blur(8px);
}

.meta-label {
  color: rgba(230,238,244,0.54);
  font-size: 0.61rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.meta-card strong {
  margin-top: 7px;
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-panel {
  margin-top: 18px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(247,249,250,0.99));
  border: 1px solid #d8e1e7;
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.count-badge {
  padding: 7px 10px;
  color: #5a6d7b;
  background: #eaf0f4;
  border: 1px solid #d8e2e8;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 750;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 13px;
}

.option-card {
  position: relative;
  min-height: 155px;
  padding: 17px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: var(--text);
  background:
    linear-gradient(148deg, #ffffff 0%, #edf2f5 100%);
  border: 1px solid #d4dee5;
  border-radius: 15px;
  box-shadow:
    inset 0 1px 0 white,
    0 8px 18px rgba(20,40,55,0.07);
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.option-card::after {
  content: "";
  position: absolute;
  width: 78px;
  height: 78px;
  right: -33px;
  top: -33px;
  background: radial-gradient(circle, rgba(201,47,56,0.12), transparent 70%);
}

.option-card:hover {
  transform: translateY(-3px);
  border-color: #aabcc9;
  box-shadow:
    inset 0 1px 0 white,
    0 13px 24px rgba(20,40,55,0.12);
}

.option-card:active {
  transform: translateY(-1px);
}

.option-card-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  color: white;
  background:
    linear-gradient(145deg, #516c80, #263b4b);
  border: 1px solid #263847;
  border-radius: 11px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.20),
    0 7px 14px rgba(28,47,62,0.15);
  font-size: 1.05rem;
}

.option-card-title {
  margin-top: 14px;
  font-size: 0.91rem;
  font-weight: 850;
  line-height: 1.3;
}

.option-card-caption {
  margin-top: 5px;
  color: #74838e;
  font-size: 0.68rem;
  line-height: 1.45;
}

.option-card-footer {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #7e8c96;
  font-size: 0.63rem;
  font-weight: 700;
}

.option-card-arrow {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--jtel-red);
  background: var(--jtel-red-soft);
  border-radius: 7px;
}

.empty-state {
  padding: 35px 20px;
  color: var(--text-muted);
  text-align: center;
}

.empty-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  color: #8798a5;
  background: #edf2f5;
  border: 1px solid #d9e2e8;
  border-radius: 15px;
  font-size: 1.3rem;
}

.empty-state h3 {
  margin: 0;
  color: #455663;
  font-size: 0.95rem;
}

.empty-state p {
  margin: 6px 0 0;
  font-size: 0.76rem;
}

.information-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}

.information-card {
  min-height: 104px;
  padding: 17px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255,255,255,0.87);
  border: 1px solid #d6e0e6;
  border-radius: 15px;
  box-shadow: 0 6px 15px rgba(19,39,54,0.05);
}

.information-icon {
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  display: grid;
  place-items: center;
  color: #e7edf1;
  background: linear-gradient(145deg, #637d90, #344c5e);
  border-radius: 10px;
}

.information-card small,
.information-card strong {
  display: block;
}

.information-card small {
  color: #8a98a3;
  font-size: 0.61rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.information-card strong {
  margin-top: 4px;
  color: #344653;
  font-size: 0.84rem;
}

.information-card p {
  margin: 5px 0 0;
  color: #7b8994;
  font-size: 0.68rem;
  line-height: 1.45;
}

.app-footer {
  position: relative;
  z-index: 25;
  height: var(--footer-height);
  flex: 0 0 var(--footer-height);
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: rgba(235,241,245,0.68);
  background:
    linear-gradient(180deg, #17242e, #101a22);
  border-top: 1px solid #0a1117;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.045);
  font-size: 0.62rem;
}

.footer-left,
.footer-right {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-left span,
.footer-right span {
  white-space: nowrap;
}

.connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3cb77e;
  box-shadow: 0 0 0 3px rgba(60,183,126,0.12);
}

.connection-dot.is-error {
  background: #db4b54;
  box-shadow: 0 0 0 3px rgba(219,75,84,0.12);
}

.footer-divider {
  width: 1px;
  height: 12px;
  background: rgba(255,255,255,0.13);
}

.mobile-only,
.mobile-overlay {
  display: none;
}

/* ============================================================
   [module-landing] END
   ============================================================ */


/* ============================================================
   [global-components] START
   ============================================================ */

.icon-button {
  width: 42px;
  height: 42px;
  color: white;
  background: rgba(255,255,255,0.075);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 10px;
}

.global-loader {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(7, 14, 20, 0.68);
  backdrop-filter: blur(5px);
}

.loader-card {
  width: min(390px, calc(100% - 34px));
  padding: 29px 30px 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: white;
  background:
    linear-gradient(145deg, #2c4354, #14232e 68%);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.13),
    var(--shadow-lg);
}

.loader-orbit {
  position: relative;
  width: 58px;
  height: 58px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
}

.spinner {
  position: absolute;
  inset: 0;
  border: 4px solid rgba(255,255,255,0.16);
  border-top-color: #de4b54;
  border-right-color: #91a8b8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader-core {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, #d9444d, #9f2028);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22);
  font-size: 0.82rem;
  font-weight: 900;
}

.loader-card strong {
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}

.loader-card > span {
  margin-top: 7px;
  color: rgba(231,239,245,0.70);
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: center;
}

.loader-progress {
  width: 100%;
  margin-top: 18px;
}

.loader-progress-track {
  height: 7px;
  overflow: hidden;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
}

.loader-progress-bar {
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, #8da4b4, #ffffff, #d9434d);
  border-radius: inherit;
  animation: loaderSweep 1.25s ease-in-out infinite;
}

.global-loader.is-determinate .loader-progress-bar {
  animation: none;
  transition: width 220ms ease;
}

.loader-progress small {
  display: block;
  margin-top: 7px;
  color: rgba(231,239,245,0.58);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.toast-container {
  position: fixed;
  z-index: 1100;
  right: 16px;
  bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}

.toast {
  width: min(350px, calc(100vw - 32px));
  padding: 13px 15px;
  color: white;
  background: #263947;
  border: 1px solid rgba(255,255,255,0.11);
  border-left: 4px solid #718da0;
  border-radius: 11px;
  box-shadow: var(--shadow-md);
  font-size: 0.75rem;
  line-height: 1.45;
  animation: toast-in 180ms ease both;
}

.toast.is-error {
  border-left-color: #df4a54;
}

.toast.is-success {
  border-left-color: #3ab078;
}

@keyframes loaderSweep {
  0% { transform: translateX(-115%); }
  55% { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ============================================================
   [global-components] END
   ============================================================ */


/* ============================================================
   RESPONSIVE RULES
   ============================================================ */

@media (max-width: 1120px) {
  .login-stage {
    gap: 38px;
  }

  .option-grid {
    grid-template-columns: repeat(3, minmax(165px, 1fr));
  }

  .header-title-block {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --header-height: 70px;
    --footer-height: 32px;
  }

  .login-stage {
    width: min(520px, calc(100% - 32px));
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .login-brand-panel {
    padding: 0;
    text-align: center;
  }

  .brand-badge {
    width: min(340px, 88%);
    min-height: 105px;
    margin: 0 auto;
    padding: 15px 23px;
  }

  .brand-logo {
    max-height: 80px;
  }

  .brand-copy {
    margin: 19px auto 0;
  }

  .brand-copy h1 {
    margin-top: 5px;
    font-size: 2rem;
  }

  .brand-copy p,
  .brand-features {
    display: none;
  }

  .login-card {
    max-width: 470px;
    justify-self: center;
    padding: 31px 30px 22px;
  }

  .mobile-only {
    display: grid;
    place-items: center;
  }

  .header-logo-shell {
    width: 120px;
    height: 48px;
  }

  .header-logo {
    max-height: 37px;
  }

  .branch-selector-wrap {
    display: none;
  }

  .profile-button {
    min-width: 0;
    width: 46px;
    height: 46px;
    padding: 3px;
    justify-content: center;
  }

  .profile-copy {
    display: none;
  }

  .app-sidebar {
    position: fixed;
    z-index: 70;
    left: 0;
    top: var(--header-height);
    bottom: var(--footer-height);
    transform: translateX(-102%);
    transition: transform 180ms ease;
  }

  .app-sidebar.is-open {
    transform: translateX(0);
  }

  .mobile-overlay {
    position: fixed;
    z-index: 60;
    inset: var(--header-height) 0 var(--footer-height) 0;
    display: block;
    visibility: hidden;
    opacity: 0;
    background: rgba(5,13,19,0.50);
    transition: 180ms ease;
  }

  .mobile-overlay.is-open {
    visibility: visible;
    opacity: 1;
  }

  .workspace-scroll {
    padding: 16px;
  }

  .welcome-banner {
    min-height: 155px;
    padding: 22px;
  }

  .welcome-meta {
    min-width: 230px;
  }

  .option-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .information-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .login-stage {
    width: 100%;
    height: 100%;
    padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
    overflow-y: auto;
  }

  .login-brand-panel {
    margin-top: auto;
  }

  .brand-badge {
    width: min(270px, 82vw);
    min-height: 84px;
    border-radius: 16px;
  }

  .brand-logo {
    max-height: 61px;
  }

  .brand-copy {
    margin-top: 14px;
  }

  .brand-copy .eyebrow {
    font-size: 0.6rem;
  }

  .brand-copy h1 {
    font-size: 1.55rem;
  }

  .login-card {
    margin-bottom: auto;
    padding: 27px 20px 19px;
    border-radius: 20px;
  }

  .login-card-header {
    margin-bottom: 21px;
  }

  .login-card-header h2 {
    font-size: 1.6rem;
  }

  .login-preferences {
    align-items: flex-start;
    flex-direction: column;
  }

  .server-pill {
    align-self: flex-end;
    margin-top: -31px;
  }

  .app-header {
    padding: 0 10px;
  }

  .header-brand {
    gap: 9px;
  }

  .header-logo-shell {
    width: 104px;
    height: 44px;
    padding: 4px 7px;
  }

  .header-logo {
    max-height: 34px;
  }

  .workspace-scroll {
    padding: 11px;
  }

  .welcome-banner {
    min-height: auto;
    padding: 19px;
    align-items: stretch;
    flex-direction: column;
    gap: 17px;
    border-radius: 15px;
  }

  .welcome-banner h1 {
    font-size: 1.65rem;
  }

  .welcome-meta {
    min-width: 0;
    width: 100%;
  }

  .meta-card {
    min-height: 70px;
    padding: 12px;
  }

  .quick-panel {
    margin-top: 11px;
    padding: 15px;
    border-radius: 15px;
  }

  .section-heading {
    margin-bottom: 13px;
  }

  .option-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .option-card {
    min-height: 105px;
    padding: 14px;
    display: grid;
    grid-template-columns: 42px 1fr 28px;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 12px;
  }

  .option-card-icon {
    grid-row: 1 / span 2;
    width: 42px;
    height: 42px;
  }

  .option-card-title {
    margin: 0;
  }

  .option-card-caption {
    margin: 3px 0 0;
  }

  .option-card-footer {
    grid-column: 3;
    grid-row: 1 / span 2;
    margin: 0;
  }

  .option-card-footer > span:first-child {
    display: none;
  }

  .information-grid {
    margin-top: 11px;
  }

  .app-footer {
    padding: 0 9px;
  }

  .footer-right {
    display: none;
  }

  #footer-server-text {
    max-width: 165px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .toast-container {
    right: 10px;
    bottom: 43px;
  }
}

@media (max-height: 720px) and (min-width: 621px) {
  .login-stage {
    transform: scale(0.91);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* ============================================================
   JTEL WEB SUITE - BUILD 002 REFINEMENTS
   ============================================================ */

:root {
  --header-height: 86px;
}

.header-brand {
  flex: 1;
}

.header-welcome-block {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.header-page-name {
  color: #ef737a;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.header-welcome-text {
  margin-top: 3px;
  overflow: hidden;
  color: #ffffff;
  font-size: 1.04rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-welcome-subtitle {
  margin-top: 3px;
  overflow: hidden;
  color: rgba(231, 239, 245, 0.62);
  font-size: 0.67rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-heading {
  padding: 18px 17px 12px;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-heading span {
  color: rgba(232,240,245,0.42);
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.sidebar-heading strong {
  margin-top: 4px;
  color: rgba(244,248,250,0.88);
  font-size: 0.82rem;
}

.action-panel {
  min-height: 100%;
  margin-top: 0;
  padding: clamp(20px, 2.4vw, 31px);
}

.section-heading {
  align-items: flex-start;
  padding-bottom: 17px;
  border-bottom: 1px solid #dbe3e8;
}

.section-heading h1 {
  margin: 5px 0 0;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  letter-spacing: -0.035em;
}

.page-description {
  margin: 7px 0 0;
  color: #7a8994;
  font-size: 0.76rem;
}

.option-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 17px;
  padding-top: 5px;
}

.option-card.action-button-card {
  position: relative;
  min-height: 128px;
  padding: 17px 18px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 15px;
  overflow: hidden;
  color: #eef4f7;
  background:
    linear-gradient(180deg, #668096 0%, #405b70 12%, #294255 58%, #1c3040 100%);
  border: 1px solid #172a38;
  border-radius: 15px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    inset 0 -1px 0 rgba(0,0,0,0.35),
    0 10px 20px rgba(17,35,48,0.17);
  text-align: left;
  isolation: isolate;
}

.option-card.action-button-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 1px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 13px;
  pointer-events: none;
}

.option-card.action-button-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 135px;
  height: 135px;
  right: -58px;
  top: -70px;
  background: radial-gradient(circle, rgba(232,75,84,0.42), rgba(201,47,56,0.08) 48%, transparent 72%);
  pointer-events: none;
}

.option-card-shine {
  position: absolute;
  inset: 0 0 auto 0;
  height: 46%;
  background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.02));
  border-radius: 14px 14px 46% 46%;
  pointer-events: none;
}

.option-card.action-button-card:hover {
  transform: translateY(-3px);
  border-color: #0f202c;
  filter: brightness(1.075);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.52),
    inset 0 -1px 0 rgba(0,0,0,0.38),
    0 16px 27px rgba(17,35,48,0.23);
}

.option-card.action-button-card:active {
  transform: translateY(1px);
  filter: brightness(0.96);
  box-shadow:
    inset 0 3px 8px rgba(0,0,0,0.22),
    0 5px 12px rgba(17,35,48,0.14);
}

.option-card.action-button-card .option-card-icon {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  color: white;
  background:
    linear-gradient(145deg, #e3535b 0%, #bd2933 58%, #8f1b23 100%);
  border: 1px solid #811820;
  border-radius: 13px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.42),
    0 7px 14px rgba(12,25,34,0.24);
  font-size: 1.12rem;
  font-weight: 900;
}

.option-card-content {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.option-card.action-button-card .option-card-title {
  margin: 0;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 850;
  line-height: 1.3;
  text-shadow: 0 1px 1px rgba(0,0,0,0.28);
}

.option-card.action-button-card .option-card-caption {
  margin-top: 6px;
  color: rgba(231,239,245,0.68);
  font-size: 0.69rem;
  line-height: 1.45;
}

.option-card.action-button-card .option-card-arrow {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  color: #ffffff;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.information-grid,
.welcome-banner {
  display: none;
}

@media (max-width: 1120px) {
  .option-grid {
    grid-template-columns: repeat(2, minmax(210px, 1fr));
  }
}

@media (max-width: 900px) {
  :root {
    --header-height: 76px;
  }

  .header-welcome-text {
    font-size: 0.9rem;
  }

  .header-welcome-subtitle {
    max-width: 310px;
  }

  .action-panel {
    min-height: 100%;
  }
}

@media (max-width: 620px) {
  :root {
    --header-height: 70px;
  }

  .header-logo-shell {
    width: 92px;
    height: 42px;
  }

  .header-welcome-block {
    max-width: calc(100vw - 205px);
  }

  .header-page-name {
    font-size: 0.52rem;
  }

  .header-welcome-text {
    font-size: 0.78rem;
  }

  .header-welcome-subtitle {
    display: none;
  }

  .workspace-scroll {
    padding: 10px;
  }

  .action-panel {
    padding: 15px;
  }

  .section-heading {
    margin-bottom: 12px;
  }

  .page-description {
    display: none;
  }

  .option-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .option-card.action-button-card {
    min-height: 92px;
    grid-template-columns: 45px minmax(0, 1fr) 30px;
    gap: 12px;
    padding: 13px;
  }

  .option-card.action-button-card .option-card-icon {
    width: 45px;
    height: 45px;
    grid-row: auto;
  }

  .option-card.action-button-card .option-card-title {
    font-size: 0.86rem;
  }

  .option-card.action-button-card .option-card-caption {
    margin-top: 4px;
    font-size: 0.63rem;
  }

  .option-card.action-button-card .option-card-arrow {
    grid-column: auto;
    grid-row: auto;
    margin: 0;
  }

  .sidebar-heading {
    padding-top: 15px;
  }
}


/* ============================================================
   [module-invoice-new] START
   ============================================================ */

.screen-invoice-new {
  flex-direction: column;
  background: #e8eef2;
}

.invoice-app-header {
  height: 78px;
  flex-basis: 78px;
}

.invoice-header-actions {
  gap: 12px;
}

.invoice-number-chip {
  min-width: 112px;
  padding: 8px 13px;
  display: flex;
  flex-direction: column;
  color: white;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
}

.invoice-number-chip span {
  color: rgba(230,239,245,0.58);
  font-size: 0.56rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.invoice-number-chip strong {
  margin-top: 3px;
  font-size: 0.78rem;
}

.header-secondary-button {
  height: 40px;
  padding: 0 14px;
  color: #eef4f7;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 9px;
  font-size: 0.72rem;
  font-weight: 750;
  cursor: pointer;
}

.header-secondary-button:hover {
  background: rgba(255,255,255,0.14);
}

.invoice-workspace {
  padding-bottom: 68px;
}

.invoice-workspace-scroll {
  padding: 16px;
  scroll-behavior: smooth;
}

.invoice-panel {
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #f7f9fa);
  border: 1px solid #d5dfe5;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.invoice-panel + .invoice-panel,
.invoice-panel + .invoice-summary-layout {
  margin-top: 14px;
}

.invoice-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}

.invoice-panel-heading h2,
.remarks-panel h2 {
  margin: 4px 0 0;
  font-size: 1.08rem;
  letter-spacing: -0.025em;
}

.invoice-panel-heading p {
  margin: 5px 0 0;
  color: #7a8994;
  font-size: 0.69rem;
}

.invoice-date-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.invoice-date-field label {
  color: #6e7f8c;
  font-size: 0.62rem;
  font-weight: 750;
  text-transform: uppercase;
}

.invoice-date-field input {
  height: 38px;
  padding: 0 10px;
  color: #263845;
  background: white;
  border: 1px solid #ccd7de;
  border-radius: 9px;
}

.invoice-header-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
  gap: 14px;
}

.client-select-card {
  min-height: 96px;
  padding: 15px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  color: #21313d;
  background:
    linear-gradient(155deg, #ffffff 0%, #edf3f6 100%);
  border: 1px solid #cbd8e0;
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 #fff,
    0 7px 16px rgba(18,38,52,0.08);
  text-align: left;
  cursor: pointer;
}

.client-select-card:hover {
  border-color: #90a7b6;
  transform: translateY(-1px);
}

.client-card-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, #d84a53, #9f2028);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.30);
  font-weight: 900;
}

.client-card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.client-card-copy small {
  color: #81909b;
  font-size: 0.6rem;
  font-weight: 750;
  text-transform: uppercase;
}

.client-card-copy strong {
  margin-top: 5px;
  overflow: hidden;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-card-copy span {
  margin-top: 5px;
  overflow: hidden;
  color: #71818d;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-card-action {
  padding: 8px 10px;
  color: #a5252e;
  background: #fae9eb;
  border-radius: 8px;
  font-size: 0.66rem;
  font-weight: 800;
}

.invoice-header-actions-grid {
  display: grid;
  gap: 10px;
}

.metal-action-button,
.force-apply-card {
  min-height: 43px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #eef4f7;
  background:
    linear-gradient(180deg, #617b90 0%, #3b566b 16%, #243f52 100%);
  border: 1px solid #1a3040;
  border-radius: 11px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.38),
    0 6px 13px rgba(17,35,48,0.15);
}

.metal-action-button {
  cursor: pointer;
  text-align: left;
}

.metal-action-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.10);
  border-radius: 8px;
  font-size: 1rem;
}

.metal-action-button strong,
.force-apply-card strong,
.metal-action-button small,
.force-apply-card small {
  display: block;
}

.metal-action-button strong,
.force-apply-card strong {
  font-size: 0.73rem;
}

.metal-action-button small,
.force-apply-card small {
  margin-top: 3px;
  color: rgba(236,243,247,0.62);
  font-size: 0.59rem;
}

.force-apply-card {
  justify-content: space-between;
  cursor: pointer;
}

.force-apply-card > span:first-child {
  flex: 1;
}

.force-apply-card input {
  position: absolute;
  opacity: 0;
}

.toggle-track {
  width: 42px;
  height: 23px;
  padding: 3px;
  flex: 0 0 42px;
  background: rgba(7,19,27,0.40);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 999px;
}

.toggle-knob {
  width: 15px;
  height: 15px;
  display: block;
  background: #d5dfe5;
  border-radius: 50%;
  transition: 160ms ease;
}

.force-apply-card input:checked + .toggle-track {
  background: #a7212a;
}

.force-apply-card input:checked + .toggle-track .toggle-knob {
  transform: translateX(18px);
  background: white;
}

.category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
  scrollbar-width: thin;
}

.category-chip {
  min-width: max-content;
  height: 36px;
  padding: 0 14px;
  color: #405461;
  background: linear-gradient(180deg, #ffffff, #e7edf1);
  border: 1px solid #cad6de;
  border-radius: 9px;
  box-shadow: inset 0 1px 0 white;
  font-size: 0.68rem;
  font-weight: 760;
  cursor: pointer;
}

.category-chip.is-active {
  color: white;
  background: linear-gradient(180deg, #dc4b54, #aa222b);
  border-color: #921b23;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 5px 12px rgba(173,34,44,0.18);
}

.product-selector-row {
  display: flex;
  gap: 9px;
}

.product-search-shell {
  position: relative;
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
}

.product-search-icon {
  position: absolute;
  left: 13px;
  color: #728591;
}

.product-search-shell input {
  width: 100%;
  height: 44px;
  padding: 0 42px 0 38px;
  color: #23343f;
  background: white;
  border: 1px solid #cbd7df;
  border-radius: 11px;
  outline: 0;
}

.product-search-shell input:focus {
  border-color: #7891a3;
  box-shadow: 0 0 0 3px rgba(95,126,148,0.12);
}

.product-search-shell input:disabled {
  background: #edf1f3;
  cursor: not-allowed;
}

.search-clear-button {
  position: absolute;
  right: 7px;
  width: 31px;
  height: 31px;
  color: #788995;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 1.1rem;
  cursor: pointer;
}

.small-metal-button {
  min-width: 86px;
  color: white;
  background: linear-gradient(180deg, #60798c, #294557);
  border: 1px solid #203948;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 750;
  cursor: pointer;
}

.small-metal-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.product-results {
  max-height: 225px;
  margin-top: 10px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(210px, 1fr));
  gap: 8px;
}

.product-result-button {
  min-height: 64px;
  height: auto;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: #263944;
  background: linear-gradient(180deg, #ffffff, #edf2f5);
  border: 1px solid #d0dbe2;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
}

.product-result-button:hover {
  border-color: #8fa6b5;
  transform: translateY(-1px);
}

.product-result-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, #5e788c, #2d485a);
  border-radius: 9px;
  font-size: 0.7rem;
  font-weight: 900;
}

.product-result-copy {
  min-width: 0;
}

.product-result-copy strong,
.product-result-copy small {
  display: block;
}

.product-result-copy strong {
  overflow: visible;
  font-size: 0.73rem;
  line-height: 1.28;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.product-result-copy small {
  margin-top: 4px;
  overflow: hidden;
  color: #7b8994;
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-result-add {
  color: #a6262f;
  font-size: 0.62rem;
  font-weight: 800;
}

.product-empty-state {
  min-height: 110px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #80909b;
  background: #f0f4f6;
  border: 1px dashed #cbd7df;
  border-radius: 11px;
}

.product-empty-state span {
  font-size: 1.3rem;
}

.product-empty-state strong {
  margin-top: 7px;
  color: #546672;
  font-size: 0.76rem;
}

.product-empty-state small {
  margin-top: 4px;
  font-size: 0.62rem;
}

.invoice-grid-shell {
  position: relative;
  min-height: 180px;
  border: 1px solid #cfd9e0;
  border-radius: 12px;
  overflow: hidden;
}

.invoice-grid-scroll {
  max-height: 330px;
  overflow: auto;
}

.invoice-grid {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  font-size: 0.66rem;
}

.invoice-grid th {
  position: sticky;
  z-index: 2;
  top: 0;
  height: 38px;
  padding: 0 8px;
  color: #edf3f6;
  background: linear-gradient(180deg, #4f687b, #2c4658);
  border-right: 1px solid rgba(255,255,255,0.08);
  text-align: left;
  white-space: nowrap;
}

.invoice-grid td {
  height: 50px;
  padding: 6px 8px;
  color: #324652;
  background: white;
  border-right: 1px solid #e0e7eb;
  border-bottom: 1px solid #dce4e9;
  vertical-align: middle;
}

.invoice-grid tr:nth-child(even) td {
  background: #f7f9fa;
}

.invoice-grid tr.is-refund-row td {
  background: #fff8d9;
}

.invoice-grid tr.has-stock-warning td:first-child {
  box-shadow: inset 4px 0 0 #d7811e;
}

.invoice-grid tr.has-cost-warning td:nth-child(2) {
  background: #fff1e5;
}

.invoice-grid input {
  width: 78px;
  height: 31px;
  padding: 0 7px;
  color: #283b47;
  background: #fff;
  border: 1px solid #cbd7de;
  border-radius: 7px;
  text-align: right;
}

.invoice-grid input:disabled {
  color: #7f8c95;
  background: #edf1f3;
}

.line-item-title {
  max-width: 245px;
  overflow: hidden;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-item-meta {
  margin-top: 3px;
  color: #82909a;
  font-size: 0.55rem;
}

.warning-pill {
  margin-left: 5px;
  padding: 2px 5px;
  color: #9c590e;
  background: #fff0d9;
  border-radius: 999px;
  font-size: 0.49rem;
  font-weight: 800;
}

.warning-pill.cost {
  color: #a12c31;
  background: #fde4e6;
}

.stock-button {
  min-width: 48px;
  padding: 5px 7px;
  color: #355469;
  background: #e8f0f4;
  border: 1px solid #ccdae2;
  border-radius: 7px;
  font-weight: 800;
  cursor: pointer;
}

.line-action-button {
  width: 29px;
  height: 29px;
  color: #355469;
  background: #edf2f5;
  border: 1px solid #d0dbe2;
  border-radius: 7px;
  cursor: pointer;
}

.line-action-button.picture {
  display: inline-grid;
  place-items: center;
  color: #315f78;
  background: linear-gradient(180deg, #f4f9fb, #dceaf1);
  border-color: #bfd2dc;
}

.line-action-button.picture:hover {
  color: #173f56;
  background: linear-gradient(180deg, #ffffff, #cfe2ec);
  border-color: #8fb0c1;
}

.picture-eye-icon {
  width: 17px;
  height: 17px;
  display: block;
  fill: currentColor;
  pointer-events: none;
}

.line-action-button.remove {
  color: #a3262f;
  background: #fae9eb;
  border-color: #edc8cc;
}

.grid-empty-state {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #80909b;
}

.grid-empty-state span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #e8eef2;
  border-radius: 11px;
  font-size: 1.1rem;
}

.grid-empty-state strong {
  margin-top: 8px;
  color: #526470;
  font-size: 0.78rem;
}

.grid-empty-state small {
  margin-top: 4px;
  font-size: 0.61rem;
}

.invoice-summary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.78fr);
  gap: 14px;
}

.remarks-panel textarea {
  width: 100%;
  height: 155px;
  margin-top: 12px;
  padding: 13px;
  resize: none;
  color: #263945;
  background: white;
  border: 1px solid #ccd8df;
  border-radius: 11px;
  outline: 0;
  line-height: 1.55;
}

.remarks-panel textarea:focus {
  border-color: #7891a3;
  box-shadow: 0 0 0 3px rgba(95,126,148,0.12);
}

.remarks-footer {
  margin-top: 7px;
  display: flex;
  justify-content: space-between;
  color: #87959e;
  font-size: 0.58rem;
}

.invoice-totals-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.totals-card {
  padding: 14px;
}

.totals-card-title {
  margin-bottom: 10px;
  padding-bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #dbe3e8;
}

.totals-card-title span {
  color: #435765;
  font-size: 0.7rem;
  font-weight: 800;
}

.totals-card-title strong {
  color: #263c4c;
  font-size: 0.88rem;
}

.refund-totals-card .totals-card-title strong {
  color: #9b6814;
}

.totals-row,
.totals-input-row {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #6f7f8a;
  font-size: 0.61rem;
}

.totals-row strong {
  color: #354b59;
}

.totals-input-row input {
  width: 74px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid #cbd7df;
  border-radius: 7px;
  text-align: right;
}


/* ============================================================
   [module-invoice-sales-summary-polish-010] START
   Sales card only. Refund summary remains unchanged.
   ============================================================ */

.sales-totals-card {
  padding: 16px 17px 15px;
  background:
    radial-gradient(circle at 100% 0%, rgba(79, 112, 135, 0.10), transparent 38%),
    linear-gradient(180deg, #ffffff, #f5f8fa);
  border-color: #bccbd4;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 7px 18px rgba(24, 48, 65, 0.09);
}

.sales-totals-card .totals-row,
.sales-totals-card .totals-input-row {
  min-height: 35px;
  padding: 2px 1px;
  color: #506572;
  font-size: 0.72rem;
  font-weight: 700;
}

.sales-totals-card .totals-row strong,
.sales-totals-card .totals-input-row input {
  color: #263c4c;
  font-size: 0.88rem;
  font-weight: 850;
}

.sales-totals-card .totals-input-row input {
  width: 94px;
  height: 32px;
  padding: 0 8px;
  background: #ffffff;
  border-color: #b9c9d3;
}

.sales-totals-card .special-discount-value-input {
  color: #2f556c;
}

.sales-totals-card .sales-summary-final-row {
  min-height: 43px;
  margin: 11px -4px -3px;
  padding: 10px 10px 7px;
  border-top: 2px solid #9eb2bf;
  border-bottom: 0;
}

.sales-totals-card .sales-summary-final-row span {
  color: #304b5d;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sales-totals-card .sales-summary-final-row strong {
  color: #1f3d50;
  font-size: 1rem;
  font-weight: 900;
}

/* ============================================================
   [module-invoice-sales-summary-polish-010] END
   ============================================================ */

.final-payable-card {
  grid-column: 1 / -1;
  min-height: 86px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  color: white;
  background:
    radial-gradient(circle at 88% 0%, rgba(223,73,83,0.27), transparent 37%),
    linear-gradient(145deg, #304a5d, #172a37);
  border: 1px solid #11232f;
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 8px 18px rgba(19,39,52,0.15);
}

.final-payable-card span {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.final-payable-card strong {
  grid-row: 1 / 3;
  grid-column: 2;
  font-size: 1.42rem;
}

.final-payable-card small {
  margin-top: 4px;
  color: rgba(234,241,245,0.62);
  font-size: 0.58rem;
}

.invoice-action-bar {
  position: fixed;
  z-index: 35;
  left: var(--sidebar-width);
  right: 0;
  bottom: var(--footer-height);
  min-height: 58px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(249,251,252,0.97);
  border-top: 1px solid #ccd7df;
  box-shadow: 0 -6px 18px rgba(15,32,45,0.10);
  backdrop-filter: blur(8px);
}

.invoice-validation-message {
  color: #9a6d21;
  font-size: 0.68rem;
  font-weight: 700;
}

.invoice-validation-message.is-valid {
  color: #2d7e59;
}

.invoice-action-buttons {
  display: flex;
  gap: 9px;
}

.invoice-cancel-button,
.invoice-save-button {
  height: 40px;
  padding: 0 17px;
  border-radius: 9px;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.invoice-cancel-button {
  color: #4d606d;
  background: #edf2f5;
  border: 1px solid #ccd7de;
}

.invoice-save-button {
  min-width: 145px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: white;
  background: linear-gradient(180deg, #dc4b54, #a8212a);
  border: 1px solid #901a22;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.34),
    0 7px 14px rgba(174,35,44,0.20);
}

.invoice-save-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.modal-layer {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(7,15,21,0.70);
  backdrop-filter: blur(5px);
}

.modal-card {
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #f4f7f9);
  border: 1px solid rgba(255,255,255,0.88);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  min-height: 72px;
  padding: 14px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f9fbfc;
  border-bottom: 1px solid #d9e2e8;
}

.modal-header h2 {
  margin: 3px 0 0;
  font-size: 1.05rem;
}

.modal-close-button {
  width: 38px;
  height: 38px;
  color: #6c7d88;
  background: #edf2f5;
  border: 1px solid #d1dce3;
  border-radius: 9px;
  font-size: 1.25rem;
  cursor: pointer;
}

.client-picker-card {
  display: flex;
  flex-direction: column;
}

.client-search-shell {
  position: relative;
  margin: 14px;
  display: flex;
  align-items: center;
}

.client-search-shell span {
  position: absolute;
  left: 13px;
  color: #748792;
}

.client-search-shell input {
  width: 100%;
  height: 44px;
  padding: 0 13px 0 38px;
  border: 1px solid #cbd7df;
  border-radius: 10px;
}

.client-grid-header {
  padding: 9px 14px;
  display: grid;
  grid-template-columns: minmax(250px, 1.3fr) minmax(170px, 0.85fr) minmax(120px, 0.55fr) minmax(90px, 0.4fr);
  gap: 12px;
  color: #70818c;
  background: #eaf0f4;
  border-top: 1px solid #d4dfe6;
  border-bottom: 1px solid #d4dfe6;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
}

.client-results {
  min-height: 220px;
  max-height: 480px;
  overflow-y: auto;
}

.client-result-row {
  width: 100%;
  min-height: 55px;
  padding: 8px 14px;
  display: grid;
  grid-template-columns: minmax(250px, 1.3fr) minmax(170px, 0.85fr) minmax(120px, 0.55fr) minmax(90px, 0.4fr);
  gap: 12px;
  align-items: center;
  color: #405460;
  background: white;
  border: 0;
  border-bottom: 1px solid #e0e7eb;
  text-align: left;
  cursor: pointer;
}

.client-result-row:hover {
  background: #edf4f7;
}

.client-result-main strong,
.client-result-main small {
  display: block;
}

.client-result-main strong {
  font-size: 0.72rem;
}

.client-result-main small,
.client-result-row > span {
  color: #75858f;
  font-size: 0.61rem;
}

.modal-empty-state {
  padding: 36px;
  color: #7d8c96;
  text-align: center;
  font-size: 0.72rem;
}

.product-picture-card {
  width: min(780px, 100%);
}

.product-picture-stage {
  min-height: 380px;
  max-height: calc(100vh - 150px);
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 18px;
  background:
    linear-gradient(45deg, #e7ecef 25%, transparent 25%),
    linear-gradient(-45deg, #e7ecef 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e7ecef 75%),
    linear-gradient(-45deg, transparent 75%, #e7ecef 75%),
    #f7f9fa;
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}

.product-picture-stage img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 190px);
  object-fit: contain;
  background: white;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}

.product-picture-placeholder {
  padding: 28px;
  color: #71818c;
  background: rgba(255,255,255,0.90);
  border: 1px solid #d2dde4;
  border-radius: 11px;
  font-size: 0.75rem;
}

@media (max-width: 1120px) {
  .product-results {
    grid-template-columns: repeat(2, minmax(210px, 1fr));
  }

  .invoice-summary-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .invoice-action-bar {
    left: 0;
  }

  .invoice-sidebar {
    position: fixed;
    z-index: 70;
    left: 0;
    top: 78px;
    bottom: var(--footer-height);
    transform: translateX(-102%);
    transition: transform 180ms ease;
  }

  .invoice-sidebar.is-open {
    transform: translateX(0);
  }

  .invoice-header-grid {
    grid-template-columns: 1fr;
  }

  .product-results {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .invoice-summary-layout {
    grid-template-columns: 1fr;
  }

  .invoice-totals-stack {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .invoice-app-header {
    height: 70px;
    flex-basis: 70px;
  }

  .invoice-number-chip {
    display: none;
  }

  .header-secondary-button {
    padding: 0 9px;
    font-size: 0.62rem;
  }

  .invoice-workspace-scroll {
    padding: 9px;
  }

  .invoice-panel {
    padding: 13px;
    border-radius: 13px;
  }

  .invoice-panel-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }

  .invoice-date-field {
    max-width: 170px;
  }

  .client-select-card {
    min-height: 88px;
    grid-template-columns: 43px minmax(0, 1fr);
  }

  .client-card-icon {
    width: 43px;
    height: 43px;
  }

  .client-card-action {
    grid-column: 1 / -1;
    justify-self: stretch;
    text-align: center;
  }

  .product-results {
    grid-template-columns: 1fr;
    max-height: 250px;
  }

  .invoice-grid-scroll {
    max-height: 360px;
  }

  .invoice-summary-layout {
    gap: 9px;
  }

  .invoice-totals-stack {
    grid-template-columns: 1fr;
  }

  .final-payable-card {
    grid-column: auto;
  }

  .remarks-panel textarea {
    height: 115px;
  }

  .invoice-action-bar {
    min-height: 66px;
    padding: 7px 9px;
  }

  .invoice-validation-message {
    display: none;
  }

  .invoice-action-buttons {
    width: 100%;
  }

  .invoice-cancel-button,
  .invoice-save-button {
    flex: 1;
  }

  .client-grid-header {
    display: none;
  }

  .client-result-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 11px 13px;
  }

  .modal-layer {
    padding: 0;
  }

  .modal-card {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }

  .client-results {
    max-height: none;
    flex: 1;
  }

  .product-picture-stage {
    max-height: none;
    height: calc(100vh - 72px);
  }
}

/* ============================================================
   [module-invoice-new] END
   ============================================================ */


/* ============================================================
   [module-invoice-new-refinement-004] START
   Compact transaction row, clairvoyance product dropdown,
   larger readable line grid, and improved vertical utilization.
   ============================================================ */

.screen-invoice-new {
  --invoice-header-height: 66px;
}

.screen-invoice-new .invoice-app-header {
  height: var(--invoice-header-height);
  flex-basis: var(--invoice-header-height);
  padding-top: 0;
  padding-bottom: 0;
}

.screen-invoice-new .header-logo-shell {
  width: 128px;
  height: 48px;
}

.screen-invoice-new .header-logo {
  max-height: 38px;
}

.screen-invoice-new .header-welcome-text {
  font-size: 0.92rem;
}

.screen-invoice-new .header-welcome-subtitle {
  font-size: 0.66rem;
}

.invoice-workspace-scroll {
  padding: 10px 12px 82px;
}

.compact-transaction-panel {
  padding: 9px;
}

.compact-transaction-row {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 166px 190px 190px;
  gap: 9px;
  align-items: stretch;
}

.compact-client-card,
.compact-date-card,
.compact-command-card {
  height: 64px;
  min-height: 64px;
}

.compact-client-card {
  padding: 7px 10px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
}

.compact-client-card .client-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.compact-client-card .client-card-copy small {
  font-size: 0.62rem;
}

.compact-client-card .client-card-copy strong {
  margin-top: 2px;
  font-size: 0.88rem;
}

.compact-client-card .client-card-copy span {
  margin-top: 2px;
  font-size: 0.65rem;
}

.compact-client-card .client-card-action {
  padding: 7px 9px;
  font-size: 0.65rem;
}

.compact-date-card {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(155deg, #ffffff, #edf3f6);
  border: 1px solid #cbd8e0;
  border-radius: 11px;
  box-shadow: inset 0 1px 0 #fff;
}

.compact-date-card label {
  margin-bottom: 4px;
  color: #71828e;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.compact-date-card input {
  width: 100%;
  height: 31px;
  padding: 0 7px;
  color: #263945;
  background: white;
  border: 1px solid #c8d4dc;
  border-radius: 7px;
  font-size: 0.75rem;
}

.compact-command-card {
  padding: 7px 9px;
  border-radius: 11px;
}

.compact-command-card .metal-action-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.compact-command-card strong {
  font-size: 0.72rem;
}

.compact-command-card small {
  font-size: 0.58rem;
}

.compact-product-panel {
  position: relative;
  z-index: 12;
  margin-top: 8px !important;
  padding: 8px 9px;
  overflow: visible;
}

.compact-product-toolbar {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(420px, 1.3fr);
  gap: 9px;
  align-items: center;
}

.compact-product-panel .category-strip {
  min-height: 42px;
  padding: 3px 0;
  align-items: center;
}

.compact-product-panel .category-chip {
  height: 34px;
  padding: 0 12px;
  font-size: 0.72rem;
}

.compact-product-panel .product-selector-row {
  position: relative;
}

.compact-product-panel .product-search-shell input {
  height: 40px;
  font-size: 0.78rem;
}

.product-search-shell.is-open input {
  border-color: #708da1;
  box-shadow: 0 0 0 3px rgba(86,116,139,0.12);
}

.product-dropdown {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding: 8px;
  background: linear-gradient(180deg, #ffffff, #f4f7f9);
  border: 1px solid #bccbd5;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(11,28,40,0.22);
}

.product-dropdown-head {
  min-height: 31px;
  padding: 0 3px 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #71818c;
  border-bottom: 1px solid #dbe4e9;
  font-size: 0.68rem;
}

.product-dropdown .product-results {
  max-height: 190px;
  margin-top: 7px;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.product-dropdown .product-result-button {
  min-height: 54px;
  padding: 7px 9px;
}

.product-dropdown .product-result-icon {
  width: 34px;
  height: 34px;
}

.product-dropdown .product-result-copy strong {
  font-size: 0.74rem;
}

.product-dropdown .product-result-copy small {
  font-size: 0.60rem;
}

.product-dropdown .product-empty-state {
  min-height: 90px;
  margin-top: 7px;
}

.invoice-lines-panel {
  margin-top: 8px !important;
  padding: 10px 11px 11px;
}

.invoice-lines-panel .invoice-panel-heading {
  min-height: 31px;
  margin-bottom: 7px;
  align-items: center;
}

.invoice-lines-panel .invoice-panel-heading .section-kicker {
  display: none;
}

.invoice-lines-panel .invoice-panel-heading h2 {
  margin: 0;
  font-size: 0.92rem;
}

.invoice-grid-shell {
  min-height: 245px;
}

.invoice-grid-scroll {
  max-height: clamp(260px, calc(100vh - 335px), 500px);
}

.invoice-grid {
  min-width: 1260px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12px;
}

.invoice-grid th {
  height: 38px;
  padding: 0 8px;
  font-size: 11.5px;
  font-weight: 700;
}

.invoice-grid td {
  height: 48px;
  padding: 5px 8px;
  font-size: 12px;
}

.invoice-grid input {
  width: 82px;
  height: 31px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
}

.line-item-title {
  max-width: 270px;
  font-size: 12.5px;
  font-weight: 700;
}

.line-item-meta {
  margin-top: 3px;
  font-size: 10.5px;
}

.warning-pill {
  font-size: 9px;
}

.stock-button {
  min-width: 52px;
  font-size: 11.5px;
}

.line-action-button {
  width: 31px;
  height: 31px;
  font-size: 13px;
}

.grid-empty-state strong {
  font-size: 12px;
}

.grid-empty-state small {
  font-size: 11px;
}

.invoice-summary-layout {
  margin-top: 9px;
}

@media (max-width: 1280px) {
  .compact-transaction-row {
    grid-template-columns: minmax(300px, 1fr) 154px 170px 174px;
  }

  .compact-product-toolbar {
    grid-template-columns: minmax(260px, 0.8fr) minmax(380px, 1.2fr);
  }

  .product-dropdown .product-results {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 1050px) {
  .compact-transaction-row {
    grid-template-columns: minmax(300px, 1fr) 155px;
  }

  .compact-command-card {
    height: 56px;
    min-height: 56px;
  }

  .compact-product-toolbar {
    grid-template-columns: 1fr;
  }

  .compact-product-panel .category-strip {
    order: 2;
  }

  .invoice-grid-scroll {
    max-height: clamp(250px, calc(100vh - 420px), 440px);
  }
}

@media (max-width: 700px) {
  .screen-invoice-new {
    --invoice-header-height: 62px;
  }

  .compact-transaction-row {
    grid-template-columns: 1fr 145px;
  }

  .compact-client-card {
    grid-column: 1 / -1;
  }

  .compact-command-card {
    height: 52px;
    min-height: 52px;
  }

  .compact-product-panel .category-strip {
    min-height: 38px;
  }

  .product-dropdown {
    position: fixed;
    z-index: 100;
    top: var(--invoice-header-height);
    left: 0;
    right: 0;
    bottom: calc(var(--footer-height) + 66px);
    overflow: hidden;
    border-radius: 0;
  }

  .product-dropdown .product-results {
    max-height: calc(100% - 45px);
    grid-template-columns: 1fr;
  }

  .invoice-grid {
    font-size: 12px;
  }

  .invoice-grid th {
    font-size: 11px;
  }
}

/* ============================================================
   [module-invoice-new-refinement-004] END
   ============================================================ */


/* ============================================================
   [module-invoice-new-final-touch-005] START
   Final grid alignment, sizing, currency presentation,
   discount synchronization support, fixed grid footer, and
   prominent action controls.
   ============================================================ */

.invoice-grid {
  width: 1364px;
  min-width: 1364px;
  table-layout: fixed;
}

.invoice-grid th {
  text-align: center;
  vertical-align: middle;
}

.invoice-grid th,
.invoice-grid td {
  overflow: hidden;
}

.invoice-grid .col-sno {
  width: 44px;
  text-align: center;
}

.invoice-grid .col-stock {
  width: 82px;
  text-align: center;
}

.invoice-grid .col-rate {
  width: 90px;
  text-align: center;
}

.invoice-grid .col-qty {
  width: 72px;
  text-align: center;
}

.invoice-grid .col-refund {
  width: 72px;
  text-align: center;
}

.invoice-grid .col-gross {
  width: 100px;
  text-align: right;
}

.invoice-grid .col-discp {
  width: 100px;
  text-align: center;
}

.invoice-grid .col-discv {
  width: 100px;
  text-align: right;
}

.invoice-grid .col-net {
  width: 100px;
  text-align: right;
}

.invoice-grid .col-actions {
  width: 85px;
  text-align: center;
}

.invoice-grid .col-item {
  width: 419px;
}

.invoice-grid th.col-gross,
.invoice-grid th.col-discv,
.invoice-grid th.col-net {
  text-align: center;
}

.invoice-grid td.col-rate,
.invoice-grid td.col-qty,
.invoice-grid td.col-refund,
.invoice-grid td.col-actions {
  text-align: center;
}

.invoice-grid td.col-gross,
.invoice-grid td.col-discv,
.invoice-grid td.col-net {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.invoice-grid input {
  max-width: 100%;
  margin: 0 auto;
}

.invoice-grid .grid-currency-input {
  width: 78px;
  padding: 0 5px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.invoice-grid .grid-quantity-input {
  width: 58px;
  padding: 0 5px;
  text-align: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.percent-input-shell {
  position: relative;
  width: 82px;
  margin: 0 auto;
}

.percent-input-shell input {
  width: 82px;
  padding-right: 20px;
  text-align: right;
}

.percent-input-shell > span {
  position: absolute;
  top: 50%;
  right: 7px;
  color: #5e707c;
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
  transform: translateY(-50%);
}

.grid-money-display {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.line-item-title {
  max-width: none;
}

.invoice-grid-scroll {
  height: 430px;
  max-height: 430px;
  overflow: auto;
}

.invoice-grid thead th {
  position: sticky;
  z-index: 4;
  top: 0;
}

.invoice-grid-footer td {
  position: sticky;
  z-index: 3;
  bottom: 0;
  height: 38px;
  color: #eef4f7;
  background: linear-gradient(180deg, #4b6477, #293f50) !important;
  border-top: 1px solid #172c3b;
  border-bottom: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 11.5px;
  font-weight: 800;
}

.invoice-grid-footer .grid-footer-label {
  text-align: left;
  letter-spacing: 0.025em;
}

.invoice-grid-footer .grid-footer-number {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.invoice-grid-footer .grid-footer-money {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.invoice-grid tbody tr {
  cursor: default;
}

.invoice-grid tbody tr.is-active-row td {
  background: #e9f2f7 !important;
  box-shadow: inset 0 1px 0 #d4e4ed, inset 0 -1px 0 #d4e4ed;
}

.invoice-grid tbody tr.is-refund-row.is-active-row td {
  background: #fff1b8 !important;
}

.line-action-button.picture {
  color: #28556f;
  background: #e5f0f6;
  border-color: #bdd3df;
}

.line-action-button.picture:hover {
  color: white;
  background: linear-gradient(180deg, #5d8198, #31566d);
  border-color: #284b60;
}

.picture-icon {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  transform: rotate(90deg);
}

.remarks-panel textarea {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 13pt;
}

.invoice-cancel-button,
.invoice-save-button {
  min-width: 174px;
  height: 44px;
  padding-right: 21px;
  padding-left: 21px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14pt;
}

.invoice-action-buttons {
  gap: 12px;
}

@media (max-width: 1500px) {
  .invoice-grid {
    width: 100%;
    min-width: 1114px;
  }

  .invoice-grid .col-item {
    width: auto;
  }
}

@media (max-height: 850px) {
  .invoice-grid-scroll {
    height: 370px;
    max-height: 370px;
  }
}

@media (max-height: 740px) {
  .invoice-grid-scroll {
    height: 315px;
    max-height: 315px;
  }
}

@media (max-width: 700px) {
  .invoice-grid {
    min-width: 1250px;
  }

  .invoice-grid-scroll {
    height: 360px;
    max-height: 360px;
  }

  .invoice-cancel-button,
  .invoice-save-button {
    min-width: 0;
    font-size: 12pt;
  }
}

/* ============================================================
   [module-invoice-new-final-touch-005] END
   ============================================================ */


/* ============================================================
   [module-invoice-qr-import] START
   ============================================================ */

.invoice-qr-card {
  width: min(980px, 100%);
}

.invoice-qr-content {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(330px, 0.82fr);
  gap: 0;
}

.qr-camera-panel,
.qr-manual-panel {
  padding: 18px;
}

.qr-camera-panel {
  background: linear-gradient(180deg, #e9eff3, #dfe8ed);
  border-right: 1px solid #cbd7df;
}

.qr-camera-stage {
  position: relative;
  min-height: 330px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at center, #1a2c38, #08131b);
  border: 1px solid #0b1821;
  border-radius: 14px;
  box-shadow: inset 0 0 35px rgba(0,0,0,0.42);
}

.qr-camera-stage video {
  width: 100%;
  height: 330px;
  display: block;
  object-fit: cover;
}

.qr-camera-frame {
  position: absolute;
  width: min(230px, 66%);
  aspect-ratio: 1;
  border: 2px solid rgba(255,255,255,0.88);
  border-radius: 16px;
  box-shadow:
    0 0 0 999px rgba(0,0,0,0.24),
    inset 0 0 0 1px rgba(201,47,56,0.75);
  pointer-events: none;
}

.qr-camera-frame::before,
.qr-camera-frame::after {
  content: "";
  position: absolute;
  width: 45px;
  height: 45px;
  border-color: #e34952;
  border-style: solid;
}

.qr-camera-frame::before {
  top: -3px;
  left: -3px;
  border-width: 4px 0 0 4px;
  border-radius: 14px 0 0 0;
}

.qr-camera-frame::after {
  right: -3px;
  bottom: -3px;
  border-width: 0 4px 4px 0;
  border-radius: 0 0 14px 0;
}

.qr-camera-message {
  position: absolute;
  z-index: 2;
  max-width: 80%;
  padding: 10px 14px;
  color: #ecf3f7;
  background: rgba(16,31,42,0.84);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 9px;
  font-size: 0.73rem;
  text-align: center;
}

.qr-camera-actions {
  margin-top: 11px;
  display: flex;
  gap: 9px;
}

.qr-primary-button,
.qr-secondary-button {
  height: 40px;
  padding: 0 15px;
  border-radius: 9px;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.qr-primary-button {
  color: white;
  background: linear-gradient(180deg, #d94750, #a7212a);
  border: 1px solid #8f1a22;
}

.qr-secondary-button {
  color: #405561;
  background: #f4f7f9;
  border: 1px solid #c8d4dc;
}

.qr-primary-button:disabled,
.qr-secondary-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.qr-support-note {
  margin: 10px 0 0;
  color: #6e7f89;
  font-size: 0.62rem;
  line-height: 1.55;
}

.qr-manual-panel {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #ffffff, #f5f8fa);
}

.qr-manual-panel > label {
  color: #465b68;
  font-size: 0.7rem;
  font-weight: 800;
}

.qr-manual-input-row {
  position: relative;
  margin-top: 7px;
}

.qr-manual-input-row input {
  width: 100%;
  height: 47px;
  padding: 0 42px 0 13px;
  color: #253946;
  background: white;
  border: 1px solid #c5d2db;
  border-radius: 10px;
  outline: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
}

.qr-manual-input-row input:focus {
  border-color: #6f8da1;
  box-shadow: 0 0 0 3px rgba(85,116,139,0.13);
}

.qr-input-clear {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 33px;
  height: 33px;
  color: #70818d;
  background: #edf2f5;
  border: 0;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}

.qr-current-context {
  margin-top: 13px;
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 8px;
}

.qr-current-context > div {
  min-width: 0;
  padding: 10px;
  background: #eaf0f4;
  border: 1px solid #d2dde4;
  border-radius: 9px;
}

.qr-current-context span,
.qr-current-context strong {
  display: block;
}

.qr-current-context span {
  color: #788995;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.qr-current-context strong {
  margin-top: 4px;
  overflow: hidden;
  color: #344b59;
  font-size: 0.69rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qr-existing-options {
  margin-top: 13px;
  padding: 11px;
  background: #fff8e5;
  border: 1px solid #ead8a4;
  border-radius: 10px;
}

.qr-option-heading {
  display: block;
  margin-bottom: 7px;
  color: #765b1b;
  font-size: 0.64rem;
  font-weight: 800;
}

.qr-radio-option {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 7px;
  align-items: start;
  padding: 7px;
  color: #465965;
  border-radius: 8px;
  cursor: pointer;
}

.qr-radio-option:hover {
  background: rgba(255,255,255,0.72);
}

.qr-radio-option input {
  margin: 3px 0 0;
  accent-color: var(--jtel-red);
}

.qr-radio-option strong,
.qr-radio-option small {
  display: block;
}

.qr-radio-option strong {
  font-size: 0.67rem;
}

.qr-radio-option small {
  margin-top: 2px;
  color: #7c8a93;
  font-size: 0.57rem;
  line-height: 1.45;
}

.qr-inline-message {
  min-height: 38px;
  margin-top: 10px;
  padding: 8px 9px;
  color: #667984;
  background: #edf2f5;
  border-radius: 8px;
  font-size: 0.65rem;
  line-height: 1.45;
}

.qr-inline-message:empty {
  visibility: hidden;
}

.qr-inline-message.is-error {
  color: #9b2831;
  background: #fae7e9;
}

.qr-inline-message.is-success {
  color: #27724f;
  background: #e4f4ec;
}

.qr-load-button {
  width: 100%;
  min-width: 0;
  margin-top: auto;
  height: 46px;
  font-size: 0.78rem;
}

@media (max-width: 780px) {
  .invoice-qr-card {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    overflow-y: auto;
  }

  .invoice-qr-content {
    grid-template-columns: 1fr;
  }

  .qr-camera-panel {
    border-right: 0;
    border-bottom: 1px solid #cbd7df;
  }

  .qr-camera-stage,
  .qr-camera-stage video {
    min-height: 260px;
    height: 260px;
  }

  .qr-manual-panel {
    min-height: 370px;
  }
}

/* ============================================================
   [module-invoice-qr-import] END
   ============================================================ */


/* ============================================================
   [module-invoice-qr-cross-platform-007] START
   html5-qrcode integration with JTEL custom presentation.
   ============================================================ */

.qr-library-stage {
  min-height: 330px;
  padding: 10px;
  display: block;
}

.invoice-qr-reader {
  width: 100%;
  min-height: 308px;
  overflow: hidden;
  color: #eaf2f6;
  background: #0b1821;
  border-radius: 11px;
}

.invoice-qr-reader video,
.invoice-qr-reader img,
.invoice-qr-reader canvas {
  max-width: 100% !important;
  border-radius: 9px;
}

.invoice-qr-reader > div {
  border: 0 !important;
}

.invoice-qr-reader #qr-shaded-region {
  border-color: rgba(201, 47, 56, 0.65) !important;
}

.invoice-qr-reader button,
.invoice-qr-reader select {
  min-height: 36px;
  margin: 5px;
  padding: 0 11px;
  color: #263b48;
  background: #f3f7f9;
  border: 1px solid #bdccd5;
  border-radius: 8px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
}

.invoice-qr-reader a {
  color: #f18a90 !important;
}

.qr-camera-actions {
  flex-wrap: wrap;
}

.qr-camera-actions > button {
  flex: 1 1 110px;
}

@media (max-width: 780px) {
  .qr-library-stage {
    min-height: 270px;
  }

  .invoice-qr-reader {
    min-height: 248px;
  }
}

/* ============================================================
   [module-invoice-qr-cross-platform-007] END
   ============================================================ */


/* ============================================================
   [module-jtel-dialog] START
   ============================================================ */

.jtel-dialog-layer {
  z-index: 320;
  padding: 18px;
  background: rgba(8, 18, 26, 0.68);
  backdrop-filter: blur(7px);
}

.jtel-dialog-card {
  position: relative;
  width: min(470px, 100%);
  padding: 0 24px 22px;
  overflow: hidden;
  color: #243744;
  background:
    linear-gradient(150deg, rgba(255,255,255,0.995), rgba(235,241,245,0.99));
  border: 1px solid rgba(255,255,255,0.92);
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 #fff,
    0 25px 75px rgba(4, 14, 22, 0.34);
  animation: jtelDialogEnter 155ms ease-out;
}

.jtel-dialog-shine {
  height: 5px;
  margin: 0 -24px 20px;
  background: linear-gradient(90deg, #536f82, #91a6b4, #c92f38, #91a6b4, #536f82);
  box-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.jtel-dialog-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.jtel-dialog-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, #69869a, #344f62);
  border: 1px solid #2e4758;
  border-radius: 13px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    0 7px 16px rgba(31, 57, 74, 0.22);
  font-size: 1.15rem;
  font-weight: 900;
}

.jtel-dialog-layer[data-type="warning"] .jtel-dialog-icon {
  background: linear-gradient(145deg, #d39a35, #9b6715);
  border-color: #86570f;
}

.jtel-dialog-layer[data-type="danger"] .jtel-dialog-icon,
.jtel-dialog-layer[data-type="error"] .jtel-dialog-icon {
  background: linear-gradient(145deg, #df4d56, #a31f28);
  border-color: #8d1921;
}

.jtel-dialog-layer[data-type="success"] .jtel-dialog-icon {
  background: linear-gradient(145deg, #43a879, #287553);
  border-color: #226648;
}

.jtel-dialog-heading-copy {
  min-width: 0;
}

.jtel-dialog-heading-copy .section-kicker {
  font-size: 0.61rem;
}

.jtel-dialog-heading-copy h2 {
  margin: 5px 0 0;
  color: #243744;
  font-size: 1.22rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.jtel-dialog-message {
  margin-top: 17px;
  color: #60717d;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.83rem;
  line-height: 1.65;
  white-space: pre-line;
}

.jtel-dialog-input-wrap {
  margin-top: 16px;
}

.jtel-dialog-input-wrap label {
  display: block;
  margin-bottom: 6px;
  color: #405561;
  font-size: 0.68rem;
  font-weight: 800;
}

.jtel-dialog-input-wrap input {
  width: 100%;
  height: 45px;
  padding: 0 12px;
  color: #263946;
  background: #fff;
  border: 1px solid #c4d1da;
  border-radius: 10px;
  outline: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.82rem;
}

.jtel-dialog-input-wrap input:focus {
  border-color: #6c8a9e;
  box-shadow: 0 0 0 3px rgba(86,116,139,0.13);
}

.jtel-dialog-input-error {
  min-height: 18px;
  margin-top: 5px;
  color: #b42a34;
  font-size: 0.64rem;
  font-weight: 700;
}

.jtel-dialog-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.jtel-dialog-button {
  min-width: 132px;
  height: 43px;
  padding: 0 17px;
  border-radius: 10px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: 140ms ease;
}

.jtel-dialog-button:hover {
  transform: translateY(-1px);
}

.jtel-dialog-button-secondary {
  color: #4d616e;
  background: linear-gradient(180deg, #fff, #e8eef2);
  border: 1px solid #c4d1d9;
  box-shadow: inset 0 1px 0 #fff;
}

.jtel-dialog-button-primary {
  color: white;
  background: linear-gradient(180deg, #dc4650, #ae222b);
  border: 1px solid #951b23;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.3),
    0 8px 18px rgba(171, 31, 40, 0.2);
}

.jtel-dialog-layer[data-type="info"] .jtel-dialog-button-primary,
.jtel-dialog-layer[data-type="question"] .jtel-dialog-button-primary {
  background: linear-gradient(180deg, #6c899d, #365568);
  border-color: #2d495b;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.3),
    0 8px 18px rgba(37, 70, 90, 0.2);
}

#client-select-button {
  position: relative;
  z-index: 14;
  pointer-events: auto;
  touch-action: manipulation;
}

@keyframes jtelDialogEnter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 560px) {
  .jtel-dialog-layer {
    align-items: flex-end;
    padding: 10px;
  }

  .jtel-dialog-card {
    width: 100%;
    padding-right: 18px;
    padding-left: 18px;
    border-radius: 17px;
  }

  .jtel-dialog-shine {
    margin-right: -18px;
    margin-left: -18px;
  }

  .jtel-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .jtel-dialog-button {
    width: 100%;
    min-width: 0;
  }
}

/* ============================================================
   [module-jtel-dialog] END
   ============================================================ */


/* ============================================================
   [module-invoice-special-discount-sync-009] START
   ============================================================ */

.special-discount-value-row {
  position: relative;
}

.special-discount-value-input {
  width: 112px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.special-discount-value-input:focus {
  border-color: #6f8da1;
  box-shadow: 0 0 0 3px rgba(85,116,139,0.13);
}

.sales-totals-card .special-discount-value-input {
  color: #2f556c;
}

.refund-totals-card .special-discount-value-input {
  color: #9a5e13;
}

@media (max-width: 700px) {
  .special-discount-value-input {
    width: 100%;
  }
}

/* ============================================================
   [module-invoice-special-discount-sync-009] END
   ============================================================ */


/* ============================================================
   [module-invoice-index] START
   ============================================================ */

.screen-invoice-index {
  flex-direction: column;
  background: #e7edf1;
}

.invoice-index-workspace {
  background:
    linear-gradient(180deg, #edf2f5, #e5ebef);
}

.invoice-index-workspace-scroll {
  padding: 15px;
}

.invoice-index-filter-panel,
.invoice-index-results-panel {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(244,248,250,0.99));
  border: 1px solid #cdd8df;
  border-radius: 15px;
  box-shadow:
    inset 0 1px 0 #fff,
    0 7px 20px rgba(24, 47, 64, 0.08);
}

.invoice-index-filter-panel {
  padding: 14px 15px 15px;
}

.invoice-index-filter-heading,
.invoice-index-results-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.invoice-index-filter-heading h2,
.invoice-index-results-heading h2 {
  margin: 4px 0 0;
  color: #2b3f4d;
  font-size: 1rem;
}

.invoice-index-filter-heading p {
  margin: 5px 0 0;
  color: #7b8b95;
  font-size: 0.66rem;
  line-height: 1.45;
}

.invoice-index-filter-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 130px 130px minmax(150px, 0.85fr) minmax(210px, 1.3fr) minmax(170px, 0.9fr) minmax(200px, 1.25fr) 138px;
  gap: 8px;
  align-items: end;
}

.index-filter-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.index-filter-field > span {
  color: #61727e;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.025em;
}

.index-filter-field input,
.index-filter-field select {
  width: 100%;
  height: 38px;
  min-width: 0;
  padding: 0 9px;
  color: #314754;
  background: #fff;
  border: 1px solid #c7d3db;
  border-radius: 8px;
  outline: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.69rem;
}

.index-filter-field input:focus,
.index-filter-field select:focus {
  border-color: #6b8b9f;
  box-shadow: 0 0 0 3px rgba(78, 112, 135, 0.11);
}

.invoice-index-find-button {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  color: white;
  background:
    linear-gradient(180deg, #da4650, #ab222b);
  border: 1px solid #931a22;
  border-radius: 9px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    0 6px 13px rgba(170, 31, 40, 0.17);
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}

.invoice-index-results-panel {
  margin-top: 11px;
  padding: 13px 14px 14px;
}

.invoice-index-result-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

#invoice-index-filter-note {
  color: #7d8d97;
  font-size: 0.63rem;
  font-weight: 700;
}

.invoice-index-grid-scroll {
  position: relative;
  height: calc(100vh - 292px);
  min-height: 325px;
  margin-top: 10px;
  overflow: auto;
  background: white;
  border: 1px solid #ccd8df;
  border-radius: 10px;
}

.invoice-index-grid {
  width: 100%;
  min-width: 1240px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  color: #344a57;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 12px;
}

.invoice-index-grid th {
  position: sticky;
  z-index: 3;
  top: 0;
  height: 39px;
  padding: 0 8px;
  color: #edf4f7;
  background:
    linear-gradient(180deg, #536d80, #30495b);
  border-right: 1px solid rgba(255,255,255,0.09);
  border-bottom: 1px solid #243d4f;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.invoice-index-grid td {
  height: 45px;
  padding: 5px 8px;
  overflow: hidden;
  background: #fff;
  border-right: 1px solid #e4eaee;
  border-bottom: 1px solid #dfe7ec;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-index-grid tbody tr {
  cursor: default;
}

.invoice-index-grid tbody tr:nth-child(even) td {
  background: #f7f9fa;
}

.invoice-index-grid tbody tr:hover td {
  background: #eaf2f7;
}

.invoice-index-grid td strong,
.invoice-index-grid td small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-index-grid td small {
  margin-top: 2px;
  color: #8997a0;
  font-size: 10px;
}

.idx-col-no {
  width: 132px;
}

.idx-col-date {
  width: 92px;
  text-align: center;
}

.idx-col-time {
  width: 80px;
  text-align: center;
}

.idx-col-client {
  width: 245px;
}

.idx-col-sale,
.idx-col-refund {
  width: 98px;
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.idx-col-refund.has-refund {
  color: #9e5d12;
  background: #fff6da !important;
}

.idx-col-remarks {
  width: 250px;
}

.idx-col-user {
  width: 160px;
}

.idx-col-action {
  width: 122px;
  text-align: center;
}

.invoice-index-open-button {
  min-width: 58px;
  height: 29px;
  color: #31566d;
  background: linear-gradient(180deg, #edf4f7, #dbe7ed);
  border: 1px solid #bfd0da;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.invoice-index-open-button:hover {
  color: #fff;
  background: linear-gradient(180deg, #617f93, #36586d);
  border-color: #2d4d61;
}

.invoice-index-empty {
  position: absolute;
  inset: 39px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #8696a0;
  background: linear-gradient(180deg, #fff, #f7f9fa);
  text-align: center;
}

.invoice-index-empty.hidden {
  display: none;
}

.invoice-index-empty > span {
  font-size: 2rem;
  color: #8195a3;
}

.invoice-index-empty strong {
  margin-top: 7px;
  color: #506570;
  font-size: 0.82rem;
}

.invoice-index-empty small {
  margin-top: 4px;
  font-size: 0.66rem;
}

.index-count-chip {
  min-width: 82px;
}

.invoice-index-refresh-side {
  color: #d9e7ef;
  background: rgba(95, 128, 150, 0.15);
  border-color: rgba(126, 156, 176, 0.24);
}

@media (max-width: 1250px) {
  .invoice-index-filter-grid {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }

  .invoice-index-find-button {
    min-width: 138px;
  }
}

@media (max-width: 760px) {
  .invoice-index-workspace-scroll {
    padding: 9px;
  }

  .invoice-index-filter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .remarks-filter-field,
  .client-filter-field,
  .user-filter-field,
  .invoice-index-find-button {
    grid-column: 1 / -1;
  }

  .invoice-index-grid-scroll {
    height: calc(100vh - 430px);
    min-height: 280px;
  }
}

/* ============================================================
   [module-invoice-index] END
   ============================================================ */


/* ============================================================
   [module-invoice-index-polish-011] START
   ============================================================ */

/* Record count now belongs in the grid footer. */
.index-count-chip {
  display: none !important;
}

/* More prominent filter controls. */
.index-filter-field input,
.index-filter-field select {
  height: 40px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 13pt;
  font-weight: 600;
}

/* Keep labels clear but compact. */
.index-filter-field > span {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 10pt;
}

/* Use the vertical space previously consumed by Search Results / Invoices. */
.compact-index-results {
  margin-top: 10px;
  padding: 8px 10px 9px;
}

.compact-index-results .invoice-index-grid-scroll {
  margin-top: 0;
  height: calc(100vh - 250px);
  min-height: 350px;
}

/* Invoice number reduced by approximately 10 px. */
.invoice-index-grid .idx-col-no {
  width: 122px;
}

/* Client + Remarks can comfortably show two lines. */
.invoice-index-grid td.idx-col-client,
.invoice-index-grid td.idx-col-remarks {
  height: auto;
  min-height: 52px;
  white-space: normal;
  vertical-align: middle;
}

.index-two-line-text {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.invoice-index-grid td.idx-col-client .index-two-line-text {
  font-weight: 700;
}

.invoice-index-grid td.idx-col-remarks .index-two-line-text {
  color: #5d707c;
}

/* Two explicit action icons while preserving row double-click. */
.invoice-index-grid .idx-col-action {
  width: 96px;
}

.invoice-index-action-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.invoice-index-icon-button {
  width: 34px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 7px;
  cursor: pointer;
  transition: 130ms ease;
}

.invoice-index-icon-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.invoice-index-icon-button.edit {
  color: #365c72;
  background: linear-gradient(180deg, #eef5f8, #d9e6ed);
  border: 1px solid #bdced8;
}

.invoice-index-icon-button.pdf {
  color: #aa2932;
  background: linear-gradient(180deg, #fff3f4, #f6dfe1);
  border: 1px solid #e2b8bc;
}


.invoice-index-icon-button.receipt {
  color: #246342;
  background: linear-gradient(180deg, #eef8f2, #d7ebdf);
  border: 1px solid #afd0bb;
}

.receipt-mini-icon {
  font-size: 10px;
  font-weight: 900;
}

.invoice-index-icon-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.pdf-mini-icon {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

/* Fixed summary footer under the data grid. */
.invoice-index-summary-footer {
  min-height: 43px;
  margin-top: 7px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #536875;
  background:
    linear-gradient(180deg, #f7fafb, #e9f0f4);
  border: 1px solid #ccd8df;
  border-radius: 9px;
  box-shadow: inset 0 1px 0 #fff;
  font-family: "Segoe UI", Arial, sans-serif;
}

.invoice-index-summary-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.invoice-index-summary-left > span {
  color: #7b8c96;
  font-size: 11px;
}

.invoice-index-summary-left > strong {
  color: #334d5d;
  font-size: 12px;
}

.invoice-index-totals {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
}

.invoice-index-totals span {
  white-space: nowrap;
}

.invoice-index-totals strong {
  margin-left: 5px;
  color: #2f4e61;
  font-variant-numeric: tabular-nums;
}

.invoice-index-total-separator {
  width: 1px;
  height: 20px;
  background: #c9d5dc;
}

/* Inactive state is a visible warning, not a blocking error. */
.invoice-grid tr.has-inactive-warning td {
  box-shadow: inset 0 1px 0 rgba(192, 129, 30, 0.08);
}

.warning-pill.inactive {
  color: #8b5a10;
  background: #fff1c9;
  border-color: #e0bd68;
}

@media (max-width: 900px) {
  .invoice-index-summary-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .invoice-index-totals {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .compact-index-results .invoice-index-grid-scroll {
    height: calc(100vh - 405px);
  }
}

/* ============================================================
   [module-invoice-index-polish-011] END
   ============================================================ */


/* ============================================================
   [module-invoice-pdf-viewer] START
   ============================================================ */

.invoice-pdf-layer {
  z-index: 310;
  padding: 14px;
  background: rgba(7, 16, 23, 0.76);
  backdrop-filter: blur(7px);
}

.invoice-pdf-card {
  width: min(1180px, 96vw);
  height: min(860px, 92vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #edf2f5;
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: 16px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.38);
}

.invoice-pdf-header {
  min-height: 64px;
  padding: 9px 12px 9px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: white;
  background:
    linear-gradient(180deg, #415c70, #253b4b);
  border-bottom: 1px solid #172a38;
}

.invoice-pdf-heading,
.invoice-pdf-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.invoice-pdf-heading h2 {
  margin: 3px 0 0;
  font-size: 1rem;
}

.invoice-pdf-heading .section-kicker {
  color: #f18b91;
  font-size: 0.58rem;
}

.invoice-pdf-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #dc4650, #aa222b);
  border: 1px solid #8f1c24;
  border-radius: 9px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28);
  font-size: 0.62rem;
  font-weight: 900;
}

.pdf-viewer-button {
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.pdf-viewer-button.secondary {
  color: #e8f1f5;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.17);
}

.pdf-viewer-button.primary {
  color: white;
  background: linear-gradient(180deg, #dc4650, #aa222b);
  border: 1px solid #901b23;
}

.invoice-pdf-stage {
  position: relative;
  min-height: 0;
  flex: 1;
  padding: 8px;
  background: #cfd9df;
}

.invoice-pdf-stage iframe {
  width: 100%;
  height: 100%;
  display: block;
  background: white;
  border: 0;
  border-radius: 7px;
}

.invoice-pdf-placeholder {
  position: absolute;
  inset: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #6b7e89;
  background: white;
  border-radius: 7px;
  text-align: center;
}

.invoice-pdf-placeholder > span {
  color: #b32a33;
  font-size: 1.6rem;
  font-weight: 900;
}

.invoice-pdf-placeholder strong {
  margin-top: 8px;
}

.invoice-pdf-placeholder small {
  margin-top: 5px;
}

@media (max-width: 720px) {
  .invoice-pdf-layer {
    padding: 5px;
  }

  .invoice-pdf-card {
    width: 100%;
    height: 98vh;
    border-radius: 11px;
  }

  .invoice-pdf-header {
    min-height: 104px;
    align-items: flex-start;
    flex-direction: column;
  }

  .invoice-pdf-header-actions {
    width: 100%;
  }

  .pdf-viewer-button {
    flex: 1;
  }
}

/* ============================================================
   [module-invoice-pdf-viewer] END
   ============================================================ */


/* ============================================================
   [invoice-mode-and-retail-tax] START
   ============================================================ */

.invoice-mode-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  padding: 9px 10px;
  background: linear-gradient(180deg, #eef3f6, #dce5eb);
  border: 1px solid #b8c6d0;
  border-radius: 13px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.invoice-mode-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.invoice-mode-button {
  min-height: 48px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  color: #314656;
  background: linear-gradient(#ffffff, #e3e9ed);
  border: 1px solid #aab9c4;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 #fff, 0 3px 8px rgba(25,45,60,.08);
  cursor: pointer;
  transition: 140ms ease;
}

.invoice-mode-button span {
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .035em;
}

.invoice-mode-button small {
  margin-top: 2px;
  color: #71828f;
  font-size: .62rem;
  font-weight: 700;
}

.invoice-mode-button:hover {
  transform: translateY(-1px);
  border-color: #728b9e;
}

.invoice-mode-button.is-active {
  color: #fff;
  border-color: #1e3547;
  background: linear-gradient(#58758c, #2d4b62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 5px 12px rgba(28,54,74,.22);
}

.invoice-mode-button.is-active small {
  color: rgba(255,255,255,.76);
}

.invoice-mode-button.retail-cash.is-active {
  border-color: #246143;
  background: linear-gradient(#4a956c, #236143);
}

.invoice-mode-button.retail-card.is-active {
  border-color: #6a4d19;
  background: linear-gradient(#ae8240, #76531f);
}

.invoice-mode-description {
  max-width: 240px;
  color: #526774;
  font-size: .68rem;
  font-weight: 750;
  line-height: 1.45;
  text-align: right;
}

.sales-tax-row {
  background: #edf7f1;
  border-color: #c6dfcf !important;
}

.sales-tax-row label,
.sales-tax-row span {
  color: #246344;
}

@media (max-width: 900px) {
  .invoice-mode-shell {
    grid-template-columns: 1fr;
  }

  .invoice-mode-description {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 620px) {
  .invoice-mode-buttons {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   [invoice-mode-and-retail-tax] END
   ============================================================ */


/* ============================================================
   [CLIENT-MODULE-001] START
   Client Entry + Clients Index
   ============================================================ */

.screen-client-entry,
.screen-clients-index {
  flex-direction: column;
  background: #e9eff3;
}

.client-module-header {
  flex: 0 0 var(--header-height);
}

.client-header-actions {
  gap: 10px;
}

.client-mode-chip {
  min-width: 90px;
  height: 52px;
  padding: 6px 13px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 11px;
}

.client-mode-chip span {
  color: rgba(235,242,247,0.62);
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.client-mode-chip strong {
  margin-top: 2px;
  color: #fff;
  font-size: 0.88rem;
}

.client-entry-workspace,
.clients-index-workspace {
  min-height: 0;
  flex: 1 1 auto;
}

.client-entry-workspace {
  overflow: hidden;
}

.client-entry-scroll {
  height: 100%;
  padding: 26px;
  overflow: auto;
}

.client-entry-card {
  position: relative;
  width: min(1060px, 100%);
  margin: 0 auto;
  padding: 30px 27px 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(81, 111, 132, 0.10), transparent 34%),
    linear-gradient(180deg, #ffffff, #f7f9fa);
  border: 1px solid #c6d2da;
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 #fff,
    0 13px 34px rgba(20, 40, 55, 0.12);
}

.client-entry-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(
    90deg,
    var(--jtel-red-dark),
    #e04a53 48%,
    var(--jtel-red-dark)
  );
  box-shadow: 0 1px 0 rgba(255,255,255,0.34);
}


.client-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid #d8e1e7;
}

.client-card-heading h2,
.clients-index-filter-copy h2 {
  margin: 6px 0 5px;
  color: #263d4d;
  font-size: 1.35rem;
}

.client-card-heading p,
.clients-index-filter-copy p {
  margin: 0;
  color: #71808b;
  font-size: 0.78rem;
}

.client-required-note {
  align-self: flex-start;
  padding: 6px 9px;
  color: #9d2831;
  background: #f9e9eb;
  border: 1px solid #edc9cd;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
}

.client-form-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.client-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.client-field-full {
  grid-column: 1 / -1;
}

.client-field-contact {
  grid-column: span 8;
}

.client-field-house {
  grid-column: span 4;
}

.client-field-wide {
  grid-column: span 8;
}

.client-field:not(
  .client-field-full,
  .client-field-contact,
  .client-field-house,
  .client-field-wide,
  .client-field-state,
  .client-field-zip
) {
  grid-column: span 5;
}

.client-field-state {
  grid-column: span 4;
}

.client-field-zip {
  grid-column: span 3;
}

.client-field span {
  color: #435867;
  font-size: 0.7rem;
  font-weight: 800;
}

.client-field input {
  width: 100%;
  height: 43px;
  padding: 0 12px;
  color: #203440;
  background: #fff;
  border: 1px solid #bdcbd4;
  border-radius: 9px;
  outline: 0;
  transition: 140ms ease;
}

.client-field input:focus {
  border-color: #6c879a;
  box-shadow: 0 0 0 3px rgba(75, 111, 136, 0.13);
}

.client-form-actions {
  margin-top: 24px;
  padding-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #d8e1e7;
}

.client-button {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 9px;
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
}

.client-button.secondary {
  color: #405563;
  background: linear-gradient(#fff, #e8eef2);
  border: 1px solid #b8c7d0;
}

.client-button.primary {
  color: #fff;
  background: linear-gradient(#4f6c80, #29475c);
  border: 1px solid #213d50;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22);
}

.client-button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.clients-index-workspace {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.clients-index-filter-card,
.clients-index-results-card {
  background: #fff;
  border: 1px solid #c6d2da;
  border-radius: 15px;
  box-shadow: 0 8px 22px rgba(19, 39, 54, 0.09);
}

.clients-index-filter-card {
  padding: 17px 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.clients-index-filter-copy {
  min-width: 260px;
}

.clients-index-search-row {
  min-width: 0;
  flex: 1;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.clients-index-search-row input {
  width: min(520px, 100%);
  height: 40px;
  padding: 0 13px;
  border: 1px solid #b9c8d1;
  border-radius: 9px;
  outline: 0;
}

.clients-index-search-row input:focus {
  border-color: #6c879a;
  box-shadow: 0 0 0 3px rgba(75,111,136,0.12);
}

.clients-index-results-card {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.clients-index-table-scroll {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
}

.clients-index-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
}

.clients-index-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 11px;
  color: #fff;
  background: linear-gradient(#536d80, #314d61);
  border-right: 1px solid rgba(255,255,255,0.16);
  font-size: 0.66rem;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.clients-index-table td {
  padding: 9px 11px;
  color: #344a58;
  border-bottom: 1px solid #e2e8ec;
  font-size: 0.72rem;
  vertical-align: middle;
}

.clients-index-table tbody tr:hover {
  background: #f2f7fa;
}

.clients-index-table td strong,
.clients-index-table td small,
.clients-index-table td span {
  display: block;
}

.clients-index-table td small {
  margin-top: 3px;
  color: #7a8994;
  font-size: 0.63rem;
}

.cl-col-code { width: 145px; }
.cl-col-title { width: 250px; }
.cl-col-house { width: 120px; }
.cl-col-address { width: auto; }
.cl-col-phone { width: 135px; }
.cl-col-action { width: 82px; text-align: center; }

.client-index-edit-button {
  width: 33px;
  height: 31px;
  display: inline-grid;
  place-items: center;
  color: #315f78;
  background: linear-gradient(#f8fbfc, #dceaf1);
  border: 1px solid #bfd2dc;
  border-radius: 8px;
  cursor: pointer;
}

.client-index-edit-button svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.client-index-view-only {
  color: #87949d;
  font-size: 0.62rem;
  font-weight: 750;
}

.clients-index-empty {
  position: absolute;
  inset: 45px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #83919b;
  pointer-events: none;
}

.clients-index-empty span {
  font-size: 2rem;
}

.clients-index-empty strong {
  margin-top: 7px;
  color: #536875;
  font-size: 0.86rem;
}

.clients-index-empty small {
  margin-top: 4px;
  font-size: 0.68rem;
}

.clients-index-footer {
  min-height: 45px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #647784;
  background: #f4f7f9;
  border-top: 1px solid #d3dde3;
  font-size: 0.68rem;
}

.clients-index-footer strong {
  color: #2f4b5e;
  font-size: 0.76rem;
}

.client-new-header-button {
  color: #fff;
  background: rgba(255,255,255,0.10);
}

@media (max-width: 880px) {
  .client-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-field-full,
  .client-field-wide {
    grid-column: 1 / -1;
  }

  .client-field-contact,
  .client-field-house,
  .client-field-state,
  .client-field-zip,
  .client-field:not(
    .client-field-full,
    .client-field-contact,
    .client-field-house,
    .client-field-wide,
    .client-field-state,
    .client-field-zip
  ) {
    grid-column: span 1;
  }

  .clients-index-filter-card {
    align-items: stretch;
    flex-direction: column;
  }

  .clients-index-search-row {
    justify-content: stretch;
  }

  .clients-index-search-row input {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .client-entry-scroll,
  .clients-index-workspace {
    padding: 12px;
  }

  .client-entry-card {
    padding: 18px 15px;
  }

  .client-form-grid {
    grid-template-columns: 1fr;
  }

  .client-field-full,
  .client-field-wide,
  .client-field-contact,
  .client-field-house,
  .client-field-state,
  .client-field-zip,
  .client-field:not(
    .client-field-full,
    .client-field-contact,
    .client-field-house,
    .client-field-wide,
    .client-field-state,
    .client-field-zip
  ) {
    grid-column: span 1;
  }

  .client-card-heading,
  .clients-index-search-row {
    flex-direction: column;
  }

  .client-button {
    width: 100%;
  }

  .client-header-actions .client-mode-chip {
    display: none;
  }
}

/* ============================================================
   [CLIENT-MODULE-001] END
   ============================================================ */


/* ============================================================
   [PROFILE-UPDATE-001] START
   Login & Profile Update
   ============================================================ */

.screen-profile-update {
  flex-direction: column;
  background:
    radial-gradient(circle at 10% 10%, rgba(201,47,56,0.07), transparent 27%),
    radial-gradient(circle at 90% 90%, rgba(67,103,128,0.12), transparent 30%),
    #e9eff3;
}

.profile-update-header {
  flex: 0 0 var(--header-height);
}

.profile-secure-chip {
  min-width: 148px;
  height: 50px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 11px;
}

.profile-secure-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  background: #4cd18a;
  border: 2px solid rgba(255,255,255,0.52);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(76,209,138,0.12);
}

.profile-secure-chip small,
.profile-secure-chip strong {
  display: block;
}

.profile-secure-chip small {
  color: rgba(235,242,247,0.62);
  font-size: 0.58rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.profile-secure-chip strong {
  margin-top: 2px;
  color: #fff;
  font-size: 0.75rem;
}

.profile-update-workspace {
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.profile-update-scroll {
  width: 100%;
  height: 100%;
  padding: 25px;
  overflow: auto;
}

.profile-update-shell {
  width: min(1180px, 100%);
  min-height: 580px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 19px;
}

.profile-identity-card,
.profile-update-main-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(246,249,250,0.99));
  border: 1px solid #c4d0d8;
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 #fff,
    0 14px 34px rgba(20,40,55,0.12);
}

.profile-identity-belt,
.profile-main-belt {
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background:
    linear-gradient(90deg, #8f1d25, #e34d56 48%, #961e26);
}

.profile-identity-card {
  padding: 38px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-picture-shell {
  position: relative;
  width: 156px;
  height: 156px;
  display: grid;
  place-items: center;
  overflow: visible;
  background:
    linear-gradient(145deg, #ffffff, #dce5ea);
  border: 7px solid #fff;
  border-radius: 50%;
  box-shadow:
    0 0 0 1px #b9c8d1,
    0 13px 27px rgba(25,48,64,0.18);
}

.profile-update-picture,
.profile-update-initials {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.profile-update-picture {
  display: block;
  object-fit: cover;
}

.profile-update-initials {
  display: grid;
  place-items: center;
  color: #fff;
  background:
    linear-gradient(145deg, #5d7689, #263f52);
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.profile-picture-status {
  position: absolute;
  right: 4px;
  bottom: 8px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #2f9b69;
  border: 4px solid #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 900;
}

.profile-identity-copy {
  margin-top: 24px;
  text-align: center;
}

.profile-identity-copy h2 {
  margin: 6px 0 7px;
  color: #263d4d;
  font-size: 1.25rem;
}

.profile-identity-copy p {
  margin: 0;
  color: #73828c;
  font-size: 0.72rem;
  line-height: 1.6;
}

.profile-picture-actions {
  width: 100%;
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 8px;
}

.profile-soft-button {
  min-height: 38px;
  color: #344d5d;
  background: linear-gradient(#fff, #e7edf1);
  border: 1px solid #b9c8d1;
  border-radius: 9px;
  font-size: 0.68rem;
  font-weight: 850;
  cursor: pointer;
}

.profile-soft-button.danger {
  color: #9d2831;
  background: linear-gradient(#fff, #f6e5e7);
  border-color: #e5bfc3;
}

.profile-soft-button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.profile-picture-help {
  width: 100%;
  margin-top: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #778690;
  background: #f0f4f6;
  border: 1px solid #d4dde3;
  border-radius: 11px;
  font-size: 0.63rem;
}

.profile-picture-help strong {
  color: #405766;
  font-size: 0.68rem;
}

.profile-update-main-card {
  padding: 28px 29px 23px;
}

.profile-card-heading {
  padding-bottom: 17px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #d8e1e6;
}

.profile-card-heading h2 {
  margin: 6px 0 5px;
  color: #263d4d;
  font-size: 1.36rem;
}

.profile-card-heading p {
  margin: 0;
  color: #75848f;
  font-size: 0.72rem;
}

.profile-lock-badge {
  align-self: flex-start;
  padding: 7px 10px;
  color: #27724f;
  background: #e4f4ec;
  border: 1px solid #b8dfcd;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 850;
}

.profile-fields-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.profile-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-field-wide {
  grid-column: span 2;
}

.profile-field > span {
  color: #435867;
  font-size: 0.69rem;
  font-weight: 850;
}

.profile-field > input,
.profile-password-input-shell {
  width: 100%;
  height: 43px;
  color: #203440;
  background: #fff;
  border: 1px solid #bdcbd4;
  border-radius: 9px;
  outline: 0;
  transition: 140ms ease;
}

.profile-field > input {
  padding: 0 12px;
}

.profile-field > input:focus,
.profile-password-input-shell:focus-within {
  border-color: #6c879a;
  box-shadow: 0 0 0 3px rgba(75,111,136,0.13);
}

.profile-password-card {
  margin-top: 22px;
  padding: 18px;
  background:
    linear-gradient(145deg, #f7f9fa, #edf2f5);
  border: 1px solid #ccd7de;
  border-radius: 14px;
}

.profile-password-heading {
  display: flex;
  align-items: center;
  gap: 11px;
}

.profile-password-icon {
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  display: grid;
  place-items: center;
  color: #fff;
  background:
    linear-gradient(145deg, #db4650, #a82029);
  border-radius: 11px;
  box-shadow: 0 7px 15px rgba(168,32,41,0.20);
}

.profile-password-heading strong,
.profile-password-heading span {
  display: block;
}

.profile-password-heading strong {
  color: #2c4556;
  font-size: 0.85rem;
}

.profile-password-heading span {
  margin-top: 3px;
  color: #788792;
  font-size: 0.66rem;
}

.profile-password-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.profile-password-input-shell {
  display: flex;
  align-items: center;
  overflow: hidden;
}

.profile-password-input-shell input {
  min-width: 0;
  flex: 1 1 auto;
  height: 100%;
  padding: 0 8px 0 11px;
  background: transparent;
  border: 0;
  outline: 0;
}

.profile-password-input-shell button {
  height: 31px;
  margin-right: 5px;
  padding: 0 8px;
  color: #526b7b;
  background: #edf2f5;
  border: 1px solid #d0dbe1;
  border-radius: 7px;
  font-size: 0.59rem;
  font-weight: 850;
  cursor: pointer;
}

.profile-password-strength {
  margin-top: 12px;
}

.profile-strength-track {
  height: 5px;
  overflow: hidden;
  background: #d9e1e6;
  border-radius: 999px;
}

.profile-strength-track span {
  display: block;
  width: 0;
  height: 100%;
  background: #8397a5;
  border-radius: inherit;
  transition: width 180ms ease, background 180ms ease;
}

.profile-password-strength[data-level="weak"] .profile-strength-track span {
  background: #bd2e38;
}

.profile-password-strength[data-level="medium"] .profile-strength-track span {
  background: #b87917;
}

.profile-password-strength[data-level="strong"] .profile-strength-track span {
  background: #2c865d;
}

.profile-password-strength small {
  display: block;
  margin-top: 6px;
  color: #74848f;
  font-size: 0.62rem;
}

.profile-update-actions {
  margin-top: 21px;
  padding-top: 17px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #d8e1e6;
}

.profile-action-button {
  min-height: 42px;
  padding: 0 19px;
  border-radius: 9px;
  font-size: 0.73rem;
  font-weight: 900;
  cursor: pointer;
}

.profile-action-button.secondary {
  color: #405563;
  background: linear-gradient(#fff, #e8eef2);
  border: 1px solid #b8c7d0;
}

.profile-action-button.primary {
  min-width: 145px;
  color: #fff;
  background:
    linear-gradient(180deg, #db4650, #ac2029);
  border: 1px solid #971b23;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    0 8px 17px rgba(172,32,41,0.20);
}

.profile-action-button:disabled {
  opacity: 0.62;
  cursor: wait;
}

@media (max-width: 940px) {
  .profile-update-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .profile-password-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .profile-update-scroll {
    padding: 13px;
  }

  .profile-update-shell {
    grid-template-columns: 1fr;
  }

  .profile-identity-card {
    padding-bottom: 20px;
  }

  .profile-picture-help {
    margin-top: 18px;
  }

  .profile-fields-grid {
    grid-template-columns: 1fr;
  }

  .profile-field-wide {
    grid-column: span 1;
  }

  .profile-card-heading {
    flex-direction: column;
  }

  .profile-lock-badge {
    align-self: flex-start;
  }

  .profile-update-actions {
    flex-direction: column-reverse;
  }

  .profile-action-button {
    width: 100%;
  }

  .profile-secure-chip {
    display: none;
  }
}

/* ============================================================
   [PROFILE-UPDATE-001] END
   ============================================================ */


/* ============================================================
   [INVOICE-BRANCH-TAX-001] START
   Branch default tax and Admin-only edit state.
   ============================================================ */

.sales-totals-card input.tax-percent-readonly {
  color: #334c5c;
  background:
    linear-gradient(180deg, #eef3f6, #e4ebef);
  border-color: #c2cfd7;
  box-shadow: inset 0 1px 2px rgba(28, 49, 63, 0.07);
  cursor: not-allowed;
}

.sales-totals-card input.tax-percent-readonly:focus {
  border-color: #c2cfd7;
  box-shadow: inset 0 1px 2px rgba(28, 49, 63, 0.07);
}

/* ============================================================
   [INVOICE-BRANCH-TAX-001] END
   ============================================================ */


/* ============================================================
   [INVOICE-ORDER-BY-001] START
   ============================================================ */

.invoice-order-by-field {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.invoice-order-by-field > span {
  color: #435867;
  font-size: 0.7rem;
  font-weight: 850;
}

.invoice-order-by-field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  color: #203440;
  background: #fff;
  border: 1px solid #bdcbd4;
  border-radius: 9px;
  outline: 0;
  transition: 140ms ease;
}

.invoice-order-by-field input:focus {
  border-color: #6c879a;
  box-shadow: 0 0 0 3px rgba(75, 111, 136, 0.13);
}

/* ============================================================
   [INVOICE-ORDER-BY-001] END
   ============================================================ */


/* ============================================================
   [JTEL-REPORTS-MODULE-001] START
   ============================================================ */

.screen-jtel-report {
  flex-direction: column;
  background:
    radial-gradient(circle at 0 0, rgba(201,47,56,.06), transparent 28%),
    #e8eef2;
}

.jtel-report-workspace {
  min-height: 0;
  flex: 1 1 auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  overflow: hidden;
}

.jtel-report-filter,
.jtel-report-results {
  background: #fff;
  border: 1px solid #c5d1d9;
  border-radius: 15px;
  box-shadow: 0 9px 24px rgba(21,42,57,.10);
}

.jtel-report-filter {
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(220px,1.4fr) 150px 150px auto;
  align-items: end;
  gap: 11px;
  border-top: 5px solid var(--jtel-red);
}

.jtel-report-filter.invoices-filter {
  grid-template-columns: 140px 140px minmax(180px,1fr) minmax(170px,1fr) 150px;
}

.jtel-report-filter label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.jtel-report-filter label span {
  color: #445a68;
  font-size: .66rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .035em;
}

.jtel-report-filter input,
.jtel-report-filter select {
  width: 100%;
  height: 39px;
  padding: 0 10px;
  color: #203541;
  background: #fff;
  border: 1px solid #bdcad3;
  border-radius: 8px;
  outline: 0;
}

.jtel-report-filter input:focus,
.jtel-report-filter select:focus {
  border-color: #6c879a;
  box-shadow: 0 0 0 3px rgba(75,111,136,.12);
}

.jtel-report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.invoices-filter .jtel-report-actions {
  grid-column: 1 / -1;
}

.report-button {
  min-height: 39px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: .68rem;
  font-weight: 900;
  cursor: pointer;
}

.report-button.primary {
  color: #fff;
  background: linear-gradient(#da4650,#aa2029);
  border: 1px solid #941b23;
}

.report-button.secondary {
  color: #405563;
  background: linear-gradient(#fff,#e8eef2);
  border: 1px solid #b8c7d0;
}

.report-button.dark {
  color: #fff;
  background: linear-gradient(#526b7d,#273f51);
  border: 1px solid #203745;
}

.report-button.csv {
  color: #fff;
  background: linear-gradient(#3e8b67,#246246);
  border: 1px solid #20573f;
}

.report-button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.jtel-report-results {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.jtel-report-table-scroll {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
}

.jtel-report-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
  table-layout: auto;
}

.invoices-statement-table {
  min-width: 1900px;
}

.jtel-report-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 8px;
  color: #fff;
  background: linear-gradient(#536d80,#304b5f);
  border-right: 1px solid rgba(255,255,255,.14);
  font-size: .59rem;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.jtel-report-table td {
  padding: 7px 8px;
  color: #344b59;
  border-bottom: 1px solid #e2e8ec;
  font-size: .66rem;
  vertical-align: top;
}

.jtel-report-table tbody tr:nth-child(even) {
  background: #f7f9fa;
}

.jtel-report-table tbody tr:hover {
  background: #edf4f8;
}

.jtel-report-table .number-cell {
  text-align: right;
  white-space: nowrap;
}

.report-balance-cell {
  color: #152f40 !important;
  font-weight: 900;
}

.jtel-report-empty {
  position: absolute;
  inset: 42px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #82909a;
  pointer-events: none;
}

.jtel-report-empty strong {
  color: #4f6675;
  font-size: .86rem;
}

.jtel-report-empty span {
  margin-top: 5px;
  font-size: .66rem;
}

.jtel-report-summary {
  padding: 10px 13px;
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 8px;
  background: #f0f4f6;
  border-top: 1px solid #d0dbe1;
}

.jtel-report-summary.compact-summary {
  grid-template-columns: repeat(3,minmax(0,1fr));
}

.jtel-report-summary div {
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #d2dce2;
  border-radius: 8px;
}

.jtel-report-summary div.emphasis {
  color: #fff;
  background: linear-gradient(#526d80,#2b475a);
  border-color: #294557;
}

.jtel-report-summary span,
.jtel-report-summary strong {
  display: block;
}

.jtel-report-summary span {
  font-size: .58rem;
  font-weight: 800;
  text-transform: uppercase;
}

.jtel-report-summary strong {
  margin-top: 3px;
  font-size: .87rem;
}

.jtel-report-status {
  min-height: 34px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #647784;
  background: #e8eef2;
  border-top: 1px solid #cfdae0;
  font-size: .63rem;
  font-weight: 750;
}

@media (max-width: 980px) {
  .jtel-report-filter,
  .jtel-report-filter.invoices-filter {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .jtel-report-actions,
  .invoices-filter .jtel-report-actions {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  .jtel-report-workspace {
    padding: 10px;
  }

  .jtel-report-filter,
  .jtel-report-filter.invoices-filter {
    grid-template-columns: 1fr;
  }

  .jtel-report-actions,
  .invoices-filter .jtel-report-actions {
    grid-column: span 1;
  }

  .report-button {
    flex: 1 1 calc(50% - 7px);
  }

  .jtel-report-summary,
  .jtel-report-summary.compact-summary {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================
   [JTEL-REPORTS-MODULE-001] END
   ============================================================ */


/* ============================================================
   [JTEL-REPORTS-REFINEMENT-002] START
   ============================================================ */

.screen-jtel-report,
.screen-jtel-report button,
.screen-jtel-report input,
.screen-jtel-report select,
.screen-jtel-report table {
  font-family: "Segoe UI", Arial, sans-serif;
}

.jtel-report-filter {
  grid-template-columns: minmax(260px, 1.5fr) 160px 160px minmax(220px, auto);
}

.jtel-report-filter.invoices-filter {
  grid-template-columns: 145px 145px minmax(190px, 1fr) minmax(190px, 1fr) 155px minmax(220px, auto);
}

.report-filter-right-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
}

.jtel-report-filter.invoices-filter .report-filter-right-actions {
  grid-column: auto;
}

.report-opening-strip {
  min-height: 40px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
  color: #263b49;
  background: #eef1f3;
  border-bottom: 1px solid #c6d0d6;
  font-size: 12pt;
}

.report-opening-strip span {
  font-weight: 650;
}

.report-opening-strip strong {
  min-width: 130px;
  text-align: right;
}

.jtel-report-table {
  font-size: 12pt;
}

.jtel-report-table th {
  padding: 7px 6px;
  font-size: 12pt;
  font-weight: 500;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
}

.jtel-report-table td {
  padding: 7px 7px;
  font-size: 12pt;
  line-height: 1.3;
}

.jtel-report-table tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 2;
  color: #111;
  background: #eceeef;
  border-top: 2px solid #aeb9c0;
  font-size: 12pt;
  font-weight: 800;
}

.report-total-label {
  text-align: right;
  text-transform: uppercase;
  letter-spacing: .035em;
}

.closing-total {
  color: #fff !important;
  background: linear-gradient(#566c7b, #2f4657) !important;
}

.report-remarks-cell {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
}

.report-bottom-bar {
  min-height: 49px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: #5b6d79;
  background: #e9eef1;
  border-top: 1px solid #cbd5db;
  font-size: 12pt;
  font-weight: 650;
}

.report-bottom-actions {
  display: flex;
  gap: 8px;
}

.ledger-report-table,
.invoices-statement-table {
  table-layout: fixed;
}

.ledger-report-table {
  min-width: 1320px;
}

.ledger-col-sn { width: 55px; }
.ledger-col-date { width: 105px; }
.ledger-col-voucher { width: 145px; }
.ledger-col-description { width: 280px; }
.ledger-col-remarks { width: 220px; }
.ledger-col-cheque { width: 125px; }
.ledger-col-money { width: 130px; }

.invoices-statement-table {
  min-width: 2260px;
}

.invrep-col-no { width: 145px; }
.invrep-col-date { width: 105px; }
.invrep-col-time { width: 95px; }
.invrep-col-client { width: 230px; }
.invrep-col-money { width: 125px; }
.invrep-col-age { width: 75px; }
.invrep-col-remarks { width: 190px; }

@media (max-width: 1220px) {
  .jtel-report-filter,
  .jtel-report-filter.invoices-filter {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .report-filter-right-actions,
  .jtel-report-filter.invoices-filter .report-filter-right-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .jtel-report-filter,
  .jtel-report-filter.invoices-filter {
    grid-template-columns: 1fr;
  }

  .report-filter-right-actions,
  .jtel-report-filter.invoices-filter .report-filter-right-actions {
    grid-column: auto;
  }

  .report-bottom-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .report-bottom-actions {
    width: 100%;
  }

  .report-bottom-actions .report-button {
    flex: 1;
  }
}

/* ============================================================
   [JTEL-REPORTS-REFINEMENT-002] END
   ============================================================ */


/* ============================================================
   [JTEL-INVOICE-ACCESS-TOUCH-016] START
   Stock-warning permission, admin preference and touch targets
   ============================================================ */

.invoice-line-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.stock-visibility-control {
  display: flex;
  align-items: center;
}

.stock-visibility-button {
  min-height: 46px;
  padding: 6px 13px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  background: linear-gradient(180deg, #536b7e 0%, #344d61 100%);
  border: 1px solid #263d50;
  border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 4px 10px rgba(24,43,58,.14);
  cursor: pointer;
  touch-action: manipulation;
}

.stock-visibility-button.is-off {
  color: #4c5d69;
  background: linear-gradient(180deg, #f4f6f7 0%, #dfe5e9 100%);
  border-color: #bdc8cf;
}

.stock-visibility-button .stock-control-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255,255,255,.13);
  font-size: 1rem;
}

.stock-visibility-button span:last-child,
.stock-visibility-button strong,
.stock-visibility-button small {
  display: block;
  text-align: left;
}

.stock-visibility-button strong { font-size: .78rem; line-height: 1.1; }
.stock-visibility-button small { margin-top: 2px; font-size: .65rem; opacity: .75; }

.invoice-grid.stock-column-hidden .col-stock {
  display: none !important;
}

.stock-value {
  min-width: 58px;
  min-height: 38px;
  padding: 5px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #324957;
  background: #edf2f5;
  border: 1px solid #cdd8de;
  border-radius: 9px;
  font-weight: 800;
}

.stock-value.is-warning {
  color: #a3262e;
  background: #fbe9eb;
  border-color: #e6b5ba;
}

/* Touch-screen refinement - keeps the established desktop layout. */
.screen-invoice-new button,
.screen-invoice-new input,
.screen-invoice-new select,
.screen-invoice-new textarea {
  touch-action: manipulation;
}

.screen-invoice-new .invoice-mode-button,
.screen-invoice-new .metal-action-button,
.screen-invoice-new .small-metal-button,
.screen-invoice-new .header-secondary-button,
.screen-invoice-new .invoice-reset-button,
.screen-invoice-new .invoice-cancel-button,
.screen-invoice-new .invoice-save-button {
  min-height: 48px;
}

.screen-invoice-new .client-select-card,
.screen-invoice-new .compact-date-card,
.screen-invoice-new .force-apply-card {
  min-height: 66px;
}

.screen-invoice-new input[type="text"],
.screen-invoice-new input[type="search"],
.screen-invoice-new input[type="date"],
.screen-invoice-new input[type="number"],
.screen-invoice-new select {
  min-height: 44px;
}

.screen-invoice-new .invoice-grid input {
  min-height: 42px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.screen-invoice-new .line-action-button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
}

.screen-invoice-new .invoice-grid th {
  min-height: 44px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.screen-invoice-new .invoice-grid td {
  padding-top: 8px;
  padding-bottom: 8px;
}

.screen-invoice-new .category-button {
  min-height: 44px;
  padding: 8px 15px;
}

.screen-invoice-new .product-option,
.screen-invoice-new .product-result-card {
  min-height: 54px;
}

@media (pointer: coarse) {
  .screen-invoice-new .invoice-panel { padding: 16px; }
  .screen-invoice-new .invoice-mode-button { min-height: 56px; }
  .screen-invoice-new .product-search-shell input { min-height: 50px; }
  .screen-invoice-new .line-action-button { width: 48px; height: 48px; }
}

/* ============================================================
   [JTEL-INVOICE-ACCESS-TOUCH-016] END
   ============================================================ */


/* ============================================================
   [JTEL-INVOICE-BARCODE-COMPACT-017] START
   Primary-code barcode scan and compact invoice-line presentation
   ============================================================ */

.compact-product-panel .product-selector-row {
  display: grid;
  grid-template-columns: minmax(290px, .78fr) minmax(360px, 1fr) auto;
  gap: 9px;
  align-items: start;
}

.barcode-scan-group {
  min-width: 0;
}

.barcode-scan-shell {
  min-height: 48px;
  padding: 5px 8px 5px 9px;
  display: grid;
  grid-template-columns: 34px auto minmax(110px, 1fr);
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #f8fafb, #e7edf1);
  border: 1px solid #bdcad3;
  border-radius: 11px;
  box-shadow: inset 0 1px 0 #fff;
}

.barcode-scan-shell:focus-within {
  border-color: #627f93;
  box-shadow: 0 0 0 3px rgba(74, 109, 133, .14), inset 0 1px 0 #fff;
}

.barcode-scan-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #566f82, #304b5d);
  border-radius: 8px;
  font-size: 1rem;
}

.barcode-scan-copy strong,
.barcode-scan-copy small {
  display: block;
  white-space: nowrap;
}

.barcode-scan-copy strong {
  color: #263c4a;
  font-size: .72rem;
  line-height: 1.1;
}

.barcode-scan-copy small {
  margin-top: 2px;
  color: #758691;
  font-size: .58rem;
}

.barcode-scan-shell input {
  width: 100%;
  min-width: 0;
  min-height: 36px !important;
  padding: 0 10px !important;
  color: #203743;
  background: #fff;
  border: 1px solid #c6d2da;
  border-radius: 8px;
  outline: 0;
  font-size: .78rem;
  font-weight: 700;
}

.barcode-scan-shell input:disabled {
  color: #8b989f;
  background: #edf1f3;
  cursor: not-allowed;
}

.barcode-scan-message {
  min-height: 15px;
  padding: 2px 4px 0;
  color: #5e7584;
  font-size: .59rem;
  line-height: 1.2;
}

.barcode-scan-message.is-error {
  color: #a3262f;
}

.barcode-scan-message.is-success {
  color: #287452;
}

/* Compact row: top aligned, horizontal actions and natural title wrapping. */
.screen-invoice-new .invoice-grid td {
  height: auto;
  padding-top: 7px;
  padding-bottom: 7px;
  vertical-align: top;
}

.screen-invoice-new .invoice-grid .col-sno,
.screen-invoice-new .invoice-grid .col-stock,
.screen-invoice-new .invoice-grid .col-gross,
.screen-invoice-new .invoice-grid .col-net {
  padding-top: 15px;
}

.screen-invoice-new .line-item-title {
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.28;
}

.screen-invoice-new .line-item-meta {
  margin-top: 4px;
  line-height: 1.25;
}

.screen-invoice-new .line-actions-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.screen-invoice-new .invoice-grid td.col-actions {
  min-width: 102px;
}

@media (max-width: 1180px) {
  .compact-product-panel .product-selector-row {
    grid-template-columns: minmax(260px, .8fr) minmax(320px, 1fr) auto;
  }

  .barcode-scan-shell {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .barcode-scan-shell input {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .compact-product-panel .product-selector-row {
    grid-template-columns: 1fr auto;
  }

  .barcode-scan-group {
    grid-column: 1 / -1;
  }
}

@media (pointer: coarse) {
  .barcode-scan-shell {
    min-height: 54px;
  }

  .barcode-scan-shell input {
    min-height: 44px !important;
  }
}

/* ============================================================
   [JTEL-INVOICE-BARCODE-COMPACT-017] END
   ============================================================ */


/* ============================================================
   [JTEL-INVOICE-ROW-ALIGNMENT-018] START
   Stock control alignment, action-column breathing room,
   and barcode TAB terminator support companion styling.
   ============================================================ */

/* Stock now follows the exact Rate/Qty control alignment and height. */
.screen-invoice-new .invoice-grid .col-stock {
  width: 90px;
  padding-top: 8px;
  padding-bottom: 8px;
  vertical-align: top;
}

.screen-invoice-new .stock-value {
  width: 78px;
  min-width: 78px;
  height: 42px;
  min-height: 42px;
  padding: 7px 5px;
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Give both action buttons a little breathing room on each side. */
.screen-invoice-new .invoice-grid .col-actions {
  width: 110px;
  min-width: 110px;
}

.screen-invoice-new .invoice-grid td.col-actions {
  padding-left: 7px;
  padding-right: 7px;
}

@media (pointer: coarse) {
  .screen-invoice-new .stock-value {
    height: 44px;
    min-height: 44px;
  }

  .screen-invoice-new .invoice-grid .col-actions {
    width: 118px;
    min-width: 118px;
  }
}

/* ============================================================
   [JTEL-INVOICE-ROW-ALIGNMENT-018] END
   ============================================================ */


/* ============================================================
   [JTEL-INVOICE-FINAL-LAYOUT-019] START
   Grid totals visibility/alignment and mobile client-card flow.
   ============================================================ */

/* Keep the totals belt fully above the fixed invoice action bar. */
.screen-invoice-new .invoice-grid-scroll {
  height: clamp(250px, calc(100vh - 430px), 430px);
  max-height: clamp(250px, calc(100vh - 430px), 430px);
  padding-bottom: 0;
  scrollbar-gutter: stable;
}

.screen-invoice-new .invoice-grid-footer td {
  z-index: 6;
  bottom: 0;
  height: 40px;
  min-height: 40px;
  padding-top: 0;
  padding-bottom: 0;
  vertical-align: middle;
  line-height: 40px;
}

.screen-invoice-new .invoice-grid-footer .grid-footer-label,
.screen-invoice-new .invoice-grid-footer .grid-footer-number,
.screen-invoice-new .invoice-grid-footer .grid-footer-money {
  vertical-align: middle;
}

/* Preserve exact column geometry between header, body and totals. */
.screen-invoice-new .invoice-grid th,
.screen-invoice-new .invoice-grid td {
  box-sizing: border-box;
}

/* Mobile: keep Select inside the client card's natural flow. */
@media (max-width: 700px) {
  .screen-invoice-new .compact-transaction-row {
    grid-template-columns: minmax(0, 1fr) minmax(132px, 145px);
    align-items: start;
  }

  .screen-invoice-new .compact-client-card {
    grid-column: 1 / -1;
    height: auto;
    min-height: 0;
    padding: 9px 10px 10px;
    grid-template-columns: 43px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    gap: 7px 10px;
    overflow: visible;
  }

  .screen-invoice-new .compact-client-card .client-card-icon {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }

  .screen-invoice-new .compact-client-card .client-card-copy {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .screen-invoice-new .compact-client-card .client-card-action {
    position: static;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-height: 34px;
    margin: 0;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: stretch;
    text-align: center;
  }

  .screen-invoice-new .invoice-grid-scroll {
    height: 360px;
    max-height: 360px;
  }
}

/* Very short desktop screens need a denser line workspace. */
@media (min-width: 701px) and (max-height: 820px) {
  .screen-invoice-new .invoice-grid-scroll {
    height: clamp(245px, calc(100vh - 430px), 350px);
    max-height: clamp(245px, calc(100vh - 430px), 350px);
  }
}

/* ============================================================
   [JTEL-INVOICE-FINAL-LAYOUT-019] END
   ============================================================ */


/* ============================================================
   [JTEL-INVOICE-DROPDOWN-TOTALS-020] START
   Mobile product chooser lifecycle and exact totals-belt geometry.
   ============================================================ */

/* Exact 38px totals belt with consistent top alignment. */
.screen-invoice-new .invoice-grid-footer td {
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding-top: 6px !important;
  padding-bottom: 0 !important;
  vertical-align: top !important;
  line-height: 1.25 !important;
}

.screen-invoice-new .invoice-grid-footer .grid-footer-label,
.screen-invoice-new .invoice-grid-footer .grid-footer-number,
.screen-invoice-new .invoice-grid-footer .grid-footer-money {
  vertical-align: top !important;
  line-height: 1.25 !important;
}

/* On phones the chooser stays attached to Search instead of covering the page. */
@media (max-width: 700px) {
  .screen-invoice-new .product-search-shell {
    position: relative;
    z-index: 82;
  }

  .screen-invoice-new .product-dropdown {
    position: absolute !important;
    z-index: 120;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    width: 100%;
    max-height: min(310px, 46vh);
    padding: 7px;
    overflow: hidden;
    border-radius: 11px;
    box-shadow: 0 16px 34px rgba(11, 28, 40, 0.25);
  }

  .screen-invoice-new .product-dropdown .product-results {
    max-height: min(245px, 36vh) !important;
    overflow-y: auto;
    overscroll-behavior: contain;
    grid-template-columns: 1fr;
  }

  .screen-invoice-new .product-dropdown .product-empty-state {
    min-height: 90px;
    max-height: 180px;
  }
}

/* ============================================================
   [JTEL-INVOICE-DROPDOWN-TOTALS-020] END
   ============================================================ */


/* ============================================================
   [JTEL-INVOICE-PHOTOSHOP-LAYOUT-022] START
   Authoritative presentation layer for the approved Photoshop
   proportions. Functional IDs/API/JS behavior are unchanged.
   ============================================================ */

.screen-invoice-new .jtel-invoice-command-panel {
  padding: 10px 12px 11px;
  overflow: visible;
}

/*
  Desktop reference geometry:
  196 Date + 695 Modes = 917 left rail (including gap scaling)
  270 Category + 150 Actions = 430 right rail
  Search/Refresh consume the same left rail
  Barcode consumes the same right rail
*/
.screen-invoice-new .jtel-invoice-command-grid {
  --jtel-gap: 10px;
  display: grid;
  grid-template-columns:
    minmax(170px, 196fr)
    minmax(500px, 695fr)
    minmax(220px, 270fr)
    minmax(142px, 150fr);
  grid-template-rows: 60px 65px 45px;
  gap: 8px var(--jtel-gap);
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

/* ---------- Row 1: Date + 3 equal invoice-mode buttons ---------- */

.screen-invoice-new .jtel-date-zone {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.screen-invoice-new .jtel-date-card {
  width: 100%;
  height: 60px !important;
  min-height: 60px !important;
  padding: 6px 8px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
}

.screen-invoice-new .jtel-date-card input {
  order: 1;
  width: 100%;
  height: 42px !important;
  min-height: 42px !important;
  margin: 0 !important;
}

.screen-invoice-new .jtel-date-card label {
  order: 2;
  margin: 0 !important;
  font-size: .70rem !important;
  line-height: 1.1 !important;
  font-weight: 800 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  white-space: normal;
}

.screen-invoice-new .jtel-mode-zone {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 60px !important;
  min-height: 60px !important;
  margin: 0 !important;
  padding: 5px 7px !important;
  min-width: 0;
}

.screen-invoice-new .jtel-mode-buttons {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100%;
  height: 50px;
}

.screen-invoice-new .jtel-mode-buttons .invoice-mode-button {
  width: 100%;
  height: 50px !important;
  min-height: 50px !important;
  min-width: 0;
  margin: 0;
  padding: 4px 8px;
  overflow: hidden;
}

.screen-invoice-new .jtel-mode-buttons .invoice-mode-button span,
.screen-invoice-new .jtel-mode-buttons .invoice-mode-button small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-invoice-new .jtel-mode-description {
  display: none !important;
}

/* ---------- Row 2: Client/Vendor ---------- */

.screen-invoice-new .jtel-client-zone {
  grid-column: 1 / 3;
  grid-row: 2;
  min-width: 0;
}

.screen-invoice-new .jtel-client-card {
  position: relative !important;
  width: 100% !important;
  height: 65px !important;
  min-height: 65px !important;
  margin: 0 !important;
  padding: 7px 90px 7px 10px !important;
  display: grid !important;
  grid-template-columns: 43px minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: center !important;
  overflow: hidden !important;
}

.screen-invoice-new .jtel-client-card .client-card-copy {
  min-width: 0;
}

.screen-invoice-new .jtel-client-card .client-card-action {
  position: absolute !important;
  top: 50% !important;
  right: 10px !important;
  width: 72px !important;
  height: 34px !important;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 0 7px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform: translateY(-50%) !important;
  white-space: nowrap;
}

/* ---------- Right rail spans Date + Client rows ---------- */

.screen-invoice-new .jtel-category-zone {
  grid-column: 3;
  grid-row: 1 / 3;
  min-width: 0;
  height: 133px;
  padding: 6px;
  overflow: hidden;
  background: linear-gradient(180deg, #f4f7f9, #e6edf1);
  border: 1px solid #c9d5dc;
  border-radius: 12px;
}

.screen-invoice-new .jtel-category-strip {
  width: 100%;
  height: 121px;
  max-height: 121px;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.screen-invoice-new .jtel-category-strip .category-chip {
  width: 100%;
  min-width: 0 !important;
  height: 38px !important;
  min-height: 38px !important;
  flex: 0 0 38px;
  text-align: left;
}

.screen-invoice-new .jtel-action-zone {
  grid-column: 4;
  grid-row: 1 / 3;
  height: 133px;
  min-width: 0;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 4px;
}

.screen-invoice-new .jtel-right-action,
.screen-invoice-new .jtel-stock-action {
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  box-sizing: border-box;
}

.screen-invoice-new .jtel-right-action {
  padding: 5px 8px !important;
  overflow: hidden !important;
}

.screen-invoice-new .jtel-right-action > span:not(.toggle-track):not(.stock-control-icon),
.screen-invoice-new .jtel-right-action strong,
.screen-invoice-new .jtel-right-action small {
  min-width: 0;
  max-width: 100%;
}

.screen-invoice-new .jtel-right-action strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .67rem !important;
}

.screen-invoice-new .jtel-right-action small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px !important;
  font-size: .53rem !important;
}

.screen-invoice-new .jtel-action-zone .metal-action-icon,
.screen-invoice-new .jtel-action-zone .stock-control-icon {
  width: 29px !important;
  height: 29px !important;
  flex: 0 0 29px !important;
}

.screen-invoice-new .jtel-stock-action > button {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
}

/* ---------- Row 3: Search + Refresh | Barcode ---------- */

.screen-invoice-new .jtel-search-zone {
  grid-column: 1 / 3;
  grid-row: 3;
  display: grid;
  grid-template-columns: minmax(0, 818fr) minmax(84px, 99fr);
  gap: 9px;
  min-width: 0;
  height: 45px;
}

.screen-invoice-new .jtel-product-search-shell,
.screen-invoice-new .jtel-product-search-shell input {
  width: 100%;
  height: 45px !important;
  min-height: 45px !important;
}

.screen-invoice-new .jtel-refresh-button {
  width: 100%;
  height: 45px !important;
  min-height: 45px !important;
  margin: 0;
}

.screen-invoice-new .jtel-barcode-zone {
  grid-column: 3 / 5;
  grid-row: 3;
  min-width: 0;
  height: 45px;
}

.screen-invoice-new .jtel-barcode-zone .barcode-scan-shell {
  width: 100%;
  height: 45px !important;
  min-height: 45px !important;
  padding-top: 4px;
  padding-bottom: 4px;
}

.screen-invoice-new .jtel-barcode-zone .barcode-scan-shell input {
  height: 35px !important;
  min-height: 35px !important;
}

.screen-invoice-new .jtel-barcode-zone .barcode-scan-message {
  min-height: 0;
  height: 0;
  padding: 0;
  overflow: visible;
}

/* ---------- Product dropdown remains anchored to Search ---------- */

.screen-invoice-new .jtel-product-search-shell {
  position: relative;
  z-index: 84;
}

.screen-invoice-new .jtel-product-search-shell .product-dropdown {
  left: 0;
  right: 0;
  width: 100%;
}

/* ---------- Invoice totals belt ---------- */

.screen-invoice-new .invoice-grid-footer tr {
  height: 40px !important;
}

.screen-invoice-new .invoice-grid-footer td {
  display: table-cell !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  vertical-align: middle !important;
  line-height: 1.2 !important;
}

.screen-invoice-new .invoice-grid-footer .grid-footer-label,
.screen-invoice-new .invoice-grid-footer .grid-footer-number,
.screen-invoice-new .invoice-grid-footer .grid-footer-money {
  vertical-align: middle !important;
  line-height: 1.2 !important;
}

/* ---------- Medium desktop/tablet: allow natural reflow ---------- */

@media (max-width: 1180px) and (min-width: 701px) {
  .screen-invoice-new .jtel-invoice-command-grid {
    grid-template-columns: minmax(155px, .28fr) minmax(430px, 1fr) minmax(210px, .42fr);
    grid-template-rows: 60px 65px auto 45px 45px;
  }

  .screen-invoice-new .jtel-date-zone { grid-column: 1; grid-row: 1; }
  .screen-invoice-new .jtel-mode-zone { grid-column: 2 / 4; grid-row: 1; }
  .screen-invoice-new .jtel-client-zone { grid-column: 1 / 4; grid-row: 2; }

  .screen-invoice-new .jtel-category-zone {
    grid-column: 1 / 3;
    grid-row: 3;
    height: 100px;
  }

  .screen-invoice-new .jtel-category-strip {
    height: 88px;
    max-height: 88px;
  }

  .screen-invoice-new .jtel-action-zone {
    grid-column: 3;
    grid-row: 3;
    height: 100px;
  }

  .screen-invoice-new .jtel-search-zone {
    grid-column: 1 / 4;
    grid-row: 4;
  }

  .screen-invoice-new .jtel-barcode-zone {
    grid-column: 1 / 4;
    grid-row: 5;
  }
}

/* ---------- Mobile: vertical, touch-safe, zero overlap ---------- */

@media (max-width: 700px) {
  .screen-invoice-new .jtel-invoice-command-panel {
    padding: 9px 10px 10px;
  }

  .screen-invoice-new .jtel-invoice-command-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .screen-invoice-new .jtel-date-zone,
  .screen-invoice-new .jtel-mode-zone,
  .screen-invoice-new .jtel-client-zone,
  .screen-invoice-new .jtel-category-zone,
  .screen-invoice-new .jtel-action-zone,
  .screen-invoice-new .jtel-search-zone,
  .screen-invoice-new .jtel-barcode-zone {
    width: 100%;
    height: auto;
    min-height: 0;
  }

  .screen-invoice-new .jtel-date-card {
    height: 60px !important;
  }

  .screen-invoice-new .jtel-mode-zone {
    height: auto !important;
    min-height: 0 !important;
    padding: 7px !important;
  }

  .screen-invoice-new .jtel-mode-buttons {
    height: auto;
    display: flex !important;
    flex-direction: column;
    gap: 7px !important;
  }

  .screen-invoice-new .jtel-mode-buttons .invoice-mode-button {
    height: 48px !important;
    min-height: 48px !important;
  }

  .screen-invoice-new .jtel-client-card {
    height: auto !important;
    min-height: 106px !important;
    padding: 9px 10px !important;
    grid-template-columns: 43px minmax(0, 1fr) !important;
    grid-template-rows: auto 38px !important;
    row-gap: 8px !important;
    overflow: visible !important;
  }

  .screen-invoice-new .jtel-client-card .client-card-icon {
    grid-column: 1;
    grid-row: 1;
  }

  .screen-invoice-new .jtel-client-card .client-card-copy {
    grid-column: 2;
    grid-row: 1;
  }

  .screen-invoice-new .jtel-client-card .client-card-action {
    position: static !important;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100% !important;
    height: 38px !important;
    min-height: 38px !important;
    transform: none !important;
    justify-self: stretch;
  }

  .screen-invoice-new .jtel-category-zone {
    height: auto;
    max-height: 150px;
  }

  .screen-invoice-new .jtel-category-strip {
    height: auto;
    max-height: 136px;
  }

  .screen-invoice-new .jtel-action-zone {
    display: flex;
    flex-direction: column;
    gap: 7px;
  }

  .screen-invoice-new .jtel-right-action,
  .screen-invoice-new .jtel-stock-action,
  .screen-invoice-new .jtel-stock-action > button {
    height: 46px !important;
    min-height: 46px !important;
    flex: 0 0 46px;
  }

  .screen-invoice-new .jtel-search-zone {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .screen-invoice-new .jtel-product-search-shell,
  .screen-invoice-new .jtel-product-search-shell input,
  .screen-invoice-new .jtel-refresh-button {
    width: 100%;
    height: 46px !important;
    min-height: 46px !important;
  }

  .screen-invoice-new .jtel-barcode-zone {
    height: auto;
  }

  .screen-invoice-new .jtel-barcode-zone .barcode-scan-shell {
    height: auto !important;
    min-height: 54px !important;
  }

  .screen-invoice-new .jtel-product-search-shell .product-dropdown {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    bottom: auto !important;
    max-height: min(310px, 46vh);
    overflow: hidden;
  }

  .screen-invoice-new .jtel-product-search-shell .product-results {
    max-height: min(245px, 36vh) !important;
    overflow-y: auto;
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   [JTEL-INVOICE-PHOTOSHOP-LAYOUT-022] END
   ============================================================ */


/* ============================================================
   [JTEL-INVOICE-MOBILE-GRID-023] START
   Mobile invoice-grid essentials view:
   keeps #, Item, Rate, Qty, Net and Actions visible together.
   Desktop/tablet layout remains unchanged.
   ============================================================ */

@media (max-width: 700px) {

  .screen-invoice-new .invoice-grid {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }

  /* Hide less-critical mobile columns. */
  .screen-invoice-new .invoice-grid .col-stock,
  .screen-invoice-new .invoice-grid .col-refund,
  .screen-invoice-new .invoice-grid .col-discp,
  .screen-invoice-new .invoice-grid .col-discv,
  .screen-invoice-new .invoice-grid .col-gross {
    display: none !important;
  }

  /* Mobile width balance for the essential entry columns. */
  .screen-invoice-new .invoice-grid .col-sno {
    width: 7% !important;
  }

  .screen-invoice-new .invoice-grid .col-item {
    width: 39% !important;
  }

  .screen-invoice-new .invoice-grid .col-rate {
    width: 15% !important;
  }

  .screen-invoice-new .invoice-grid .col-qty {
    width: 14% !important;
  }

  .screen-invoice-new .invoice-grid .col-net {
    width: 15% !important;
  }

  .screen-invoice-new .invoice-grid .col-actions {
    width: 10% !important;
    min-width: 0 !important;
  }

  .screen-invoice-new .invoice-grid th,
  .screen-invoice-new .invoice-grid td {
    padding-left: 4px !important;
    padding-right: 4px !important;
    font-size: 11px !important;
  }

  .screen-invoice-new .invoice-grid td {
    vertical-align: middle !important;
  }

  .screen-invoice-new .invoice-grid td.col-item {
    vertical-align: top !important;
    padding-top: 8px !important;
  }

  .screen-invoice-new .invoice-grid .line-item-title {
    max-width: none !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
    line-height: 1.22 !important;
  }

  .screen-invoice-new .invoice-grid .line-item-meta {
    margin-top: 3px !important;
    white-space: normal !important;
    line-height: 1.18 !important;
  }

  .screen-invoice-new .invoice-grid input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding-left: 3px !important;
    padding-right: 3px !important;
    box-sizing: border-box !important;
  }

  .screen-invoice-new .invoice-grid .grid-currency-input,
  .screen-invoice-new .invoice-grid .grid-quantity-input {
    width: 100% !important;
  }

  .screen-invoice-new .line-actions-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    white-space: normal !important;
  }

  .screen-invoice-new .line-action-button {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
  }

  .screen-invoice-new .invoice-grid-footer .col-item {
    width: 39% !important;
  }

  /* Prevent the mobile essentials view from forcing sideways scroll. */
  .screen-invoice-new .invoice-grid-scroll {
    overflow-x: hidden !important;
  }
}

/* ============================================================
   [JTEL-INVOICE-MOBILE-GRID-023] END
   ============================================================ */
