:root{
  --theme-background:#95DAFB;
  --theme-foreground:#404040;
  --theme-on-light:#404040;
  --theme-bg-light-50:color-mix(in srgb, var(--theme-background, #E6F6FE) 40%, #ffffff);
  --font-family-base:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
html {
  font-family: var(--font-family-base, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
	
	font-family: var(--font-family-base, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
	font-size: 9pt;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	//background-color: #FBFAFA;
}
input, button, select, textarea {
	font-family: inherit;
}


/* Tenant-themed report and print headers */
#divFirmName{
   background:var(--theme-background,#84BAD2);
   color:var(--theme-foreground,#545454);
}
#divFirmName table,
#divFirmName td,
#divFirmName span{
   color:inherit;
}
#divFirmName a{color:inherit;}
.mainhead {
	height:110px;
	margin-left:5%;
	margin-right:5%;
	width:90%;
	background:var(--theme-background,#84BAD2);
	color:var(--theme-foreground,#545454);
}

#divMainHead {
	background-color:var(--theme-background,#84BAD2);
	color:var(--theme-foreground,#545454);
}

#divMainHead #spanHeaderFirmName,

#divMainHead #spanClock,
#spanClock {
	color:var(--theme-foreground,#545454) !important;
}
.currentInvoiceStats
{
 border:1px solid silver;background-color:#F0F3F5;
 }
 .disableStats
{
 border:1px solid silver;background-color:#EBEBEB;color:silver;
 }
.page
{
 margin-left:3%;
 margin-right:3%;
 margin-top:1%;
 margin-bottom:1%;
 background-color:#FFFFFF;
 color: #545454;

}
.printPage{
color:#545454;
margin-left:5px;
margin-right:5px;
}

table.printStatementTable tr{
border-bottom:1px solid silver;
width:100%;
transition: background-color 0.15s ease-in-out;
}
table.printStatementTable tr:hover,
table.printStatementTable tbody tr:hover{
background-color: #f0fdf4 !important;
}
.scrollingDiv
{
overflow:auto;
max-height:350px; 
}
table
{
border-collapse:collapse;
}

a{color:#4b4b4b;}

button,
input[type=button],
input[type=submit]{
    background:var(--theme-background,#84BAD2);
    color:var(--theme-foreground,#545454);
    border:1px solid color-mix(in srgb, var(--theme-foreground,#545454) 35%, transparent);
    border-radius:6px;
    cursor:pointer;
}
button:hover,
input[type=button]:hover,
input[type=submit]:hover{
    background:var(--theme-background,#84BAD2);
    color:var(--theme-foreground,#545454);
    filter:brightness(1.12);
}

textarea{
color:#4b4b4b;
font: 10pt "Arial";
}

input[type=text]
{ 
border: 1px solid silver;
color:#4b4b4b;
}
input[type=text]:focus  {
border: solid 1px #b5cfd2;
padding: 1px;
box-shadow: 1px 1px 2px 2px rgba(156, 156, 156, 0.25);
  }
input[type=password]
{ 
border: 1px solid silver;
color:#4b4b4b;
}
input[type=password]:focus  {
border: solid 1px #b5cfd2;
padding: 1px;
box-shadow: 1px 1px 2px 2px rgba(156, 156, 156, 0.25);
  }

table.activity {
width:100%;
font-size:9pt;
}
table.activity tr {
border-bottom:1px solid silver;
}
table.appconfig tr {
border-bottom:1px solid silver;
}
table.appconfig  {
width: 98%;
}
table.archived {
width:98%;
margin-left:2% ;
font-size:9pt;
}
table.archived tr {
border-bottom:1px solid silver;
}

/* Dashboard Form Container & Modern Transparent Header Stripe */
.dashboard-form-container {
	margin-top: 0 !important;
	padding: 0 4px 8px 0;
	box-sizing: border-box;
	width: 100%;
}

.dashboard-form-header-stripe {
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	padding: 7px 16px 7px 121px;
	margin-top: 0 !important;
	margin-bottom: 10px;
	background: linear-gradient(135deg, rgba(2, 132, 199, 0.06) 0%, rgba(132, 186, 210, 0.14) 50%, rgba(241, 245, 249, 0.85) 100%);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(132, 186, 210, 0.38);
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.7);
	box-sizing: border-box;
	width: 100%;
	height: 36px;
}

.dashboard-form-header-stripe::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--theme-background, #84BAD2);
	opacity: 0.9;
}

.dashboard-form-header-title {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	color: #005575;
	font-size: 11pt;
	font-weight: 700;
	letter-spacing: 0.3px;
	line-height: 1.3;
	margin: 0;
	padding: 0;
	text-align: left;
}

.dashboard-form-header-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	color: #0284c7;
	display: inline-block;
	vertical-align: middle;
}

.dashboard-form-status {
	min-height: 0;
	margin: 0;
	padding-left: 121px;
	font-weight: 600;
	font-size: 9.5pt;
	text-align: left;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	line-height: 1.4;
}

.dashboard-form-status:not(:empty) {
	min-height: 22px;
	margin: 4px 0;
}

.dashboard-form-status.bs-status-loading {
	color: #0284c7;
}

.dashboard-form-status.bs-status-success {
	color: #047857;
}

.dashboard-form-status.bs-status-error {
	color: #b91c1c;
}

.dashboard-form-status .bs-status-spinner {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: #0284c7;
	animation: bsSpin 0.75s linear infinite;
}

.dashboard-form-status .bs-status-icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.dashboard-form-status .bs-status-tick {
	color: #059669;
}

.dashboard-form-status .bs-status-err {
	color: #dc2626;
}

.dashboard-form-status .bs-status-msg {
	display: inline-block;
	vertical-align: middle;
}

@keyframes bsSpin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.dashboard-form-btn-group {
	display: flex;
	gap: 12px;
	margin-top: 12px;
	align-items: center;
	justify-content: flex-start;
	padding-left: 121px;
	flex-wrap: wrap;
	width: 100%;
	box-sizing: border-box;
}

/* Edit Admin Account Table and Action Buttons */
.edit-admin-title {
	font-weight: bold;
	font-size: 12pt;
	margin-left: 10%;
	margin-bottom: 12px;
}

.edit-admin-table-container {
	overflow: auto;
	height: 220px;
	border-radius: 6px;
}

table.editAdmin {
	width: 90%;
	margin: 0 auto;
	border-collapse: collapse;
}

table.editAdmin th,
table.editAdmin td {
	padding: 8px 10px;
	vertical-align: middle;
}

table.editAdmin tr.calcivalciColor {
	font-weight: 600;
}

table.editAdmin td.col-action {
	text-align: center;
	width: 56px;
}

.edit-admin-cancel-container {
	text-align: center;
	margin-top: 10px;
}

.super-admin-name {
	font-weight: bold;
}

.super-admin-badge {
	font-weight: bold;
	color: #475569;
}

.admin-action-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	text-decoration: none;
	border: 1px solid transparent;
	transition: all 0.15s ease-in-out;
	box-sizing: border-box;
	vertical-align: middle;
}

.admin-action-btn.edit-btn {
	color: #0284c7;
	background-color: rgba(2, 132, 199, 0.08);
	border-color: rgba(2, 132, 199, 0.2);
}

.admin-action-btn.edit-btn:hover {
	color: #0369a1;
	background-color: rgba(2, 132, 199, 0.18);
	border-color: #0284c7;
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(2, 132, 199, 0.15);
}

.admin-action-btn.delete-btn {
	color: #dc2626;
	background-color: rgba(220, 38, 38, 0.08);
	border-color: rgba(220, 38, 38, 0.2);
}

.admin-action-btn.delete-btn:hover {
	color: #b91c1c;
	background-color: rgba(220, 38, 38, 0.18);
	border-color: #dc2626;
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(220, 38, 38, 0.15);
}

.admin-action-btn.disabled {
	color: #94a3b8;
	background-color: #f8fafc;
	border-color: #e2e8f0;
	cursor: not-allowed;
	opacity: 0.65;
}

.admin-action-btn.disabled:hover {
	background-color: #f8fafc;
	border-color: #e2e8f0;
	transform: none;
	box-shadow: none;
}

.admin-action-svg {
	display: block;
	width: 17px;
	height: 17px;
	pointer-events: none;
}

table.editAdmin tr {
border-bottom: 1px solid #e2e8f0;
}
table.recentInvoicesHeader  {
width:100%;
background:var(--theme-background,#84BAD2);
color:var(--theme-foreground,#545454);
border:1px solid color-mix(in srgb, var(--theme-foreground,#545454) 35%, transparent);
}
	
table.recentInvoicesHeader  td{
border-bottom:1px solid silver;
}
table.recentinvoices  {
width:100%;
background-color:white;
}
table.recentinvoices  tr{
transition: background-color 0.15s ease-in-out;
}
table.recentinvoices  tr:hover,
#recentInvoicesTable tr:hover{
background-color: #f0fdf4 !important;
}
table.recentinvoices  td{
border-bottom:1px solid silver;
}

.currentinvoice { 
background-color:#F9FBFF; 
}
table.currentinvoice tr {
text-align:left;
border-bottom:1px solid silver;
padding: 30px;

}

#divTagLine 
{
color:var(--theme-foreground,#545454);font-family:inherit;font-size:32px;font-weight:bold;
}

#lightbox {
	color: #545454;
	position: absolute;
	top: 0;
	left: 50%;
	width: 30%;
	height: 25%;
	margin-left: -250px;
	background: #ffffff;
	z-index: 1001;
	display: none;
	
	
}
#lightbox-shadow {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #000000;
	filter: alpha(opacity=75);
	-moz-opacity: 0.75;
	-khtml-opacity: 0.75;
	opacity: 0.75;
	z-index: 1000;
	display: none;
}
.calcivalciColor
{
color:#005575;
}

.calcivalciAlert
{
color:#BB0000;
}
.input-error-glow {
    border: 1px solid #ef4444 !important;
    box-shadow: 0 0 0 3.5px rgba(239, 68, 68, 0.28), 0 1px 2px rgba(239, 68, 68, 0.15) !important;
    outline: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
.success
{
color: #02650F;
font-weight:bold;
}

.loginBoxes{
   width: 238px;
   height: 23px;
   border: solid 1px #C7C9C9;
   padding: 2px;
   border-radius: 5px;
   font-size: 10pt;
   background-color: #FFFFFF;
   outline: none;
   }
.loginBoxes:hover  {
   border: 1px solid #9ECEE3;
   font-size: 10pt;
   box-shadow: 1px 1px 2px 2px rgba(156, 156, 156, 0.25);
  }
.loginBoxes:focus  {
	height: 25px;
   border: solid 1px #b5cfd2;
   box-shadow: 1px 1px 2px 2px rgba(156, 156, 156, 0.25);
  }
.loginBoxes:active  {
   border: solid 1px #A5C9D9;
  }

 .keyBox{
   color:#4b4b4b;
   width: 500px;
   height: 30px;
   border: solid 1px #C7C9C9;
   padding: 2px;
   border-radius: 5px;
   font-size: 15pt;
   background-color: #FFFFFF;
   outline: none;
}

.password-wrapper {
   position: relative;
   display: inline-block;
   width: 200px;
   vertical-align: middle;
}
.password-wrapper .loginBoxes {
   width: 100% !important;
   height: 28px !important;
   box-sizing: border-box !important;
   padding: 2px 28px 2px 6px !important;
}
.password-toggle-btn {
   position: absolute;
   right: 4px;
   top: 50%;
   transform: translateY(-50%);
   background: transparent;
   border: none;
   cursor: pointer;
   padding: 2px 4px;
   color: #64748b;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   outline: none;
   line-height: 1;
   border-radius: 4px;
   height: 20px;
}
.password-toggle-btn:hover {
   color: #0f172a;
}
.password-eye-icon {
   vertical-align: middle;
   pointer-events: none;
}

/* Login page layout */
.loginPage{
   width:min(560px,92%);
   margin:2% auto 0;
}
.tenantLoginPage{
   margin-top:08%;
}
.loginBox{
   width:100%;
   margin:0 auto;
   box-sizing:border-box;
   min-height:300px;
   padding:6px 14px 12px;
   border:1px solid #E4E9ED;
   background-color:#FFFFFF;
   background-image:url('../images/login.png');
   background-repeat:no-repeat;
   background-position:center center;
   background-size:cover;
   text-align:center;
}
.loginBox .loginLogo{
   width:min(260px,70%);
   height:auto;
   max-height:120px;
   object-fit:contain;
   display:block;
   margin:0 auto 4px;
}
.loginLayout {
   width:auto;
   max-width:calc(100% - 36px);
   margin:0 auto;
   border-collapse:separate;
   border-spacing:0 2px;
   position:relative;
   left:28px;
}
.loginLayout .loginLabelColumn { width:72px; }
.loginLayout .loginInputColumn { width:210px; }
.loginLayout .loginErrorColumn { width:128px; }
.loginLayout .loginLabelCell {
   text-align:right;
   padding:1px 8px 1px 0;
   white-space:nowrap;
   vertical-align:middle;
   font-size:9pt;
}
.loginLayout .loginInputCell {
   text-align:left;
   vertical-align:middle;
}
.loginLayout .loginInputCell .loginBoxes{
   width:200px;
   height:28px;
   padding:2px 6px;
   box-sizing:border-box;
}
.loginLayout .loginInputCell .loginBoxes:focus{
   height:28px;
}
.loginLayout .loginErrorCell {
   text-align:left;
   padding:0 0 0 6px;
   width:128px;
   max-width:128px;
   vertical-align:middle;
   font-size:8pt;
   line-height:1.2;
   overflow:hidden;
}
.loginLayout .loginErrorCell .calcivalciAlert{
   display:inline-block;
   white-space:normal;
   word-break:break-word;
}
.loginLayout .loginButtonCell {
   text-align:center;
   padding-top:4px;
}
.loginLayout .loginMessageCell {
   text-align:center;
   padding-top:6px;
   line-height:1.25;
   font-size:9pt;
}
.loginLayout .loginMessageCell .calcivalciAlert,
.loginLayout .loginMessageCell #spanForgetPassword {
   display:block;
   text-align:center;
}
.loginLayout .loginScriptCell {
   display:none;
}
.loginFooter{
   margin-top:12px;
   color:grey;
   text-align:center;
   font-size:9pt;
   line-height:1.5;
}
.loginTip{
   margin-top:16px;
   text-align:center;
}
.login-html,
.login-body{
   height:100%;
}
.login-body{
   margin:0;
   min-height:100vh;
   min-height:100dvh;
}
@media (max-width:720px){
   .login-body{
      display:flex;
      flex-direction:column;
      background:#F4F7FA;
   }
   .loginPage{
      width:100%;
      max-width:100%;
      margin:0;
      flex:1;
      display:flex;
      flex-direction:column;
      justify-content:center;
      box-sizing:border-box;
      padding:20px 16px calc(24px + env(safe-area-inset-bottom,0px));
   }
   .tenantLoginPage{
      margin-top:10%;
      justify-content:flex-start;
   }
   .loginBox{
      min-height:0;
      padding:28px 18px 22px;
      border-radius:16px;
      box-shadow:0 8px 24px rgba(15,23,42,.08);
   }
   .loginBox .loginLogo{
      width:min(240px,78%);
      max-height:none;
      margin:0 auto 18px;
   }
   .loginLayout{
      left:0;
      width:100%;
      max-width:100%;
   }
   .loginLayout,
   .loginLayout tbody,
   .loginLayout tr{
      display:block;
      width:100%;
   }
   .loginLayout colgroup,
   .loginLayout td:empty{
      display:none;
   }
   .loginLayout td{
      display:block;
      width:100%;
      max-width:100%;
      box-sizing:border-box;
   }
   .loginLayout .loginLabelCell{
      text-align:left;
      padding:10px 0 4px;
      font-size:10pt;
   }
   .loginLayout .loginInputCell .loginBoxes{
      width:100%;
      height:42px;
      font-size:16px;
      box-sizing:border-box;
   }
   .loginLayout .loginInputCell .password-wrapper{
      width:100%;
      display:block;
   }
   .loginLayout .loginErrorCell{
      width:100%;
      max-width:100%;
      padding:4px 0 0;
      overflow:visible;
   }
   .loginLayout .loginButtonCell{
      text-align:center;
      padding-top:16px;
   }
   .loginLayout .loginButtonCell .buttons{
      display:block;
      width:100%;
      box-sizing:border-box;
      padding:12px 16px;
      text-align:center;
   }
   .loginLayout .loginMessageCell{
      text-align:center;
      padding-top:10px;
   }
   .loginLayout .loginMessageCell .calcivalciAlert,
   .loginLayout .loginMessageCell #spanForgetPassword{
      text-align:center;
   }
   .loginFooter{
      margin-top:18px;
      font-size:10pt;
   }
   .loginTip{
      margin-top:18px;
      font-size:10pt;
      line-height:1.45;
      padding:0 8px;
   }
   #cookieAlert{
      width:auto !important;
      height:auto !important;
      margin:24px 16px !important;
      padding:12px;
      box-sizing:border-box;
   }
}


/* Modern tenant configuration with notched outlined cards */
.configViewport {
   padding: 10px 16px;
   box-sizing: border-box;
   font-family: var(--font-family-base, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
}
.configGrid {
   display: grid;
   grid-template-columns: repeat(2, minmax(0, 1fr));
   gap: 12px;
   align-items: stretch;
}
.configCol {
   display: flex;
   flex-direction: column;
   justify-content: space-between;
   gap: 10px;
   height: 100%;
}
.configCard {
   position: relative;
   background: #FCFCFC;
   border: 1.5px solid #cbd5e1;
   border-radius: 8px;
   padding: 12px 16px 8px;
   margin-top: 6px;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
   box-sizing: border-box;
   transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.configCard:focus-within {
   border-color: #0284c7;
   box-shadow: 0 0 0 1px #0284c7, 0 3px 8px rgba(2, 132, 199, 0.08);
}
.configCardLegend {
   position: absolute;
   top: -9px;
   left: 14px;
   background: #FCFCFC;
   padding: 0 6px;
   margin: 0;
   font-size: 11px;
   font-weight: 700;
   text-transform: uppercase;
   letter-spacing: 0.5px;
   color: #0284c7;
   line-height: 1;
   border-radius: 4px;
   z-index: 2;
   transition: color 0.15s ease;
}
.configCard:focus-within .configCardLegend {
   color: #0284c7;
}
.configField {
   display: grid;
   grid-template-columns: 155px minmax(0, 1fr);
   gap: 10px;
   align-items: center;
   margin-bottom: 6px;
}
.configField:last-child { margin-bottom: 0; }
.configField label {
   font-size: 12px;
   font-weight: 600;
   color: #334155;
   line-height: 1.25;
}
.configField .loginBoxes,
.configField select {
   width: 100%;
   box-sizing: border-box;
   height: 30px;
   padding: 0 10px;
   font-size: 12.5px;
   border: 1px solid #cbd5e1;
   border-radius: 6px;
   background: #ffffff;
   color: #0f172a;
   transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.configField .loginBoxes:focus,
.configField select:focus {
   outline: none;
   border-color: #0284c7;
   box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}
.configField .loginBoxes[readonly],
.configField .loginBoxes:disabled,
.configField select:disabled {
   background-color: #f1f5f9;
   border-color: #e2e8f0;
   color: #64748b;
   cursor: not-allowed;
}
.config-lock-hint {
   display: block;
   font-size: 10px;
   font-weight: 400;
   color: #94a3b8;
   line-height: 1.1;
   margin-top: 1px;
}
.configColorControl { display: flex; gap: 8px; align-items: center; }
.configColorControl .color-value { width: 90px !important; height: 30px !important; }
.color-picker-button {
   width: 30px !important;
   height: 30px !important;
   padding: 1px;
   border: 1px solid #cbd5e1;
   border-radius: 6px;
   cursor: pointer;
   background: #ffffff;
}
.configApplyBar {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 8px 16px;
   margin-top: 10px;
   background: #ffffff;
   border: 1px solid #e2e8f0;
   border-radius: 8px;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.configApplyHint { font-size: 12px; color: #64748b; }
.btn-config-apply {
   display: inline-flex !important;
   align-items: center !important;
   gap: 6px !important;
   background: #0284c7 !important;
   color: #ffffff !important;
   border: 1px solid #0284c7 !important;
   padding: 6px 22px !important;
   border-radius: 6px !important;
   font-size: 12.5px !important;
   font-weight: 700 !important;
   cursor: pointer !important;
   box-shadow: 0 1px 3px rgba(2, 132, 199, 0.25) !important;
   transition: all 0.15s ease !important;
}
.btn-config-apply:hover {
   background: #0369a1 !important;
   border-color: #0369a1 !important;
   transform: translateY(-1px) !important;
   box-shadow: 0 3px 6px rgba(2, 132, 199, 0.35) !important;
}
.configLogoActions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.configLogoActions input[type=file] { max-width: 100%; }
.configLogoContainer { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.config-info-tooltip { display: inline-flex; align-items: center; justify-content: center; cursor: help; color: #64748b; transition: color .15s ease; }
.config-info-tooltip:hover { color: #0284c7; }
.configCard-full {
   grid-column: span 2;
}
.config-appearance-fields {
   display: flex;
   flex-direction: column;
   gap: 6px;
}
.configCard-full .config-appearance-fields {
   display: grid;
   grid-template-columns: repeat(2, minmax(0, 1fr));
   column-gap: 24px;
   align-items: start;
}
.config-appearance-col {
   display: flex;
   flex-direction: column;
   gap: 6px;
}
@media (max-width: 820px) {
   .configGrid { grid-template-columns: 1fr; }
   .configField { grid-template-columns: 1fr; }
   .configCard-full { grid-column: span 1 !important; }
   .configCard-full .config-appearance-fields {
      display: flex;
      flex-direction: column;
      gap: 6px;
   }
}


/* Modern configuration result modal */
.config-result-overlay{
   position:fixed;
   inset:0;
   z-index:10000;
   display:flex;
   align-items:center;
   justify-content:center;
   padding:24px;
   box-sizing:border-box;
   background:rgba(9,18,33,.48);
   backdrop-filter:blur(12px);
   -webkit-backdrop-filter:blur(12px);
   opacity:0;
   transition:opacity .18s ease;
}
.config-result-overlay.is-visible{opacity:1}
.config-result-modal{
   width:min(450px,100%);
   padding:34px 32px 28px;
   box-sizing:border-box;
   border:1px solid rgba(255,255,255,.78);
   border-radius:24px;
   background:rgba(255,255,255,.98);
   box-shadow:0 32px 84px rgba(9,18,33,.24),0 12px 32px rgba(9,18,33,.12);
   text-align:center;
   transform:translateY(calc(-10vh + 12px)) scale(.96);
   transition:transform .22s cubic-bezier(.22,1,.36,1);
}
.config-result-overlay.is-visible .config-result-modal{transform:translateY(-10vh) scale(1)}
.config-result-icon{
   width:68px;
   height:68px;
   margin:0 auto 18px;
   display:grid;
   place-items:center;
   position:relative;
   border-radius:50%;
}
.config-result-icon.success{color:#0c8b61;background:linear-gradient(145deg,#edfdf6,#def7ec)}
.config-result-icon.error{color:#c63f51;background:linear-gradient(145deg,#fff3f5,#ffe7eb)}
.config-result-icon.confirm{color:var(--theme-on-light,#545454);background:linear-gradient(145deg,#eef5fb,#e3eef8)}
.config-result-icon.wait{color:var(--theme-on-light,#545454);background:linear-gradient(145deg,#eef3f8,#e4ebf2)}
.config-result-icon.warning{color:#b45309;background:linear-gradient(145deg,#fffbeb,#fef3c7)}
.config-result-icon.warning:after{
   content:"!";
   font:700 32px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.config-result-icon.confirm:after{
   content:"?";
   font:700 32px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.config-result-icon.wait:after{
   content:"";
   width:22px;
   height:22px;
   border:3px solid #c5d0dc;
   border-top-color:currentColor;
   border-radius:50%;
   animation:configResultSpin .8s linear infinite;
}
@keyframes configResultSpin{to{transform:rotate(360deg)}}
.config-result-icon.success:after{
   content:"";
   width:14px;
   height:25px;
   border-right:3px solid currentColor;
   border-bottom:3px solid currentColor;
   transform:rotate(45deg) translate(-1px,-2px);
}
.config-result-icon.error:before,
.config-result-icon.error:after{
   content:"";
   position:absolute;
   width:25px;
   height:3px;
   border-radius:4px;
   background:currentColor;
}
.config-result-icon.error:before{transform:rotate(45deg)}
.config-result-icon.error:after{transform:rotate(-45deg)}
.config-result-title{
   margin:0;
   color:#172033;
   font:650 22px/1.3 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
   letter-spacing:-.02em;
}
.config-result-message{
   max-width:360px;
   margin:10px auto 24px;
   color:#667085;
   font:400 14px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
   white-space:pre-line;
}
.config-result-actions{
   display:flex;
   justify-content:center;
   gap:10px;
   flex-wrap:wrap;
}
.config-result-ok,
.config-result-cancel{
   min-width:112px;
   padding:12px 24px;
   border:0;
   border-radius:12px;
   font:600 13px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
   cursor:pointer;
   transition:transform .15s ease,box-shadow .15s ease,background .15s ease;
}
.config-result-ok{
   background:#172033;
   color:#fff;
   box-shadow:0 8px 20px rgba(23,32,51,.20);
}
.config-result-ok:hover{
   transform:translateY(-1px);
   background:#0f1728;
   box-shadow:0 11px 24px rgba(23,32,51,.24);
}
.config-result-cancel{
   background:#edf0f4;
   color:#172033;
}
.config-result-cancel:hover{
   transform:translateY(-1px);
   background:#e2e7ee;
}
.config-result-ok:focus-visible,
.config-result-cancel:focus-visible{outline:3px solid rgba(23,32,51,.20);outline-offset:3px}
.delete-confirm-input {
   width: 100%;
   max-width: 280px;
   padding: 11px 16px;
   margin: 0 auto 12px;
   display: block;
   box-sizing: border-box;
   font: 600 15px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
   text-align: center;
   letter-spacing: 2px;
   color: #172033;
   background: #f8fafc;
   border: 1.5px solid #cbd5e1;
   border-radius: 12px;
   outline: none;
   transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.delete-confirm-input:focus {
   border-color: #dc2626;
   background: #ffffff;
   box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}
.delete-confirm-input.is-invalid {
   border-color: #dc2626 !important;
   background: #fff5f5 !important;
   animation: deleteShake .3s ease-in-out;
}
@keyframes deleteShake {
   0%, 100% { transform: translateX(0); }
   20%, 60% { transform: translateX(-6px); }
   40%, 80% { transform: translateX(6px); }
}
.config-result-danger {
   background: #dc2626 !important;
   color: #ffffff !important;
   box-shadow: 0 8px 20px rgba(220, 38, 38, .28) !important;
}
.config-result-danger:hover {
   background: #b91c1c !important;
   box-shadow: 0 11px 24px rgba(220, 38, 38, .36) !important;
}
.btn-send-whatsapp {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
   min-width: 175px;
   padding: 12px 22px;
   border: 0;
   border-radius: 12px;
   font: 600 13px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
   color: #FFFFFF !important;
   background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
   box-shadow: 0 8px 22px rgba(37, 211, 102, 0.32);
   cursor: pointer;
   text-decoration: none;
   transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-send-whatsapp:hover {
   transform: translateY(-1.5px);
   box-shadow: 0 11px 26px rgba(37, 211, 102, 0.42);
   filter: brightness(1.04);
}
.btn-send-whatsapp:active {
   transform: translateY(0);
   box-shadow: 0 5px 14px rgba(37, 211, 102, 0.3);
}
.btn-send-whatsapp:focus-visible {
   outline: 3px solid rgba(37, 211, 102, 0.45);
   outline-offset: 3px;
}
.btn-send-whatsapp svg {
   width: 18px;
   height: 18px;
   fill: currentColor;
   flex-shrink: 0;
}
.btn-wa-reminder {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 24px;
   height: 24px;
   border-radius: 50%;
   background: #25D366;
   color: #ffffff !important;
   border: none;
   cursor: pointer;
   margin-left: 6px;
   vertical-align: middle;
   transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
   box-shadow: 0 1px 4px rgba(37, 211, 102, 0.35);
   padding: 0;
   flex-shrink: 0;
}
.btn-wa-reminder:hover {
   background: #1eb956;
   transform: scale(1.1);
   box-shadow: 0 3px 8px rgba(37, 211, 102, 0.45);
}
.btn-wa-reminder:active {
   transform: scale(0.95);
}
.btn-wa-reminder svg {
   width: 14px;
   height: 14px;
   fill: currentColor;
   pointer-events: none;
}
.btn-wa-reminder img {
   width: 15px;
   height: 15px;
   pointer-events: none;
   display: block;
   object-fit: contain;
}
@media print {
   .btn-wa-reminder {
      display: none !important;
   }
}
.phone-input-combo {
   display: inline-flex;
   align-items: center;
   border: 1px solid #CBD5E1;
   border-radius: 6px;
   background: #FFFFFF;
   overflow: hidden;
   transition: border-color .15s ease, box-shadow .15s ease;
}
.phone-input-combo:focus-within {
   border-color: var(--theme-background, #386182) !important;
   box-shadow: 0 0 0 2px rgba(56, 97, 130, 0.2) !important;
}
.phone-input-combo.input-error-glow {
   border-color: #ef4444 !important;
   box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.22) !important;
}
.config-result-progress{
   height:2px;
   margin-top:24px;
   overflow:hidden;
   border-radius:999px;
   background:#edf0f4;
}
.config-result-progress span{
   display:block;
   width:100%;
   height:100%;
   transform-origin:left center;
   background:#172033;
   animation:configResultProgress 1800ms linear forwards;
}
@keyframes configResultProgress{from{transform:scaleX(1)}to{transform:scaleX(0)}}
@media (prefers-reduced-motion:reduce){
   .config-result-overlay,.config-result-modal{transition:none}
   .config-result-progress span{animation:none}
}
@media (max-width:520px){
   .config-result-overlay{padding:16px}
   .config-result-modal{padding:26px 18px 20px;border-radius:18px;transform:scale(.96)}
   .config-result-overlay.is-visible .config-result-modal{transform:scale(1)}
   .config-result-title{font-size:14pt}
   .config-result-message{font-size:10pt}
   .config-result-actions{gap:8px;flex-direction:column-reverse}
   .config-result-ok,.config-result-cancel{width:100%;min-height:42px;box-sizing:border-box}
}

/* Compact Modern App Alert Modal (No background blur, theme-compliant, compact box) */
.app-alert-overlay {
   position: fixed;
   inset: 0;
   z-index: 100050;
   display: flex;
   align-items: center;
   justify-content: center;
   padding: 16px;
   box-sizing: border-box;
   background: rgba(15, 23, 42, 0.28);
   opacity: 0;
   transition: opacity .15s ease-out;
}
.app-alert-overlay.is-visible {
   opacity: 1;
}
.app-alert-box {
   width: min(340px, calc(100vw - 32px));
   padding: 20px 22px 18px;
   box-sizing: border-box;
   background: #ffffff;
   color: #545454;
   border-radius: 14px;
   border: 1px solid rgba(0, 0, 0, 0.08);
   box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.18), 0 6px 14px -4px rgba(15, 23, 42, 0.08);
   text-align: center;
   transform: scale(0.94) translateY(6px);
   transition: transform .18s cubic-bezier(0.16, 1, 0.3, 1);
}
.app-alert-overlay.is-visible .app-alert-box {
   transform: scale(1) translateY(0);
}
.app-alert-icon {
   width: 44px;
   height: 44px;
   margin: 0 auto 12px;
   display: flex;
   align-items: center;
   justify-content: center;
   border-radius: 50%;
   position: relative;
}
.app-alert-icon.warning {
   color: #b45309;
   background: linear-gradient(145deg, #fffbeb, #fef3c7);
}
.app-alert-icon.success {
   color: #047857;
   background: linear-gradient(145deg, #ecfdf5, #d1fae5);
}
.app-alert-icon.error {
   color: #b91c1c;
   background: linear-gradient(145deg, #fef2f2, #fee2e2);
}
.app-alert-icon.info {
   color: var(--theme-on-light, #386182);
   background: linear-gradient(145deg, #f0f9ff, #e0f2fe);
}
.app-alert-icon svg {
   width: 24px;
   height: 24px;
   stroke-width: 2.2;
}
.app-alert-title {
   margin: 0 0 6px;
   font-size: 15px;
   font-weight: 650;
   color: #545454 !important;
   letter-spacing: -0.01em;
}
.app-alert-message {
   margin: 0 0 16px;
   font-size: 12.5px;
   line-height: 1.5;
   color: #545454 !important;
   word-break: break-word;
   white-space: pre-line;
}
.app-alert-actions {
   display: flex;
   justify-content: center;
   gap: 8px;
}
.app-alert-btn {
   min-width: 82px;
   padding: 7px 18px;
   font-size: 12.5px;
   font-weight: 600;
   border-radius: 8px;
   cursor: pointer;
   border: none;
   background: var(--theme-on-light, #386182) !important;
   color: #ffffff !important;
   transition: background-color .15s ease, transform .1s ease, filter .15s ease;
}
.app-alert-btn:hover {
   background: var(--theme-on-light, #386182) !important;
   color: #ffffff !important;
   filter: brightness(1.1);
}
.app-alert-btn:active {
   transform: scale(0.97);
}
.app-alert-btn:focus-visible {
   outline: 2px solid var(--theme-on-light, #386182);
   outline-offset: 2px;
}
.app-alert-btn-cancel {
   background: #f1f5f9 !important;
   color: #475569 !important;
   border: 1px solid #cbd5e1 !important;
}
.app-alert-btn-cancel:hover {
   background: #e2e8f0 !important;
   color: #1e293b !important;
   filter: none;
}
@media (prefers-reduced-motion:reduce){
   .app-alert-overlay, .app-alert-box { transition: none; }
}


/* Required first-login currency and time-zone setup. */
.tenant-setup-html,.tenant-setup-body{min-height:100%;margin:0}
.tenant-setup-body{
   display:grid;
   place-items:center;
   padding:24px;
   box-sizing:border-box;
   background:#f8fafc;
   color:#1e293b;
   font-family:var(--font-family-base, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
}
.tenant-setup-page{width:min(100%,520px);box-sizing:border-box}
.tenant-setup-subcard {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
}
.tenant-setup-subcard-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}
.tenant-setup-subcard-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f0f9ff;
    color: #0284c7;
    font-size: 15px;
    flex-shrink: 0;
}
.tenant-setup-subcard-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
}
.tenant-setup-subcard-desc {
    font-size: 12px;
    color: #64748b;
    margin: 2px 0 0;
    line-height: 1.3;
}
.tenant-setup-subcard .tenant-setup-field:last-child {
    margin-bottom: 0;
}
@keyframes subcardFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
#cardGstSettings {
    animation: subcardFadeIn 0.25s ease-out;
}
.tenant-setup-card{
   box-sizing:border-box;
   padding:30px 32px;
   border:1.5px solid #bce6f2;
   border-radius:16px;
   background:#E6F6FE;
   box-shadow:0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}
.tenant-setup-eyebrow{
   margin:0 0 6px;
   color:#0284c7;
   font-size:11px;
   font-weight:bold;
   text-transform:uppercase;
   letter-spacing:.08em;
}
.tenant-setup-card h1{margin:0;color:#0f172a;font-size:22px;font-weight:700;letter-spacing:-0.3px;line-height:1.25}
.tenant-setup-copy{margin:8px 0 14px;font-size:13.5px;color:#475569;line-height:1.5}
.tenant-setup-warning-pill{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;background:#fef2f2;border:1px solid #fecaca;color:#b91c1c;border-radius:6px;font-size:12px;font-weight:600;margin-bottom:18px;}
.tenant-setup-field{display:grid;gap:5px;margin:0 0 16px}
.tenant-setup-field label{display:block;font-size:13px;font-weight:600;color:#334155;margin:0;}
.tenant-setup-field select,
.tenant-setup-field input[type="text"],
.tenant-setup-field input[type="password"] {
    width: 100%;
    min-height: 42px;
    height: 42px;
    padding: 8px 12px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #1e293b;
    font-size: 13.5px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.tenant-setup-field select:disabled,
.tenant-setup-field input:disabled {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border-color: #cbd5e1 !important;
    cursor: not-allowed !important;
    opacity: 0.9 !important;
}
.tenant-setup-field select:focus,
.tenant-setup-field input[type="text"]:focus,
.tenant-setup-field input[type="password"]:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}
.tenant-setup-field input[type="text"].has-error,
.tenant-setup-field select.has-error,
.modern-input.has-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}
.tenant-setup-submit{display:flex!important;align-items:center!important;justify-content:center!important;width:100%;height:44px;padding:0 16px!important;line-height:1!important;border-radius:8px;font-size:15px;font-weight:600;cursor:pointer;text-align:center;border:1px solid #b0d4ed;background:#C4E0F2!important;color:#404040!important;box-sizing:border-box;text-decoration:none;margin-top:8px;font-family:inherit;transition:all .15s ease}
.tenant-setup-submit:hover{filter:brightness(0.97);background:#b5d8ed!important}
.tenant-setup-error{padding:10px 14px;border-radius:8px;background:#fef2f2;border:1px solid #fecaca;color:#b91c1c;font-weight:600;font-size:13px;margin:0 0 16px}
@media (max-width:520px){
   .tenant-setup-body{padding:16px 12px}
   .tenant-setup-card{padding:24px 18px;border-radius:16px}
   .tenant-setup-card h1{font-size:19px;line-height:1.25}
   .tenant-setup-field select,
   .tenant-setup-field input[type="text"],
   .tenant-setup-field input[type="password"]{
      font-size:16px; /* Prevents auto-zoom on iOS */
      min-height:44px;
      height:44px;
   }
   .tenant-setup-submit{min-height:44px;font-size:15px}
}
@media (max-width:380px){
   .tenant-setup-body{padding:12px 8px}
   .tenant-setup-card{padding:20px 14px;border-radius:14px}
   .tenant-setup-card h1{font-size:17px}
   .tenant-setup-eyebrow{font-size:10px}
   .tenant-setup-copy{font-size:12.5px}
}

/* Personalized greeting on tenant setup */
.tenant-setup-greeting {
    margin: 0 0 14px 0;
    font-size: 19px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.25;
    letter-spacing: -0.2px;
}
.tenant-setup-greeting .greeting-lead {
    font-size: 28px;
    font-weight: 800;
    color: var(--theme-on-light, #0284c7);
    line-height: 1;
    display: inline-block;
    vertical-align: baseline;
    margin-right: 0.5px;
}

/* Terms and Conditions checkbox group */
.tenant-setup-terms-group {
    margin: 18px 0 16px 0;
    padding: 12px 14px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tenant-setup-terms-group:focus-within {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}
.tenant-setup-terms-group.has-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}
.tenant-setup-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    margin: 0;
}
.tenant-setup-terms-checkbox {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    margin-top: 2px;
    accent-color: #0284c7;
    cursor: pointer;
}
.tenant-setup-terms-text {
    font-size: 13px;
    color: #334155;
    line-height: 1.45;
}
.tenant-setup-terms-link {
    color: #0284c7;
    text-decoration: underline;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s ease;
}
.tenant-setup-terms-link:hover {
    color: #0369a1;
}

/* Terms Modal Popup (Little bigger than standard dialogs) */
.terms-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.terms-modal-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}
.terms-modal-card {
    position: relative;
    width: min(92vw, 880px);
    height: min(88vh, 820px);
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.96) translateY(8px);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.terms-modal-overlay.is-visible .terms-modal-card {
    transform: scale(1) translateY(0);
}
.terms-modal-header {
    height: 52px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}
.terms-modal-header-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.terms-modal-icon {
    font-size: 18px;
}
.terms-modal-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
.terms-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s ease;
}
.terms-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.terms-modal-close:focus {
    outline: none;
    box-shadow: 0 0 0 2px #0284c7;
}
.terms-modal-body {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
    background: #f8fafc;
    overflow: hidden;
}
.terms-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
@media (max-width: 520px) {
    .terms-modal-overlay {
        padding: 10px;
    }
    .terms-modal-card {
        width: 100%;
        height: 94vh;
        border-radius: 12px;
    }
    .tenant-setup-greeting {
        font-size: 17px;
    }
    .tenant-setup-greeting .greeting-lead {
        font-size: 24px;
    }
}

/* ==========================================================================
   Quotation Modal & Document Styles
   ========================================================================== */
.quotation-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.quotation-modal-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}
.quotation-modal-card {
    position: relative;
    width: min(94vw, 780px);
    max-height: min(92vh, 880px);
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.96) translateY(8px);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.quotation-modal-overlay.is-visible .quotation-modal-card {
    transform: scale(1) translateY(0);
}
.quotation-modal-header {
    height: 52px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}
.quotation-modal-header-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.quotation-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #e0f2fe;
    color: #0284c7;
    border-radius: 6px;
}
.quotation-modal-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
.quotation-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s ease;
}
.quotation-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.quotation-modal-close:focus {
    outline: none;
    box-shadow: 0 0 0 2px #0284c7;
}
.quotation-modal-body {
    flex: 1;
    position: relative;
    width: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 24px;
    background: #f8fafc;
    box-sizing: border-box;
}
.quotation-modal-footer {
    padding: 12px 18px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.quotation-footer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.quotation-email-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    box-sizing: border-box;
}
.quotation-email-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.quotation-email-label {
    font-size: 8.5pt;
    font-weight: 600;
    color: #334155;
}
.quotation-email-input {
    flex: 1;
    min-width: 200px;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 9pt;
    outline: none;
    box-sizing: border-box;
}
.quotation-email-input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}
.quotation-email-status {
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 8.5pt;
}

/* Quotation Document Preview inside modal */
.quotation-modal-body .invoice-container {
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    overflow: hidden;
}
.quotation-modal-body .invoice-top-stripe {
    font-size: 9.5pt;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    padding: 8px 0;
}
.quotation-modal-body .invoice-content {
    padding: 22px 26px;
    box-sizing: border-box;
}
.quotation-modal-body .invoice-parties-table,
.quotation-modal-body .invoice-items-table,
.quotation-modal-body .invoice-totals-table,
.quotation-modal-body .invoice-footer-table {
    width: 100%;
    border-collapse: collapse;
}
.quotation-modal-body .invoice-summary-card {
    display: inline-block;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 14px;
    background: transparent;
    box-shadow: none;
    text-align: left;
}
.quotation-modal-body .invoice-items-table th {
    font-size: 8.5pt;
    font-weight: 700;
    padding: 7px 8px;
}
.quotation-modal-body .invoice-items-table td {
    border-bottom: 1px solid #f1f5f9;
    font-size: 9pt;
    padding: 8px;
}
.quotation-modal-body .invoice-desktop-items {
    display: block;
}
.quotation-modal-body .invoice-mobile-items {
    display: none;
}
.quotation-modal-body .estimate-notice {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    padding: 8px 12px;
    margin: 16px 0;
    font-size: 8.5pt;
    color: #64748b;
    line-height: 1.4;
}

/* Action buttons */
.est-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 8.5pt;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease-in-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.est-btn-download {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}
.est-btn-download:hover {
    background: #0369a1;
}
.est-btn-email {
    background: #ffffff;
    color: #334155;
    border-color: #cbd5e1;
}
.est-btn-email:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}
.est-btn-whatsapp {
    background: #25D366;
    color: #ffffff;
    border-color: #22bf5b;
}
.est-btn-whatsapp:hover {
    background: #1eb956;
}
.est-btn-print {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}
.est-btn-print:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.est-btn-close {
    background: #ffffff;
    color: #64748b;
    border-color: #cbd5e1;
}
.est-btn-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}
.est-btn-send-mail {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}
.est-btn-send-mail:hover {
    background: #0369a1;
}
.est-btn-secondary {
    background: #ffffff;
    color: #475569;
    border-color: #cbd5e1;
}
.est-btn-secondary:hover {
    background: #f1f5f9;
}

@media only screen and (max-width: 640px) {
    .quotation-modal-overlay {
        padding: 8px;
    }
    .quotation-modal-card {
        width: 100%;
        max-height: 96vh;
        border-radius: 10px;
    }
    .quotation-modal-body {
        padding: 12px 10px;
    }
    .quotation-modal-body .invoice-container {
        border-radius: 6px;
        box-shadow: none;
    }
    .quotation-modal-body .invoice-content {
        padding: 14px 10px;
    }
    .quotation-modal-body .invoice-parties-table,
    .quotation-modal-body .invoice-parties-table tbody,
    .quotation-modal-body .invoice-parties-table tr {
        display: block !important;
        width: 100% !important;
    }
    .quotation-modal-body .invoice-party-col {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        border-left: none !important;
        box-sizing: border-box !important;
    }
    .quotation-modal-body .invoice-party-to {
        margin-top: 14px !important;
        padding-top: 14px !important;
        border-top: 1px dashed #cbd5e1 !important;
    }
    .quotation-modal-body .invoice-desktop-items {
        display: none !important;
    }
    .quotation-modal-body .invoice-mobile-items {
        display: block !important;
    }
    .quotation-modal-body .invoice-summary-card {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .quotation-footer-actions {
        justify-content: center;
    }
}

/* Modern input styles for Customer Account and Admin forms */
.modern-input {
    min-height: 34px;
    height: 34px;
    padding: 6px 10px;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    background-color: #ffffff;
    color: #1e293b;
    font-size: 9.5pt;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.modern-input:hover {
    border-color: #94a3b8;
}
.modern-input:focus {
    border-color: var(--theme-background, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.modern-input:disabled {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
}

/* Modern lock badge for configuration fields */
.config-lock-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    color: #64748b;
    vertical-align: middle;
}
.config-lock-badge svg {
    display: inline-block;
    stroke: #64748b;
}

/* Tenant-only password recovery. */
.password-recovery-html,.password-recovery-body{min-height:100%;margin:0;font-family:var(--font-family-base, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;}
.password-recovery-body{min-height:100vh;display:grid;place-items:center;padding:24px 16px;box-sizing:border-box;background:#f8fafc;color:#1e293b;font-family:var(--font-family-base, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);}
.password-recovery-page{width:min(100%,460px);box-sizing:border-box;}
.password-recovery-card{padding:28px 32px 24px 32px;border:1.5px solid #bce6f2;border-radius:16px;background:#E6F6FE;box-shadow:0 10px 25px -5px rgba(15,23,42,.08), 0 8px 10px -6px rgba(15,23,42,.04);text-align:center;box-sizing:border-box;}
.password-recovery-logo{display:block;height:72px;width:auto;max-width:240px;object-fit:contain;margin:0 auto 16px;}
.password-recovery-card h1{margin:0 0 6px 0;color:#0f172a;font-size:20px;font-weight:700;letter-spacing:-0.2px;line-height:1.3;}
.password-recovery-card>p{margin:0 0 18px 0;font-size:13.5px;color:#536b78;line-height:1.45;}
.password-recovery-card form{display:grid;gap:6px;text-align:left;margin-bottom:8px;}
.password-recovery-card label{display:block;font-size:13px;font-weight:600;color:#243c4a;margin-bottom:2px;}
.password-recovery-card .loginBoxes{width:100%;min-height:42px;height:42px;padding:8px 12px;box-sizing:border-box;font-size:14px;font-family:inherit;border:1.5px solid #cbd5e1;border-radius:8px;background:#ffffff;color:#1e293b;outline:none;transition:border-color .2s,box-shadow .2s;}
.password-recovery-card .loginBoxes:focus{border-color:#0284c7;box-shadow:0 0 0 3px rgba(2,132,199,.15);}
.password-recovery-card .buttons{display:flex!important;align-items:center!important;justify-content:center!important;width:100%;height:44px;padding:0 16px!important;line-height:1!important;border-radius:8px;font-size:15px;font-weight:600;cursor:pointer;text-align:center;border:1px solid #b0d4ed;background:#C4E0F2!important;color:#404040!important;box-sizing:border-box;text-decoration:none;margin-top:10px;font-family:inherit;transition:all .15s ease;}
.password-recovery-card .buttons:hover{filter:brightness(0.97);background:#b5d8ed!important;}
.password-recovery-card .buttons:disabled{opacity:0.65;cursor:not-allowed;}
.password-recovery-status{min-height:1.5em;margin:14px 0 0!important;font-size:13px;font-weight:600;}
.password-recovery-status.is-success{color:#15803d;}
.password-recovery-status.is-error{color:#b91c1c;}
.password-recovery-note{font-size:12px;color:#64748b;margin:16px 0 12px;line-height:1.4;}
.password-recovery-back{display:inline-flex;align-items:center;gap:4px;margin-top:6px;color:#0284c7;font-size:13px;font-weight:600;text-decoration:none;transition:color .15s ease;}
.password-recovery-back:hover{color:#0369a1;text-decoration:underline;}
@media (max-width:520px){.password-recovery-body{padding:16px 12px}.password-recovery-card{padding:24px 20px 20px;border-radius:14px}.password-recovery-card h1{font-size:18px}.password-recovery-card .loginBoxes{font-size:16px;min-height:44px;height:44px}.password-recovery-card .buttons{min-height:44px;font-size:15px}}

/* Shared business logo sizing for login and invoice result */
.invoiceSuccessLogo{
   width:432px;
   height:216px;
   object-fit:contain;
   display:block;
   margin:0 auto;
}

.figure-privacy-toggle{
   display:inline-flex;
   align-items:center;
   justify-content:center;
   width:42px;
   height:42px;
   margin:6px 0 4px;
   padding:0;
   border:1px solid #d7e0e8;
   border-radius:12px;
   background:linear-gradient(180deg,#ffffff,#f5f8fb);
   color:var(--theme-on-light,#545454);
   cursor:pointer;
   box-shadow:0 1px 2px rgba(15,23,42,.06);
   transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease,background .15s ease;
}
.figure-privacy-toggle:hover{
   transform:translateY(-1px);
   border-color:#b7c9d8;
   background:linear-gradient(180deg,#ffffff,#eef4f9);
   box-shadow:0 6px 16px color-mix(in srgb,var(--theme-on-light,#545454) 14%,transparent);
}
.figure-privacy-toggle:focus-visible{
   outline:3px solid color-mix(in srgb,var(--theme-on-light,#545454) 22%,transparent);
   outline-offset:2px;
}
.figure-privacy-svg{
   width:22px;
   height:22px;
   fill:none;
   stroke:currentColor;
   stroke-width:1.8;
   stroke-linecap:round;
   stroke-linejoin:round;
}
.figure-privacy-value{
   display:flex;
   align-items:center;
   justify-content:space-between;
   gap:12px;
   min-height:42px;
   padding:4px 0;
   cursor:pointer;
}
.figure-privacy-amount{
   color:#172033;
   font:650 18px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
   letter-spacing:-.02em;
}
.figure-privacy-chip{
   display:inline-flex;
   align-items:center;
   justify-content:center;
   width:32px;
   height:32px;
   border-radius:10px;
   background:#eef4f9;
   color:var(--theme-on-light,#545454);
   flex:0 0 auto;
}

/* Modern Dashboard Metric Cards */
.dashboard-cards-grid {
   display: grid;
   grid-template-columns: repeat(2, 1fr);
   gap: 12px;
   width: 100%;
   box-sizing: border-box;
   margin-bottom: 12px;
}
.dash-card {
   background: #FFFFFF;
   border: 1px solid #E2E8F0;
   border-radius: 10px;
   padding: 12px 14px;
   display: flex;
   flex-direction: column;
   justify-content: space-between;
   gap: 8px;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
   transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
   min-height: 96px;
   box-sizing: border-box;
   position: relative;
   overflow: hidden;
}
.dash-card:hover {
   border-color: #CBD5E1;
   box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
   transform: translateY(-1px);
}
.dash-card::before {
   content: "";
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   height: 3px;
   background: var(--theme-background, #84BAD2);
   opacity: 0.85;
}
.dash-card-header {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 8px;
   width: 100%;
}
.dash-card-header-left {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   min-width: 0;
}
.dash-card-icon {
   width: 15px;
   height: 15px;
   color: var(--theme-on-light, #545454);
   flex-shrink: 0;
}
.dash-card-title {
   font-size: 11px;
   font-weight: 700;
   color: #64748B;
   letter-spacing: 0.03em;
   text-transform: uppercase;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
}
.dash-card-title-period {
   text-transform: none;
   font-weight: 600;
   letter-spacing: 0;
   margin-left: 2px;
}
.dash-card-header-link {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   color: inherit;
   text-decoration: none;
   font-size: 11px;
   font-weight: 700;
   color: #64748B;
   letter-spacing: 0.03em;
   text-transform: uppercase;
   transition: color 0.15s ease;
}
.dash-card-header-link:hover {
   color: var(--theme-on-light, #545454);
}
.dash-card-body {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 8px;
   width: 100%;
   min-height: 42px;
}
.dash-card-account-link {
   display: flex;
   flex-direction: column;
   gap: 4px;
   text-decoration: none;
   min-width: 0;
   width: 100%;
}
.dash-card-account-name {
   font-size: 14px;
   font-weight: 600;
   color: #0F172A;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
   transition: color 0.15s ease;
}
.dash-card-account-link:hover .dash-card-account-name {
   color: var(--theme-on-light, #545454);
}
.dash-pill-badge {
   display: inline-flex;
   align-items: center;
   padding: 2px 8px;
   font-size: 11px;
   font-weight: 600;
   color: #475569;
   background: #F1F5F9;
   border: 1px solid #CBD5E1;
   border-radius: 12px;
   white-space: nowrap;
   align-self: flex-start;
}
.dash-alert-badge {
   display: inline-flex;
   align-items: center;
   padding: 2px 7px;
   font-size: 11px;
   font-weight: 700;
   color: #B45309;
   background: #FEF3C7;
   border: 1px solid #FCD34D;
   border-radius: 12px;
   white-space: nowrap;
}
.dash-alert-badge:empty {
   display: none;
}
.dash-stock-ticker {
   font-size: 12px;
   font-weight: 600;
   color: #92400E;
   background: #FFFBEB;
   border: 1px solid #FEF08A;
   border-radius: 6px;
   padding: 8px 10px;
   width: 100%;
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
   box-sizing: border-box;
   cursor: pointer;
   text-align: center;
   transition: background 0.15s ease;
}
.dash-stock-ticker:hover {
   background: #FEF9C3;
}
.dash-card-empty-text {
   font-size: 13px;
   color: #94A3B8;
   text-align: center;
   padding: 12px;
   width: 100%;
}

.dash-card-mini-body {
   flex-direction: column;
   align-items: stretch;
   justify-content: flex-start;
   min-height: 80px;
   padding: 2px 0;
   gap: 2px;
}
.dash-mini-list {
   display: flex;
   flex-direction: column;
   gap: 3px;
   width: 100%;
}
.dash-mini-row {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 6px;
   padding: 3px 6px;
   border-radius: 6px;
   transition: background 0.15s ease;
   cursor: pointer;
}
.dash-mini-row:hover {
   background: #F8FAFC;
}
.dash-mini-left {
   display: flex;
   align-items: center;
   gap: 6px;
   min-width: 0;
   flex: 1 1 auto;
}
.dash-mini-rank {
   width: 17px;
   height: 17px;
   border-radius: 50%;
   font-size: 10px;
   font-weight: 700;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   flex-shrink: 0;
   line-height: 1;
}
.dash-mini-rank.rank-1 {
   background: #FEF3C7;
   color: #92400E;
}
.dash-mini-rank.rank-2 {
   background: #F1F5F9;
   color: #475569;
}
.dash-mini-rank.rank-3 {
   background: #FFEDD5;
   color: #9A3412;
}
.dash-mini-name {
   font-size: 11.5px;
   font-weight: 500;
   color: #1E293B;
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
   line-height: 1.3;
   min-width: 0;
   flex: 1 1 auto;
}
.dash-mini-row:hover .dash-mini-name {
   color: #0284C7;
}
.dash-mini-row.dash-mini-row-static {
   cursor: default;
}
.dash-mini-row.dash-mini-row-static:hover {
   background: transparent;
}
.dash-mini-row.dash-mini-row-static:hover .dash-mini-name {
   color: #1E293B;
}
.dash-mini-val {
   font-size: 11.5px;
   font-weight: 600;
   font-variant-numeric: tabular-nums;
   white-space: nowrap;
   text-align: right;
   flex: 0 0 auto;
   line-height: 1.3;
}
.dash-val-debt {
   color: #B91C1C;
}
.dash-val-qty {
   color: #0F172A;
}
.dash-mini-unit {
   font-size: 10px;
   font-weight: 600;
   color: #64748B;
   text-transform: uppercase;
}
.dash-mini-footer {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 8px;
   border-top: 1px dashed #E2E8F0;
   padding-top: 6px;
   margin-top: 2px;
   width: 100%;
}
.dash-mini-footer-label {
   font-size: 11px;
   font-weight: 600;
   color: #64748B;
   text-transform: uppercase;
   letter-spacing: 0.02em;
}
.dash-mini-footer-val {
   font-size: 11.5px;
   font-weight: 700;
   color: #0F172A;
   font-variant-numeric: tabular-nums;
   white-space: nowrap;
}
.dash-mini-footer-link {
   font-size: 11px;
   font-weight: 600;
   color: #0284C7;
   text-decoration: none;
   display: inline-flex;
   align-items: center;
   gap: 4px;
   margin-left: auto;
   transition: color 0.15s ease;
}
.dash-mini-footer-link:hover {
   color: #0369A1;
   text-decoration: underline;
}

.app-search{
   display:inline-flex;
   align-items:center;
   gap:8px;
}
.app-search-input{
   box-sizing:border-box;
   width:230px;
   height:34px;
   padding:0 12px;
   border:1px solid #D9E0E6;
   border-radius:8px;
   background:#FFFFFF;
   color:#4B4B4B;
   font:10pt Arial;
   outline:none;
   transition:border-color .15s ease,box-shadow .15s ease;
}
.app-search-input-short{
   width:220px;
   transition:border-color .18s ease,box-shadow .18s ease;
}
.app-search-input:hover,
.app-search-input-short:hover{
   border-color:#94A3B8;
}
.app-search-input:focus,
.app-search-input-short:focus{
   border-color:var(--theme-on-light,var(--theme-background,#84BAD2));
   box-shadow:0 0 0 3px color-mix(in srgb,var(--theme-on-light,var(--theme-background,#84BAD2)) 22%,transparent),0 2px 6px -1px rgba(15,23,42,0.08);
}
.app-search-btn,
.app-search-icon{
   height:34px;
   padding:0 14px;
   border-radius:8px;
   font:600 9.5pt Arial;
}
.app-search-clear{
   color:#6B7280;
   text-decoration:none;
   font-size:9pt;
}
.app-search-clear:hover{color:var(--theme-on-light,#545454);text-decoration:underline}
.tenant-logo{
   height:52px;
   width:auto;
   max-width:180px;
   object-fit:contain;
   vertical-align:middle;
   margin-right:10px;
}
.tenant-logo-banner{
   height:109px;
   max-width:250px;
   margin:0;
}

/* Account monthly statement */
#divFirmName.statement-header{
   height:auto;
   padding:14px 16px;
   box-sizing:border-box;
   margin-bottom:12px;
}
.statement-header-top,
.statement-header-meta{
   display:flex;
   align-items:center;
   justify-content:space-between;
   gap:12px;
}
.statement-header-meta{margin-top:10px;flex-wrap:wrap}
.statement-firm{font-size:20pt;font-weight:bold;line-height:1.2}
.statement-subtitle{font-size:12pt;font-weight:bold}
.statement-print{
   flex:0 0 auto;
   border:1px solid currentColor;
   border-radius:6px;
   background:transparent;
   color:inherit;
   font:inherit;
   font-weight:bold;
   padding:6px 12px;
   cursor:pointer;
}
.statement-view{display:flex;align-items:center;gap:8px}
.statement-summary{
   display:flex;
   flex-wrap:wrap;
   gap:10px 18px;
   margin:0 0 14px;
   padding:10px 12px;
   border:1px solid #D9E0E6;
   background:#FAFBFC;
}
.statement-summary-item{display:flex;align-items:center;gap:6px;font-size:9pt}
.statement-summary-item span{color:#6B7280}
.statement-month{
   margin:0 0 12px;
   text-align:center;
   font-size:13pt;
   font-weight:bold;
}
.statement-page #printStatementTable{width:100%}
/* Modern Statement Bottom Summary */
.statement-bottom-card {
   margin-top: 20px;
   background: #ffffff;
   border: 1px solid #e2e8f0;
   border-radius: 12px;
   padding: 16px 20px;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
   box-sizing: border-box;
}
.statement-bottom-header {
   display: flex;
   align-items: center;
   justify-content: space-between;
   margin-bottom: 14px;
   padding-bottom: 10px;
   border-bottom: 1px solid #f1f5f9;
}
.statement-bottom-title {
   font-size: 11pt;
   font-weight: 700;
   color: #1e293b;
   display: inline-flex;
   align-items: center;
   gap: 6px;
}
.statement-bottom-badge {
   display: inline-flex;
   align-items: center;
   padding: 3px 9px;
   border-radius: 9999px;
   font-size: 8pt;
   font-weight: 600;
   background: #f1f5f9;
   color: #475569;
   letter-spacing: 0.3px;
}
.statement-kpi-grid {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
   gap: 12px;
}
.statement-kpi-card {
   background: #f8fafc;
   border: 1px solid #e2e8f0;
   border-radius: 10px;
   padding: 12px 14px;
   display: flex;
   flex-direction: column;
   gap: 4px;
   transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.statement-kpi-card:hover {
   transform: translateY(-1px);
   box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.statement-kpi-card.kpi-received,
.statement-kpi-card.kpi-active-sales {
   background: #f0fdf4;
   border-color: #bbf7d0;
}
.statement-kpi-card.kpi-sent {
   background: #fffbeb;
   border-color: #fde68a;
}
.statement-kpi-card.kpi-net {
   background: #f0f9ff;
   border-color: #bae6fd;
}
.statement-kpi-card.kpi-sales {
   background: #f8fafc;
   border-color: #cbd5e1;
}
.statement-kpi-card.kpi-cancelled,
.statement-kpi-card.kpi-inactive-sales {
   background: #fef2f2;
   border-color: #fecaca;
}
.statement-kpi-top {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 6px;
}
.statement-kpi-label {
   font-size: 8pt;
   font-weight: 700;
   text-transform: uppercase;
   letter-spacing: 0.5px;
   color: #64748b;
}
.statement-kpi-card.kpi-received .statement-kpi-label,
.statement-kpi-card.kpi-active-sales .statement-kpi-label {
   color: #166534;
}
.statement-kpi-card.kpi-sent .statement-kpi-label {
   color: #92400e;
}
.statement-kpi-card.kpi-net .statement-kpi-label {
   color: #0369a1;
}
.statement-kpi-card.kpi-cancelled .statement-kpi-label,
.statement-kpi-card.kpi-inactive-sales .statement-kpi-label {
   color: #991b1b;
}
.statement-kpi-value {
   font-size: 15pt;
   font-weight: 800;
   color: #0f172a;
   line-height: 1.2;
   font-variant-numeric: tabular-nums;
}
.statement-kpi-card.kpi-received .statement-kpi-value,
.statement-kpi-card.kpi-active-sales .statement-kpi-value {
   color: #15803d;
}
.statement-kpi-card.kpi-sent .statement-kpi-value {
   color: #b45309;
}
.statement-kpi-card.kpi-net .statement-kpi-value {
   color: #0284c7;
}
.statement-kpi-card.kpi-cancelled .statement-kpi-value,
.statement-kpi-card.kpi-inactive-sales .statement-kpi-value {
   color: #dc2626;
}
.statement-kpi-sub {
   font-size: 8pt;
   color: #64748b;
   display: flex;
   align-items: center;
   gap: 4px;
   margin-top: 2px;
}
.statement-kpi-notes-block {
   display: flex;
   flex-direction: column;
   gap: 5px;
   margin-top: 4px;
}
.statement-kpi-note-row {
   font-size: 11pt;
   font-weight: 700;
   line-height: 1.3;
   font-variant-numeric: tabular-nums;
   display: flex;
   align-items: baseline;
   justify-content: space-between;
   flex-wrap: wrap;
   gap: 4px;
}
.statement-kpi-note-row.note-cn {
   color: #ea580c;
}
.statement-kpi-note-row.note-dn {
   color: #0284c7;
}
.statement-kpi-note-count {
   font-size: 8.5pt;
   font-weight: 600;
   opacity: 0.85;
}
@media (max-width: 640px){
   .statement-kpi-grid{
      grid-template-columns: 1fr;
   }
}
@media print{
   .no-print{display:none !important}
}
@media (min-width:721px){
   html.app-home #tabContainer{
      margin-left:5%;
      margin-right:5%;
      width:90%;
      box-sizing:border-box;
   }
   html.app-home #tabscontent{
      height:calc(100vh - 200px) !important;
      min-height:500px;
      box-sizing:border-box;
      margin-bottom:22px;
      padding:14px 16px;
      overflow:hidden !important;
      border:1px solid #D9E0E6;
      border-radius:8px;
      background:#FFFFFF;
      box-shadow:0 4px 16px rgba(0,0,0,0.05);
      position:relative;
   }
   html.app-home #invoiceForm{
      height:100%;
      margin:0;
      padding:0;
      display:contents;
   }
   html.app-home .tabpage{
      height:100% !important;
      min-height:100% !important;
      max-height:100% !important;
      box-sizing:border-box;
      overflow:hidden !important;
      margin:0 !important;
      padding:0 !important;
   }
   html.app-home #tabpage_0{
      overflow:hidden !important;
   }
   html.app-home #tabpage_0 > table{
      width:100%;
      max-width:100%;
      height:100%;
      box-sizing:border-box;
   }
   html.app-home #tabpage_0 > table > tbody > tr > td{
      vertical-align:top;
   }
   html.app-home .dashboard-account-list{
      height:calc(100vh - 270px) !important;
      max-height:calc(100vh - 270px) !important;
      min-height:360px !important;
      overflow-y:auto !important;
      box-sizing:border-box;
   }
   html.app-home #tabpage_1{
      overflow:hidden !important;
      height:100% !important;
      max-height:100% !important;
      box-sizing:border-box;
   }
   html.app-home .invoice-right-pane{
      display:flex;
      flex-direction:column;
      max-height:calc(100vh - 160px);
      box-sizing:border-box;
   }
   html.app-home #divNewInvoice{
      flex:1 1 auto;
      height:auto !important;
      min-height:60px;
      max-height:calc(100vh - 325px) !important;
      overflow-y:auto !important;
      overflow-x:auto !important;
      box-sizing:border-box;
   }
   html.app-home #tableTotalsSection{
      flex-shrink:0 !important;
      margin-top:8px !important;
   }
   html.app-home #tabpage_2{
      overflow:hidden !important;
   }
   html.app-home #divShowRecentInvoices{
      flex: 1 1 auto !important;
      height: auto !important;
      max-height: none !important;
      min-height: 0 !important;
      overflow-y:auto !important;
      box-sizing:border-box;
   }
   html.app-home #tabpage_3{
      overflow-y:auto;
      box-sizing:border-box;
   }
   html.app-home #tabpage_3 h1{
      margin:8px 0 !important;
   }
   html.app-home #tabpage_5{
      overflow:hidden !important;
      height:100% !important;
      box-sizing:border-box;
   }
   html.app-home .activity-top-bar{
      min-height:24px;
      padding:0 2px 4px 2px;
      box-sizing:border-box;
      color:#1E293B;
   }
   html.app-home #divLoadActivities{
      display:flex;
      flex-direction:column;
      height:calc(100% - 28px);
      max-height:calc(100% - 28px);
      box-sizing:border-box;
      overflow:hidden;
   }
   html.app-home .activity-scroll-wrap{
      flex:1 1 0%;
      min-height:0;
      width:100%;
      overflow-y:auto !important;
      overflow-x:auto;
      box-sizing:border-box;
      background:#FFFFFF;
      border:1px solid #D9E0E6;
      border-radius:8px;
   }
   html.app-home table.activity{
      width:100%;
      border-collapse:separate;
      border-spacing:0;
      font-size:13px;
   }
   html.app-home table.activity th{
      position:sticky;
      top:0;
      background:var(--theme-background, #84BAD2);
      color:var(--theme-foreground, #545454) !important;
      font-weight:600;
      font-size:12px;
      text-transform:uppercase;
      letter-spacing:0.04em;
      padding:10px 12px;
      z-index:2;
      border-bottom:1px solid rgba(0,0,0,0.1);
   }
   html.app-home table.activity td{
      padding:8px 12px;
      font-size:13px;
      color:#334155;
      border-bottom:1px solid #F1F5F9;
      line-height:1.4;
   }
   html.app-home table.activity tr:last-child td{
      border-bottom:none;
   }
   html.app-home .activity-bottom-bar{
      flex-shrink:0;
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:12px;
      padding:10px 4px 2px;
      margin-top:8px;
      border-top:1px solid #E2E8F0;
      width:100%;
      box-sizing:border-box;
   }
   html.app-home .activity-bar-left{
      display:flex;
      align-items:center;
      gap:10px;
      flex-wrap:wrap;
   }
   html.app-home .activity-bar-center{
      display:flex;
      align-items:center;
      justify-content:center;
      flex-wrap:wrap;
   }
   html.app-home .activity-bar-right{
      display:flex;
      align-items:center;
      justify-content:flex-end;
      flex-wrap:wrap;
   }
   html.app-home .activity-count-badge{
      display:inline-flex;
      align-items:center;
      padding:5px 12px;
      font-size:12px;
      font-weight:500;
      color:#475569;
      background:#F8FAFC;
      border:1px solid #CBD5E1;
      border-radius:20px;
      line-height:1.2;
   }
   html.app-home .activity-count-badge strong{
      color:#0F172A;
      font-weight:700;
      margin-left:3px;
   }
   html.app-home .activity-link-btn{
      display:inline-flex;
      align-items:center;
      padding:4px 10px;
      font-size:12px;
      font-weight:600;
      color:#2563EB;
      background:#EFF6FF;
      border:1px solid #BFDBFE;
      border-radius:6px;
      text-decoration:none;
      cursor:pointer;
      transition:all 0.15s ease;
      line-height:1.2;
   }
   html.app-home .activity-link-btn:hover{
      background:#DBEAFE;
      color:#1D4ED8;
      border-color:#93C5FD;
   }
   html.app-home .activity-filter-group{
      display:inline-flex;
      align-items:center;
      gap:8px;
   }
   html.app-home .activity-filter-label{
      font-size:12px;
      font-weight:600;
      color:#475569;
      white-space:nowrap;
   }
   html.app-home .activity-filter-select{
      height:34px;
      padding:0 32px 0 12px;
      font-size:12.5px;
      font-weight:500;
      color:#1E293B;
      background-color:#FFFFFF;
      border:1px solid #CBD5E1;
      border-radius:6px;
      outline:none;
      cursor:pointer;
      background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
      background-repeat:no-repeat;
      background-position:right 10px center;
      background-size:13px 13px;
      appearance:none;
      -webkit-appearance:none;
      -moz-appearance:none;
      box-shadow:0 1px 2px rgba(0, 0, 0, 0.04);
      transition:all 0.15s ease-in-out;
   }
   html.app-home .activity-filter-select:hover{
      border-color:#94A3B8;
      background-color:#F8FAFC;
   }
   html.app-home .activity-filter-select:focus{
      border-color:#3B82F6;
      background-color:#FFFFFF;
      box-shadow:0 0 0 3px rgba(59, 130, 246, 0.15);
   }
   html.app-home .activity-clear-btn{
      font-size:12px;
      font-weight:500;
      color:#64748B;
      text-decoration:none;
      padding:4px 8px;
      border-radius:4px;
      transition:all 0.15s ease;
      white-space:nowrap;
   }
   html.app-home .activity-clear-btn:hover{
      color:#EF4444;
      background:#FEF2F2;
      text-decoration:none;
   }
   html.app-home .activity-switch-btn{
      display:inline-flex;
      align-items:center;
      gap:6px;
      height:32px;
      padding:0 14px;
      font-size:12px;
      font-weight:600;
      color:var(--theme-foreground, #545454) !important;
      background:var(--theme-background, #84BAD2);
      border:1px solid color-mix(in srgb, var(--theme-foreground, #545454) 25%, transparent);
      border-radius:6px;
      cursor:pointer;
      transition:all 0.15s ease;
      box-shadow:0 1px 2px rgba(0,0,0,0.06);
      white-space:nowrap;
   }
   html.app-home .activity-switch-btn:hover{
      filter:brightness(0.92);
      box-shadow:0 2px 4px rgba(0,0,0,0.12);
      color:var(--theme-foreground, #545454) !important;
   }
   html.app-home .activity-switch-btn:active{
      transform:scale(0.98);
   }
   html.app-home .activity-pill-switch{
      display:inline-flex;
      align-items:center;
      background:#e2e8f0;
      padding:2px;
      border-radius:8px;
      gap:2px;
   }
   html.app-home .activity-pill-switch .activity-switch-btn{
      height:28px;
      padding:0 12px;
      font-size:11.5px;
      font-weight:600;
      border:none;
      border-radius:6px;
      background:transparent;
      color:#475569 !important;
      box-shadow:none;
      cursor:pointer;
      transition:all 0.15s ease;
   }
   html.app-home .activity-pill-switch .activity-switch-btn:hover{
      color:#0f172a !important;
      background:rgba(255,255,255,0.6);
   }
   html.app-home .activity-pill-switch .activity-switch-btn.active{
      background:#ffffff;
      color:#0f172a !important;
      box-shadow:0 1px 3px rgba(0,0,0,0.1);
   }
   html.app-home #tabpage_6{
      overflow:hidden !important;
   }
   html.app-home .stock-items-scroll-wrap{
      height:calc(100vh - 282px) !important;
      min-height:360px;
      overflow-y:auto !important;
      box-sizing:border-box;
   }
   html.app-home #tabpage_7{
      overflow:auto !important;
   }
   html.app-home .configViewport{
      height:100% !important;
      max-height:100% !important;
      min-height:0;
      overflow-y:auto !important;
      box-sizing:border-box;
   }
   html.app-home #tabpage_8{
      overflow:hidden !important;
   }
   html.app-home .reports-container{
      height:100% !important;
      max-height:100% !important;
      overflow-y:auto !important;
      box-sizing:border-box;
      padding:14px 12px 20px;
      margin:0 auto;
   }
   html.app-home #tabpage_9{
      height:100% !important;
      max-height:100% !important;
      overflow-y:auto !important;
      box-sizing:border-box !important;
      padding:6px 8px 24px !important;
      scrollbar-width:thin;
      scrollbar-color:#cbd5e1 transparent;
   }
   html.app-home #tabpage_9::-webkit-scrollbar{
      width:6px;
   }
   html.app-home #tabpage_9::-webkit-scrollbar-track{
      background:transparent;
   }
   html.app-home #tabpage_9::-webkit-scrollbar-thumb{
      background:#cbd5e1;
      border-radius:4px;
   }
   html.app-home #tabpage_9::-webkit-scrollbar-thumb:hover{
      background:#94a3b8;
   }
}

/* Dashboard Desktop Fixed 2-Column Layout (CLS Prevention) */
@media (min-width: 993px){
   html.app-home #tabpage_0 > table,
   html.app-home .dashboard-main-table{
      width:100%;
      max-width:100%;
      height:100%;
      box-sizing:border-box;
      table-layout:fixed !important;
   }
   html.app-home #tabpage_0 > table > tbody > tr > td,
   html.app-home #tabpage_0 > table > tr > td{
      vertical-align:top;
   }
   html.app-home .dashboard-col-accounts,
   html.app-home #tabpage_0 > table > tbody > tr > td:first-child,
   html.app-home #tabpage_0 > table > tr > td:first-child{
      width:48% !important;
      max-width:48% !important;
      vertical-align:top;
      box-sizing:border-box;
   }
   html.app-home .dashboard-col-content,
   html.app-home #tabpage_0 > table > tbody > tr > td:last-child,
   html.app-home #tabpage_0 > table > tr > td:last-child{
      width:52% !important;
      max-width:52% !important;
      vertical-align:top;
      padding-left:12px;
      box-sizing:border-box;
   }
   html.app-home #divLoadAccounts{
      min-height:360px;
      box-sizing:border-box;
   }
}

/* Modern Suggested badge for auto-generated fields */
.suggested-badge{
   display:inline-block;
   color:#94A3B8;
   background:#F8FAFC;
   border:1px solid #E2E8F0;
   border-radius:4px;
   font-size:7.5pt;
   font-weight:600;
   letter-spacing:0.4px;
   text-transform:uppercase;
   padding:2px 7px;
   line-height:1.4;
   vertical-align:middle;
   user-select:none;
   box-shadow:0 1px 2px rgba(0,0,0,0.03);
   transition:opacity .2s ease, transform .2s ease;
}

/* Unified Modern Report Header Styles */
.report-header,
#divFirmName.report-header {
   width: 100%;
   height: auto !important;
   box-sizing: border-box;
   margin-bottom: 16px;
   padding: 14px 18px;
   border-radius: 12px;
   background: var(--theme-background, #84BAD2);
   color: var(--theme-foreground, #545454);
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
   display: flex;
   flex-direction: column;
   gap: 12px;
}
.report-header a,
.report-header span,
.report-header label,
.report-header td {
   color: inherit;
}
.report-header-top {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 14px;
}
.report-header-left {
   display: inline-flex;
   align-items: center;
   gap: 12px;
   min-width: 0;
   flex: 1;
}
.report-back-btn {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   padding: 6px 12px;
   border-radius: 8px;
   border: 1px solid color-mix(in srgb, currentColor 32%, transparent);
   background: color-mix(in srgb, currentColor 10%, transparent);
   color: inherit !important;
   text-decoration: none !important;
   font-size: 9pt;
   font-weight: 600;
   cursor: pointer;
   flex-shrink: 0;
   transition: all .15s ease;
}
.report-back-btn:hover {
   background: color-mix(in srgb, currentColor 20%, transparent);
   transform: translateX(-2px);
}
.report-back-btn svg {
   width: 16px;
   height: 16px;
   stroke: currentColor;
   flex-shrink: 0;
}
.report-firm-name {
   font-size: 19pt;
   font-weight: bold;
   line-height: 1.2;
   word-break: break-word;
}
.report-header-actions {
   display: inline-flex;
   align-items: center;
   gap: 8px;
   flex-shrink: 0;
   flex-wrap: wrap;
}
.report-print-btn,
.report-excel-btn {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   padding: 6px 14px;
   border-radius: 8px;
   border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
   background: transparent;
   color: inherit !important;
   text-decoration: none !important;
   font-size: 9.5pt;
   font-weight: 600;
   font-family: inherit;
   cursor: pointer;
   transition: all .15s ease;
   white-space: nowrap;
   flex-shrink: 0;
}
.report-print-btn:hover,
.report-excel-btn:hover {
   background: color-mix(in srgb, currentColor 15%, transparent);
   filter: brightness(1.05);
}
.report-print-btn svg,
.report-excel-btn svg {
   width: 16px;
   height: 16px;
   stroke: currentColor;
   flex-shrink: 0;
}
.report-toolbar {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 14px;
   flex-wrap: wrap;
   padding-top: 6px;
   border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}
.report-heading {
   font-size: 13.5pt;
   font-weight: bold;
   line-height: 1.25;
}
/* Supplier Balance Badge in Report Header (White background pill for high contrast against any theme) */
.supplier-balance-badge {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   padding: 2px 10px;
   background: #ffffff;
   border: 1px solid #e2e8f0;
   border-radius: 9999px;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
   vertical-align: middle;
   line-height: 1.3;
   -webkit-print-color-adjust: exact;
   print-color-adjust: exact;
}
.supplier-balance-badge .supplier-balance-amount {
   font-weight: 700;
   font-size: 9.5pt;
   white-space: nowrap;
}
.supplier-balance-badge .supplier-balance-icon-wrap {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   background: #ffffff;
   border-radius: 50%;
   padding: 1px;
   line-height: 1;
   vertical-align: middle;
}
.supplier-balance-badge .supplier-balance-icon-wrap img {
   display: inline-block;
   vertical-align: middle;
   width: 14px;
   height: 14px;
   object-fit: contain;
}
.supplier-balance-badge .supplier-balance-icon-wrap .zero-balance-icon,
.supplier-balance-badge .supplier-balance-icon-wrap .balance-flow-icon {
   margin: 0;
}
.supplier-balance-badge .supplier-balance-label {
   font-size: 8.5pt;
   font-weight: 600;
   white-space: nowrap;
}
/* Supplier GSTIN Badge in Report Header (Fixed font color #545454, keeps pill background, ignores tenant theme foreground) */
.supplier-gstin-badge,
.report-header .supplier-gstin-badge {
   background: #e0e7ff;
   color: #545454 !important;
   padding: 2px 7px;
   border-radius: 4px;
   font-family: monospace;
   font-weight: 700;
   font-size: 8.5pt;
   letter-spacing: 0.5px;
   border: 1px solid #c7d2fe;
   -webkit-print-color-adjust: exact;
   print-color-adjust: exact;
}
.supplier-gstin-unreg,
.report-header .supplier-gstin-unreg {
   background: #f1f5f9;
   color: #545454 !important;
   padding: 2px 7px;
   border-radius: 4px;
   font-weight: 600;
   font-size: 8pt;
   border: 1px solid #e2e8f0;
   -webkit-print-color-adjust: exact;
   print-color-adjust: exact;
}
.report-controls {
   display: inline-flex;
   align-items: center;
   gap: 10px;
   flex-wrap: wrap;
}
.report-control-group {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   font-size: 9pt;
   font-weight: 500;
}
.report-select {
   height: 32px;
   padding: 0 10px;
   border: 1px solid #CBD5E1;
   border-radius: 6px;
   background: #FFFFFF;
   color: #334155;
   font-size: 9pt;
   font-weight: 500;
   outline: none;
   cursor: pointer;
   transition: border-color .15s ease, box-shadow .15s ease;
}
.report-select:focus {
   border-color: #386182;
   box-shadow: 0 0 0 2px rgba(56, 97, 130, 0.18);
}
.report-input {
   height: 32px;
   box-sizing: border-box;
   padding: 0 10px;
   border: 1px solid #CBD5E1;
   border-radius: 6px;
   background: #FFFFFF;
   color: #334155;
   font-size: 9pt;
   outline: none;
   transition: border-color .15s ease, box-shadow .15s ease;
}
.report-input:focus {
   border-color: #386182;
   box-shadow: 0 0 0 2px rgba(56, 97, 130, 0.18);
}
.report-btn {
   height: 32px;
   padding: 0 14px;
   border: 1px solid color-mix(in srgb, currentColor 32%, transparent);
   border-radius: 6px;
   background: color-mix(in srgb, currentColor 15%, transparent);
   color: inherit;
   font-size: 9pt;
   font-weight: bold;
   cursor: pointer;
   transition: all .15s ease;
   white-space: nowrap;
   display: inline-flex;
   align-items: center;
   justify-content: center;
}
.report-btn:hover {
   background: color-mix(in srgb, currentColor 25%, transparent);
}
.report-btn:focus,
.report-btn:focus-visible {
   outline: none;
   background: color-mix(in srgb, currentColor 22%, transparent);
   border-color: color-mix(in srgb, currentColor 50%, transparent);
   box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 20%, transparent);
}
.report-badge {
   display: inline-flex;
   align-items: center;
   padding: 4px 10px;
   border-radius: 12px;
   background: color-mix(in srgb, currentColor 12%, transparent);
   color: inherit;
   font-size: 8.5pt;
   font-weight: bold;
   white-space: nowrap;
}

@media (max-width: 768px) {
   .printPage,
   #printPage {
      margin: 0;
      padding: 10px 12px 32px;
      box-sizing: border-box;
      width: 100%;
      max-width: 100%;
      overflow-x: hidden;
   }
   .report-header,
   #divFirmName.report-header {
      padding: 12px 14px;
      border-radius: 14px;
      gap: 10px;
      box-sizing: border-box;
   }
   .report-header-top {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 8px;
   }
   .report-header-left {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      min-width: 0;
   }
   .report-firm-name {
      font-size: 16px;
      font-weight: 700;
      line-height: 1.25;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
      flex: 1;
   }
   .report-header-actions {
      display: flex;
      gap: 6px;
      width: 100%;
   }
   .report-header-actions .report-print-btn,
   .report-header-actions .report-excel-btn,
   .report-header-top > .report-print-btn,
   .report-header-top > .report-excel-btn {
      flex: 1;
      height: 34px;
      padding: 0 12px;
      font-size: 12px;
      border-radius: 8px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      white-space: nowrap;
      text-align: center;
      box-sizing: border-box;
   }
   .report-back-btn {
      height: 34px;
      padding: 0 12px;
      font-size: 12px;
      border-radius: 8px;
      flex-shrink: 0;
      display: inline-flex;
      align-items: center;
      gap: 6px;
   }
   .report-toolbar {
      flex-direction: column;
      align-items: stretch;
      gap: 10px;
      padding-top: 10px;
      margin-top: 4px;
      border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
   }
   .report-heading {
      font-size: 14.5px;
      font-weight: 700;
      line-height: 1.35;
      word-break: break-word;
   }
   .report-controls {
      display: flex;
      flex-direction: column;
      gap: 8px;
      width: 100%;
   }
   .report-control-group {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 12.5px;
      font-weight: 500;
      width: 100%;
   }
   .report-control-group > span:first-child {
      min-width: 52px;
      flex-shrink: 0;
   }
   .report-select,
   .report-input {
      flex: 1;
      height: 36px;
      border-radius: 8px;
      padding: 0 10px;
      font-size: 13px;
      box-sizing: border-box;
      width: 100%;
   }
   label.report-control-group {
      justify-content: flex-start !important;
      gap: 8px;
      cursor: pointer;
      margin: 2px 0;
   }
   label.report-control-group input[type="checkbox"] {
      width: 18px;
      height: 18px;
      margin: 0;
      accent-color: #0f172a;
      flex-shrink: 0;
   }
   #lblIncludeCancelledText {
      font-size: 12.5px;
      line-height: 1.3;
   }
   .report-btn {
      height: 38px;
      min-height: 38px;
      width: 100%;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 600;
   }

   /* Responsive Table Scroll Container */
   .report-table-scroll-container {
      width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      box-sizing: border-box;
      margin-top: 12px;
      margin-bottom: 14px;
      border-radius: 12px;
      background: #ffffff;
      border: 1px solid #e2e8f0;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
      scrollbar-width: thin;
      scrollbar-color: #cbd5e1 #f8fafc;
   }
   .report-table-scroll-container::-webkit-scrollbar {
      height: 6px;
   }
   .report-table-scroll-container::-webkit-scrollbar-track {
      background: #f8fafc;
      border-radius: 4px;
   }
   .report-table-scroll-container::-webkit-scrollbar-thumb {
      background: #cbd5e1;
      border-radius: 4px;
   }
   .report-table-scroll-container::-webkit-scrollbar-thumb:hover {
      background: #94a3b8;
   }
   .report-table-scroll-container table.printStatementTable {
      min-width: 620px;
      width: 100%;
      margin-bottom: 0 !important;
      border: none !important;
   }
   .report-table-scroll-container table.printStatementTable:not(:last-child) {
      border-bottom: 1px solid #e2e8f0 !important;
   }
   .printStatementTable th,
   .printStatementTable td {
      padding: 8px 10px !important;
      font-size: 12.5px;
   }
   .printStatementTable th {
      font-size: 11.5px;
      letter-spacing: 0.3px;
      color: #475569;
      background: #f8fafc;
   }
   .printStatementTable td:nth-child(2) {
      white-space: nowrap;
      font-weight: 600;
   }
   .printStatementTable td:nth-child(3) {
      white-space: nowrap;
      font-weight: 600;
      font-variant-numeric: tabular-nums;
   }
   /* Stock Audit Mobile Enhancements */
   body.stock-audit-page {
      padding-bottom: 96px !important;
   }
   .stock-audit-fixed-footer {
      padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
   }
   .stock-audit-footer-inner {
      flex-direction: column !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 6px !important;
   }
   .stock-audit-fixed-footer .recent-pagination-info {
      font-size: 12px !important;
      text-align: center !important;
   }
   .stock-audit-fixed-footer .recent-pagination-buttons {
      justify-content: center !important;
      gap: 3px !important;
   }
   .stock-audit-fixed-footer .pagination-btn {
      height: 30px !important;
      padding: 0 8px !important;
      font-size: 11.5px !important;
   }
   #formStockAudit.report-controls {
      display: flex !important;
      flex-direction: column !important;
      align-items: stretch !important;
      gap: 8px !important;
      width: 100% !important;
   }
   .stock-audit-search-wrap {
      width: 100% !important;
      display: flex !important;
   }
   .stock-audit-search-wrap .report-input {
      width: 100% !important;
      max-width: 100% !important;
      box-sizing: border-box !important;
      height: 38px !important;
      font-size: 13.5px !important;
   }
   #reqdate.report-input {
      width: 100% !important;
      box-sizing: border-box !important;
      height: 38px !important;
      font-size: 13.5px !important;
   }
   #rm.report-select {
      width: 100% !important;
      box-sizing: border-box !important;
      height: 38px !important;
      font-size: 13.5px !important;
   }
   .stock-audit-btn-group {
      display: flex !important;
      align-items: center !important;
      gap: 12px !important;
      width: 100% !important;
   }
   .stock-audit-btn-group .report-btn {
      flex: 1 !important;
      height: 38px !important;
      font-size: 13.5px !important;
      font-weight: 600 !important;
      margin: 0 !important;
   }
   .stock-audit-btn-group .stock-audit-clear-link {
      padding: 8px 12px !important;
      font-size: 13px !important;
      text-align: center !important;
   }
   .report-table-scroll-container table.stock-audit-table {
      min-width: 780px !important;
   }
   .stock-audit-table th,
   .stock-audit-table td {
      white-space: nowrap !important;
   }
   .stock-audit-table td:nth-child(2),
   .stock-audit-table td:nth-child(7) {
      white-space: normal !important;
      min-width: 120px !important;
   }
   /* Procurements Overview Report Mobile Enhancements */
   .procurement-supplier-summary {
      display: flex !important;
      flex-direction: column !important;
      gap: 6px !important;
      padding: 8px 10px !important;
      background: rgba(255, 255, 255, 0.4) !important;
      border-radius: 8px !important;
      margin-top: 4px !important;
   }
   .procurement-supplier-name {
      font-size: 13px !important;
      word-break: break-word !important;
   }
   .procurement-supplier-bal-wrap {
      display: flex !important;
      align-items: center !important;
      flex-wrap: wrap !important;
      gap: 6px !important;
      font-size: 12px !important;
   }
   #formProcurementReport.report-controls {
      display: flex !important;
      flex-direction: column !important;
      align-items: stretch !important;
      width: 100% !important;
      gap: 8px !important;
   }
   .procurement-filter-row {
      display: flex !important;
      flex-direction: column !important;
      gap: 8px !important;
      width: 100% !important;
   }
   .procurement-control-field {
      display: flex !important;
      flex-direction: column !important;
      gap: 4px !important;
      width: 100% !important;
   }
   .procurement-field-label {
      font-size: 11.5px !important;
      font-weight: 600 !important;
      color: var(--theme-foreground, inherit) !important;
   }
   .procurement-control-field .report-select,
   .procurement-control-field .report-input {
      width: 100% !important;
      height: 38px !important;
      font-size: 13px !important;
      box-sizing: border-box !important;
   }
   .procurement-btn-actions {
      display: flex !important;
      align-items: center !important;
      gap: 10px !important;
      width: 100% !important;
      margin-top: 2px !important;
   }
   .procurement-btn-actions .report-btn {
      flex: 1 !important;
      height: 38px !important;
      font-size: 13.5px !important;
      font-weight: 600 !important;
      margin: 0 !important;
   }
   .procurement-reset-link,
   .procurement-clear-link {
      padding: 8px 12px !important;
      font-size: 13px !important;
      text-decoration: underline !important;
      color: inherit !important;
   }
   .report-table-scroll-container table.procurement-report-table {
      min-width: 760px !important;
   }
   .procurement-report-table th,
   .procurement-report-table td {
      white-space: nowrap !important;
   }
   .procurement-report-table td:nth-child(5) {
      white-space: normal !important;
      min-width: 140px !important;
      word-break: break-word !important;
   }
   /* Product Wastage Report Mobile Enhancements */
   .report-table-scroll-container table.wastage-report-table {
      min-width: 780px !important;
   }
   .wastage-report-table th,
   .wastage-report-table td {
      white-space: nowrap !important;
   }
   .wastage-report-table td:nth-child(2) {
      white-space: normal !important;
      min-width: 180px !important;
      word-break: break-word !important;
   }
   .wastage-report-table td:nth-child(5) {
      white-space: normal !important;
      min-width: 150px !important;
      word-break: break-word !important;
   }
}

/* Universal Print Auto-Fit & Styling for All Reports */
@media print {
   @page {
      size: portrait;
      margin: 8mm 6mm;
   }
   body {
      zoom: 78%;
      -webkit-print-color-adjust: exact;
      print-color-adjust: exact;
   }
   .printPage,
   .statement-page {
      width: 100% !important;
      max-width: 100% !important;
      margin: 0 !important;
      padding: 0 !important;
      box-sizing: border-box !important;
   }
   .report-table-scroll-container {
      overflow: visible !important;
      width: 100% !important;
      border: none !important;
      box-shadow: none !important;
      margin: 0 !important;
   }
   .report-table-scroll-container table.printStatementTable,
   table.printStatementTable,
   .statement-page #printStatementTable {
      min-width: 0 !important;
      width: 100% !important;
      max-width: 100% !important;
      table-layout: fixed !important;
      border-collapse: collapse !important;
   }
   .report-table-scroll-container table.printStatementTable th,
   .report-table-scroll-container table.printStatementTable td,
   .printStatementTable th,
   .printStatementTable td,
   .statement-page #printStatementTable th,
   .statement-page #printStatementTable td,
   .procurement-report-table th,
   .procurement-report-table td {
      padding: 3px 4px !important;
      font-size: 8pt !important;
      word-break: break-word !important;
      overflow-wrap: break-word !important;
   }
   .printStatementTable tr {
      break-inside: avoid;
      page-break-inside: avoid;
   }
   .statement-summary {
      display: flex !important;
      flex-wrap: wrap !important;
      gap: 4px 14px !important;
      border: 1px solid #cbd5e1 !important;
      background: #f8fafc !important;
      border-radius: 6px !important;
      padding: 6px 10px !important;
      margin-bottom: 8px !important;
      page-break-inside: avoid !important;
      break-inside: avoid !important;
      -webkit-print-color-adjust: exact !important;
      print-color-adjust: exact !important;
   }
   .statement-summary-item {
      font-size: 7.5pt !important;
      gap: 4px !important;
   }
   .statement-summary-item span {
      font-size: 7pt !important;
      color: #64748b !important;
   }
   .statement-summary-item strong {
      font-size: 8pt !important;
      color: #0f172a !important;
   }
   .statement-month {
      font-size: 10.5pt !important;
      margin: 6px 0 8px 0 !important;
      text-align: center !important;
   }
   .statement-bottom-card {
      border: 1px solid #cbd5e1 !important;
      border-radius: 6px !important;
      box-shadow: none !important;
      background: #ffffff !important;
      padding: 8px 12px !important;
      margin-top: 10px !important;
      page-break-inside: avoid !important;
      break-inside: avoid !important;
   }
   .statement-bottom-header {
      margin-bottom: 6px !important;
      padding-bottom: 4px !important;
      border-bottom: 1px solid #e2e8f0 !important;
   }
   .statement-bottom-title {
      font-size: 9pt !important;
   }
   .statement-bottom-badge {
      font-size: 7.5pt !important;
      padding: 2px 6px !important;
   }
   .statement-kpi-grid {
      display: grid !important;
      grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
      gap: 6px !important;
   }
   .statement-kpi-card {
      border: 1px solid #cbd5e1 !important;
      background: #ffffff !important;
      box-shadow: none !important;
      transform: none !important;
      padding: 6px 8px !important;
      page-break-inside: avoid !important;
      break-inside: avoid !important;
   }
   .statement-kpi-label {
      font-size: 6.5pt !important;
   }
   .statement-kpi-value {
      color: #0f172a !important;
      font-size: 10pt !important;
   }
   .statement-kpi-sub {
      font-size: 6.5pt !important;
   }
   .statement-kpi-note-row {
      font-size: 8.5pt !important;
      line-height: 1.2 !important;
   }
   .statement-kpi-note-count {
      font-size: 6.5pt !important;
   }
   .badge-txn-proc,
   .badge-txn-pay-out,
   .badge-txn-pay-in,
   .badge-txn-reversal,
   .badge-supply-intra,
   .badge-supply-inter {
      padding: 1px 4px !important;
      font-size: 7.5pt !important;
      -webkit-print-color-adjust: exact;
      print-color-adjust: exact;
   }
   .report-back-btn,
   .report-print-btn,
   .report-excel-btn,
   .report-toolbar .report-controls,
   .report-controls,
   .no-print {
      display: none !important;
   }
   .report-header,
   #divFirmName.report-header {
      box-shadow: none !important;
      border-radius: 0 !important;
      padding: 6px 0 !important;
      background: transparent !important;
      color: #000000 !important;
   }
}

/* Dashboard Action Toolbar */
.dashboard-accounts-toolbar {
   display: flex;
   align-items: center;
   gap: 6px;
   padding: 6px 10px;
   margin-top: 6px;
   background: #f8fafc;
   border: 1px solid #e2e8f0;
   border-radius: 8px;
   box-sizing: border-box;
   flex-wrap: wrap;
}
.dashboard-toolbar-item {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   padding: 2px;
   border-radius: 4px;
   transition: transform 0.15s ease, background 0.15s ease;
}
.dashboard-toolbar-item:hover {
   transform: scale(1.08);
   background: #e2e8f0;
}
#btnManageSuppliers {
   margin-left: auto !important;
   transition: background-color 0.15s ease, transform 0.15s ease !important;
}
#btnManageSuppliers:hover {
   background-color: #1d4ed8 !important;
   color: #ffffff !important;
   transform: translateY(-1px) !important;
}
.dashboard-toolbar-sep {
   display: inline-block;
   width: 1px;
   height: 20px;
   background: #cbd5e1;
   margin: 0 6px;
}
.dashboard-toolbar-group {
   display: inline-flex;
   align-items: center;
   gap: 6px;
}
.dashboard-toolbar-count {
   color: #334155;
   font-weight: 600;
   font-size: 8.5pt;
   white-space: nowrap;
}
.dashboard-toolbar-count.limit-reached,
html.app-home .dashboard-toolbar-count.limit-reached,
html.app-home span.dashboard-toolbar-count.limit-reached {
   color: #dc2626 !important;
   font-weight: 700 !important;
}
.dashboard-toolbar-link {
   color: #0284c7;
   font-weight: 600;
   font-size: 8.5pt;
   text-decoration: none;
   padding: 4px 8px;
   border-radius: 4px;
   border: 1px solid #bae6fd;
   background: #f0f9ff;
   white-space: nowrap;
   transition: all 0.15s ease;
}
.dashboard-toolbar-link:hover {
   background: #e0f2fe;
   color: #0369a1;
}

/* Dashboard Account Search Modern Styling */
.dashboard-search-bar-row {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 10px;
   width: 100%;
   margin-bottom: 6px;
}
.dashboard-search-hint {
   font-size: 11.5px;
   color: #64748b;
   margin-top: -4px;
   margin-bottom: 8px;
   padding-left: 6px;
   display: flex;
   align-items: center;
   gap: 5px;
   line-height: 1.2;
}
.dashboard-search-bar-row .dashboard-search-box {
   flex: 1 1 auto;
   min-width: 0;
   max-width: none;
}
.dashboard-inactive-toggle {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   height: 36px;
   padding: 0 10px;
   background: #f8fafc;
   border: 1.5px solid #cbd5e1;
   border-radius: 8px;
   font-size: 11.5px;
   font-weight: 500;
   color: #475569;
   cursor: pointer;
   white-space: nowrap;
   user-select: none;
   flex: 0 0 auto;
   box-sizing: border-box;
   transition: all 0.15s ease;
}
.dashboard-inactive-toggle:hover {
   background: #f1f5f9;
   border-color: #94a3b8;
   color: #1e293b;
}
.dashboard-inactive-toggle input[type="checkbox"] {
   accent-color: #0284c7;
   cursor: pointer;
   width: 13px;
   height: 13px;
   margin: 0;
}
.dashboard-inactive-badge {
   display: inline-flex;
   align-items: center;
   margin-left: 8px;
   padding: 2px 8px;
   font-size: 10.5px;
   font-weight: 600;
   line-height: 1.2;
   color: #64748b;
   background-color: #f1f5f9;
   border: 1px solid #cbd5e1;
   border-radius: 9999px;
   vertical-align: middle;
   letter-spacing: 0.02em;
}
.dashboard-account-limits {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   height: 28px;
   padding: 0 8px;
   background: #ffffff;
   border: 1px solid #cbd5e1;
   border-radius: 6px;
   font-size: 11px;
   font-weight: 600;
   color: #475569;
   white-space: nowrap;
   flex: 0 0 auto;
   box-sizing: border-box;
}
.dashboard-limits-count {
   color: #334155;
   font-weight: 600;
   font-size: 11px;
   white-space: nowrap;
}
.dashboard-limits-sep {
   color: #cbd5e1;
   font-weight: 400;
   margin: 0 1px;
   user-select: none;
}
.dashboard-limits-count.limit-reached,
html.app-home .dashboard-limits-count.limit-reached,
html.app-home span.dashboard-limits-count.limit-reached {
   color: #dc2626 !important;
   font-weight: 700 !important;
}
.dashboard-search-box {
   position: relative;
   display: flex;
   align-items: center;
   width: 100%;
   max-width: 360px;
}
.dashboard-search-icon {
   position: absolute;
   left: 12px;
   width: 16px;
   height: 16px;
   stroke: #94a3b8;
   fill: none;
   stroke-width: 2;
   pointer-events: none;
   z-index: 2;
}
.dashboard-search-input,
input[type="text"].dashboard-search-input {
   width: 100% !important;
   height: 36px !important;
   padding: 0 32px 0 38px !important;
   padding-left: 38px !important;
   padding-right: 32px !important;
   border: 1.5px solid #cbd5e1 !important;
   border-radius: 8px !important;
   background: #ffffff !important;
   font-size: 13px !important;
   color: #0f172a !important;
   box-sizing: border-box !important;
   line-height: normal !important;
   transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}
.dashboard-search-input:focus,
input[type="text"].dashboard-search-input:focus {
   outline: none !important;
   border-color: var(--theme-background, #0284c7) !important;
   box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-background, #0284c7) 20%, transparent) !important;
   padding: 0 32px 0 38px !important;
   padding-left: 38px !important;
   padding-right: 32px !important;
}
.dashboard-search-clear {
   position: absolute;
   right: 8px;
   width: 20px;
   height: 20px;
   border: none;
   background: #e2e8f0;
   color: #475569;
   border-radius: 50%;
   cursor: pointer;
   font-size: 14px;
   display: none;
   align-items: center;
   justify-content: center;
   line-height: 1;
   padding: 0;
   z-index: 2;
   transition: background 0.12s ease;
}
.dashboard-search-clear:hover {
   background: #cbd5e1;
   color: #0f172a;
}

/* Dashboard Account List Modern Styling */
.dashboard-account-row {
   transition: background-color 0.15s ease;
   border-bottom: 1px solid #f1f5f9;
}
.dashboard-account-row:hover {
   background-color: #f8fafc;
}
.dashboard-account-row.is-active {
   background-color: #eff6ff !important;
   box-shadow: inset 3px 0 0 #0284c7;
}
.dashboard-acc-name-cell {
   padding: 8px 4px 8px 10px;
   vertical-align: middle;
   width: 1%;
   white-space: nowrap;
}
.dashboard-acc-id-cell {
   padding: 8px 10px 8px 4px;
   vertical-align: middle;
   white-space: nowrap;
   width: 1%;
}
.dashboard-acc-actions-cell {
   padding: 6px 10px;
   vertical-align: middle;
   text-align: right;
   white-space: nowrap;
}
.dashboard-customer-link {
   color: #1e293b;
   font-size: 13.5px;
   font-weight: 500;
   text-decoration: none;
   transition: color 0.15s ease;
}
.dashboard-customer-link:hover {
   color: #0284c7;
   text-decoration: underline;
}
.dashboard-customer-link.is-active {
   color: #0369a1;
   font-weight: 700;
}
.dashboard-active-badge {
   display: inline-flex;
   align-items: center;
   margin-left: 8px;
   padding: 2px 8px;
   font-size: 10.5px;
   font-weight: 600;
   line-height: 1.2;
   color: #0369a1;
   background-color: #e0f2fe;
   border: 1px solid #bae6fd;
   border-radius: 9999px;
   vertical-align: middle;
   letter-spacing: 0.02em;
}
.dashboard-acid-text {
   font-size: 12px;
   color: #64748b;
}
.dashboard-acid-active {
   font-size: 12px;
   color: #0369a1;
   font-weight: 600;
}
.dashboard-alphabet-row td {
   background-color: #f1f5f9;
   padding: 4px 10px !important;
   border-top: 1px solid #e2e8f0;
   border-bottom: 1px solid #e2e8f0;
}
.dashboard-alphabet-letter {
   font-weight: 700;
   font-size: 14px;
   color: #475569;
}

/* Customer Detail Modern Card */
.customer-detail-card {
   background: #ffffff;
   border: 1px solid #e2e8f0;
   border-radius: 12px;
   padding: 18px 20px;
   box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
   box-sizing: border-box;
   width: 100%;
   max-width: 520px;
   margin: 0 auto;
}
.customer-detail-header {
   display: flex;
   align-items: center;
   gap: 12px;
   padding-bottom: 14px;
   border-bottom: 1px solid #edf2f7;
   position: relative;
}
.customer-detail-avatar {
   width: 46px;
   height: 46px;
   border-radius: 50%;
   background: var(--theme-background, #84BAD2);
   color: #ffffff;
   display: flex;
   align-items: center;
   justify-content: center;
   font-weight: bold;
   font-size: 15px;
   flex-shrink: 0;
   box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.customer-detail-header-info {
   flex: 1;
   min-width: 0;
}
.customer-detail-name {
   font-size: 14.5px;
   font-weight: 700;
   color: #1e293b;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
   margin-bottom: 4px;
}
.customer-detail-subline {
   display: flex;
   align-items: center;
   gap: 6px;
   flex-wrap: wrap;
}
.customer-detail-badge {
   background: #f1f5f9;
   color: #475569;
   padding: 2px 8px;
   border-radius: 4px;
   font-size: 8.5pt;
   font-weight: 600;
}
.customer-detail-type-badge {
   background: #e0f2fe;
   color: #0369a1;
   padding: 2px 8px;
   border-radius: 4px;
   font-size: 8.5pt;
   font-weight: 600;
}
.customer-detail-type-badge.customer-detail-type-consumer {
   color: #15803d;
}
.customer-detail-type-badge.customer-detail-type-business {
   color: #0369a1;
}
.customer-detail-close-btn {
   background: transparent;
   border: none;
   font-size: 22px;
   line-height: 1;
   color: #94a3b8;
   cursor: pointer;
   padding: 4px 8px;
   border-radius: 4px;
   transition: all 0.15s ease;
}
.customer-detail-close-btn:hover {
   color: #1e293b;
   background: #f1f5f9;
}
.customer-detail-metrics {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 12px;
   margin: 14px 0;
}
.customer-metric-box {
   background: #f8fafc;
   border: 1px solid #e2e8f0;
   border-radius: 8px;
   padding: 10px 12px;
   display: flex;
   flex-direction: column;
   gap: 4px;
}
.customer-metric-label {
   font-size: 8pt;
   color: #64748b;
   text-transform: uppercase;
   letter-spacing: 0.5px;
   font-weight: 600;
}
.customer-metric-value {
   font-size: 11pt;
   font-weight: 700;
   color: #0f172a;
   display: inline-flex;
   align-items: center;
}
.customer-metric-value.customer-metric-date {
   font-size: 9pt;
   font-weight: 600;
   color: #334155;
}
.customer-metric-box.customer-metric-box-txn {
   justify-content: center;
}
.customer-last-txn-row {
   display: flex;
   align-items: center;
   gap: 6px;
   flex-wrap: wrap;
   margin-top: 1px;
}
.customer-last-txn-badge {
   display: inline-block;
   padding: 1px 7px;
   border-radius: 4px;
   font-size: 7.5pt;
   font-weight: 700;
   text-transform: uppercase;
   letter-spacing: 0.3px;
   line-height: 1.4;
}
.customer-last-txn-badge.badge-invoice {
   background: #e0f2fe;
   color: #0369a1;
}
.customer-last-txn-badge.badge-payment {
   background: #dcfce7;
   color: #15803d;
}
.customer-last-txn-badge.badge-cancelled {
   background: #fee2e2;
   color: #b91c1c;
}
.customer-last-txn-badge.badge-default {
   background: #f1f5f9;
   color: #475569;
}
.customer-last-txn-amount {
   font-size: 10.5pt;
   font-weight: 700;
   color: #0f172a;
}
.customer-last-txn-subline {
   display: flex;
   align-items: center;
   gap: 4px;
   flex-wrap: wrap;
   font-size: 8pt;
   font-weight: 600;
   color: #64748b;
   margin-top: 2px;
}
.customer-last-txn-paid {
   color: #15803d;
   font-weight: 600;
}
.customer-detail-grid {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 10px 14px;
   padding-top: 12px;
   border-top: 1px solid #edf2f7;
}
.customer-detail-item {
   display: flex;
   flex-direction: column;
   gap: 2px;
}
.customer-detail-item.customer-detail-full {
   grid-column: 1 / -1;
}
.customer-item-label {
   font-size: 8pt;
   color: #64748b;
   font-weight: 600;
}
.customer-item-value {
   font-size: 9pt;
   color: #1e293b;
   word-break: break-word;
}
.customer-detail-actions {
   margin-top: 14px;
   padding-top: 12px;
   border-top: 1px solid #edf2f7;
   display: flex;
   justify-content: flex-end;
}
.customer-detail-btn-close {
   display: inline-block;
   padding: 6px 18px !important;
   font-size: 9pt !important;
}

/* New Invoice Left Pane Modernization */
.invoice-left-pane {
   display: flex;
   flex-direction: column;
   gap: 10px;
   padding: 4px;
   box-sizing: border-box;
}
.invoice-item-entry-card {
   background: var(--theme-bg-light-50, color-mix(in srgb, var(--theme-background, #84BAD2) 40%, #ffffff));
   border: 1px solid #e2e8f0;
   border-radius: 10px;
   padding: 12px 14px;
   box-sizing: border-box;
}
.invoice-modern-input {
   height: 30px;
   padding: 4px 10px;
   border: 1px solid #cbd5e1;
   border-radius: 6px;
   font-size: 9.5pt;
   background: #ffffff;
   box-sizing: border-box;
   outline: none;
   transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.invoice-modern-input:focus {
   border-color: var(--theme-background, #84BAD2);
   box-shadow: 0 0 0 2px rgba(132, 186, 210, 0.25);
}
.invoice-modern-select {
   height: 30px;
   padding: 4px 8px;
   border: 1px solid #cbd5e1;
   border-radius: 6px;
   font-size: 9.5pt;
   background: #ffffff;
   box-sizing: border-box;
   outline: none;
}
.invoice-modern-select:focus {
   border-color: var(--theme-background, #84BAD2);
}
.invoice-tip-icon {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 24px;
   height: 24px;
   border-radius: 50%;
   color: #64748b;
   background: #f1f5f9;
   border: 1px solid #cbd5e1;
   transition: all 0.15s ease-in-out;
   cursor: pointer;
   text-decoration: none;
   vertical-align: middle;
   box-sizing: border-box;
}
.invoice-tip-icon:hover {
   color: #0284c7;
   background: #e0f2fe;
   border-color: #7dd3fc;
   transform: scale(1.08);
   box-shadow: 0 1px 3px rgba(2, 132, 199, 0.2);
}
.invoice-item-buttons {
   display: flex;
   flex-wrap: wrap;
   gap: 6px;
   margin-top: 10px;
   padding-top: 10px;
   border-top: 1px solid #e2e8f0;
}
.invoice-item-buttons input[type="button"] {
   padding: 6px 12px;
   font-size: 8.5pt;
   border: 1px solid #cbd5e1;
   border-radius: 5px;
   background: #ffffff;
   cursor: pointer;
   color: #334155;
   transition: all 0.15s ease;
}
.invoice-item-buttons input[type="button"]:hover {
   background: #f1f5f9;
   border-color: #94a3b8;
}
.invoice-btn-add {
   background: var(--theme-background, #84BAD2) !important;
   color: var(--theme-foreground, #545454) !important;
   font-weight: 600 !important;
   border: 1px solid color-mix(in srgb, var(--theme-foreground, #545454) 30%, transparent) !important;
}
.invoice-btn-add:hover {
   filter: brightness(0.95);
}
.invoice-adjustment-card {
   background: var(--theme-bg-light-50, color-mix(in srgb, var(--theme-background, #84BAD2) 40%, #ffffff));
   border: 1px solid #e2e8f0;
   border-radius: 10px;
   padding: 10px 14px;
   box-sizing: border-box;
}
.invoice-adjustment-actions {
   margin-top: 6px;
}
.invoice-adjustment-actions input[type="button"] {
   padding: 4px 14px;
   border-radius: 5px;
   font-size: 8.5pt;
}
.invoice-proceed-container {
   margin-top: 8px;
}
.invoice-actions-group {
   display: flex;
   align-items: center;
   gap: 6px;
   flex-wrap: nowrap;
   margin-top: 8px;
   width: 100%;
}
.invoice-actions-group .invoice-btn-proceed {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   gap: 4px;
   padding: 5px 11px !important;
   font-size: 8.5pt !important;
   font-weight: 600;
   white-space: nowrap;
   flex: 0 0 auto;
   background: var(--theme-background, #84BAD2);
   color: var(--theme-foreground, #545454);
   border: 1px solid color-mix(in srgb, var(--theme-foreground, #545454) 30%, transparent);
   border-radius: 5px;
   text-decoration: none;
   cursor: pointer;
   box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
   transition: all 0.15s ease-in-out;
}
.invoice-actions-group .invoice-btn-proceed:hover {
   opacity: 0.92;
   box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.invoice-actions-group .invoice-btn-secondary {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   gap: 4px;
   padding: 5px 9px !important;
   font-size: 8.5pt !important;
   font-weight: 600;
   white-space: nowrap;
   flex: 0 0 auto;
   background: #ffffff;
   color: #334155;
   border: 1px solid #cbd5e1;
   border-radius: 5px;
   cursor: pointer;
   box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
   transition: all 0.15s ease-in-out;
}
.invoice-actions-group .invoice-btn-secondary:hover {
   background: #f8fafc;
   border-color: #94a3b8;
   color: #0f172a;
}
.invoice-actions-group .invoice-btn-estimate {
   color: #0369a1;
   border-color: #bae6fd;
   background: #f0f9ff;
}
.invoice-actions-group .invoice-btn-estimate:hover {
   background: #e0f2fe;
   border-color: #7dd3fc;
   color: #0284c7;
}
@media only screen and (max-width: 600px) {
   .invoice-actions-group {
      flex-wrap: wrap;
   }
}
.invoice-customer-bar {
   padding: 8px 14px;
   background: var(--theme-bg-light-50, color-mix(in srgb, var(--theme-background, #84BAD2) 40%, #ffffff));
   border: 1px solid #e2e8f0;
   border-radius: 10px;
   color: #1e293b;
   display: flex;
   flex-direction: column;
   gap: 4px;
   box-sizing: border-box;
}

.invoice-customer-header {
   font-weight: 700;
   font-size: 10pt;
   padding: 0 4px;
   box-sizing: border-box;
}

.invoice-config-rows {
   display: flex;
   flex-direction: column;
   gap: 4px;
   width: 100%;
   box-sizing: border-box;
   margin-top: 2px;
   padding-top: 4px;
   border-top: 1px solid rgba(226, 232, 240, 0.75);
}

.invoice-config-row {
   display: flex;
   align-items: center;
   width: 100%;
   box-sizing: border-box;
   min-height: 28px;
}

.invoice-config-label-col {
   width: 155px;
   min-width: 155px;
   max-width: 155px;
   box-sizing: border-box;
   padding: 0 4px;
   display: flex;
   align-items: center;
}

.invoice-config-label {
   font-size: 8.5pt;
   font-weight: 600;
   color: #475569;
   white-space: nowrap;
   margin: 0;
}

.invoice-config-control-col {
   flex: 1;
   min-width: 0;
   box-sizing: border-box;
   padding: 0 4px;
   display: flex;
   align-items: center;
   gap: 8px;
}

.invoice-date-action-link {
   font-size: 8.5pt;
   color: #0284c7;
   text-decoration: underline;
   cursor: pointer;
   white-space: nowrap;
   font-weight: 500;
   transition: color 0.15s ease;
}

.invoice-date-action-link:hover {
   color: #0369a1;
}

.invoice-date-secondary-action {
   font-size: 8pt;
   color: #64748b;
   text-decoration: underline;
   cursor: pointer;
   white-space: nowrap;
}

.invoice-date-secondary-action:hover {
   color: #334155;
}

.invoice-date-cancel-btn {
   font-size: 11pt;
   color: #64748b;
   text-decoration: none;
   cursor: pointer;
   padding: 0 3px;
   line-height: 1;
}

.invoice-date-cancel-btn:hover {
   color: #ef4444;
}

.invoice-bar-controls {
   display: flex;
   align-items: flex-start;
   width: 100%;
   box-sizing: border-box;
}

.invoice-pos-label-col {
   width: 24%;
   min-width: 24%;
   box-sizing: border-box;
   padding: 0 6px;
   display: flex;
   align-items: center;
   min-height: 30px;
}

.invoice-pos-label {
   font-size: 8.5pt;
   font-weight: 600;
   color: #475569;
   white-space: nowrap;
}

.invoice-pos-controls-col {
   flex: 1;
   min-width: 0;
   box-sizing: border-box;
   padding: 0 6px;
   display: flex;
   align-items: center;
   gap: 8px;
   flex-wrap: wrap;
   min-height: 30px;
}

.invoice-date-container {
   display: inline-flex;
   align-items: center;
   gap: 6px;
}

.invoice-date-container.is-expanded {
   flex-basis: 100%;
   margin-top: 2px;
}

/* Modern Invoice Table Row Toggle Icons (+ / -) */
.inv-item-toggle-btn {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 20px;
   height: 20px;
   border-radius: 50%;
   cursor: pointer;
   text-decoration: none !important;
   outline: none;
   box-sizing: border-box;
   transition: all 0.15s ease-in-out;
   vertical-align: middle;
}

.inv-item-toggle-btn.inv-item-btn-remove {
   background-color: #fef2f2;
   border: 1px solid #fecaca;
   color: #ef4444;
}

.inv-item-toggle-btn.inv-item-btn-remove:hover {
   background-color: #fee2e2;
   border-color: #fca5a5;
   color: #dc2626;
   transform: scale(1.1);
   box-shadow: 0 1px 3px rgba(239, 68, 68, 0.2);
}

.inv-item-toggle-btn.inv-item-btn-add {
   background-color: #ecfdf5;
   border: 1px solid #a7f3d0;
   color: #10b981;
}

.inv-item-toggle-btn.inv-item-btn-add:hover {
   background-color: #d1fae5;
   border-color: #6ee7b7;
   color: #059669;
   transform: scale(1.1);
   box-shadow: 0 1px 3px rgba(16, 185, 129, 0.2);
}

.inv-item-toggle-btn svg {
   display: block;
   pointer-events: none;
}

/* Small toggle switch */
.switch-sm {
   position: relative;
   display: inline-block;
   width: 36px;
   height: 20px;
   flex-shrink: 0;
   vertical-align: middle;
}
.switch-sm input {
   opacity: 0;
   width: 0;
   height: 0;
}
.switch-sm .slider {
   position: absolute;
   cursor: pointer;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background-color: #cbd5e1;
   transition: .25s ease;
   border-radius: 20px;
}
.switch-sm .slider:before {
   position: absolute;
   content: "";
   height: 14px;
   width: 14px;
   left: 3px;
   bottom: 3px;
   background-color: #ffffff;
   transition: .25s ease;
   border-radius: 50%;
   box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.switch-sm input:checked + .slider {
   background-color: #10b981;
}
.switch-sm input:checked + .slider:before {
   transform: translateX(16px);
}

/* Zero Balance Modern Settled Pill Badge */
.balance-settled-pill {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   padding: 1px 7px;
   border-radius: 9999px;
   background: #dcfce7;
   color: #15803d;
   border: 1px solid #bbf7d0;
   font-size: 10px;
   font-weight: 700;
   line-height: 1.3;
   vertical-align: middle;
   margin: 0 2px;
   cursor: default;
   box-sizing: border-box;
   box-shadow: 0 1px 2px rgba(22, 101, 52, 0.08);
   user-select: none;
   letter-spacing: 0.3px;
   text-transform: uppercase;
   white-space: nowrap;
   -webkit-print-color-adjust: exact;
   print-color-adjust: exact;
   transition: all 0.15s ease;
}
.balance-settled-pill:hover {
   background: #bbf7d0;
   color: #166534;
}

/* Backwards-compatible alias for zero-balance-icon */
.zero-balance-icon {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   padding: 1px 7px;
   border-radius: 9999px;
   background: #dcfce7;
   color: #15803d;
   border: 1px solid #bbf7d0;
   font-size: 10px;
   font-weight: 700;
   line-height: 1.3;
   vertical-align: middle;
   margin: 0 2px;
   cursor: default;
   box-sizing: border-box;
   letter-spacing: 0.3px;
   text-transform: uppercase;
   white-space: nowrap;
   -webkit-print-color-adjust: exact;
   print-color-adjust: exact;
}

/* Standalone Financial Vector Flow Icons (Alternative A) */
.balance-flow-icon {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 16px;
   height: 16px;
   vertical-align: middle;
   margin: 0 2px;
   cursor: pointer;
   line-height: 1;
   user-select: none;
   transition: transform 0.15s ease, color 0.15s ease;
}
.balance-flow-icon:hover {
   transform: scale(1.2);
}
.balance-flow-icon svg {
   display: block;
   width: 16px;
   height: 16px;
}
.balance-flow-icon.flow-in {
   color: #16a34a; /* Inflow ↙ / Customer to Admin */
}
.balance-flow-icon.flow-in:hover {
   color: #15803d;
}
.balance-flow-icon.flow-out {
   color: #0284c7; /* Outflow ↗ / Admin to Customer */
}
.balance-flow-icon.flow-out:hover {
   color: #0369a1;
}
.balance-flow-icon.flow-settled {
   color: #15803d; /* Reconciled ✓ / Settled */
}
.balance-flow-icon.flow-settled:hover {
   color: #166534;
}

/* Modern Unauthorized Section Card */
.unauthorized-card {
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   padding: 32px 24px;
   margin: 28px auto;
   max-width: 420px;
   background: #ffffff;
   border: 1px solid #e2e8f0;
   border-radius: 12px;
   box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
   text-align: center;
   box-sizing: border-box;
}
.unauthorized-card-icon {
   width: 58px;
   height: 58px;
   border-radius: 50%;
   background: #eff6ff;
   border: 1px solid #bfdbfe;
   display: flex;
   align-items: center;
   justify-content: center;
   margin-bottom: 14px;
   color: #2563eb;
   box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}
.unauthorized-card-title {
   font-size: 15px;
   font-weight: 700;
   color: #0f172a;
   margin-bottom: 4px;
   letter-spacing: 0.1px;
}
.unauthorized-card-text {
   font-size: 13px;
   color: #64748b;
   font-weight: 500;
}

/* Recent Invoices Pagination & Bottom Bar Modernization */
.recent-pagination-toolbar {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 6px 12px;
   background: #f8fafc;
   border: 1px solid #e2e8f0;
   border-radius: 8px;
   margin-top: 6px;
   box-sizing: border-box;
   flex-wrap: wrap;
   gap: 8px;
}
.recent-pagination-toolbar:empty {
   display: none !important;
}
.recent-pagination-buttons {
   display: flex;
   align-items: center;
   gap: 4px;
}
.pagination-btn {
   padding: 4px 10px;
   font-size: 8.5pt;
   font-weight: 500;
   border: 1px solid #cbd5e1;
   background: #ffffff;
   color: #334155;
   border-radius: 5px;
   cursor: pointer;
   transition: all 0.15s ease;
}
.pagination-btn:hover:not(:disabled) {
   background: #f1f5f9;
   border-color: #94a3b8;
   color: #0f172a;
}
.pagination-btn:disabled {
   opacity: 0.45;
   cursor: not-allowed;
   background: #f8fafc;
}
.recent-pagination-info {
   font-size: 8.5pt;
   color: #64748b;
}
.recent-pagination-info strong {
   color: #1e293b;
}
.recent-bottom-area {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 8px 12px;
   background: #f8fafc;
   border: 1px solid #e2e8f0;
   border-radius: 10px;
   margin-top: 8px;
   box-sizing: border-box;
   flex-wrap: wrap;
   gap: 12px;
}
.recent-balance-card {
   display: flex;
   flex-direction: column;
   gap: 2px;
   padding: 4px 12px;
   background: #ffffff;
   border: 1px solid #e2e8f0;
   border-radius: 8px;
}
.recent-balance-title {
   font-size: 7.5pt;
   text-transform: uppercase;
   letter-spacing: 0.5px;
   color: #64748b;
   font-weight: 600;
}
.recent-balance-row {
   display: flex;
   align-items: center;
   gap: 6px;
}
.recent-balance-figure {
   font-size: 13pt;
   font-weight: 700;
   color: #0f172a;
}
.recent-bottom-right {
   display: flex;
   align-items: center;
   gap: 14px;
   flex-wrap: wrap;
}
.recent-period-container {
   display: flex;
   align-items: center;
   gap: 6px;
}
.recent-period-label {
   font-size: 8.5pt;
   font-weight: 600;
   color: #475569;
}
.recent-period-select {
   height: 30px;
   padding: 4px 10px;
   border: 1px solid #cbd5e1;
   border-radius: 6px;
   font-size: 9pt;
   background: #ffffff;
   color: #1e293b;
   outline: none;
   cursor: pointer;
}
.recent-period-select:focus {
   border-color: var(--theme-background, #84BAD2);
}
.recent-statement-actions {
   display: flex;
   align-items: center;
   gap: 6px;
}
.recent-action-btn {
   display: inline-flex;
   align-items: center;
   gap: 4px;
   padding: 4px 8px;
   background: #ffffff;
   border: 1px solid #cbd5e1;
   border-radius: 6px;
   text-decoration: none;
   color: #334155;
   font-size: 8.5pt;
   font-weight: 500;
   transition: all 0.15s ease;
}
.recent-action-btn:hover {
   background: #f1f5f9;
   border-color: #94a3b8;
   color: #0f172a;
}

/* Payments Tab & Bulk Payments Queue */
.payments-wrapper {
   overflow: hidden;
   width: 100%;
   box-sizing: border-box;
}
.payments-track {
   display: flex;
   width: 200%;
   transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.payments-track.show-quickpay {
   transform: translateX(0%);
}
.payments-track.show-bulkpay {
   transform: translateX(-50%);
}
.payments-pane {
   width: 50%;
   min-width: 0;
   box-sizing: border-box;
   padding: 10px 16px;
}
.payments-pane-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-bottom: 12px;
}
.payments-account-badge {
   font-weight: 700;
   font-size: 10.5pt;
   color: #1e293b;
}
.payments-switch-btn {
   background: #f0f9ff;
   border: 1px solid #bae6fd;
   color: #0284c7;
   padding: 6px 14px;
   border-radius: 6px;
   font-weight: 600;
   font-size: 9pt;
   cursor: pointer;
   transition: all 0.15s ease;
}
.payments-switch-btn:hover {
   background: #e0f2fe;
   color: #0369a1;
   border-color: #7dd3fc;
}
.payments-switch-back {
   background: #f8fafc;
   border-color: #cbd5e1;
   color: #475569;
}
.payments-switch-back:hover {
   background: #f1f5f9;
   color: #1e293b;
   border-color: #94a3b8;
}
.bulkpay-header-title {
   font-size: 12pt;
   font-weight: 700;
   color: #334155;
}
#paidSection {
   background: var(--theme-bg-light-50, color-mix(in srgb, var(--theme-background, #84BAD2) 40%, #ffffff)) !important;
   border-radius: 10px;
}
.quickpay-card {
   background: var(--theme-bg-light-50, color-mix(in srgb, var(--theme-background, #84BAD2) 32%, #ffffff));
   border: 1px solid #dbeafe;
   border-radius: 14px;
   padding: 22px 28px;
   max-width: 500px;
   margin: 24px auto 0;
   box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
   box-sizing: border-box;
}
.quickpay-title {
   font-size: 20px;
   font-weight: 800;
   color: #404040;
   margin: 0 0 16px 0;
   text-align: center;
   letter-spacing: -0.3px;
}
.quickpay-form-box {
   background: #ffffff;
   border: 1px solid #e2e8f0;
   border-radius: 10px;
   padding: 20px 22px;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
   box-sizing: border-box;
}
.quickpay-form {
   display: flex;
   flex-direction: column;
   gap: 16px;
   width: 100%;
}
.quickpay-field-group {
   display: flex;
   flex-direction: column;
   gap: 6px;
   width: 100%;
}
.quickpay-label {
   font-weight: 700;
   font-size: 9.5pt;
   color: #334155;
   letter-spacing: -0.1px;
}

/* Who is paying options stacked vertically */
.quickpay-radio-group {
   display: flex;
   flex-direction: column;
   gap: 8px;
   width: 100%;
}
.quickpay-radio-option {
   display: flex;
   align-items: center;
   gap: 10px;
   padding: 9px 14px;
   background: #f8fafc;
   border: 1px solid #e2e8f0;
   border-radius: 8px;
   cursor: pointer;
   transition: all 0.15s ease;
   user-select: none;
   box-sizing: border-box;
}
.quickpay-radio-option:hover {
   background: #f1f5f9;
   border-color: #cbd5e1;
}
.quickpay-radio-option input[type="radio"] {
   margin: 0;
   width: 16px;
   height: 16px;
   accent-color: var(--theme-background, #0284c7);
   cursor: pointer;
   flex-shrink: 0;
}
.quickpay-radio-label-text {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 8px;
   flex: 1;
   min-width: 0;
}
.quickpay-radio-label-text strong {
   font-size: 9.5pt;
   color: #1e293b;
   font-weight: 600;
   word-break: break-word;
}
.quickpay-radio-role-tag {
   font-size: 8pt;
   font-weight: 600;
   padding: 1px 7px;
   border-radius: 4px;
   background: #e2e8f0;
   color: #475569;
   flex-shrink: 0;
}

/* Amount Row */
.quickpay-amount-row {
   display: flex;
   align-items: stretch;
   width: 100%;
   border: 1px solid #cbd5e1;
   border-radius: 8px;
   overflow: hidden;
   background: #ffffff;
   transition: border-color 0.15s ease, box-shadow 0.15s ease;
   box-sizing: border-box;
}
.quickpay-amount-row:focus-within {
   border-color: var(--theme-background, #0284c7);
   box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}
.quickpay-amount-row .quickpay-input {
   flex: 1;
   border: none !important;
   height: 38px;
   padding: 0 12px;
   font-size: 15px;
   font-weight: 700;
   color: #0f172a;
   outline: none !important;
   background: transparent !important;
   box-sizing: border-box;
}
.quickpay-currency-badge {
   display: flex;
   align-items: center;
   padding: 0 14px;
   background: #f1f5f9;
   border-left: 1px solid #e2e8f0;
   font-weight: 700;
   font-size: 9pt;
   color: #475569;
   user-select: none;
   flex-shrink: 0;
}

/* Remark Input */
.quickpay-input-remark {
   width: 100%;
   height: 38px;
   padding: 0 12px;
   border: 1px solid #cbd5e1;
   border-radius: 8px;
   font-size: 9.5pt;
   color: #1e293b;
   background: #ffffff;
   outline: none;
   box-sizing: border-box;
   transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.quickpay-input-remark:focus {
   border-color: var(--theme-background, #0284c7);
   box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Payment Mode Select */
.quickpay-select {
   width: 100%;
   height: 38px;
   padding: 0 12px;
   border: 1px solid #cbd5e1;
   border-radius: 8px;
   font-size: 9.5pt;
   color: #1e293b;
   background: #ffffff;
   outline: none;
   box-sizing: border-box;
   cursor: pointer;
   transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.quickpay-select:focus {
   border-color: var(--theme-background, #0284c7);
   box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Actions: Pay and Reset/Cancel Aligned Perfectly */
.quickpay-actions {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 12px;
   margin-top: 6px;
   width: 100%;
}
.quickpay-btn-submit {
   flex: 1.4;
   height: 40px;
   display: inline-flex !important;
   align-items: center !important;
   justify-content: center !important;
   border-radius: 8px !important;
   font-size: 10pt !important;
   font-weight: 700 !important;
   text-align: center;
   box-sizing: border-box;
   text-decoration: none;
   box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
   transition: all 0.15s ease;
}
.quickpay-btn-submit:hover {
   filter: brightness(1.08);
   transform: translateY(-1px);
}
.quickpay-btn-reset {
   flex: 1;
   height: 40px;
   display: inline-flex !important;
   align-items: center !important;
   justify-content: center !important;
   border-radius: 8px !important;
   background: #f1f5f9 !important;
   color: #475569 !important;
   border: 1px solid #cbd5e1 !important;
   font-size: 10pt !important;
   font-weight: 600 !important;
   text-align: center;
   box-sizing: border-box;
   text-decoration: none;
   transition: all 0.15s ease;
}
.quickpay-btn-reset:hover {
   background: #e2e8f0 !important;
   color: #1e293b !important;
}

/* Empty state styling */
.payments-empty-state {
   text-align: center;
   padding: 44px 20px;
   color: #475569;
   font-size: 12pt;
   font-weight: 700;
}

/* Bulk Payments Queue Card */
.bulkpay-card {
   background: var(--theme-bg-light-50, color-mix(in srgb, var(--theme-background, #84BAD2) 40%, #ffffff));
   border: 1px solid #e2e8f0;
   border-radius: 12px;
   padding: 16px 20px;
   max-width: 860px;
   margin: 0 auto;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.bulkpay-input-row {
   display: flex;
   gap: 10px;
   align-items: center;
   margin-bottom: 12px;
}
.bulkpay-field-search {
   flex: 1;
   min-width: 220px;
}
.bulkpay-field-amount {
   width: 140px;
}
.bulkpay-field-mode {
   width: 130px;
}
.bulkpay-select {
   width: 100%;
   height: 34px;
   padding: 6px 10px;
   border: 1px solid #cbd5e1;
   border-radius: 6px;
   font-size: 9.5pt;
   box-sizing: border-box;
   outline: none;
   background: #ffffff;
   color: #334155;
   cursor: pointer;
   transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bulkpay-select:focus {
   border-color: var(--theme-background, #84BAD2);
   box-shadow: 0 0 0 2px rgba(132, 186, 210, 0.25);
}
.bulkpay-input-text {
   width: 100%;
   height: 34px;
   padding: 6px 12px;
   border: 1px solid #cbd5e1;
   border-radius: 6px;
   font-size: 9.5pt;
   box-sizing: border-box;
   outline: none;
   background: #ffffff;
}
.bulkpay-input-text:focus {
   border-color: var(--theme-background, #84BAD2);
   box-shadow: 0 0 0 2px rgba(132, 186, 210, 0.25);
}
.bulkpay-btn-add {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   gap: 6px;
   height: 34px;
   padding: 0 16px !important;
   font-size: 9pt !important;
   font-weight: 700;
   font-family: inherit;
   letter-spacing: 0.2px;
   background: var(--theme-background, #84BAD2);
   color: var(--theme-foreground, #545454) !important;
   border: 1px solid color-mix(in srgb, var(--theme-foreground, #545454) 28%, transparent);
   border-radius: 6px;
   cursor: pointer;
   white-space: nowrap;
   box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
   transition: background-color 0.18s ease, filter 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
   user-select: none;
}
.bulkpay-btn-add svg {
   flex-shrink: 0;
   stroke: currentColor;
   transition: transform 0.18s ease;
}
.bulkpay-btn-add:hover {
   filter: brightness(1.08);
   transform: translateY(-1px);
   box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
   border-color: color-mix(in srgb, var(--theme-foreground, #545454) 40%, transparent);
}
.bulkpay-btn-add:hover svg {
   transform: scale(1.1);
}
.bulkpay-btn-add:active {
   transform: translateY(0);
   box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
   filter: brightness(0.96);
}
.bulkpay-btn-add:focus-visible {
   outline: 2px solid var(--theme-background, #84BAD2);
   outline-offset: 2px;
}
.bulkpay-btn-add:disabled {
   opacity: 0.55;
   cursor: not-allowed;
   transform: none !important;
   box-shadow: none !important;
   filter: grayscale(30%);
   pointer-events: none;
}
@media (max-width: 720px) {
   .bulkpay-input-row {
      flex-direction: column !important;
      align-items: stretch !important;
      gap: 10px !important;
   }
   .bulkpay-field-search,
   .bulkpay-field-amount,
   .bulkpay-field-mode,
   .bulkpay-btn-add {
      width: 100% !important;
      min-width: 0 !important;
   }
   .bulkpay-btn-add {
      height: 40px !important;
   }
}
.bulkpay-input-text.has-error {
   border-color: #ef4444 !important;
   box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2) !important;
}
.bulkpay-global-status {
   min-height: 20px;
   font-size: 9pt;
   margin-bottom: 8px;
}
.bulkpay-alert {
   display: flex;
   align-items: center;
   gap: 8px;
   padding: 7px 12px;
   border-radius: 6px;
   font-size: 8.5pt;
   font-weight: 600;
   box-sizing: border-box;
   animation: bulkpayFadeIn 0.2s ease-out;
}
@keyframes bulkpayFadeIn {
   from { opacity: 0; transform: translateY(-4px); }
   to { opacity: 1; transform: translateY(0); }
}
.bulkpay-alert-error {
   background: #FEF2F2;
   color: #B91C1C;
   border: 1px solid #FECACA;
}
.bulkpay-alert-warning {
   background: #FFFBEB;
   color: #B45309;
   border: 1px solid #FDE68A;
}
.bulkpay-alert-success {
   background: #F0FDF4;
   color: #15803D;
   border: 1px solid #BBF7D0;
}
.bulkpay-alert-info {
   background: #EFF6FF;
   color: #1D4ED8;
   border: 1px solid #BFDBFE;
}
.bulkpay-alert svg {
   flex-shrink: 0;
}
.bulkpay-table-wrapper {
   max-height: 260px;
   overflow-y: auto;
   border: 1px solid #e2e8f0;
   border-radius: 8px;
}
.bulkpay-table {
   width: 100%;
   border-collapse: collapse;
   font-size: 9pt;
}
.bulkpay-table th {
   background: #f1f5f9;
   padding: 8px 10px;
   border-bottom: 1px solid #cbd5e1;
   color: #475569;
   font-weight: 600;
   position: sticky;
   top: 0;
   z-index: 1;
}
.bulkpay-table td {
   padding: 8px 10px;
   border-bottom: 1px solid #f1f5f9;
   color: #1e293b;
}
.bulkpay-empty-cell {
   text-align: center;
   padding: 30px 10px !important;
   color: #94a3b8;
   font-size: 9.5pt;
}
.bulk-badge-queued {
   background: #f1f5f9;
   color: #64748b;
   padding: 2px 8px;
   border-radius: 4px;
   font-size: 8pt;
   font-weight: 600;
}
.bulk-badge-processing {
   background: #fef3c7;
   color: #d97706;
   padding: 2px 8px;
   border-radius: 4px;
   font-size: 8pt;
   font-weight: 600;
   animation: pulse 1.5s infinite;
}
.bulk-badge-completed {
   background: #dcfce7;
   color: #16a34a;
   padding: 2px 8px;
   border-radius: 4px;
   font-size: 8pt;
   font-weight: 600;
}
.bulk-badge-failed {
   background: #fee2e2;
   color: #dc2626;
   padding: 2px 8px;
   border-radius: 4px;
   font-size: 8pt;
   font-weight: 600;
}
.bulkpay-btn-remove {
   background: transparent;
   border: none;
   color: #ef4444;
   font-size: 16px;
   font-weight: bold;
   cursor: pointer;
   padding: 2px 6px;
   line-height: 1;
}
.bulkpay-btn-remove:hover {
   color: #b91c1c;
}
.bulkpay-footer-bar {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-top: 12px;
   padding-top: 10px;
   border-top: 1px solid #e2e8f0;
   flex-wrap: wrap;
   gap: 10px;
}
.bulkpay-total-summary {
   font-size: 9.5pt;
   color: #334155;
}
.bulkpay-summary-sep {
   margin: 0 8px;
   color: #94a3b8;
}
.bulkpay-footer-buttons {
   display: flex;
   gap: 8px;
}
.bulkpay-btn-process {
   padding: 7px 20px !important;
   font-weight: 700;
   font-size: 9.5pt;
   background: var(--theme-background, #84BAD2);
   color: var(--theme-foreground, #545454);
   border: 1px solid color-mix(in srgb, var(--theme-foreground, #545454) 30%, transparent);
   border-radius: 6px;
   cursor: pointer;
}
.bulkpay-btn-clear {
   padding: 7px 14px !important;
   font-size: 9pt;
   background: #ffffff;
   border: 1px solid #cbd5e1;
   border-radius: 6px;
   cursor: pointer;
   color: #64748b;
}

/* ========================================================
   Help Tab Modernization (Two-Column Vertical Card Layout)
   ======================================================== */
.help-section-container {
   padding: 6px 2px 20px;
   box-sizing: border-box;
   width: 100%;
}
.help-two-column-layout {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 20px;
   align-items: stretch;
   width: 100%;
   box-sizing: border-box;
}
.help-card {
   background: #ffffff;
   border: 1px solid #e2e8f0;
   border-radius: 12px;
   padding: 0;
   overflow: hidden;
   box-sizing: border-box;
   display: flex;
   flex-direction: column;
   height: 100%;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.help-card-header {
   display: flex;
   align-items: center;
   gap: 12px;
   padding: 16px 20px;
   min-height: 72px;
   box-sizing: border-box;
   background: var(--theme-bg-light-50, color-mix(in srgb, var(--theme-background, #84BAD2) 20%, #ffffff));
   border-bottom: 1.5px solid color-mix(in srgb, var(--theme-background, #84BAD2) 35%, #e2e8f0);
   margin-bottom: 0;
}
.help-card-icon {
   width: 40px;
   height: 40px;
   border-radius: 8px;
   background: var(--theme-background, #84BAD2);
   color: var(--theme-foreground, #545454);
   display: flex;
   align-items: center;
   justify-content: center;
   flex-shrink: 0;
   border: 1px solid color-mix(in srgb, var(--theme-foreground, #545454) 25%, transparent);
}
.help-card-title {
   font-size: 13pt;
   font-weight: 700;
   color: #0f172a;
   margin: 0;
}
.help-card-subtitle {
   font-size: 8.5pt;
   color: #64748b;
   margin: 2px 0 0 0;
}
.help-card-body {
   display: flex;
   flex-direction: column;
   flex: 1;
   padding: 16px 18px;
   background: #ffffff;
}

/* FAQ Links List */
.help-faq-list {
   display: flex;
   flex-direction: column;
   gap: 8px;
   transition: max-height 0.25s ease-in-out;
}
.help-faq-list.has-internal-scroll {
   overflow-y: visible;
   padding-right: 0;
}
.help-more-guides-wrap {
   display: flex;
   flex-direction: column;
   gap: 8px;
}
.help-more-row {
   display: flex;
   justify-content: flex-end;
   align-items: center;
   margin-top: auto;
   padding-top: 10px;
}
.help-more-link {
   display: inline-flex;
   align-items: center;
   gap: 5px;
   font-size: 8.5pt;
   font-weight: 600;
   color: #0284c7;
   text-decoration: none;
   cursor: pointer;
   padding: 4px 10px;
   border-radius: 6px;
   background: #f0f9ff;
   border: 1px solid #e0f2fe;
   transition: all 0.15s ease;
}
.help-more-link:hover {
   color: #0369a1;
   background: #e0f2fe;
   border-color: #bae6fd;
}
.help-footer-bar {
   display: flex;
   justify-content: flex-start;
   align-items: center;
   margin-top: 14px;
   padding-top: 10px;
   border-top: 1px solid #f1f5f9;
}
.help-footer-privacy-link {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   font-size: 8.5pt;
   font-weight: 500;
   color: #64748b;
   text-decoration: none;
   padding: 4px 8px;
   border-radius: 6px;
   transition: all 0.15s ease;
}
.help-footer-privacy-link:hover {
   color: #0284c7;
   background: #f0f9ff;
}
.help-footer-arrow {
   transition: transform 0.15s ease;
}
.help-footer-privacy-link:hover .help-footer-arrow {
   transform: translateX(3px);
}
.help-faq-item {
   display: flex;
   align-items: flex-start;
   gap: 12px;
   padding: 10px 14px;
   background: #ffffff;
   border: 1px solid #e2e8f0;
   border-radius: 8px;
   text-decoration: none;
   transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
   cursor: pointer;
}
.help-faq-item:hover {
   border-color: var(--theme-background, #84BAD2);
   box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
   transform: translateY(-1px);
}
.help-faq-item-icon {
   color: #0284c7;
   margin-top: 2px;
   flex-shrink: 0;
}
.help-faq-item-content {
   flex: 1;
}
.help-faq-item-title {
   font-size: 9.5pt;
   font-weight: 600;
   color: #1e293b;
   margin-bottom: 2px;
   display: flex;
   align-items: center;
   justify-content: space-between;
}
.help-faq-item:hover .help-faq-item-title {
   color: #0369a1;
}
.help-faq-item-desc {
   font-size: 8.5pt;
   color: #64748b;
   line-height: 1.35;
}
.help-faq-arrow {
   color: #94a3b8;
   font-size: 10pt;
   transition: transform 0.15s ease;
}
.help-faq-item:hover .help-faq-arrow {
   transform: translateX(3px);
   color: #0284c7;
}

/* Write to Us Form */
.help-form {
   display: flex;
   flex-direction: column;
   flex: 1;
   gap: 12px;
}
.help-form-group {
   display: flex;
   flex-direction: column;
   gap: 5px;
}
.help-form-group.help-form-group-msg {
   flex: 1;
   display: flex;
   flex-direction: column;
}
.help-form-label {
   font-size: 8.5pt;
   font-weight: 600;
   color: #475569;
}
.help-modern-select {
   width: 100%;
   height: 34px;
   padding: 4px 10px;
   border: 1px solid #cbd5e1;
   border-radius: 6px;
   font-size: 9pt;
   background: #ffffff;
   color: #1e293b;
   outline: none;
   box-sizing: border-box;
   transition: border-color 0.15s ease;
}
.help-modern-select:focus {
   border-color: var(--theme-background, #84BAD2);
   box-shadow: 0 0 0 2px rgba(132, 186, 210, 0.25);
}
.help-modern-textarea {
   width: 100%;
   flex: 1;
   height: 100%;
   min-height: 120px;
   padding: 10px;
   border: 1px solid #cbd5e1;
   border-radius: 6px;
   font-size: 9pt;
   font-family: inherit;
   background: #ffffff;
   color: #1e293b;
   resize: vertical;
   outline: none;
   box-sizing: border-box;
   transition: border-color 0.15s ease;
}
.help-modern-textarea:focus {
   border-color: var(--theme-background, #84BAD2);
   box-shadow: 0 0 0 2px rgba(132, 186, 210, 0.25);
}
.help-form-footer {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 12px;
   margin-top: auto;
   padding-top: 4px;
}
.help-btn-send {
   padding: 8px 24px !important;
   font-size: 9.5pt !important;
   font-weight: 600;
   background: var(--theme-background, #84BAD2) !important;
   color: var(--theme-foreground, #545454) !important;
   border: 1px solid color-mix(in srgb, var(--theme-foreground, #545454) 30%, transparent) !important;
   border-radius: 6px;
   cursor: pointer;
   text-decoration: none;
   display: inline-flex;
   align-items: center;
   gap: 6px;
   transition: filter 0.15s ease;
}
.help-btn-send:hover {
   filter: brightness(0.95);
}
.help-mail-status {
   font-size: 8.5pt;
   font-weight: 600;
   color: #15803d;
}

/* Unauthorized Box */
.help-unauthorized-box {
   background: #f8fafc;
   border: 1px dashed #cbd5e1;
   border-radius: 8px;
   padding: 24px 18px;
   text-align: center;
   color: #64748b;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   gap: 8px;
   flex: 1;
   margin-top: auto;
   margin-bottom: auto;
}
.help-unauthorized-icon {
   color: #94a3b8;
}
.help-unauthorized-title {
   font-size: 10.5pt;
   font-weight: 600;
   color: #334155;
}
.help-unauthorized-text {
   font-size: 8.5pt;
   color: #64748b;
   max-width: 300px;
}
/* Help & Info Popups Banner & Layout */
.help-popup-banner {
   width: 140px !important;
   height: 30px !important;
   max-width: 100%;
   object-fit: contain;
   display: block;
   margin: 0 auto 4px auto;
}
html.help-popup-html {
   margin: 0;
   padding: 0;
   background: #f1f5f9;
   box-sizing: border-box;
   overflow-x: hidden;
}
body.help-popup-page {
   margin: 0;
   padding: 8px 10px;
   background: #f1f5f9;
   min-height: auto;
   box-sizing: border-box;
   font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
   overflow-x: hidden;
   overflow-y: auto;
}
.help-popup-card {
   max-width: 520px;
   margin: 0 auto;
   background: #ffffff;
   border: 1px solid #e2e8f0;
   border-radius: 12px;
   padding: 10px 14px;
   box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
   box-sizing: border-box;
}
.help-popup-title {
   font-size: 11pt;
   font-weight: 700;
   color: #1e293b;
   margin-bottom: 6px;
   display: block;
   text-align: center;
}
.help-popup-subtitle {
   font-size: 9.5pt;
   font-weight: 600;
   color: #475569;
   margin: 6px 0 3px 0;
   display: block;
}
.help-popup-list {
   list-style: none;
   padding: 0;
   margin: 0 0 6px 0;
   display: flex;
   flex-direction: column;
   gap: 4px;
}
.help-popup-list li {
   background: #f8fafc;
   border: 1px solid #e2e8f0;
   border-radius: 6px;
   padding: 4px 8px;
   font-size: 8pt;
   color: #334155;
   line-height: 1.3;
}
.help-popup-list li strong {
   color: #0f172a;
}
.help-popup-key {
   display: inline-block;
   background: #e2e8f0;
   color: #0f172a;
   padding: 2px 7px;
   border-radius: 5px;
   font-family: monospace;
   font-weight: 700;
   font-size: 9.5pt;
   border: 1px solid #cbd5e1;
   margin-right: 6px;
}
.help-popup-actions {
   text-align: center;
   margin-top: 6px;
}


/* Balance Statement Modern Financial Summary */
.bal-stmt-summary {
   background: #ffffff;
   border: 1px solid #e2e8f0;
   border-radius: 12px;
   padding: 20px 24px;
   margin-top: 28px;
   box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
   box-sizing: border-box;
}
.bal-summary-header {
   border-bottom: 1px solid #f1f5f9;
   padding-bottom: 14px;
   margin-bottom: 18px;
}
.bal-summary-header-title {
   display: inline-flex;
   align-items: center;
   gap: 10px;
   font-size: 13pt;
   font-weight: 700;
   color: #1e293b;
}
.bal-summary-icon {
   color: var(--theme-background, #84BAD2);
}
.bal-summary-grid {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 20px;
}
.bal-summary-metrics {
   display: flex;
   flex-direction: column;
   gap: 14px;
}
.bal-metric-card {
   display: flex;
   align-items: center;
   gap: 16px;
   padding: 16px 18px;
   border-radius: 10px;
   border: 1px solid #e2e8f0;
   transition: all 0.15s ease;
}
.bal-metric-receivable {
   background: #f0fdf4;
   border-color: #bbf7d0;
}
.bal-metric-receivable .bal-metric-icon-wrap {
   background: #dcfce7;
   color: #15803d;
}
.bal-metric-receivable .bal-metric-val {
   color: #166534;
}
.bal-metric-payable {
   background: #fef2f2;
   border-color: #fecaca;
}
.bal-metric-payable .bal-metric-icon-wrap {
   background: #fee2e2;
   color: #dc2626;
}
.bal-metric-payable .bal-metric-val {
   color: #b91c1c;
}
.bal-metric-sales-total {
   background: #eff6ff;
   border-color: #bfdbfe;
}
.bal-metric-sales-total .bal-metric-icon-wrap {
   background: #dbeafe;
   color: #2563eb;
}
.bal-metric-sales-total .bal-metric-val {
   color: #1d4ed8;
}
.bal-metric-sales-negative {
   background: #fff1f2;
   border-color: #fecdd3;
}
.bal-metric-sales-negative .bal-metric-icon-wrap {
   background: #ffe4e6;
   color: #e11d48;
}
.bal-metric-sales-negative .bal-metric-val {
   color: #e11d48;
}
.bal-badge-negative-return {
   display: inline-flex;
   align-items: center;
   padding: 1px 7px;
   border-radius: 10px;
   font-size: 7.5pt;
   font-weight: 600;
   background: #ffe4e6;
   color: #e11d48;
   margin-bottom: 3px;
}
.bal-metric-count {
   background: #f8fafc;
   border-color: #e2e8f0;
}
.bal-metric-count .bal-metric-icon-wrap {
   background: #f1f5f9;
   color: #0284c7;
}
.bal-metric-count .bal-metric-val {
   color: #0f172a;
}
.bal-metric-icon-wrap {
   width: 48px;
   height: 48px;
   border-radius: 10px;
   display: flex;
   align-items: center;
   justify-content: center;
   flex-shrink: 0;
}
.bal-metric-content {
   flex: 1;
   min-width: 0;
}
.bal-metric-label {
   font-size: 8.5pt;
   font-weight: 600;
   text-transform: uppercase;
   letter-spacing: 0.04em;
   color: #64748b;
   margin-bottom: 2px;
}
.bal-metric-val {
   font-size: 15pt;
   font-weight: 800;
   line-height: 1.2;
}
.bal-metric-curr {
   font-size: 9.5pt;
   font-weight: 600;
   color: #64748b;
   margin-left: 4px;
}
.bal-metric-sub {
   font-size: 8pt;
   color: #94a3b8;
   margin-top: 2px;
}
.bal-top-pending-card {
   background: #f8fafc;
   border: 1px solid #e2e8f0;
   border-radius: 10px;
   padding: 16px 18px;
   display: flex;
   flex-direction: column;
}
.bal-top-header {
   display: flex;
   align-items: center;
   gap: 8px;
   font-size: 10pt;
   font-weight: 700;
   color: #334155;
   margin-bottom: 12px;
}
.bal-top-header svg {
   color: #f59e0b;
}
.bal-top-list {
   display: flex;
   flex-direction: column;
   gap: 10px;
   flex: 1;
   justify-content: center;
}
.bal-top-item {
   display: flex;
   align-items: center;
   gap: 12px;
   padding: 10px 14px;
   background: #ffffff;
   border: 1px solid #e2e8f0;
   border-radius: 8px;
   box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.bal-rank-badge {
   width: 26px;
   height: 26px;
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 9pt;
   font-weight: 700;
   flex-shrink: 0;
}
.rank-gold .bal-rank-badge {
   background: #fef3c7;
   color: #b45309;
   border: 1px solid #fde68a;
}
.rank-silver .bal-rank-badge {
   background: #f1f5f9;
   color: #475569;
   border: 1px solid #cbd5e1;
}
.rank-bronze .bal-rank-badge {
   background: #ffedd5;
   color: #c2410c;
   border: 1px solid #fed7aa;
}
.bal-rank-info {
   flex: 1;
   min-width: 0;
}
.bal-rank-name {
   font-size: 9.5pt;
   font-weight: 600;
   color: #1e293b;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
}
.bal-rank-code {
   font-size: 8pt;
   color: #64748b;
}
.bal-rank-amt {
   font-size: 11pt;
   font-weight: 700;
   color: #0f172a;
   white-space: nowrap;
   display: inline-flex;
   align-items: center;
   gap: 4px;
}
.bal-rank-curr {
   font-size: 8pt;
   font-weight: 600;
   color: #64748b;
   margin-left: 2px;
}
.bal-top-empty {
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   gap: 8px;
   padding: 24px;
   color: #15803d;
   font-size: 9pt;
   font-weight: 600;
}
@media (max-width: 768px) {
   .bal-stmt-summary {
      margin-top: 16px;
      padding: 14px 14px 18px;
      border-radius: 14px;
   }
   .bal-summary-grid {
      grid-template-columns: 1fr;
      gap: 12px;
   }
   .bal-metric-card {
      padding: 14px 16px;
      border-radius: 12px;
      gap: 12px;
   }
   .bal-top-pending-card {
      padding: 14px 16px;
      border-radius: 12px;
   }
   .bal-top-item {
      padding: 10px 12px;
      border-radius: 10px;
      gap: 10px;
   }
}
@media print {
   .bal-stmt-summary {
      border: 1px solid #ccc !important;
      box-shadow: none !important;
      break-inside: avoid;
      page-break-inside: avoid;
      background: #ffffff !important;
      margin-top: 16px !important;
      padding: 12px 16px !important;
   }
   .bal-metric-card,
   .bal-top-pending-card,
   .bal-top-item {
      box-shadow: none !important;
   }
}

/* Balance Statement Two-Column Flow & Card Layout */
.bal-flow-columns {
   column-count: 2;
   column-gap: 20px;
   width: 100%;
   box-sizing: border-box;
   margin-top: 14px;
}

.bal-alpha-heading {
   display: flex;
   align-items: center;
   gap: 10px;
   margin: 16px 0 10px 0;
   break-inside: avoid;
   page-break-inside: avoid;
   break-after: avoid;
   page-break-after: avoid;
}
.bal-alpha-heading:first-child {
   margin-top: 4px;
}
.bal-alpha-letter {
   font-size: 20px;
   font-weight: 800;
   color: #0284c7;
   background: #e0f2fe;
   border: 1.5px solid #bae6fd;
   width: 36px;
   height: 36px;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   border-radius: 8px;
   line-height: 1;
   flex-shrink: 0;
}
.bal-alpha-line {
   flex: 1;
   height: 2px;
   background: linear-gradient(90deg, #cbd5e1, #f1f5f9);
   border-radius: 2px;
}

.bal-customer-card {
   background: #ffffff;
   border: 1px solid #e2e8f0;
   border-radius: 8px;
   padding: 10px 14px;
   margin-bottom: 10px;
   break-inside: avoid;
   page-break-inside: avoid;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
   box-sizing: border-box;
   transition: border-color .15s ease, box-shadow .15s ease;
}
.bal-customer-card:hover {
   border-color: #cbd5e1;
   box-shadow: 0 3px 8px rgba(0, 0, 0, 0.07);
}
.bal-customer-card.is-receivable {
   border-left: 3.5px solid #ef4444;
}
.bal-customer-card.is-payable {
   border-left: 3.5px solid #16a34a;
}
.bal-customer-card.is-settled {
   border-left: 3.5px solid #94a3b8;
}

.bal-card-top {
   display: flex;
   justify-content: space-between;
   align-items: flex-start;
   gap: 12px;
   margin-bottom: 6px;
}
.bal-card-identity {
   flex: 1;
   min-width: 0;
}
.bal-card-name {
   font-size: 13.5px;
   font-weight: 700;
   color: #0f172a;
   line-height: 1.3;
   word-break: break-word;
}
.bal-card-name-link {
   color: inherit;
   text-decoration: none;
   transition: color 0.15s ease;
}
.bal-card-name-link:hover {
   color: #0284c7;
   text-decoration: underline;
}
.bal-card-code {
   font-size: 11px;
   color: #64748b;
   font-weight: 500;
   margin-top: 2px;
}
.bal-card-balance-wrap {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   flex-shrink: 0;
}
.bal-card-balance-amt {
   font-size: 13.5px;
   font-weight: 700;
   white-space: nowrap;
}
.bal-card-balance-amt.amt-receivable {
   color: #dc2626;
}
.bal-card-balance-amt.amt-payable {
   color: #16a34a;
}
.bal-card-balance-amt.amt-zero {
   color: #64748b;
}

.bal-card-bottom {
   display: flex;
   justify-content: space-between;
   align-items: center;
   gap: 10px;
   font-size: 11px;
   color: #64748b;
   border-top: 1px dashed #f1f5f9;
   padding-top: 6px;
}
.bal-card-date {
   display: inline-flex;
   align-items: center;
   gap: 4px;
}
.bal-card-contact {
   display: inline-flex;
   align-items: center;
   gap: 4px;
   color: #475569;
}

@media (max-width: 768px) {
   .bal-flow-columns {
      column-count: 1 !important;
      margin-top: 12px;
   }
   .bal-customer-card {
      border-radius: 12px;
      padding: 12px 14px;
      margin-bottom: 10px;
      border-left-width: 4px;
   }
   .bal-card-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 8px;
      margin-bottom: 8px;
      flex-wrap: wrap;
   }
   .bal-card-identity {
      flex: 1 1 180px;
      min-width: 0;
   }
   .bal-card-name {
      font-size: 14px;
      line-height: 1.3;
      word-break: break-word;
   }
   .bal-card-code {
      font-size: 11.5px;
      color: #64748b;
      font-weight: 500;
      margin-top: 2px;
   }
   .bal-card-balance-wrap {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
      white-space: nowrap;
      margin-left: auto;
   }
   .bal-card-balance-amt {
      font-size: 14px;
   }
   .btn-wa-reminder {
      width: 28px !important;
      height: 28px !important;
      min-width: 28px !important;
      min-height: 28px !important;
   }
   .bal-card-bottom {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      margin-top: 8px;
      padding-top: 8px;
      border-top: 1px dashed #e2e8f0;
      font-size: 11.5px;
      flex-wrap: wrap;
   }
   .bal-alpha-heading {
      margin: 14px 0 8px;
      gap: 8px;
   }
   .bal-alpha-letter {
      width: 32px;
      height: 32px;
      font-size: 14px;
      border-radius: 8px;
   }
}

@media (max-width: 640px) {
   .statement-summary {
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      padding: 10px;
   }
   .statement-summary-item {
      padding: 8px 10px;
   }
   .statement-summary-item span {
      font-size: 11px;
   }
   .statement-summary-item strong {
      font-size: 13px;
   }
   .statement-month {
      font-size: 15px;
      margin: 12px 0 8px;
   }
}

@media print {
   .bal-card-name-link {
      color: inherit !important;
      text-decoration: none !important;
   }
   .bal-flow-columns {
      column-count: 2 !important;
      column-gap: 16px !important;
      margin-top: 10px !important;
   }
   .bal-customer-card {
      border: 1px solid #cbd5e1 !important;
      box-shadow: none !important;
      break-inside: avoid !important;
      page-break-inside: avoid !important;
      padding: 8px 10px !important;
      margin-bottom: 8px !important;
   }
   .bal-alpha-heading {
      break-inside: avoid !important;
      page-break-inside: avoid !important;
      break-after: avoid !important;
      page-break-after: avoid !important;
      margin: 12px 0 6px 0 !important;
   }
   .bal-alpha-letter {
      background: #f1f5f9 !important;
      border: 1px solid #cbd5e1 !important;
      color: #0f172a !important;
      width: 28px !important;
      height: 28px !important;
      font-size: 16px !important;
   }
   .bal-alpha-line {
      background: #cbd5e1 !important;
   }
}

/* Login Page Pricing Button (GitHub style) */
.loginTopBar {
   position: fixed;
   top: 22px;
   right: 28px;
   z-index: 99999;
   text-align: right;
}
a.loginPricingBtn {
   display: inline-flex;
   align-items: center;
   gap: 8px;
   padding: 5px 16px;
   font-size: 14px;
   font-weight: 600;
   line-height: 20px;
   color: #ffffff;
   background-color: #1f883d;
   border: 1px solid rgba(27, 31, 36, 0.15);
   border-radius: 6px;
   box-shadow: 0 1px 0 rgba(27, 31, 36, 0.1);
   text-decoration: none;
   font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
   transition: background-color 0.15s ease, border-color 0.15s ease;
   cursor: pointer;
}
a.loginPricingBtn:hover {
   background-color: #1a7f37;
   border-color: rgba(27, 31, 36, 0.15);
   text-decoration: none;
   color: #ffffff;
}
a.loginPricingBtn:active {
   background-color: #15692c;
   box-shadow: inset 0 1px 0 rgba(0, 45, 17, 0.2);
}
a.loginPricingBtn .pricingArrow {
   font-size: 15px;
   font-weight: 700;
   color: #ffffff;
   display: inline-block;
   transition: transform 0.15s ease;
   line-height: 1;
}
a.loginPricingBtn:hover .pricingArrow {
   transform: translateX(3px);
}
@media (max-width: 640px) {
   .loginTopBar {
      top: 14px;
      right: 14px;
   }
   a.loginPricingBtn {
      padding: 4px 12px;
      font-size: 13px;
   }
}

/* Modern Form Tooltip Icon */
.form-tooltip-icon {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 19px;
   height: 19px;
   border-radius: 50%;
   background-color: #f1f5f9;
   color: #475569;
   cursor: help;
   transition: all 0.15s ease-in-out;
   border: 1px solid #cbd5e1;
   user-select: none;
   vertical-align: middle;
   box-sizing: border-box;
}
.form-tooltip-icon svg {
   width: 12px;
   height: 12px;
   stroke: currentColor;
}
.form-tooltip-icon:hover {
   background-color: #0284c7;
   color: #ffffff;
   border-color: #0284c7;
   transform: scale(1.15);
   box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

/* Modern Floating CSS Tooltip Bubble */
.modern-tooltip-wrapper {
   position: relative;
   display: inline-flex;
   align-items: center;
   vertical-align: middle;
}

.modern-tooltip-wrapper .tooltip-card {
   visibility: hidden;
   opacity: 0;
   position: absolute;
   bottom: calc(100% + 7px);
   left: 50%;
   transform: translateX(-50%) translateY(4px);
   transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1),
               transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
               visibility 0.18s;
   background: #0f172a;
   color: #f8fafc;
   text-align: center;
   padding: 5px 10px;
   border-radius: 6px;
   font-size: 11px;
   font-weight: 500;
   letter-spacing: 0.2px;
   line-height: 1.35;
   white-space: nowrap;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
   z-index: 1050;
   pointer-events: none;
}

.modern-tooltip-wrapper .tooltip-card::after {
   content: "";
   position: absolute;
   top: 100%;
   left: 50%;
   transform: translateX(-50%);
   border-width: 5px;
   border-style: solid;
   border-color: #0f172a transparent transparent transparent;
}

.modern-tooltip-wrapper:hover .tooltip-card,
.modern-tooltip-wrapper:focus-within .tooltip-card {
   visibility: visible;
   opacity: 1;
   transform: translateX(-50%) translateY(0);
}

/* Multi-tenant Store Chooser Card */
.storeChooserBox {
    max-width: 440px;
    width: 100%;
    margin: 30px auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 30px 24px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    font-family: inherit;
    text-align: center;
}
.store-chooser-header {
    text-align: center;
    margin-bottom: 22px;
}
.store-chooser-icon {
    font-size: 34px;
    line-height: 1;
    margin-bottom: 8px;
}
.store-chooser-title {
    font-size: 15pt;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px;
}
.store-chooser-desc {
    font-size: 9pt;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}
.store-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
    text-align: left;
}
.store-option-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.2s ease;
}
.store-option-card:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}
.store-option-card.active {
    border-color: #0284c7;
    background: #f0f9ff;
    box-shadow: 0 0 0 1px #0284c7;
}
.store-option-card input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #0284c7;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}
.store-option-info {
    flex-grow: 1;
}
.store-option-title {
    font-size: 11pt;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}
.store-option-sub {
    font-size: 8.5pt;
    color: #64748b;
    margin-top: 3px;
}
.store-chooser-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}
.store-submit-btn {
    width: 100%;
    min-height: 44px;
    padding: 11px 16px;
    font-size: 11.5pt;
    font-weight: 700;
    border-radius: 10px;
    background: #0284c7;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.store-submit-btn:hover {
    background: #0369a1;
}
.store-cancel-link {
    font-size: 9.5pt;
    color: #64748b;
    text-decoration: none;
}
.store-cancel-link:hover {
    color: #0f172a;
    text-decoration: underline;
}

/* ==========================================================================
   Modern Invoice Share Action & On-Demand Email Styles
   ========================================================================== */
.modern-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 6px;
    border: 1px solid #D0D7DE;
    background-color: #FFFFFF;
    color: #4B5563;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.modern-share-btn:hover {
    background-color: #F8FAFC;
    border-color: #94A3B8;
    color: #0284C7;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
.modern-share-btn:active {
    transform: translateY(0);
}

.invoice-share-popover {
    position: fixed;
    z-index: 999999;
    width: 220px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 6px;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: invoiceShareFadeIn 0.15s ease-out;
    box-sizing: border-box;
}
@keyframes invoiceShareFadeIn {
    from { opacity: 0; transform: translateY(-4px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.invoice-share-header {
    padding: 4px 8px 6px 8px;
    font-size: 8pt;
    color: #64748B;
    border-bottom: 1px solid #F1F5F9;
    margin-bottom: 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.invoice-share-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 8px;
    border-radius: 6px;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.12s ease;
    font-family: inherit;
    box-sizing: border-box;
}
.invoice-share-item:hover {
    background-color: #F8FAFC;
}
.invoice-share-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.invoice-share-item.disabled:hover {
    background: transparent;
}
.invoice-share-icon-wrap {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.invoice-share-wa-icon {
    background-color: #E8F8F0;
    color: #16A34A;
}
.invoice-share-mail-icon {
    background-color: #EFF6FF;
    color: #0284C7;
}
.invoice-share-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}
.invoice-share-title {
    font-size: 8.5pt;
    font-weight: 600;
    color: #1E293B;
    line-height: 1.2;
}
.invoice-share-subtitle {
    font-size: 7.5pt;
    color: #64748B;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Modal for On-Demand Email Prompt */
.invoice-email-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: invoiceModalFadeIn 0.15s ease-out;
}
@keyframes invoiceModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.invoice-email-modal-card {
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    border: 1px solid #E2E8F0;
    animation: invoiceModalCardPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes invoiceModalCardPop {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.invoice-email-modal-header {
    padding: 14px 18px;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.invoice-email-modal-title {
    font-size: 10.5pt;
    font-weight: 700;
    color: #0F172A;
    margin: 0;
}
.invoice-email-modal-close {
    background: transparent;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: #64748B;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}
.invoice-email-modal-close:hover {
    background: #E2E8F0;
    color: #0F172A;
}

.invoice-email-modal-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.invoice-email-modal-note {
    font-size: 8pt;
    color: #64748B;
    line-height: 1.4;
    margin: 0;
    background: #F8FAFC;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid #0284C7;
}
.invoice-email-modal-actions {
    padding: 12px 18px 16px 18px;
    background: #FFFFFF;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #F1F5F9;
}

/* Toast Notification */
.invoice-share-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000002;
    background: #FFFFFF;
    border-radius: 8px;
    padding: 10px 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #E2E8F0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 8.5pt;
    font-weight: 500;
    color: #1E293B;
    animation: invoiceToastSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 380px;
}
.invoice-share-toast.toast-success {
    border-left: 4px solid #16A34A;
}
.invoice-share-toast.toast-error {
    border-left: 4px solid #DC2626;
}
.invoice-share-toast.toast-info {
    border-left: 4px solid #0284C7;
}
@keyframes invoiceToastSlideIn {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Manage Suppliers modal layout and tabs */
.manage-suppliers-wrapper {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.supplier-select-card {
    background-color: #F0F3F5;
    padding: 6px 0;
    border-radius: 6px;
    margin-bottom: 8px;
}
.supplier-select-table {
    width: 100%;
    border-collapse: collapse;
}
.supplier-no-selection {
    text-align: center;
    padding: 24px 12px;
    color: #64748b;
    font-size: 9.5pt;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    margin-bottom: 8px;
}
.supplier-tab-strip {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--theme-background, #84BAD2);
    margin-bottom: 8px;
}
.supplier-modal-tab {
    padding: 6px 14px;
    font-weight: bold;
    font-size: 9pt;
    border: none;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
    background: #e2e8f0;
    color: #334155;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.supplier-modal-tab.active {
    background: var(--theme-background, #84BAD2) !important;
    color: var(--theme-foreground, #545454) !important;
}
.supplier-form-table {
    background-color: #F0F3F5;
    width: 100%;
    border-collapse: collapse;
    border-radius: 4px;
}
.col-supplier-label {
    width: 115px;
    vertical-align: middle;
    font-size: 9pt;
    font-weight: bold;
    padding: 6px 6px 4px 0;
    box-sizing: border-box;
}
.col-supplier-label-top {
    width: 115px;
    vertical-align: top;
    font-size: 9pt;
    font-weight: bold;
    padding: 6px 6px 4px 0;
    box-sizing: border-box;
}
.supplier-input-with-tip {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 320px;
    width: 100%;
}
.supplier-form-btn-row {
    display: flex;
    gap: 10px;
    margin-top: 6px;
    align-items: center;
}
.btn-supplier-delete,
button.btn-supplier-delete,
.buttons.btn-supplier-delete {
    background-color: #dc2626 !important;
    background: #dc2626 !important;
    color: #ffffff !important;
    border: 1px solid #b91c1c !important;
    border-radius: 6px;
    display: inline-block;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 21px;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn-supplier-delete:hover,
button.btn-supplier-delete:hover,
.buttons.btn-supplier-delete:hover {
    background-color: #b91c1c !important;
    background: #b91c1c !important;
    border-color: #991b1b !important;
    color: #ffffff !important;
}
.btn-supplier-delete:active,
button.btn-supplier-delete:active,
.buttons.btn-supplier-delete:active {
    background-color: #991b1b !important;
    background: #991b1b !important;
    border-color: #7f1d1d !important;
    color: #ffffff !important;
}
.btn-supplier-delete:focus-visible,
button.btn-supplier-delete:focus-visible,
.buttons.btn-supplier-delete:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.35);
}
.btn-supplier-delete:disabled,
button.btn-supplier-delete:disabled,
.buttons.btn-supplier-delete:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.supplier-status-area {
    min-height: 20px;
    margin: 6px 0;
    font-weight: 600;
    font-size: 8.5pt;
    padding-left: 121px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.supplier-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #cbd5e1;
}
.supplier-gst-state-label {
    font-weight: 600;
    font-size: 8.5pt;
    margin-top: 4px;
    color: #1e293b;
}

/* Product Import & Barcode Scanner Guide Popup */
.help-guide-wrapper {
    max-width: 700px;
    margin: 0 auto;
    box-sizing: border-box;
}
.help-guide-header {
    text-align: center;
    margin-bottom: 12px;
}
.help-guide-title {
    font-size: 13pt;
    font-weight: 700;
    color: #1e293b;
    margin: 6px 0 2px 0;
}
.help-guide-subtitle {
    font-size: 8.5pt;
    color: #64748b;
    margin: 0;
}
.help-lang-tab-bar {
    display: inline-flex;
    align-items: center;
    background: #e2e8f0;
    border-radius: 8px;
    padding: 2px;
    gap: 4px;
    margin: 4px auto 8px auto;
}
.help-lang-tab {
    padding: 3px 12px;
    font-size: 8.5pt;
    font-weight: 600;
    color: #475569;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}
.help-lang-tab:hover {
    color: #0f172a;
}
.help-lang-tab.active {
    background: #ffffff;
    color: #0284c7;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.help-guide-pane {
    display: none;
}
.help-guide-pane.active {
    display: block;
}
.help-guide-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    box-sizing: border-box;
}
.help-guide-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 8px;
}
.help-guide-card-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.help-guide-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f0f9ff;
    color: #0284c7;
    flex-shrink: 0;
}
.help-guide-card-icon.icon-amber {
    background: #fffbeb;
    color: #d97706;
}
.help-guide-card-icon.icon-emerald {
    background: #ecfdf5;
    color: #059669;
}
.help-guide-card-icon.icon-purple {
    background: #faf5ff;
    color: #7c3aed;
}
.help-guide-card-title {
    font-size: 10.5pt;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}
.help-guide-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 7.5pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}
.help-guide-badge-step {
    background: #e0f2fe;
    color: #0369a1;
}
.help-guide-badge-warn {
    background: #fee2e2;
    color: #dc2626;
}
.help-guide-badge-tip {
    background: #dcfce7;
    color: #15803d;
}
.help-guide-badge-setup {
    background: #f3e8ff;
    color: #6b21a8;
}
.help-guide-body {
    font-size: 9pt;
    color: #334155;
    line-height: 1.55;
}
.help-guide-body p {
    margin: 0 0 6px 0;
}
.help-guide-body p:last-child {
    margin-bottom: 0;
}
.help-guide-columns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 6px;
    margin: 8px 0;
}
.help-guide-column-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 8pt;
}
.help-guide-column-name {
    font-weight: 700;
    color: #0f172a;
    display: block;
    margin-bottom: 2px;
}
.help-guide-column-desc {
    color: #64748b;
    font-size: 7.5pt;
    line-height: 1.3;
}
.help-guide-callout {
    padding: 10px 14px;
    border-radius: 8px;
    margin: 8px 0;
    font-size: 8.5pt;
    line-height: 1.45;
}
.help-guide-callout-warning {
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    color: #92400e;
}
.help-guide-callout-tip {
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    color: #166534;
}
.help-guide-code-pill {
    display: inline-block;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    color: #0369a1;
    font-family: monospace;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 8.5pt;
}
.help-guide-code-pill-warn {
    display: inline-block;
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-family: monospace;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 8.5pt;
}
.help-guide-steps-list {
    padding-left: 18px;
    margin: 6px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.help-guide-steps-list li {
    margin-bottom: 2px;
}
.help-download-card {
    background: linear-gradient(to bottom right, #f8fafc, #f1f5f9);
    border: 1.5px solid #cbd5e1;
}
.help-download-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-sizing: border-box;
    width: 100%;
}
.help-download-meta {
    flex: 1 1 auto;
    min-width: 200px;
    box-sizing: border-box;
}
.help-download-file-name {
    font-weight: 700;
    font-size: 9pt;
    color: #0f172a;
}
.help-download-file-hint {
    font-size: 7.5pt;
    color: #64748b;
    margin-top: 2px;
}
.help-scanner-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px !important;
    font-size: 8.5pt !important;
    font-weight: 600;
    background: #0284c7 !important;
    color: #ffffff !important;
    border: 1px solid #0369a1 !important;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
    white-space: nowrap;
    box-sizing: border-box !important;
    max-width: 100%;
}
.help-scanner-download-btn:hover {
    background: #0369a1 !important;
}
@media (max-width: 640px) {
    .help-download-row {
        flex-direction: column !important;
        align-items: stretch !important;
        text-align: center !important;
        gap: 12px !important;
        padding: 14px 12px !important;
    }
    .help-download-meta {
        width: 100% !important;
        text-align: center !important;
    }
    .help-scanner-download-btn {
        width: 100% !important;
        max-width: 100% !important;
        justify-content: center !important;
        padding: 10px 14px !important;
        white-space: normal !important;
    }
    .help-google-play-main {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 12px !important;
    }
    .help-legal-attribution {
        text-align: center !important;
    }
}
.help-guide-subheading {
    margin-top: 10px;
    margin-bottom: 4px;
    font-weight: 700;
    color: #1e293b;
}
.help-guide-footer-actions {
    text-align: center;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

/* Google Play Badge Styling (Official Brand Guidelines compliant) */
.help-google-play-card {
    flex-direction: column !important;
    align-items: stretch !important;
}
.help-google-play-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    width: 100%;
}
.help-google-play-btn {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
    flex-shrink: 0;
}
.help-google-play-btn:hover {
    transform: scale(1.03);
    opacity: 0.95;
}
.help-google-play-badge {
    height: 44px;
    width: auto;
    display: block;
    border-radius: 6px;
}
.help-legal-attribution {
    font-size: 7.5pt;
    color: #94a3b8;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
    line-height: 1.35;
    width: 100%;
}



/* Stock Audit Fixed Footer & Pagination (Desktop & Base) */
.stock-audit-fixed-footer {
   position: fixed;
   bottom: 0;
   left: 0;
   right: 0;
   z-index: 1000;
   background: rgba(255, 255, 255, 0.96);
   backdrop-filter: blur(8px);
   -webkit-backdrop-filter: blur(8px);
   border-top: 1px solid #cbd5e1;
   box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.07);
   padding: 10px 24px;
   margin: 0 !important;
   border-radius: 0 !important;
   box-sizing: border-box;
}
.stock-audit-footer-inner {
   width: 100%;
   max-width: 100%;
   display: flex;
   align-items: center;
   justify-content: space-between;
   flex-wrap: wrap;
   gap: 12px;
}
.stock-audit-fixed-footer .recent-pagination-info {
   font-size: 13px;
   font-weight: 500;
   color: #475569;
}
.stock-audit-fixed-footer .recent-pagination-info strong {
   color: #0f172a;
   font-weight: 700;
}
.stock-audit-fixed-footer .recent-pagination-buttons {
   display: flex;
   align-items: center;
   gap: 4px;
   flex-wrap: wrap;
}
.stock-audit-fixed-footer .pagination-btn {
   height: 32px;
   padding: 0 12px;
   font-size: 12.5px;
   font-weight: 600;
   border-radius: 6px;
   border: 1px solid #cbd5e1;
   background: #ffffff;
   color: #334155;
   cursor: pointer;
   transition: all 0.15s ease;
   display: inline-flex;
   align-items: center;
   justify-content: center;
}
.stock-audit-fixed-footer .pagination-btn:hover:not(:disabled):not(.active) {
   background: #f1f5f9;
   border-color: #94a3b8;
   color: #0f172a;
}
.stock-audit-fixed-footer .pagination-btn.active {
   background: #0284c7;
   color: #ffffff;
   border-color: #0284c7;
   font-weight: 700;
   box-shadow: 0 1px 3px rgba(2, 132, 199, 0.3);
}
.stock-audit-fixed-footer .pagination-btn:disabled {
   opacity: 0.45;
   cursor: not-allowed;
   background: #f8fafc;
}
body.stock-audit-page {
   padding-bottom: 70px !important;
}
.stock-audit-btn-group {
   display: inline-flex;
   align-items: center;
   gap: 10px;
}
.stock-audit-clear-link {
   font-size: 12.5px;
   text-decoration: underline;
   color: inherit;
   cursor: pointer;
   opacity: 0.85;
   transition: opacity 0.15s ease;
}
.stock-audit-clear-link:hover {
   opacity: 1;
}

@media print {
   .stock-audit-fixed-footer {
      display: none !important;
   }
   body.stock-audit-page {
      padding-bottom: 0 !important;
   }
}

/* Procurements Overview Report (Desktop & Base) */
.procurement-supplier-summary {
   display: inline-flex;
   align-items: center;
   flex-wrap: wrap;
   gap: 8px;
   font-size: 13px;
   margin-top: 2px;
}
.procurement-supplier-name {
   color: #0f172a;
}
.procurement-supplier-code {
   color: #475569;
   font-weight: 500;
}
.procurement-supplier-bal-wrap {
   display: inline-flex;
   align-items: center;
   gap: 6px;
}
.procurement-bal-label {
   color: #475569;
   font-weight: 600;
}
.procurement-filter-row {
   display: flex;
   align-items: center;
   flex-wrap: wrap;
   gap: 10px;
}
.procurement-control-field {
   display: inline-flex;
   align-items: center;
   gap: 6px;
}
.procurement-field-label {
   font-size: 12px;
   font-weight: 600;
   color: var(--theme-foreground, inherit);
   white-space: nowrap;
}
.procurement-btn-actions {
   display: inline-flex;
   align-items: center;
   gap: 8px;
}
.procurement-reset-link,
.procurement-clear-link {
   font-size: 12.5px;
   text-decoration: underline;
   color: inherit;
   opacity: 0.85;
   cursor: pointer;
}
.procurement-reset-link:hover {
   opacity: 1;
}

/* Dashboard Notes Help Icon */
.notes-help-btn {
   border: none;
   background: transparent;
   color: #64748b;
   padding: 3px;
   border-radius: 50%;
   cursor: pointer;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   vertical-align: middle;
   transition: all 0.18s ease;
}
.notes-help-btn:hover {
   color: #0284c7;
   background: #f0f9ff;
   transform: scale(1.08);
}
.notes-help-btn:focus-visible {
   outline: 2px solid #0284c7;
   outline-offset: 1px;
}

body.modal-open {
   overflow: hidden !important;
}

/* Invoice & Estimate Totals Summary Card */
.invoice-summary-card {
   display: inline-block;
   border: 1px solid #cbd5e1;
   border-radius: 6px;
   padding: 8px 14px;
   background: transparent;
   box-shadow: none;
   text-align: left;
   box-sizing: border-box;
   -webkit-print-color-adjust: exact;
   print-color-adjust: exact;
}
@media only screen and (max-width: 600px) {
   .invoice-summary-card {
      width: 100% !important;
      min-width: unset !important;
   }
}

/* Payment Mode Select in Invoicing */
.invoice-select-mode {
   height: 28px;
   padding: 3px 8px;
   font-size: 9pt;
   color: #1e293b;
   background-color: #ffffff;
   border: 1px solid #cbd5e1;
   border-radius: 4px;
   box-sizing: border-box;
   cursor: pointer;
}
.invoice-select-mode:focus {
   border-color: #0284c7;
   outline: none;
   box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

/* Payment Mode Pill Badge across Statements */
.badge-payment-mode {
   display: inline-block;
   padding: 2px 7px;
   font-size: 7.5pt;
   font-weight: 600;
   letter-spacing: 0.3px;
   border-radius: 9999px;
   background: #f8fafc;
   color: #475569;
   border: 1px solid #cbd5e1;
   white-space: nowrap;
   vertical-align: middle;
   text-align: center;
}
