@import url('https://fonts.cdnfonts.com/css/solaimanlipi');

:root {
	--brand: #0f766e;
	--brand2: #22c55e;
	--bg: #f4f8f7;
	--card: #ffffff;
	--surface: #ecfdf5;
	--txt: #0b1220;
	--muted: #475569;
	--border: rgba(15, 23, 42, .10);
	--ring: rgba(15, 118, 110, .18);
}



/* ============================
   Theme overrides (optional)
   - Default: Premium Green (current :root)
   - Blue theme: add <html data-theme="blue">
============================ */
html[data-theme="blue"]{
  --brand: #1d4ed8;   /* blue-700 */
  --brand2: #38bdf8;  /* sky-400 */
  --ring: rgba(29, 78, 216, .20);
}
html[data-theme="blue"] .topbar{
  background: linear-gradient(180deg, rgba(29,78,216,.06), rgba(255,255,255,1));
  border-bottom: 1px solid rgba(29, 78, 216, .14);
}
html[data-theme="blue"].dark .topbar{
  background: linear-gradient(180deg, rgba(29,78,216,.22), rgba(2,6,23,.85));
  border-bottom: 1px solid rgba(56,189,248,.16);
}

/* ============================
   Global typography (responsive)
   - Mobile/Tablet (<=1023px): 15px
   - Desktop/Laptop (>=1024px): 13px
   Note: body uses 1rem, so everything scales consistently.
============================ */
html{ font-size: 13px; }
body{ font-size: 1rem; } /* = 13px */

/* Mobile + Tablet: bigger for readability */

.landing-brand-slogan { font-size: .7rem; color: var(--brand); font-weight: 800; }
.landing-slider-wrap { margin-bottom: 7px; }
.landing-slider { position: relative; min-height: 190px; border-radius: 20px; overflow: hidden; border: 1px solid rgba(148,163,184,.14); background: linear-gradient(135deg, rgba(226,232,240,.8), rgba(255,255,255,.95)); }
.landing-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease; display: grid; place-items: center; }
.landing-slide.is-active { opacity: 1; position: relative; }
.landing-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.landing-slide-ph { font-weight: 900; color: #64748b; }
.landing-slider-dots { display: flex; gap: 6px; justify-content: center; margin-top: 6px; }
.landing-slider-dots button { width: 8px; height: 8px; border-radius: 999px; background: rgba(100,116,139,.35); border: 0; }
.landing-slider-dots button.is-active { background: var(--brand); }
@media (max-width: 1023px){ html{ font-size: 15px; } }

/* Very large screens: keep elegant */
@media (min-width: 1600px){
  html{ font-size: 13px; }
}
html,
body {
	height: 100%;
}

body {
	font-family: 'SolaimanLipi', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	background:
		radial-gradient(circle at top left, rgba(34, 197, 94, .08), transparent 32%),
		radial-gradient(circle at top right, rgba(15, 118, 110, .10), transparent 28%),
		var(--bg);
	color: var(--txt);
	overflow-x: hidden;
}
html[lang="en"] body {
	font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* force better contrast for common muted text in light mode */
.text-slate-500 {
	color: var(--muted) !important;
}

.text-slate-400 {
	color: rgba(15, 23, 42, .55) !important;
}

.text-slate-600 {
	color: rgba(15, 23, 42, .78) !important;
}

.card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 16px;
	box-shadow: 0 12px 32px rgba(15, 23, 42, .05);
}

.btn {
	border-radius: 5px;
	font-weight: 900;
	transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { box-shadow: 0 10px 24px rgba(15, 23, 42, .08); }

.inp {
	border-radius: 5px;
	padding: .55rem .75rem;
	background: #ffffff;
	border: 1px solid var(--border);
	outline: none;
	font-weight: 800;
	color: var(--txt);
}

.inp:focus {
	box-shadow: 0 0 0 3px var(--ring);
	border-color: rgba(6, 95, 70, .35);
}

/* Tabs / pills */
.pill {
	border-radius: 999px;
	padding: .35rem .7rem;
	font-weight: 900;
	font-size: 12px;
	border: 1px solid rgba(2, 6, 23, .12);
	background: #fff;
	color: var(--txt);
}

.pill.active {
	background: #064e3b;
	color: #fff;
	border-color: transparent;
}

.chip {
	border-radius: 999px;
	padding: .2rem .55rem;
	font-weight: 900;
	font-size: 0.92rem;
}

/* chip variants */
.chip-ghost{
  background: rgba(2,6,23,.05) !important;
  color: var(--txt) !important;
  border: 1px solid rgba(2,6,23,.10) !important;
}
.dark .chip-ghost{
  background: rgba(255,255,255,.06) !important;
  color: rgba(226,232,240,.92) !important;
  border-color: rgba(148,163,184,.14) !important;
}
.chip-danger{
  background: rgba(220,38,38,.10) !important;
  color: #b91c1c !important;
  border: 1px solid rgba(220,38,38,.18) !important;
}
.dark .chip-danger{
  background: rgba(220,38,38,.18) !important;
  color: #fecaca !important;
  border-color: rgba(220,38,38,.22) !important;
}

.topbar {
	position: sticky;
	top: 0;
	z-index: 60;
	background: #fff;
	border-bottom: 1px solid var(--border);
}

/* Bottom nav ALWAYS dark dream */
.bottom-nav {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 10px 10px;
	z-index: 70;
	background: linear-gradient(135deg, rgba(2, 6, 23, .96), rgba(6, 78, 59, .78));
	border-top: 1px solid rgba(255, 255, 255, .14);
	box-shadow: 0 -12px 28px rgba(2, 6, 23, .18);
	backdrop-filter: blur(10px);
}

.nav-btn {
	border-radius: 14px;
	padding: 10px 8px;
	font-weight: 900;
	font-size: 0.92rem;
	border: 1px solid rgba(255, 255, 255, .18);
	background: rgba(255, 255, 255, .10);
	color: rgba(255, 255, 255, .92);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
}

.nav-btn i {
	color: rgba(255, 255, 255, .92);
}

.nav-btn.active {
	background: rgba(255, 255, 255, .92);
	color: #064e3b;
	border-color: rgba(255, 255, 255, .92);
}

.nav-btn.active i {
	color: #064e3b;
}

#shell.hidden{display:none !important;}

@media (min-width: 1024px) {
	#shell:not(.hidden) {
		display: grid;
		grid-template-columns: 250px 1fr;
	}

	#sidebar {
		position: sticky;
		top: 0;
		height: 100vh;
	}

	.bottom-nav {
		display: none;
	}
}

@media (max-width: 1023px) {
	#sidebar {
		display: none;
	}

	#content {
		padding-bottom: 92px;
	}
}

.sec {
	display: none;
}

.sec.active {
	display: block;
}

.search-results {
	max-height: 240px;
	overflow: auto;
	position: absolute;
	width: 100%;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 12px;
	box-shadow: 0 16px 28px rgba(2, 6, 23, .10);
	z-index: 999;
}

#toast {
	position: fixed;
	left: 50%;
	top: 14px;
	transform: translateX(-50%) translateY(-90px);
	transition: .35s ease;
	z-index: 9999;
}

#toast.show {
	transform: translateX(-50%) translateY(0);
}

.dark body {
	background: #0b1220;
	color: #e2e8f0;
}

.dark .topbar {
	background: rgba(2, 6, 23, .85);
	border-bottom: 1px solid rgba(148, 163, 184, .15);
}

.dark .card {
	background: rgba(15, 23, 42, .75);
	border-color: rgba(148, 163, 184, .14);
}

.dark .inp {
	background: rgba(2, 6, 23, .55);
	border-color: rgba(148, 163, 184, .14);
	color: #e2e8f0;
}

.dark .pill {
	background: rgba(2, 6, 23, .35);
	border-color: rgba(148, 163, 184, .14);
	color: #e2e8f0;
}

.dark .search-results {
	background: rgba(2, 6, 23, .96);
	border-color: rgba(148, 163, 184, .14);
	color: #e2e8f0;
}

.dark .bottom-nav {
	background: linear-gradient(135deg, rgba(2, 6, 23, .96), rgba(6, 78, 59, .68));
	border-top: 1px solid rgba(148, 163, 184, .14);
}

.dark .text-slate-500 {
	color: rgba(226, 232, 240, .72) !important;
}

.dark .text-slate-400 {
	color: rgba(226, 232, 240, .55) !important;
}

/* Mobile KPI: 3-up compact */
@media (max-width: 767px) {
	.kpi-grid {
		gap: 8px !important;
	}

	.kpi-card {
		padding: 10px !important;
		border-radius: 12px !important;
	}

	.kpi-title {
		font-size: 9px !important;
	}

	.kpi-value {
		font-size: 13px !important;
		line-height: 1.1 !important;
	}

	.kpi-card canvas {
		height: 42px !important;
	}
}

/* ============================
   Mobile App-like Dashboard
   (only visual changes; links/logic stay same)
============================ */

/* Hide heavy desktop charts on mobile/tablet */
@media (max-width: 1023px){
  .dash-heavy{ display:none !important; }
}

/* KPI cards on mobile/tablet look like compact strip cards */
@media (max-width: 1023px){
  .kpi-card{
    border-radius: 12px !important;
    overflow:hidden;
    box-shadow: 0 10px 22px rgba(2,6,23,.06);
  }
  .kpi-card::before{
    /* remove old glow gradient (keep clean) */
    background: none !important;
  }
  .kpi-card::after{
    /* remove side strip */
    opacity: 0 !important;
  }
  .kpi-title{
    display:inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(88, 28, 135, .10); /* purple tint like reference */
    color: rgba(88, 28, 135, .95) !important;
    letter-spacing: .2px;
  }
  .kpi-value{
    font-size: 13px !important; /* requested */
    line-height: 1.25 !important;
    margin-top: 6px;
  }
  /* keep expense red readable */
  #kpi_expense{ color:#b91c1c !important; }
}

/* App-like quick menu tiles (mobile/tablet) */
@media (max-width: 1023px){
  .m-dash-tiles{
    margin-top: 10px;
    display:grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .dash-tile{
    background:#ffffff;
    border: 1px solid rgba(2,6,23,.10);
    border-radius: 14px;
    padding: 12px 10px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap: 8px;
    box-shadow: 0 10px 22px rgba(2,6,23,.06);
    font-weight: 900;
  }
  .dash-ico{
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display:flex;
    align-items:center;
    justify-content:center;
    background: rgba(88, 28, 135, .10); /* purple like reference */
    border: 1px solid rgba(88, 28, 135, .16);
    color: rgba(88, 28, 135, .95);
    font-size: 18px;
  }
  .dash-txt{
    font-size: 12px;
    color: rgba(15,23,42,.85);
    line-height: 1.1;
    text-align:center;
  }
  .dash-tile:active{ transform: scale(.98); }
}


@media print {

	.no-print,
	.bottom-nav,
	#sidebar,
	.topbar {
		display: none !important;
	}

	body {
		background: #fff !important;
		color: #000 !important;
	}

	.card {
		box-shadow: none !important;
	}

	#content {
		padding: 0 !important;
	}
}

/* ---------------------------
   Dashboard: color communication
---------------------------- */

/* KPI cards accent strip + soft glow */
.kpi-card{
  position: relative;
  overflow: hidden;
  background: #f0fdf4; /* green-50 */
  border-color: rgba(6,78,59,.16);
}
.dark .kpi-card{
  background: rgba(6,78,59,.12);
  border-color: rgba(16,185,129,.18);
}

.kpi-card::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:14px;
  pointer-events:none;
  background: rgba(6,78,59,.06);
}
.kpi-card::after{
  content:"";
  position:absolute;
  left:0; top:0; bottom:0;
  width:4px;
  background: #064e3b;
  opacity:.95;
}

/* Make icons inside KPI a bit nicer */
.kpi-card i{
  padding:10px;
  border-radius:14px;
  background: rgba(6,78,59,.10);
  border: 1px solid rgba(2,6,23,.08);
}

/* Normal cards: subtle border + hover */
.card{
  box-shadow: 0 10px 26px rgba(2, 6, 23, .06);
}
.card:hover{
  box-shadow: 0 14px 34px rgba(2, 6, 23, .10);
}


/* ---------------------------
   Topbar: brand tint
---------------------------- */
.topbar{
  background: linear-gradient(180deg, rgba(6,78,59,.06), rgba(255,255,255,1));
  border-bottom: 1px solid rgba(6, 78, 59, .14);
}

/* Dark mode topbar already exists; slightly enrich */
.dark .topbar{
  background: linear-gradient(180deg, rgba(6,78,59,.20), rgba(2,6,23,.85));
  border-bottom: 1px solid rgba(16,185,129,.14);
}


/* ---------------------------
   Bottom Nav: solid dark green + stylish
---------------------------- */
.bottom-nav{
  background: #064e3b !important; /* no gradient */
  border-top: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 -14px 34px rgba(2,6,23,.28);
}

.nav-btn{
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  transition: transform .15s ease, background .15s ease;
}
.nav-btn:active{
  transform: scale(.98);
}
.nav-btn.active{
  background: rgba(255,255,255,.92);
  color: #064e3b;
  border-color: rgba(255,255,255,.92);
  box-shadow: 0 10px 22px rgba(2,6,23,.20);
}

/* small active indicator dot */
.nav-btn.active::after{
  content:"";
  width:6px; height:6px;
  border-radius:999px;
  background:#064e3b;
  display:block;
  margin-top:4px;
}


/* ---------------------------
   Auth page: always white (even in dark)
---------------------------- */
#auth_layer{
  background:#ffffff !important;
  color:#0b1220 !important;
}
.dark #auth_layer{
  background:#ffffff !important;
  color:#0b1220 !important;
}

/* auth card keep clean */
#auth_layer .card{
  background:#ffffff !important;
  border-color: rgba(2,6,23,.10) !important;
  box-shadow: 0 18px 40px rgba(2,6,23,.10);
}
#auth_layer .text-slate-500{
  color: rgba(15,23,42,.70) !important;
}
#auth_layer .inp{
  background:#fff !important;
  color:#0b1220 !important;
}
/* ---------------------------
   Compact spacing (global)
---------------------------- */

/* main container padding reduce */
#content .max-w-6xl{
  padding-left: 10px !important;
  padding-right: 10px !important;
}
@media (min-width:768px){
  #content .max-w-6xl{
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}

/* card padding reduce (override tailwind p-4/p-3) */
.card.p-4{ padding: .80rem !important; }
.card.p-3{ padding: .65rem !important; }
.card.p-2{ padding: .50rem !important; }

/* inputs/buttons slightly tighter */
.inp{ padding: .48rem .68rem; }
.btn{ padding-top: .55rem; padding-bottom: .55rem; }

/* KPI grid tighter */
.kpi-grid{ gap: 8px !important; }
@media (min-width:768px){ .kpi-grid{ gap: 10px !important; } }

/* table cells tighter */
table td, table th{ padding-top: .50rem; padding-bottom: .50rem; }

/* Entry/Report list cards tighten */
#ui_last10 > div,
#ui_ledger > div,
#ui_bal_list > div{
  padding: .65rem !important;
}

/* ---------------------------
   Sidebar active readability
---------------------------- */
#sidebar .nav-active{
  background: #064e3b !important;
  color: #ffffff !important;
  border-color: rgba(255,255,255,.10) !important;
}
#sidebar .nav-active i{
  color: #ffffff !important;
}
/* ===== FIX: Category Tree Active Visibility ===== */

/* Left category tree active button */
#ui_cat_tree .nav-active {
  background: #0f172a !important;   /* slate-900 */
  color: #ffffff !important;
  border-color: #0f172a !important;
}

/* Active item title */
#ui_cat_tree .nav-active .font-black {
  color: #ffffff !important;
}

/* Active item meta text */
#ui_cat_tree .nav-active .text-slate-500,
#ui_cat_tree .nav-active .text-white\/80 {
  color: #e5e7eb !important; /* slate-200 */
}

/* Active badge (count chip) */
#ui_cat_tree .nav-active .chip {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}


/* Desktop tabs for Accounts sub-sections */
.acc-tabsbar{align-items:center;}
@media (min-width: 768px){
  .acc-tabsbar{width:100%;}
  .acc-tabsbar .pill{flex:1; text-align:center; padding:.55rem 1rem;}
}

/* =============================
   Mobile keyboard friendly modal
   ============================= */
#party_add_layer, #acc_edit_layer{
  align-items: flex-start; /* so the card can move up when keyboard opens */
}
.modal-card{
  margin-top: 10px;
  max-height: calc(100vh - 20px);
  overflow: auto;
}


/* ============================
   POS Ledger 2.0 — Professional UI Additions
   (keeps all existing styles; only adds new utilities)
   ============================ */

.btn-primary{
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color:#fff !important;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 10px 22px rgba(2,6,23,.12);
}
.btn-primary:hover{ filter: brightness(1.02); }
.btn-primary:active{ transform: translateY(1px); }

.btn-danger{
  background: linear-gradient(135deg, #be123c, #f43f5e);
  color:#fff !important;
  border: 1px solid rgba(255,255,255,.12);
}

.fin-income{ color:#059669 !important; }
.fin-expense{ color:#dc2626 !important; }
.fin-receivable{ color:#2563eb !important; }
.fin-payable{ color:#ea580c !important; }
.fin-neutral{ color: var(--muted) !important; }

thead th{
  background: rgba(6,78,59,.06);
}
.dark thead th{
  background: rgba(16,185,129,.08);
}
tbody tr:hover{ background: rgba(6,78,59,.05); }
.dark tbody tr:hover{ background: rgba(16,185,129,.08); }

.card.card-gradient{
  background: linear-gradient(145deg, rgba(255,255,255,1), rgba(240,253,244,.9));
}
.dark .card.card-gradient{
  background: linear-gradient(145deg, rgba(15,23,42,.78), rgba(6,78,59,.12));
}



/* ============================
   Laptop/desktop full width
============================ */
@media (min-width: 1024px){
  #content .max-w-6xl{
    max-width: 100% !important;
  }
  #content .max-w-6xl.mx-auto{
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  #content{
    width: 100%;
  }
}

/* ============================
   Mobile/Tablet: larger & more attractive
============================ */
@media (max-width: 1023px){
  /* make cards/buttons feel touch-friendly */
  .card.p-4{ padding: 1rem !important; }
  .card.p-3{ padding: .85rem !important; }
  .inp{ padding: .70rem .85rem !important; }
  .btn{ padding-top: .70rem !important; padding-bottom: .70rem !important; }

  .pill{ font-size: 13px !important; padding: .48rem .85rem !important; }
  .chip{ font-size: 12px !important; padding: .28rem .65rem !important; }

  /* bottom nav bigger */
  .bottom-nav{ padding: 12px 12px !important; }
  .nav-btn{ font-size: 13px !important; padding: 12px 10px !important; border-radius: 16px !important; }
  .nav-btn i{ font-size: 18px !important; }

  /* KPI readable on mobile/tablet */
  .kpi-title{ font-size: 12px !important; }
  .kpi-value{ font-size: 20px !important; }
}

/* ============================
   Input placeholder tuning
============================ */
.inp::placeholder,
input::placeholder,
textarea::placeholder{
  font-size: .92em !important;
  opacity: .70 !important;
  font-weight: 700 !important;
}

/* ============================
   Custom Alert System (no browser alert)
============================ */
#app_alert_layer{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(2,6,23,.55);
  z-index: 99999;
  backdrop-filter: blur(6px);
}
#app_alert_layer.show{ display: flex; }

.app-alert-card{
  width: min(520px, 100%);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(2,6,23,.25);
  overflow: hidden;
}
.dark .app-alert-card{
  background: rgba(15,23,42,.92);
  border-color: rgba(148,163,184,.16);
}

.app-alert-head{
  padding: 14px 16px 10px 16px;
  display:flex;
  gap:10px;
  align-items:flex-start;
}
.app-alert-ico{
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  background: rgba(6,78,59,.10);
  border: 1px solid rgba(2,6,23,.10);
  color: var(--brand);
}
.dark .app-alert-ico{
  background: rgba(16,185,129,.10);
  border-color: rgba(148,163,184,.14);
  color: #a7f3d0;
}
.app-alert-title{
  font-weight: 900;
  font-size: 15px;
  line-height: 1.2;
}
.app-alert-msg{
  margin-top: 2px;
  font-weight: 800;
  color: var(--muted);
  font-size: 13px;
}
.dark .app-alert-msg{ color: rgba(226,232,240,.72); }

.app-alert-actions{
  padding: 12px 16px 16px 16px;
  display:flex;
  gap:10px;
  justify-content:flex-end;
  border-top: 1px solid rgba(2,6,23,.08);
}
.dark .app-alert-actions{ border-top-color: rgba(148,163,184,.14); }

.app-alert-btn{
  border-radius: 14px;
  padding: .65rem 1rem;
  font-weight: 900;
  border: 1px solid rgba(2,6,23,.10);
  background: rgba(255,255,255,.92);
}
.dark .app-alert-btn{
  background: rgba(2,6,23,.35);
  border-color: rgba(148,163,184,.14);
  color: rgba(226,232,240,.92);
}
.app-alert-btn.primary{
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff;
  border-color: transparent;
}


/* ============================
   Global Font Size Control
============================ */
html{font-size:13px;}
body{font-size:1rem;}
@media (max-width:1023px){html{font-size:14px;}}


/* SMS checkbox (bigger + nicer) */
.sms-check{ width:1.15rem; height:1.15rem; }
@media (max-width:1023px){ .sms-check{ width:1.25rem; height:1.25rem; } }
.sms-check{ transform: translateY(1px); }


/* ============================
   Mobile App Dashboard (App-like)
   - desktop unchanged
============================ */
:root{
  --app-accent: #064e3b; /* dark green /*
  --app-accent-2: #16a34a;
  --app-tile-bg: #ffffff;
  --app-surface: #f4f3ff; /* subtle lavender */
  --app-border: rgba(6,78,59,.18);
}

/* Mobile/Tablet typography */
@media (max-width: 1023px){
  html{ font-size: 15px !important; } /* app-like mobile readability */
}

/* Desktop/Laptop typography */
@media (min-width: 1024px){
  html{ font-size: 13px !important; }
}

/* KPI colors + sizing on mobile (cash/bank/income/expense/profit) */
@media (max-width: 1023px){
  #sec_home .kpi-title{ font-size: 10px !important; letter-spacing:.2px; color: rgba(255,255,255,.90) !important; }
  #sec_home .kpi-value{
    font-size: 13.5px !important; /* 13-14 */
    line-height: 1.15 !important;
    font-weight: 900 !important;
    color: #ffffff !important;
  }
  #sec_home .kpi-card i{
    color: #ffffff !important;
    background: rgba(255,255,255,.16) !important;
    border-color: rgba(255,255,255,.20) !important;
  }
  #sec_home .kpi-card::before,
  #sec_home .kpi-card::after{ display:none !important; }
  #sec_home .kpi-card{
    background: #064e3b !important;
    border: 1px solid rgba(255,255,255,.16) !important;
    box-shadow: 0 12px 26px rgba(2,6,23,.14) !important;
  }
}

/* App tiles grid (mobile home) */
.m-dash-tiles{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 420px){
  .m-dash-tiles{ gap: 8px; }
}
.dash-tile{
  background: var(--app-tile-bg);
  border: 1px solid var(--app-border);
  border-radius: 14px;
  padding: 12px 10px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 8px;
  box-shadow: 0 10px 22px rgba(2,6,23,.06);
}
.dash-ico{
  width: 44px; height: 44px;
  border-radius: 14px;
  display:flex;
  align-items:center; justify-content:center;
  background: rgba(6,78,59,.10);
  border: 1px solid rgba(6,78,59,.14);
}
.dash-ico i{
  font-size: 20px;
  color: var(--app-accent);
}
.dash-txt{
  font-weight: 900;
  font-size: 11px;
  line-height: 1.05;
  color: #111827;
  text-align:center;
}

/* Bottom nav app-like on mobile (5 items) */
@media (max-width: 1023px){
  .bottom-nav{
    background: #ffffff !important;
    border-top: 1px solid rgba(2,6,23,.10) !important;
    box-shadow: 0 -12px 26px rgba(2,6,23,.10) !important;
  }
  .nav-btn{
    background: transparent !important;
    border: 0 !important;
    color: rgba(17,24,39,.80) !important;
    padding: 10px 6px !important;
  }
  .nav-btn i{ color: rgba(17,24,39,.70) !important; }
  .nav-btn.active{
    background: rgba(6,78,59,.10) !important;
    color: var(--app-accent) !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  .nav-btn.active i{ color: var(--app-accent) !important; }
  .nav-btn.active::after{ background: var(--app-accent) !important; }
}

/* Placeholder size fix */
::placeholder{
  font-size: .92em !important;
  opacity: .65 !important;
}


@media (max-width: 1023px){
  /* KPI cards: full purple background like mobile app reference */
  .kpi-card{
    border-radius: 14px !important;
    overflow:hidden;
    background: #064e3b !important; /* dark green */
    border: 1px solid rgba(255,255,255,.18) !important;
    box-shadow: 0 12px 26px rgba(2,6,23,.12);
  }
  .kpi-card::before{ background:none !important; }
  .kpi-card::after{ opacity:0 !important; }

  .kpi-title{
    display:block;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: rgba(255,255,255,.88) !important;
    font-weight: 900 !important;
    letter-spacing: .2px;
  }

  .kpi-value{
    color: #ffffff !important;
    line-height: 1.25 !important;
    margin-top: 6px;
  }

  /* Icon pill */
  .kpi-card i{
    background: rgba(255,255,255,.16) !important;
    border: 1px solid rgba(255,255,255,.20) !important;
    color: #ffffff !important;
  }
}

/* KPI amount font sizing: phone 13px, tablet 14px */
@media (max-width: 767px){
  .kpi-value{ font-size: 13px !important; }
}
@media (min-width: 768px) and (max-width: 1023px){
  .kpi-value{ font-size: 14px !important; }
}

/* ============================
   Mobile bottom nav: parallel row
============================ */
@media (max-width: 1023px){
  .bottom-nav-row{
    display:flex;
    gap:8px;
    align-items:stretch;
    flex-wrap: nowrap;
  }
  .bottom-nav-row .nav-btn{
    flex:1;
    min-width:0;
    padding: 10px 6px;
  }
  .bottom-nav-row .nav-btn div{
    font-size: 9px;
    line-height: 1.05;
    white-space: nowrap;
  }
  .bottom-nav-row .nav-btn i{
    font-size: 15px;
  }
}

/* Placeholder smaller & consistent */
::placeholder{
  font-size: .92em !important;
  opacity: .70;
}

/* ---- Trade cart (mobile friendly) */
.trade-item{
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255,255,255,.8);
}
.dark .trade-item{background: rgba(15,23,42,.35);}
.trade-item .ti-top{display:flex;align-items:flex-start;gap:10px;}
.trade-item .ti-name{font-weight:900;font-size:12px;line-height:1.2;}
.trade-item .ti-meta{font-size:10px;font-weight:800;color:#64748b;margin-top:2px;}
.trade-item .ti-amt{margin-left:auto;font-weight:900;font-size:12px;white-space:nowrap;}
.trade-item .ti-actions{margin-top:8px;display:flex;gap:8px;}
.trade-item .ti-actions .btn{flex:1;}

/* ===== 2026 refresh: richer dashboard and auth visuals ===== */
:root{
  --brand-soft: #dcfce7;
  --brand-deep: #022c22;
  --accent: #14b8a6;
  --card-shadow: 0 18px 40px rgba(15, 23, 42, .08);
}
body{
  background:
    radial-gradient(circle at top left, rgba(20,184,166,.10), transparent 28%),
    radial-gradient(circle at top right, rgba(6,78,59,.10), transparent 24%),
    linear-gradient(180deg, #f8fafc 0%, #eefbf5 100%);
}
.card{
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(10px);
}
.btn{
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(6,78,59,.16);
  filter: saturate(1.02);
}
.inp{
  background: rgba(255,255,255,.92);
}
#auth_layer{
  background:
    radial-gradient(circle at top left, rgba(20,184,166,.12), transparent 26%),
    radial-gradient(circle at bottom right, rgba(6,78,59,.12), transparent 22%),
    linear-gradient(180deg, #f8fffc 0%, #eff6ff 100%);
}
.topbar{
  background: linear-gradient(180deg, rgba(236,253,245,.95), rgba(255,255,255,.92));
  backdrop-filter: blur(10px);
}
.kpi-card{
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(16,185,129,.12) !important;
  box-shadow: 0 20px 36px rgba(6,78,59,.08);
}
.kpi-card::before{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(16,185,129,.10), rgba(20,184,166,.05));
  pointer-events: none;
}
.kpi-card .kpi-value{
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.m-dash-tiles{
  gap: 7px;
}
.dash-tile{
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(236,253,245,.94));
  border: 1px solid rgba(16,185,129,.14);
  box-shadow: 0 14px 28px rgba(15,23,42,.06);
}
.dash-ico{
  box-shadow: 0 10px 22px rgba(6,78,59,.12);
}
#sec_home .card > .flex .chip,
#sec_home .card .chip{
  border: 1px solid rgba(16,185,129,.12);
}
.dark body{
  background: linear-gradient(180deg, #020617 0%, #052e2b 100%);
}
.dark #auth_layer{
  background: linear-gradient(180deg, rgba(2,6,23,.98), rgba(3,30,24,.96));
}
.dark .card{
  box-shadow: 0 20px 42px rgba(2,6,23,.34);
}
.dark .kpi-card::before{
  background: linear-gradient(135deg, rgba(16,185,129,.16), rgba(6,78,59,.22));
}

/* ==== Desktop entry / trade refresh ==== */
.entry-desktop-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}
.trade-layout-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  align-items:start;
}
.trade-help-box{
  border:1px dashed rgba(15,118,110,.25);
  background:linear-gradient(135deg, rgba(236,253,245,.95), rgba(240,249,255,.92));
}
.trade-summary-box{
  border:1px solid rgba(15,23,42,.08);
  background:linear-gradient(180deg, rgba(248,250,252,.95), rgba(236,253,245,.9));
}
.trade-item{
  border-radius:18px;
  padding:14px;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.96));
  box-shadow:0 12px 28px rgba(15,23,42,.05);
}
.trade-item .ti-edit-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
.trade-item .ti-field label{
  display:block;
  font-size:10px;
  font-weight:900;
  color:#64748b;
  margin-bottom:4px;
}
.trade-item .ti-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:12px;
}
.trade-item .ti-stock{
  font-size:10px;
  font-weight:900;
  color:#64748b;
}
.kpi-card.kpi-cash::before{ background:linear-gradient(135deg, rgba(16,185,129,.18), rgba(34,197,94,.05)); }
.kpi-card.kpi-bank::before{ background:linear-gradient(135deg, rgba(59,130,246,.18), rgba(14,165,233,.05)); }
.kpi-card.kpi-income::before{ background:linear-gradient(135deg, rgba(99,102,241,.16), rgba(16,185,129,.06)); }
.kpi-card.kpi-expense::before{ background:linear-gradient(135deg, rgba(244,63,94,.15), rgba(251,146,60,.05)); }
.kpi-card.kpi-profit::before{ background:linear-gradient(135deg, rgba(168,85,247,.18), rgba(45,212,191,.05)); }
.kpi-card.kpi-bank, .kpi-card.kpi-income, .kpi-card.kpi-profit, .kpi-card.kpi-expense, .kpi-card.kpi-cash{
  border-color:rgba(148,163,184,.14)!important;
}
@media (min-width: 1024px){
  .entry-desktop-grid{
    grid-template-columns:minmax(0, 0.95fr) minmax(340px, 0.75fr);
    align-items:start;
  }
  .trade-layout-grid{
    grid-template-columns:minmax(280px, 30%) minmax(0, 70%);
    align-items:start;
    gap:16px;
  }
  #entry_trade .trade-main-col{
    max-width:100%;
  }
  #entry_trade .trade-side-col{
    position:sticky;
    top:76px;
  }
}
@media (max-width: 767px){
  .trade-item .ti-edit-grid{ grid-template-columns:1fr 1fr; }
  .trade-item .ti-foot{ flex-direction:column; align-items:stretch; }
}
.dark .trade-help-box{ background:linear-gradient(180deg, rgba(15,23,42,.9), rgba(6,78,59,.28)); }
.dark .trade-summary-box{ background:linear-gradient(180deg, rgba(15,23,42,.88), rgba(6,78,59,.26)); border-color:rgba(148,163,184,.18); }
.dark .trade-item{ background:linear-gradient(180deg, rgba(15,23,42,.9), rgba(30,41,59,.82)); }


/* Separate trade section + product dropdown layering */
#sec_trade .card,
#sec_trade .trade-box,
#sec_trade .trade-main-col,
#sec_trade .trade-layout-grid{
  overflow: visible;
}
#sec_trade .trade-main-col{
  position: relative;
  z-index: 90;
}
#sec_trade .trade-side-col{
  position: relative;
  z-index: 10;
}
#sec_trade .trade-box{
  position: relative;
  z-index: 120;
}
#sec_trade #tr_prod_res.search-results,
#sec_trade #tr_party_res.search-results,
#sec_trade #tr_vat_res.search-results{
  z-index: 4000;
}
#sec_trade{
  position: relative;
  z-index: 20;
}


/* Trade UX polish */
#sec_trade{
  position: relative;
  z-index: 20;
}
#sec_trade .trade-shell,
#sec_trade .trade-main-col,
#sec_trade .trade-side-col,
#sec_trade .trade-party-card,
#sec_trade .trade-product-card,
#sec_trade .trade-box,
#sec_trade .trade-search-wrap,
#sec_trade .card{
  overflow: visible;
}
#sec_trade .trade-party-card,
#sec_trade .trade-product-card,
#sec_trade .trade-side-col > .card{
  border: 1px solid rgba(148,163,184,.12);
  box-shadow: 0 18px 40px rgba(15,23,42,.06);
}
#sec_trade .trade-party-card{
  position: relative;
  z-index: 130;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(240,249,255,.95));
}
#sec_trade .trade-product-card{
  position: relative;
  z-index: 110;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(236,253,245,.94));
}
#sec_trade .trade-party-wrap{ position: relative; z-index: 4600; }
#sec_trade .trade-product-wrap{ position: relative; z-index: 4400; }
#sec_trade #tr_vat_res.search-results,
#sec_trade #tr_prod_res.search-results,
#sec_trade #tr_party_res.search-results{
  z-index: 5000;
  margin-top: 6px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.18);
  box-shadow: 0 22px 48px rgba(15,23,42,.16);
  backdrop-filter: blur(12px);
}
#sec_trade .trade-help-box{
  min-height: 100%;
  border-style: solid;
  border-color: rgba(14,165,233,.14);
}
#sec_trade .trade-mini-guide div{
  padding: 6px 0;
  border-bottom: 1px dashed rgba(148,163,184,.2);
}
#sec_trade .trade-mini-guide div:last-child{ border-bottom: 0; }
#sec_trade .trade-side-col{ position: relative; z-index: 60; }
#sec_trade .trade-main-col{ position: relative; z-index: 100; }
#sec_trade .inp:focus{
  box-shadow: 0 0 0 4px rgba(16,185,129,.12);
  border-color: rgba(5,150,105,.35);
}
.dark #sec_trade .trade-party-card{
  background: linear-gradient(180deg, rgba(15,23,42,.94), rgba(30,41,59,.88));
}
.dark #sec_trade .trade-product-card{
  background: linear-gradient(180deg, rgba(15,23,42,.94), rgba(6,78,59,.22));
}
.dark #sec_trade #tr_vat_res.search-results,
.dark #sec_trade #tr_prod_res.search-results,
.dark #sec_trade #tr_party_res.search-results{
  background: rgba(2,6,23,.96);
}
@media (max-width: 767px){
  #sec_trade .trade-layout-grid{ gap: 12px; }
  #sec_trade .trade-party-card,
  #sec_trade .trade-product-card,
  #sec_trade .trade-side-col > .card{
    border-radius: 20px;
  }
  #sec_trade .trade-help-box{
    order: 2;
  }
}


/* Trade section rebalance: 30 / 70 desktop */
#sec_trade .trade-shell{
  align-items:start;
}
#sec_trade .trade-main-col{
  display:flex;
  flex-direction:column;
  gap:12px;
}
#sec_trade .trade-side-col{
  display:flex;
  flex-direction:column;
  gap:12px;
}
#sec_trade .trade-party-card,
#sec_trade .trade-product-card,
#sec_trade .trade-side-col > .card{
  margin-top:0 !important;
}
#sec_trade .trade-party-card .grid{
  grid-template-columns:minmax(0,1fr);
}
#sec_trade .trade-help-box{
  min-height:auto;
}
#sec_trade .trade-side-col > .card:first-child{
  margin-top:0;
}
@media (min-width: 1024px){
  #sec_trade .trade-shell{
    grid-template-columns:minmax(280px, 30%) minmax(0, 70%);
  }
  #sec_trade .trade-side-col .card{
    box-shadow:0 18px 40px rgba(15,23,42,.08);
  }
  #sec_trade .trade-main-col .trade-party-card,
  #sec_trade .trade-main-col .trade-product-card{
    border-radius:20px;
  }
  #sec_trade .trade-party-card .grid{
    grid-template-columns:minmax(0,1fr);
    gap:10px;
  }
  #sec_trade .trade-side-col{
    min-width:0;
  }
}


/* Trade final polish: remove blank top space and keep qty/price/remove in one row */
@media (min-width: 1024px){
  #entry_trade{ margin-top: 12px !important; }
  #entry_trade .trade-side-col{
    position: relative !important;
    top: 0 !important;
    align-self: start;
  }
  #sec_trade .trade-side-col > .card:first-child{
    margin-top: 0 !important;
  }
}
#sec_trade .trade-side-col{
  justify-content:flex-start;
}
.trade-item .ti-inline-row{
  display:grid;
  grid-template-columns:minmax(110px,1fr) minmax(140px,1fr) 140px;
  gap:10px;
  align-items:end;
  margin-top:12px;
}
.trade-item .ti-remove-wrap .btn{
  min-height:30px;
  white-space:nowrap;
}
.trade-item .ti-foot{
  margin-top:8px;
}
@media (max-width: 767px){
  .trade-item .ti-inline-row{
    grid-template-columns:1fr 1fr;
  }
  .trade-item .ti-remove-wrap{
    grid-column:1 / -1;
  }
}


/* Dashboard KPI cards: solid standard colors */
#sec_home .kpi-card{
  border:0 !important;
  box-shadow:0 14px 28px rgba(15,23,42,.10);
}
#sec_home .kpi-card::before,
#sec_home .kpi-card::after{
  display:none !important;
  background:none !important;
}
#sec_home .kpi-card .kpi-title,
#sec_home .kpi-card .kpi-value,
#sec_home .kpi-card i{
  color:#fff !important;
}
#sec_home .kpi-card canvas{
  filter:brightness(1.08) contrast(1.02);
}
#sec_home .kpi-card.kpi-cash{ background:#0f766e !important; }
#sec_home .kpi-card.kpi-bank{ background:#1d4ed8 !important; }
#sec_home .kpi-card.kpi-income{ background:#15803d !important; }
#sec_home .kpi-card.kpi-expense{ background:#c2410c !important; }
#sec_home .kpi-card.kpi-profit{ background:#7c3aed !important; }


/* Final mobile polish: white dashboard cards, bigger colored icons, app-like tiles */
@media (max-width: 1023px){
  #sec_home .kpi-card{
    border:0 !important;
    box-shadow:0 12px 28px rgba(15,23,42,.10) !important;
    border-radius:18px !important;
  }
  #sec_home .kpi-card.kpi-cash{ background:#0f766e !important; }
  #sec_home .kpi-card.kpi-bank{ background:#1d4ed8 !important; }
  #sec_home .kpi-card.kpi-income{ background:#15803d !important; }
  #sec_home .kpi-card.kpi-expense{ background:#c2410c !important; }
  #sec_home .kpi-card.kpi-profit{ background:#7c3aed !important; }
  #sec_home .kpi-card .kpi-title{
    color:#ffffff !important;
    font-size:10px !important;
    letter-spacing:.25px !important;
  }
  #sec_home .kpi-card .kpi-value{
    color:#ffffff !important;
    font-size:14px !important;
    font-weight:900 !important;
  }
  #sec_home .kpi-card i{
    width:52px !important;
    height:52px !important;
    border-radius:16px !important;
    font-size:22px !important;
    border-width:0 !important;
    box-shadow:none !important;
    background:rgba(255,255,255,.18) !important;
    color:#ffffff !important;
  }
  #sec_home .kpi-card.kpi-cash i,
  #sec_home .kpi-card.kpi-bank i,
  #sec_home .kpi-card.kpi-income i,
  #sec_home .kpi-card.kpi-expense i,
  #sec_home .kpi-card.kpi-profit i{ background:rgba(255,255,255,.18) !important; color:#ffffff !important; }
  #sec_home .kpi-card canvas{ filter:none !important; opacity:.96; }

  .m-dash-tiles{
    gap:12px !important;
  }
  .dash-tile{
    background:#ffffff !important;
    border:1px solid rgba(15,23,42,.08) !important;
    border-radius:18px !important;
    box-shadow:0 12px 24px rgba(15,23,42,.06) !important;
    padding:14px 10px !important;
    gap:10px !important;
  }
  .dash-ico{
    width:50px !important;
    height:50px !important;
    border-radius:16px !important;
    background:#f8fafc !important;
    border:1px solid rgba(15,23,42,.05) !important;
  }
  .dash-ico i{ font-size:22px !important; }
  .m-dash-tiles .dash-tile:nth-child(1) .dash-ico i{ color:#0f766e !important; }
  .m-dash-tiles .dash-tile:nth-child(2) .dash-ico i{ color:#2563eb !important; }
  .m-dash-tiles .dash-tile:nth-child(3) .dash-ico i{ color:#7c3aed !important; }
  .m-dash-tiles .dash-tile:nth-child(4) .dash-ico i{ color:#ea580c !important; }
  .m-dash-tiles .dash-tile:nth-child(5) .dash-ico i{ color:#15803d !important; }
  .m-dash-tiles .dash-tile:nth-child(6) .dash-ico i{ color:#0891b2 !important; }
  .m-dash-tiles .dash-tile:nth-child(7) .dash-ico i{ color:#dc2626 !important; }
  .m-dash-tiles .dash-tile:nth-child(8) .dash-ico i{ color:#475569 !important; }
  .dash-txt{
    color:#0f172a !important;
    font-size:11px !important;
    line-height:1.15 !important;
  }

  .bottom-nav .nav-btn.active{
    background:rgba(6,78,59,.12) !important;
    color:#064e3b !important;
    border-radius:14px !important;
  }
  .bottom-nav .nav-btn.active i{ color:#064e3b !important; }
}


.entity-profile-shell{max-height:92vh;overflow:auto;border-radius:26px;}
.entity-profile-head{padding:24px;background:#f8fafc;border-bottom:1px solid var(--border);}
.entity-avatar{width:86px;height:86px;border-radius:9999px;background:#0f766e;color:#fff;display:flex;align-items:center;justify-content:center;font-size:30px;font-weight:900;box-shadow:0 14px 34px rgba(15,118,110,.22);}
.entity-stat-card{padding:14px 16px;border:1px solid var(--border);border-radius:18px;background:#fff;}
.entity-info-list{border:1px solid var(--border);border-radius:18px;background:#fff;overflow:hidden;}
.entity-info-row{display:grid;grid-template-columns:180px 1fr;gap:16px;padding:14px 16px;border-bottom:1px solid var(--border);align-items:center;}
.entity-info-row:last-child{border-bottom:none;}
.entity-info-row.align-start{align-items:flex-start;}
.entity-info-label{font-size:11px;font-weight:900;letter-spacing:.04em;text-transform:uppercase;color:#64748b;}
.entity-info-value{font-size:15px;font-weight:700;color:#0f172a;line-height:1.6;word-break:break-word;}
.entity-info-value.multiline{white-space:pre-wrap;min-height:42px;}
.entity-ledger-topbar{display:grid;grid-template-columns:1fr 1fr 220px;gap:12px;align-items:end;}
.entity-ledger-search-wrap{display:flex;align-items:end;}
.entity-ledger-table-wrap{border:1px solid var(--border);border-radius:20px;background:#fff;overflow:hidden;}
.entity-ledger-table-card{background:#fff;}
.entity-ledger-table-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:16px 18px;background:#f8fafc;border-bottom:1px solid var(--border);}
.entity-ledger-caption{font-size:12px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#64748b;}
.entity-ledger-subcaption{font-size:20px;font-weight:900;color:#0f172a;margin-top:3px;}
.entity-ledger-period{font-size:12px;font-weight:800;color:#475569;background:#fff;border:1px solid var(--border);border-radius:999px;padding:8px 12px;}
.entity-ledger-table-scroll{overflow:auto;}
.entity-ledger-table{width:100%;border-collapse:collapse;min-width:920px;}
.entity-ledger-table th,.entity-ledger-table td{padding:11px 12px;border-bottom:1px solid #e2e8f0;font-size:13px;color:#0f172a;vertical-align:top;}
.entity-ledger-table th{background:#0f766e;color:#fff;font-size:12px;font-weight:900;letter-spacing:.03em;text-transform:uppercase;white-space:nowrap;}
.entity-ledger-table tbody tr:nth-child(even){background:#fcfdfd;}
.entity-ledger-table tbody tr:hover{background:#f8fafc;}
.entity-ledger-opening-row td,.entity-ledger-closing-row td{background:#f8fafc;font-weight:800;}
.dark .entity-profile-head,.dark .entity-stat-card,.dark .entity-info-list,.dark .entity-ledger-table-wrap,.dark .entity-ledger-table-card{background:rgba(15,23,42,.72);}
.dark .entity-info-value,.dark .entity-ledger-subcaption,.dark .entity-ledger-table td{color:#e5e7eb;}
.dark .entity-ledger-table th{background:#134e4a;}
@media (max-width: 767px){
  .entity-profile-head{padding:16px;}
  .entity-avatar{width:66px;height:66px;font-size:24px;}
  .entity-info-row{grid-template-columns:1fr;gap:6px;}
  .entity-ledger-topbar{grid-template-columns:1fr;}
  .entity-ledger-table-head{flex-direction:column;align-items:flex-start;}
  .entity-ledger-period{padding:6px 10px;}
  .entity-ledger-table{min-width:760px;}
}


#entity_profile_layer{-webkit-overflow-scrolling:touch;overscroll-behavior:contain;}
.entity-profile-shell{margin:auto;display:flex;flex-direction:column;}
.entity-ledger-table-wrap{max-height:58vh;overflow:auto;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y;}
.entity-ledger-search-wrap{display:flex;align-items:end;}
.entity-mini-icon{width:28px;height:28px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;}
.entity-mini-icon.call{background:rgba(37,99,235,.12);color:#2563eb;}
.entity-mini-icon.wa{background:rgba(16,185,129,.12);color:#059669;}
.entity-ledger-table-wrap .text-right{text-align:right;}
@media (max-width:767px){
  .entity-profile-shell{width:100%;max-height:none;margin:8px 0;}
  .entity-ledger-table-wrap{max-height:50vh;}
  .entity-ledger-search-wrap{width:100%;}
  .entity-ledger-search-wrap .btn{min-height:46px;}
}

/* Final UI compact + contact alignment */
.contact-cell{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:180px;max-width:100%;}
.contact-number{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.contact-actions{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;justify-content:flex-end;min-width:48px;}
.entity-mini-icon{width:24px;height:24px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #dbe4ee;font-size:11px;}
.entity-mini-icon.call{color:#2563eb;background:#eff6ff;}
.entity-mini-icon.wa{color:#16a34a;background:#ecfdf5;}
.entity-profile-balance-pill{display:inline-flex;align-items:center;gap:10px;padding:9px 12px;border-radius:999px;background:#7c3aed;border:1px solid #6d28d9;font-size:12px;font-weight:800;color:#fff;box-shadow:0 10px 24px rgba(124,58,237,.18);}
.entity-profile-balance-pill strong{font-size:14px;color:#fff;}
.entity-ledger-table-wrap{overscroll-behavior:contain;}
#sec_entry > .card,#sec_trade > .card{padding:12px !important;}
#entry_txn{margin-top:10px !important;}
#entry_txn .card,#entry_trade .card{padding:12px !important;border-radius:18px;}
#entry_txn .inp,#entry_trade .inp{padding:5px 5px;min-height:30px;}
#entry_txn .btn,#entry_trade .btn{padding-top:5px;padding-bottom:5px;}
#entry_trade .trade-help-box{padding:10px !important;}
#entry_trade .trade-summary-box{padding:10px !important;}
#entry_trade .space-y-3 > :not([hidden]) ~ :not([hidden]),#entry_txn .space-y-3 > :not([hidden]) ~ :not([hidden]){margin-top:10px;}
@media (max-width:768px){
  .contact-cell{min-width:0;gap:6px;}
  .contact-actions{min-width:46px;gap:5px;}
  .entity-mini-icon{width:22px;height:22px;font-size:10px;}
  #entry_txn .card,#entry_trade .card{padding:10px !important;}
}


.contact-number-btn{
  display:inline-flex;
  align-items:center;
  max-width:100%;
  padding:0;
  background:transparent;
  border:none;
  color:#0f172a;
  font-weight:900;
  text-align:left;
  text-decoration:underline;
  text-decoration-style:dotted;
  text-underline-offset:3px;
}
.dark .contact-number-btn{ color:#e5e7eb; }
.contact-action-sheet{border-radius:24px;box-shadow:0 20px 50px rgba(2,6,23,.18);}
.contact-action-balance{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px 14px;border-radius:16px;background:#f8fafc;border:1px solid var(--border);
  font-weight:800;color:#475569;
}
.contact-action-balance strong{font-size:20px;color:#0f172a;}
.contact-action-btn{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;
  min-height:94px;border-radius:18px;border:1px solid var(--border);font-weight:900;
  background:#fff;color:#0f172a;padding:14px 10px;text-align:center;
}
.contact-action-btn i{font-size:20px;}
.contact-action-btn.call{background:#eff6ff;color:#2563eb;border-color:#bfdbfe;}
.contact-action-btn.wa{background:#ecfdf5;color:#16a34a;border-color:#bbf7d0;}
.contact-action-btn.sms{background:#fff7ed;color:#ea580c;border-color:#fed7aa;}
.contact-action-btn.balance{background:#f5f3ff;color:#7c3aed;border-color:#ddd6fe;}
.contact-action-placeholder{
  display:flex;align-items:center;justify-content:center;gap:10px;
  border:1px dashed #cbd5e1;border-radius:16px;padding:14px 12px;color:#64748b;font-weight:800;
}
.dark .contact-action-balance,.dark .contact-action-btn{background:rgba(15,23,42,.72);border-color:rgba(148,163,184,.18);color:#e5e7eb;}
.dark .contact-action-balance strong{color:#fff;}
.dark .contact-action-btn.call{background:rgba(37,99,235,.18);color:#93c5fd;}
.dark .contact-action-btn.wa{background:rgba(22,163,74,.18);color:#86efac;}
.dark .contact-action-btn.sms{background:rgba(234,88,12,.18);color:#fdba74;}
.dark .contact-action-btn.balance{background:rgba(124,58,237,.18);color:#c4b5fd;}
@media (max-width: 1023px){
  .contact-action-sheet{border-radius:22px 22px 0 0;}
}


/* Mobile ledger layout tuning */
.entity-ledger-date-field{min-width:0;}
.entity-balance-grid{align-items:stretch;}
@media (max-width: 767px){
  .entity-ledger-topbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;align-items:end;}
  .entity-ledger-actions{grid-column:1 / -1;display:grid;grid-template-columns:minmax(0,1fr) 48px 48px;gap:8px;width:100%;}
  .entity-ledger-actions .btn{min-height:44px;}
  .entity-balance-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;}
  .entity-stat-card{padding:12px 12px;border-radius:16px;}
  .entity-stat-card .text-xl{font-size:1rem;line-height:1.25rem;}
  .entity-stat-card .text-\[11px\]{font-size:10px;line-height:1rem;}
}


/* Mobile footer nav colorful app-like styling */
@media (max-width: 1023px){
  .bottom-nav{
    background:#ffffff !important;
    border-top:1px solid rgba(15,23,42,.08) !important;
    box-shadow:0 -10px 26px rgba(15,23,42,.10) !important;
  }
  .bottom-nav-row{ gap:6px !important; }
  .bottom-nav-row .nav-btn{
    border-radius:16px !important;
    padding:9px 4px 8px !important;
    min-height:58px;
    transition:all .18s ease;
  }
  .bottom-nav-row .nav-btn i{
    font-size:17px !important;
    margin-bottom:2px;
  }
  .bottom-nav-row .nav-btn div{
    font-size:9px !important;
    font-weight:800;
  }
  .bottom-nav-row #m_home i{ color:#2563eb !important; }
  .bottom-nav-row #m_accounts i{ color:#7c3aed !important; }
  .bottom-nav-row #m_entry i{ color:#059669 !important; }
  .bottom-nav-row #m_trade i{ color:#ea580c !important; }
  .bottom-nav-row #m_ledger i{ color:#dc2626 !important; }
  .bottom-nav-row #m_settings i{ color:#475569 !important; }
  .bottom-nav-row #m_admin i{ color:#0f172a !important; }

  .bottom-nav-row #m_home.active{ background:rgba(37,99,235,.12) !important; color:#2563eb !important; }
  .bottom-nav-row #m_accounts.active{ background:rgba(124,58,237,.12) !important; color:#7c3aed !important; }
  .bottom-nav-row #m_entry.active{ background:rgba(5,150,105,.12) !important; color:#059669 !important; }
  .bottom-nav-row #m_trade.active{ background:rgba(234,88,12,.12) !important; color:#ea580c !important; }
  .bottom-nav-row #m_ledger.active{ background:rgba(220,38,38,.12) !important; color:#dc2626 !important; }
  .bottom-nav-row #m_settings.active{ background:rgba(71,85,105,.14) !important; color:#334155 !important; }
  .bottom-nav-row #m_admin.active{ background:rgba(15,23,42,.10) !important; color:#0f172a !important; }

  .bottom-nav-row .nav-btn.active i,
  .bottom-nav-row .nav-btn.active div{ color:inherit !important; }
  .bottom-nav-row .nav-btn.active::after{ display:none !important; }
}


html { scroll-behavior: smooth; }

.auth-panel {
  border: 1px solid rgba(15, 118, 110, .12);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .12);
}

.landing-page {
  min-height: 100vh;
  color: #0f172a;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, .16), transparent 26%),
    radial-gradient(circle at top right, rgba(59, 130, 246, .10), transparent 22%),
    linear-gradient(180deg, #f7fffc 0%, #f8fafc 52%, #eefbf6 100%);
}
.landing-shell {
  width: min(1180px, calc(100% - 14px));
  margin: 0 auto;
}
.landing-header {
  position: sticky;
  top: 0;
  z-index: 80;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, .70);
  border-bottom: 1px solid rgba(148, 163, 184, .16);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}
.landing-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 7px 0;
}
.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: inherit;
  text-decoration: none;
}
.landing-brand-badge,
.landing-icon {
  width: 48px;
  height: 48px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 18px 34px rgba(15, 118, 110, .22);
  font-weight: 900;
}
.landing-brand-title { font-size: 1.12rem; font-weight: 900; }
.landing-brand-sub { font-size: .78rem; color: var(--muted); font-weight: 700; }
.landing-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.landing-nav a {
  color: #334155;
  text-decoration: none;
  font-weight: 800;
  padding: .7rem .95rem;
  border-radius: 999px;
  transition: .2s ease;
}
.landing-nav a:hover {
  color: var(--brand);
  background: rgba(15, 118, 110, .08);
}
.landing-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.landing-hero {
  padding: 18px 0 10px;
  position: relative;
  overflow: clip;
}
.landing-hero::before,
.landing-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(6px);
  pointer-events: none;
}
.landing-hero::before {
  width: 280px;
  height: 280px;
  right: 2%;
  top: 2%;
  background: radial-gradient(circle, rgba(16,185,129,.18), transparent 68%);
}
.landing-hero::after {
  width: 220px;
  height: 220px;
  left: -40px;
  bottom: 40px;
  background: radial-gradient(circle, rgba(59,130,246,.12), transparent 72%);
}
.landing-hero-grid,
.landing-about-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 10px;
  align-items: stretch;
}
.landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: .4rem .7rem;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(15,118,110,.14);
  color: var(--brand);
  font-weight: 900;
  margin-bottom: 7px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .05);
}
.landing-title {
  font-size: clamp(2.25rem, 4vw, 4rem);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -.03em;
  margin: 0;
}
.landing-subtitle {
  margin-top: 7px;

  color: #475569;
  font-size: 1.02rem;
  line-height: 1.8;
  font-weight: 700;
}
.landing-cta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.landing-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}
.landing-stat {
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: 1px solid rgba(148,163,184,.12);
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .05);
}
.landing-stat strong { font-size: 1.28rem; }
.landing-stat span { color: #64748b; font-weight: 800; }
.landing-showcase,
.landing-pricing-card,
.landing-about-card,
.landing-final-card,
.landing-feature-card,
.landing-price-card {
  padding: 7px;
  border-radius: 5px;
  border: 1px solid rgba(148,163,184,.12);
  box-shadow: 0 22px 54px rgba(15, 23, 42, .08);
}
.landing-showcase {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(240,253,250,.98));
}
.landing-showcase::after {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(34,197,94,.18), transparent 72%);
}
.landing-showcase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin-bottom: 7px;
}
.landing-mini-title { font-size: 1.15rem; font-weight: 900; }
.landing-mini-sub { color: #64748b; font-weight: 700; font-size: .92rem; }
.landing-chip {
  padding: .45rem .8rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 900;
  background: rgba(15, 118, 110, .12);
  color: var(--brand);
}
.landing-preview-window {
  background: #eff6ff;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 22px;
  padding: 7px;
  margin-bottom: 7px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.landing-preview-topbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.landing-preview-topbar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(16,185,129,.9), rgba(59,130,246,.8));
  opacity: .8;
}
.landing-preview-body {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 7px;
}
.landing-preview-sidebar,
.landing-preview-main {
  display: grid;
  gap: 10px;
}
.landing-preview-sidebar {
  align-content: start;
}
.landing-preview-nav,
.landing-preview-card,
.landing-preview-chart {
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(226,232,240,.76));
}
.landing-preview-nav { height: 24px; }
.landing-preview-nav.short { width: 70%; }
.landing-preview-nav.active {
  background: linear-gradient(135deg, rgba(16,185,129,.9), rgba(59,130,246,.7));
}
.landing-preview-chart { height: 90px; position: relative; overflow: hidden; }
.landing-preview-chart::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 14px; top: 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(16,185,129,.22), rgba(59,130,246,.04));
  clip-path: polygon(0% 88%, 12% 72%, 22% 78%, 36% 48%, 52% 62%, 67% 30%, 82% 44%, 100% 8%, 100% 100%, 0% 100%);
}
.landing-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.landing-preview-card { min-height: 70px; }
.landing-preview-card.tall { grid-column: span 2; min-height: 78px; }
.landing-showcase-list,
.landing-price-list {
  display: grid;
  gap: 7px;
}
.landing-bullet {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--txt);
  font-weight: 700;
  line-height: 1.65;
}
.landing-bullet i { color: var(--brand); margin-top: 3px; }
.landing-trustband {
  padding: 4px 0 7px;
}
.landing-trustband-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.landing-trust-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  border-radius: 20px;
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(148,163,184,.12);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
  font-weight: 900;
  color: #0f172a;
}
.landing-trust-item i { color: var(--brand); }
.landing-section {
  padding: 10px 0;
}
.landing-section-soft { padding-bottom: 12px; }
.landing-section-head {
  margin-bottom: 7px;
  text-align: center;
}
.landing-section-head.left { text-align: left; }
.landing-section-head h2 {
  margin: 0 0 8px;
  font-size: 1.95rem;
  font-weight: 900;
  letter-spacing: -.02em;
}
.landing-section-head p {
  margin: 0 auto;
  max-width: 62ch;
  color: #64748b;
  font-weight: 700;
  line-height: 1.75;
}
.landing-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.landing-feature-card,
.landing-price-card,
.landing-about-card {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.landing-feature-card:hover,
.landing-price-card:hover,
.landing-about-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 60px rgba(15, 23, 42, .10);
  border-color: rgba(15,118,110,.18);
}
.landing-feature-card h3,
.landing-price-plan,
.landing-price-amount,
.landing-final-card h2 {
  margin: 0 0 8px;
  font-weight: 900;
}
.landing-feature-card h3,
.landing-price-plan { font-size: 1.08rem; }
.landing-feature-card p,
.landing-price-note,
.landing-about-copy,
.landing-final-card p {
  margin: 0;
  color: #64748b;
  font-weight: 700;
  line-height: 1.72;
}
.landing-price-card {
  display: grid;
  gap: 7px;
  justify-items: start;
}
.landing-price-card.featured {
  background: linear-gradient(145deg, rgba(15,118,110,.96), rgba(30,64,175,.92));
  color: #fff;
  transform: translateY(-6px);
}
.landing-price-card.featured .landing-price-note,
.landing-price-card.featured .landing-price-list,
.landing-price-card.featured .landing-price-plan { color: rgba(255,255,255,.94); }
.landing-price-card.featured .btn-primary {
  background: #fff;
  color: var(--brand) !important;
}
.landing-price-amount {
  font-size: 2.1rem;
  letter-spacing: -.03em;
}
.landing-price-list {
  padding-left: 1.1rem;
  margin: 0;
}
.landing-price-list li { line-height: 1.8; font-weight: 800; }
.landing-about-card {
  display: grid;
  gap: 7px;
  background: linear-gradient(160deg, rgba(255,255,255,.96), rgba(239,246,255,.82));
}
.landing-final {
  padding: 7px 0 14px;
}
.landing-final-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(135deg, rgba(15,23,42,.98), rgba(15,118,110,.95));
  color: #fff;
  position: relative;
  overflow: hidden;
}
.landing-final-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -90px;
  bottom: -110px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,.14), transparent 72%);
}
.landing-final-card p { color: rgba(255,255,255,.86); }
.landing-final-card .btn.border { color: #fff; border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.06); }

@media (max-width: 1023px) {
  .landing-header-row,
  .landing-final-card,
  .landing-hero-grid,
  .landing-about-grid,
  .landing-grid-3,
  .landing-trustband-grid {
    grid-template-columns: 1fr;
    display: grid;
  }
  .landing-header-row { gap: 14px; }
  .landing-nav { gap: 12px; }
  .landing-actions { justify-content: flex-start; }
  .landing-hero { padding-top: 34px; }
  .landing-stats { grid-template-columns: 1fr; }
  .landing-price-card.featured { transform: none; }
}

@media (max-width: 767px) {
  .landing-shell { width: min(100% - 12px, 1180px); }
  .landing-nav { display: none; }
  .landing-title { font-size: 2.2rem; }
  .landing-feature-card,
  .landing-price-card,
  .landing-about-card,
  .landing-final-card,
  .landing-showcase,
  .landing-trust-item { padding: 7px; }
  .landing-preview-body { grid-template-columns: 1fr; }
  .landing-preview-sidebar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}



/* landing tightening */
.landing-shell{padding-left:7px;padding-right:7px;}
.landing-header{padding:6px 0;}
.landing-section,.landing-hero,.landing-final{padding-top:7px;padding-bottom:7px;}
.landing-showcase,.landing-price-card,.landing-about-card,.landing-final-card,.landing-feature-card{padding:7px !important;}
.landing-showcase-list,.landing-stats,.landing-cta,.landing-showcase-head{gap:7px !important;margin-top:7px;}
.landing-slider-wrap{margin-bottom:7px;}
.landing-preview-window{display:none !important;}

/* streamlined landing */
.landing-stats,.landing-showcase-copy,.landing-about-points{display:none !important;}
#landing_pricing_cards{max-width:560px;margin:0 auto;}
.admin-subtab{display:none;}
.admin-subtab.is-active{display:block;}
.admin-tab-btn.is-active{background:var(--brand);color:#fff;border-color:var(--brand);}

/* Entity profile refresh */
.entity-profile-shell-lg{max-height:94vh;border-radius:30px;box-shadow:0 32px 80px rgba(2,6,23,.28);}
.entity-profile-head{
  padding:26px 28px;
  background:linear-gradient(135deg,#f8fafc 0%,#eefbf7 52%,#f5f3ff 100%);
  border-bottom:1px solid rgba(15,23,42,.08);
}
.entity-profile-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center;}
.entity-profile-main{display:flex;align-items:center;gap:18px;min-width:0;}
.entity-profile-side{display:flex;align-items:flex-start;gap:12px;}
.entity-avatar{
  width:94px;height:94px;font-size:32px;
  background:linear-gradient(135deg,#0f766e 0%,#14b8a6 100%);
  box-shadow:0 20px 42px rgba(13,148,136,.28);
}
.entity-profile-meta{display:flex;flex-wrap:wrap;gap:10px;}
.entity-meta-chip{
  display:inline-flex;align-items:center;gap:8px;
  padding:10px 14px;border-radius:999px;
  background:rgba(255,255,255,.85);border:1px solid rgba(148,163,184,.22);
  color:#0f172a;font-size:12px;font-weight:800;box-shadow:0 10px 24px rgba(15,23,42,.06);
}
.entity-meta-chip i{color:#0f766e;}
.entity-balance-hero{
  min-width:260px;max-width:320px;
  padding:18px 20px;border-radius:24px;
  background:linear-gradient(135deg,#0f172a 0%,#1d4ed8 100%);
  color:#fff;box-shadow:0 22px 46px rgba(30,64,175,.22);
}
.entity-balance-hero-label{font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:rgba(255,255,255,.72);}
.entity-balance-hero strong{display:block;font-size:28px;line-height:1.2;font-weight:900;margin-top:8px;color:#fff;}
.entity-balance-hero-sub{margin-top:8px;font-size:12px;line-height:1.55;color:rgba(255,255,255,.82);word-break:break-word;}
.entity-profile-close-btn{
  width:44px;height:44px;border-radius:18px;border:1px solid rgba(148,163,184,.25);
  background:rgba(255,255,255,.92);display:flex;align-items:center;justify-content:center;
  color:#0f172a;box-shadow:0 12px 26px rgba(15,23,42,.10);
}
.entity-tab-row .pill{min-height:44px;padding-left:18px;padding-right:18px;font-weight:900;}
.entity-profile-content-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(280px,.95fr);gap:18px;align-items:start;}
.entity-info-card,.entity-edit-card,.entity-ledger-panel,.entity-profile-summary-card{
  background:#fff;border:1px solid rgba(148,163,184,.18);border-radius:24px;box-shadow:0 16px 34px rgba(15,23,42,.06);
}
.entity-profile-summary-column{display:flex;flex-direction:column;gap:14px;}
.entity-profile-summary-balance{background:linear-gradient(135deg,#ecfeff 0%,#ecfdf5 100%);}
.entity-profile-mini-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.entity-profile-summary-card{padding:18px;}
.entity-summary-title{font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#64748b;}
.entity-summary-amount{font-size:30px;font-weight:900;line-height:1.2;color:#0f172a;margin-top:10px;word-break:break-word;}
.entity-summary-note{margin-top:8px;font-size:12px;font-weight:700;color:#475569;}
.entity-summary-value{font-size:18px;font-weight:900;line-height:1.4;color:#0f172a;margin-top:10px;word-break:break-word;}
.entity-summary-text{margin-top:10px;font-size:14px;line-height:1.7;color:#0f172a;white-space:pre-wrap;word-break:break-word;}
.entity-note-alert{
  min-height:42px;padding:12px 14px;border-radius:18px;
  background:#fff7ed;border:1px solid #fed7aa;color:#b45309;
  font-size:12px;font-weight:800;line-height:1.55;
}
.entity-dark-btn{background:linear-gradient(135deg,#0f172a 0%,#334155 100%) !important;}
.entity-danger-btn{background:linear-gradient(135deg,#b91c1c 0%,#ef4444 100%) !important;}
.entity-ledger-panel{padding:14px;}
.entity-ledger-topbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:12px;align-items:end;}
.entity-ledger-bulkbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:14px;padding-top:14px;border-top:1px dashed #dbe4ee;}
.entity-check-chip{display:inline-flex;align-items:center;gap:10px;padding:10px 14px;border-radius:999px;background:#f8fafc;border:1px solid rgba(148,163,184,.24);font-size:12px;font-weight:900;color:#0f172a;}
.entity-check-chip input{width:16px;height:16px;accent-color:#0f766e;}
.entity-selected-count{font-size:12px;font-weight:900;color:#475569;}
.entity-stat-accent{background:linear-gradient(135deg,#f8fafc 0%,#eff6ff 100%);}
.entity-stat-accent-secondary{background:linear-gradient(135deg,#f5f3ff 0%,#eef2ff 100%);}
.entity-ledger-table-wrap{border-radius:24px;border:1px solid rgba(148,163,184,.16);box-shadow:0 18px 34px rgba(15,23,42,.06);}
.entity-ledger-table-head{padding:18px 20px;background:linear-gradient(135deg,#f8fafc 0%,#f0fdfa 100%);}
.entity-ledger-period{background:#fff;border-color:rgba(148,163,184,.18);box-shadow:0 10px 20px rgba(15,23,42,.05);}
.entity-ledger-table th{background:linear-gradient(135deg,#0f766e 0%,#0f172a 100%);}
.entity-ledger-table tbody tr:hover{background:#f1f5f9;}
.entity-ledger-check{width:16px;height:16px;accent-color:#0f766e;cursor:pointer;}
.entity-ledger-empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:38px 18px;color:#64748b;font-size:14px;font-weight:900;background:linear-gradient(135deg,#f8fafc 0%,#f0fdfa 100%);}
.entity-ledger-empty-state i{font-size:26px;color:#0f766e;}
.dark #entity_profile_layer .card,
.dark .entity-info-card,
.dark .entity-edit-card,
.dark .entity-ledger-panel,
.dark .entity-profile-summary-card,
.dark .entity-ledger-table-wrap,
.dark .entity-ledger-table-card{background:rgba(15,23,42,.9);border-color:rgba(148,163,184,.16);}
.dark .entity-profile-head{background:linear-gradient(135deg,rgba(15,23,42,.98) 0%,rgba(15,118,110,.18) 50%,rgba(76,29,149,.22) 100%);}
.dark .entity-profile-name,.dark .entity-summary-amount,.dark .entity-summary-value,.dark .entity-summary-text,.dark .entity-info-value,.dark .entity-selected-count{color:#e5e7eb;}
.dark .entity-meta-chip,.dark .entity-check-chip,.dark .entity-note-alert,.dark .entity-stat-accent,.dark .entity-stat-accent-secondary{background:rgba(30,41,59,.9);color:#e5e7eb;border-color:rgba(148,163,184,.16);}
.dark .entity-ledger-table-head,.dark .entity-ledger-empty-state{background:rgba(30,41,59,.9);}
.dark .entity-profile-close-btn{background:rgba(15,23,42,.88);color:#e5e7eb;border-color:rgba(148,163,184,.2);}
@media (max-width: 1023px){
  .entity-profile-shell-lg{max-height:none;border-radius:26px;}
  .entity-profile-head{padding:18px;}
  .entity-profile-hero,.entity-profile-content-grid{grid-template-columns:1fr;}
  .entity-profile-main{align-items:flex-start;}
  .entity-profile-side{justify-content:space-between;align-items:flex-start;}
  .entity-balance-hero{min-width:0;max-width:none;width:100%;}
}
@media (max-width: 767px){
  .entity-avatar{width:72px;height:72px;font-size:26px;}
  .entity-meta-chip{width:100%;justify-content:flex-start;}
  .entity-profile-mini-grid{grid-template-columns:1fr;}
  .entity-ledger-topbar{grid-template-columns:1fr;}
  .entity-ledger-bulkbar{align-items:stretch;}
  .entity-ledger-bulkbar > *{width:100%;}
  .entity-profile-side{gap:10px;}
  .entity-profile-close-btn{flex:0 0 44px;}
}


/* Classic customer/supplier profile redesign */
.entity-profile-classic-shell{max-height:94vh;border-radius:0;box-shadow:0 30px 80px rgba(2,6,23,.32);border:1px solid rgba(15,23,42,.18);background:#e8edf2;}
.entity-profile-windowbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:5px 12px;background:#404040;color:#fff;border-bottom:1px solid rgba(255,255,255,.08);}
.entity-windowbar-title{font-size:14px;font-weight:900;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.entity-windowbar-title span{color:#61d836;}
.entity-windowbar-actions{display:flex;align-items:center;gap:8px;}
.entity-windowbar-icon{width:28px;height:28px;border:none;border-radius:6px;background:transparent;color:#54f050;display:flex;align-items:center;justify-content:center;font-size:18px;cursor:pointer;}
.entity-windowbar-icon:hover{background:rgba(255,255,255,.08);}
.entity-profile-classic-head{padding:0;background:#dfe4ea;border-bottom:1px solid #bcc7d1;}
.entity-profile-navstrip{display:flex;align-items:center;gap:6px;padding:6px 8px;background:linear-gradient(180deg,#eef4f7 0%,#e3edf3 100%);border-bottom:1px solid #c8d5df;overflow:auto;}
.entity-classic-tab{border:1px solid #c9d7e2;background:linear-gradient(180deg,#ffffff 0%,#f4f8fb 100%);color:#335166;font-size:14px;font-weight:700;padding:7px 14px;cursor:pointer;border-radius:7px;white-space:nowrap;transition:all .18s ease;box-shadow:inset 0 1px 0 rgba(255,255,255,.85);}
.entity-classic-tab:hover{background:linear-gradient(180deg,#f8fcff 0%,#eaf4fa 100%);color:#0f5f73;border-color:#b7cad8;}
.entity-classic-tab.active{background:linear-gradient(180deg,#0f7c90 0%,#0d6375 100%);color:#fff;font-weight:800;border-color:#0d6375;box-shadow:0 6px 14px rgba(15,124,144,.18);}
.entity-profile-classic-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:18px 18px 14px;}
.entity-profile-classic-main{display:flex;align-items:center;gap:18px;min-width:0;flex:1;}
.entity-classic-logo-box{width:92px;height:92px;border:1px solid #b9c3ce;background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden;flex:0 0 auto;}
.entity-classic-logo-img{width:100%;height:100%;object-fit:contain;background:#fff;}
.entity-avatar.entity-avatar-fallback{width:72px;height:72px;border-radius:16px;box-shadow:none;background:#0f766e;}
.entity-classic-kicker{font-size:11px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;color:#64748b;}
.entity-classic-name{font-size:26px;line-height:1.15;font-weight:800;color:#1f2937;margin-top:2px;word-break:break-word;}
.entity-classic-sub{font-size:14px;font-weight:700;color:#56616d;margin-top:4px;}
.entity-classic-meta{display:flex;flex-wrap:wrap;gap:10px;}
.entity-meta-chip{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;background:#f8fafc;border:1px solid #cdd7e1;color:#334155;font-weight:700;}
.entity-profile-classic-side{display:flex;align-items:flex-start;justify-content:flex-end;min-width:250px;}
.entity-classic-balance-hero{background:transparent;border:none;border-radius:0;padding:0;box-shadow:none;text-align:right;max-width:340px;}
.entity-classic-balance-hero .entity-balance-hero-label{font-size:12px;font-weight:700;color:#5b6570;letter-spacing:.02em;}
.entity-classic-balance-hero strong{font-size:22px;font-weight:900;color:#1f2937;display:block;margin-top:6px;}
.entity-classic-balance-hero .entity-balance-hero-sub{font-size:12px;color:#5b6570;margin-top:8px;line-height:1.45;}
.entity-profile-classic-content{padding:10px 10px 14px;background:#eef2f5;}
.entity-classic-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(290px,.78fr);gap:12px;align-items:start;}
.entity-classic-panel{background:#fff;border:1px solid #c7d1db;box-shadow:0 10px 20px rgba(15,23,42,.05);}
.entity-classic-panel-title{background:linear-gradient(180deg,#0f7c90 0%,#0d6375 100%);color:#fff;text-align:center;font-size:13px;font-weight:800;padding:7px 10px;letter-spacing:.01em;}
.entity-classic-info-panel{padding:0 0 12px;}
.entity-info-classic-table{border:none;border-radius:0;box-shadow:none;}
.entity-info-classic-table .entity-info-row{grid-template-columns:170px 1fr;gap:0;padding:0;min-height:40px;background:#f8fafc;border-bottom:1px solid #d3dbe3;}
.entity-info-classic-table .entity-info-row:nth-child(even){background:#ffffff;}
.entity-info-classic-table .entity-info-label{display:flex;align-items:center;padding:9px 12px;background:#eef2f6;border-right:1px solid #d3dbe3;text-transform:none;letter-spacing:0;color:#334155;font-size:12px;}
.entity-info-classic-table .entity-info-value{padding:9px 12px;font-size:15px;font-weight:500;color:#1f2937;line-height:1.45;}
.entity-info-classic-table .entity-info-value.multiline{min-height:84px;display:flex;align-items:flex-start;}
.entity-classic-info-panel .entity-note-alert,.entity-classic-info-panel .flex{margin-left:12px;margin-right:12px;}
.entity-classic-chart-panel{padding:0 0 12px;background:#f8fafc;}
.entity-classic-summary-card{margin:12px;border-radius:0;border:1px solid #d3dbe3;box-shadow:none;background:#fff;}
.entity-profile-summary-card{padding:14px 16px;border:1px solid #d3dbe3;border-radius:16px;background:#fff;}
.entity-summary-title{font-size:11px;font-weight:900;color:#64748b;text-transform:uppercase;letter-spacing:.05em;}
.entity-summary-amount{font-size:28px;font-weight:900;color:#111827;line-height:1.15;margin-top:8px;word-break:break-word;}
.entity-summary-note,.entity-summary-value,.entity-summary-text{color:#475569;line-height:1.5;}
.entity-classic-chart-card{margin:0 12px 12px;background:#fff;border:1px solid #d3dbe3;padding:12px 12px 10px;}
.entity-classic-chart-legend{display:flex;align-items:center;justify-content:center;gap:8px;color:#4b5563;font-size:13px;font-weight:700;margin-bottom:8px;}
.entity-classic-chart-swatch{width:34px;height:12px;background:#8c8c8c;display:inline-block;}
.entity-classic-chart-bars{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:end;min-height:190px;padding:10px 12px 2px;background:linear-gradient(to top,#fff,#fff),repeating-linear-gradient(to top,#e5e7eb 0,#e5e7eb 1px,transparent 1px,transparent 38px);background-blend-mode:normal;border:1px solid #e5e7eb;}
.entity-classic-bar-col{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:8px;min-height:164px;}
.entity-classic-bar-amount{font-size:12px;font-weight:700;color:#475569;min-height:18px;}
.entity-classic-bar-track{height:118px;width:70px;display:flex;align-items:flex-end;justify-content:center;border-left:1px solid #e5e7eb;border-right:1px solid #e5e7eb;}
.entity-classic-bar{display:block;width:54px;height:0;border-radius:0;transition:height .25s ease;}
.entity-classic-bar.debit{background:#d6d6d6;}
.entity-classic-bar.credit{background:#ff5d37;}
.entity-classic-bar-label{font-size:14px;font-weight:500;color:#374151;}
.entity-classic-mini-grid{margin:0 12px 12px;display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.entity-classic-chart-panel .entity-profile-note-card{margin:0 12px;}
.entity-classic-edit-card{background:#fff;border:1px solid #c7d1db;padding:16px;}
.entity-classic-ledger-panel{background:#fff;border:1px solid #c7d1db;border-radius:0;padding:12px;box-shadow:0 10px 20px rgba(15,23,42,.05);}
.entity-ledger-table-wrap{border:1px solid #c7d1db;border-radius:0;background:#fff;}
.entity-ledger-table-card{background:#fff;}
.entity-ledger-table-head{padding:14px 16px;background:linear-gradient(180deg,#f5fafc 0%,#eaf4f8 100%);border-bottom:1px solid #c7d1db;}
.entity-ledger-caption{color:#64748b;}
.entity-ledger-subcaption{font-size:22px;color:#0f172a;}
.entity-ledger-period{background:#fff;border-color:#c7d1db;color:#475569;}
.entity-ledger-table th{background:linear-gradient(180deg,#0f7c90 0%,#0d6375 100%);color:#fff;}
.entity-ledger-table tbody tr:nth-child(even){background:#fafcfd;}
.entity-ledger-table tbody tr:hover{background:#f2f6f9;}
.entity-ledger-opening-row td,.entity-ledger-closing-row td{background:#eef3f6;}
@media (max-width:991px){
  .entity-classic-grid{grid-template-columns:1fr;}
  .entity-profile-classic-side{min-width:0;}
}
@media (max-width:767px){
  .entity-profile-windowbar{padding:6px 10px;}
  .entity-windowbar-title{font-size:13px;}
  .entity-profile-classic-hero{flex-direction:column;align-items:flex-start;padding:14px 12px 12px;}
  .entity-profile-classic-main{width:100%;gap:12px;}
  .entity-classic-logo-box{width:78px;height:78px;}
  .entity-classic-name{font-size:22px;}
  .entity-profile-classic-side{width:100%;justify-content:flex-start;}
  .entity-classic-balance-hero{text-align:left;max-width:none;}
  .entity-profile-classic-content{padding:8px;}
  .entity-info-classic-table .entity-info-row{grid-template-columns:1fr;}
  .entity-info-classic-table .entity-info-label{border-right:none;border-bottom:1px solid #d3dbe3;}
  .entity-classic-bar-track{width:58px;}
  .entity-classic-bar{width:42px;}
  .entity-classic-mini-grid{grid-template-columns:1fr;}
}
.dark .entity-profile-classic-shell{background:#0f172a;border-color:rgba(148,163,184,.2);}
.dark .entity-profile-classic-head,.dark .entity-profile-classic-content{background:#0f172a;}
.dark .entity-profile-navstrip{background:#1e293b;border-color:rgba(148,163,184,.18);}
.dark .entity-classic-tab{color:#e5e7eb;border-color:rgba(148,163,184,.18);}
.dark .entity-classic-panel,.dark .entity-classic-summary-card,.dark .entity-classic-chart-card,.dark .entity-profile-summary-card,.dark .entity-classic-ledger-panel,.dark .entity-ledger-table-wrap{background:rgba(15,23,42,.76);border-color:rgba(148,163,184,.18);}
.dark .entity-info-classic-table .entity-info-row,.dark .entity-info-classic-table .entity-info-label{background:transparent;border-color:rgba(148,163,184,.18);}
.dark .entity-info-classic-table .entity-info-value,.dark .entity-classic-name,.dark .entity-classic-balance-hero strong,.dark .entity-summary-amount,.dark .entity-classic-bar-label{color:#f8fafc;}
.dark .entity-classic-sub,.dark .entity-classic-balance-hero .entity-balance-hero-sub,.dark .entity-summary-note,.dark .entity-summary-value,.dark .entity-summary-text,.dark .entity-classic-chart-legend,.dark .entity-classic-bar-amount{color:#cbd5e1;}
.dark .entity-ledger-table-head{background:rgba(30,41,59,.92);border-color:rgba(148,163,184,.18);}

/* Simplified profile popup + improved scrolling */
#entity_profile_layer{align-items:center;}
.entity-profile-classic-shell{
  width:min(1120px,100%);
  height:min(calc(100dvh - 24px), 900px);
  max-height:min(calc(100dvh - 24px), 900px);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.entity-profile-classic-head{flex:0 0 auto;background:#eef2f5;}
.entity-profile-simple-content{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  padding:12px;
  -webkit-overflow-scrolling:touch;
}
.entity-profile-simple-hero{padding:14px 16px 10px;gap:16px;}
.entity-simple-logo-box{width:74px;height:74px;border-radius:10px;}
.entity-profile-inline-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;}
.entity-inline-pill{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid #cbd5e1;border-radius:999px;background:#fff;color:#334155;font-size:12px;font-weight:700;}
.entity-profile-simple-side{min-width:220px;}
.entity-simple-balance{background:#fff;border:1px solid #cbd5e1;border-radius:14px;padding:14px 16px;text-align:right;box-shadow:0 6px 18px rgba(15,23,42,.05);}
.entity-profile-simple-tabs{gap:8px;padding:10px 14px;background:#eef2f5;border-bottom:none;}
.entity-classic-tab{border:none;border-radius:999px;background:#fff;color:#334155;font-size:13px;font-weight:700;padding:8px 16px;box-shadow:inset 0 0 0 1px #cbd5e1;}
.entity-classic-tab.active{background:#0f766e;color:#fff;box-shadow:none;}
.entity-simple-grid{grid-template-columns:minmax(0,1.1fr) minmax(260px,.72fr);gap:14px;}
.entity-simple-info-panel,.entity-simple-summary-panel,.entity-classic-edit-card,.entity-classic-ledger-panel,.entity-ledger-table-wrap{border-radius:16px;overflow:hidden;}
.entity-simple-summary-panel{padding-bottom:12px;background:#fff;}
.entity-simple-chart-card{display:grid;gap:12px;margin:0 12px 12px;padding:14px;border-radius:14px;border:1px solid #dbe4ee;background:#f8fafc;}
.entity-simple-chart-row{display:grid;grid-template-columns:minmax(92px,120px) 1fr;gap:12px;align-items:center;}
.entity-simple-amount{font-size:15px;font-weight:800;color:#0f172a;}
.entity-simple-bar-track{height:14px;border-radius:999px;background:#e2e8f0;overflow:hidden;position:relative;}
.entity-simple-bar-track .entity-classic-bar{height:100% !important;width:0;display:block;border-radius:999px;transition:width .25s ease;}
.entity-simple-bar-track .entity-classic-bar.debit{background:#cbd5e1;}
.entity-simple-bar-track .entity-classic-bar.credit{background:#10b981;}
.entity-info-classic-table .entity-info-row{min-height:42px;}
.entity-profile-classic-content .entity-profile-mini-grid,
.entity-profile-classic-content .entity-profile-note-card,
.entity-profile-classic-content .entity-classic-chart-legend,
.entity-profile-classic-content .entity-classic-chart-bars,
.entity-profile-classic-content .entity-profile-meta{display:none !important;}
.entity-classic-info-panel .entity-note-alert,.entity-classic-info-panel .flex{margin-left:14px;margin-right:14px;}
.entity-ledger-topbar{display:grid;grid-template-columns:repeat(2,minmax(0,170px)) minmax(0,1fr);gap:12px;align-items:end;}
.entity-ledger-actions{justify-content:flex-end;}
.entity-ledger-bulkbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:12px;padding-top:12px;border-top:1px solid #e2e8f0;}
.entity-ledger-table-wrap{border:1px solid #dbe4ee;background:#fff;box-shadow:none;}
.entity-ledger-table-card{background:#fff;}
.entity-ledger-table-head{padding:12px 14px;background:#fff;border-bottom:1px solid #e2e8f0;display:flex;align-items:center;justify-content:space-between;gap:10px;}
.entity-ledger-caption{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:#64748b;}
.entity-ledger-subcaption{font-size:16px;font-weight:800;color:#0f172a;}
.entity-ledger-period{padding:7px 10px;border-radius:999px;border:1px solid #dbe4ee;background:#f8fafc;font-size:12px;font-weight:700;}
.entity-ledger-table-scroll{overflow:auto;}
.entity-ledger-table{width:100%;min-width:760px;border-collapse:collapse;font-size:12px;}
.entity-ledger-table th,.entity-ledger-table td{padding:10px 12px;border-bottom:1px solid #e2e8f0;vertical-align:top;color:#0f172a;}
.entity-ledger-table th{background:#f8fafc;color:#475569;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap;}
.entity-ledger-table tbody tr:nth-child(even){background:#fbfdff;}
.entity-ledger-table tbody tr:hover{background:#f8fafc;}
.entity-ledger-check{width:16px;height:16px;accent-color:#0f766e;}
.entity-ledger-desc-title{font-weight:700;color:#0f172a;line-height:1.35;}
.entity-ledger-desc-meta{display:block;font-size:11px;color:#64748b;margin-top:2px;line-height:1.35;}
.entity-ledger-opening-row td,.entity-ledger-closing-row td{background:#f8fafc;font-weight:800;}
@media (max-width: 991px){
  .entity-profile-classic-shell{height:min(calc(100dvh - 14px), 900px);max-height:min(calc(100dvh - 14px), 900px);}
  .entity-simple-grid{grid-template-columns:1fr;}
  .entity-ledger-topbar{grid-template-columns:1fr 1fr;}
  .entity-ledger-actions{grid-column:1 / -1;justify-content:stretch;}
}
@media (max-width: 767px){
  #entity_profile_layer{padding:6px;align-items:stretch;}
  .entity-profile-classic-shell{width:100%;height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);border-radius:18px;}
  .entity-profile-simple-content{padding:10px;}
  .entity-profile-simple-hero{padding:12px;flex-direction:column;align-items:flex-start;}
  .entity-profile-simple-side{width:100%;min-width:0;}
  .entity-simple-balance{text-align:left;width:100%;}
  .entity-profile-simple-tabs{padding:8px 10px;position:sticky;top:0;z-index:2;}
  .entity-ledger-topbar{grid-template-columns:1fr;}
  .entity-ledger-bulkbar{align-items:flex-start;}
  .entity-ledger-table{min-width:640px;}
}
.dark .entity-profile-simple-content,.dark .entity-profile-classic-head{background:#0f172a;}
.dark .entity-inline-pill,.dark .entity-simple-balance,.dark .entity-simple-summary-panel,.dark .entity-simple-chart-card,.dark .entity-ledger-table-wrap,.dark .entity-classic-edit-card,.dark .entity-classic-info-panel,.dark .entity-classic-ledger-panel{background:rgba(15,23,42,.9);border-color:rgba(148,163,184,.18);}
.dark .entity-classic-tab{background:rgba(15,23,42,.9);color:#e5e7eb;box-shadow:inset 0 0 0 1px rgba(148,163,184,.2);}
.dark .entity-ledger-table th,.dark .entity-ledger-opening-row td,.dark .entity-ledger-closing-row td{background:rgba(30,41,59,.9);color:#cbd5e1;}
.dark .entity-ledger-table td,.dark .entity-ledger-subcaption,.dark .entity-simple-amount,.dark .entity-ledger-desc-title{color:#f8fafc;}
.dark .entity-ledger-period,.dark .entity-simple-bar-track{border-color:rgba(148,163,184,.18);background:rgba(30,41,59,.9);color:#cbd5e1;}
.dark .entity-ledger-desc-meta,.dark .entity-inline-pill,.dark .entity-balance-hero-sub{color:#cbd5e1;}

/* compact smooth entity profile refresh */
#entity_profile_layer{overflow-y:auto;-webkit-overflow-scrolling:touch;}
#entity_profile_layer .entity-profile-classic-shell{width:min(1120px,100%);max-height:min(calc(100dvh - 12px),920px);height:min(calc(100dvh - 12px),920px);border-radius:7px !important;border:1px solid #d8e0e8;background:#f8fafc;box-shadow:0 14px 40px rgba(15,23,42,.16);overflow:hidden;}
#entity_profile_layer .entity-profile-windowbar{padding:3px 8px;background:#334155;}
#entity_profile_layer .entity-profile-classic-head{padding:0;background:#f1f5f9;border-bottom:1px solid #dde5ec;}
#entity_profile_layer .entity-profile-simple-hero{padding:8px 10px;gap:10px;}
#entity_profile_layer .entity-profile-classic-main{gap:8px;align-items:center;}
#entity_profile_layer .entity-initials-box{width:48px;height:48px;border:none;background:transparent;display:flex;align-items:center;justify-content:center;}
#entity_profile_layer .entity-avatar.entity-avatar-fallback{display:flex !important;width:42px;height:42px;border-radius:7px;background:linear-gradient(135deg,#0f766e 0%,#0ea5a4 100%);color:#fff;font-size:16px;font-weight:900;box-shadow:none;}
#entity_profile_layer .entity-classic-kicker{font-size:10px;letter-spacing:.08em;margin:0;}
#entity_profile_layer .entity-classic-name{font-size:22px;line-height:1.1;margin:0;}
#entity_profile_layer .entity-profile-inline-meta{gap:4px;margin-top:4px;}
#entity_profile_layer .entity-inline-pill{padding:2px 6px;border-radius:999px;font-size:11px;min-height:auto;}
#entity_profile_layer .entity-profile-inline-stack{display:flex;flex-wrap:wrap;align-items:center;}
#entity_profile_layer .entity-phone-pill i{font-size:10px;}
#entity_profile_layer .entity-profile-simple-side{min-width:200px;}
#entity_profile_layer .entity-simple-balance{padding:6px 8px;border-radius:7px;border:1px solid #d9e2ec;background:#fff;box-shadow:none;}
#entity_profile_layer .entity-balance-hero-label{font-size:10px;line-height:1.1;}
#entity_profile_layer .entity-classic-balance-hero strong{font-size:24px;line-height:1.1;display:block;margin-top:2px;}
#entity_profile_layer .entity-balance-hero-sub-empty{display:none !important;}
#entity_profile_layer .entity-profile-simple-tabs{gap:6px;padding:6px 8px;background:#eef2f6;border-top:1px solid #dde5ec;}
#entity_profile_layer .entity-classic-tab{padding:4px 10px;border-radius:7px;font-size:12px;box-shadow:inset 0 0 0 1px #d3dde7;background:#fff;}
#entity_profile_layer .entity-profile-simple-content{flex:1 1 auto;overflow:auto;padding:8px;-webkit-overflow-scrolling:touch;}
#entity_profile_layer .entity-profile-content-grid{grid-template-columns:minmax(0,1.2fr) minmax(220px,.8fr);gap:8px;}
#entity_profile_layer .entity-classic-panel,
#entity_profile_layer .entity-profile-summary-card,
#entity_profile_layer .entity-classic-chart-card,
#entity_profile_layer .entity-classic-edit-card,
#entity_profile_layer .entity-classic-ledger-panel,
#entity_profile_layer .entity-ledger-table-wrap,
#entity_profile_layer .entity-stat-card{border-radius:7px !important;box-shadow:none;border:1px solid #dde5ec;}
#entity_profile_layer .entity-classic-panel-title,
#entity_profile_layer .entity-ledger-caption{font-size:10px;letter-spacing:.05em;}
#entity_profile_layer .entity-info-list{padding:0;}
#entity_profile_layer .entity-info-row{padding:6px 8px;min-height:auto;}
#entity_profile_layer .entity-info-label{font-size:11px;}
#entity_profile_layer .entity-info-value{font-size:12px;line-height:1.35;}
#entity_profile_layer .entity-note-alert{margin-top:6px !important;padding:6px 8px;border-radius:7px;}
#entity_profile_layer .entity-classic-info-panel .flex{margin-left:8px;margin-right:8px;margin-top:6px !important;gap:6px;}
#entity_profile_layer .entity-classic-info-panel .btn,
#entity_profile_layer .entity-classic-ledger-panel .btn,
#entity_profile_layer #entity_profile_edit_box .btn{padding:6px 10px !important;border-radius:7px;min-height:auto;}
#entity_profile_layer .entity-profile-summary-card{padding:8px;}
#entity_profile_layer .entity-simple-chart-card{margin:0 8px 8px;padding:8px;border-radius:7px;gap:8px;}
#entity_profile_layer .entity-simple-chart-row{gap:8px;}
#entity_profile_layer .entity-simple-amount{font-size:13px;}
#entity_profile_layer .entity-ledger-panel{padding:8px;}
#entity_profile_layer .entity-ledger-topbar{grid-template-columns:repeat(2,minmax(0,160px)) minmax(0,1fr);gap:8px;}
#entity_profile_layer .entity-ledger-bulkbar{margin-top:8px;padding-top:8px;gap:8px;}
#entity_profile_layer .entity-ledger-table-head{padding:8px 10px;}
#entity_profile_layer .entity-ledger-subcaption{font-size:14px;}
#entity_profile_layer .entity-ledger-period{padding:3px 8px;border-radius:999px;font-size:11px;}
#entity_profile_layer .entity-ledger-table{min-width:100%;font-size:12px;}
#entity_profile_layer .entity-ledger-table th,
#entity_profile_layer .entity-ledger-table td{padding:6px 8px;font-size:12px;}
#entity_profile_layer .entity-ledger-table th{font-size:10px;}
#entity_profile_layer .entity-ledger-table-wrap{max-height:none;overflow:auto;}
#entity_profile_layer .entity-balance-grid{gap:8px;}
#entity_profile_layer .entity-balance-grid .text-xl{font-size:18px;line-height:1.15;}
#entity_profile_layer .inp{padding:6px 8px;border-radius:7px;min-height:auto;}
#entity_profile_layer textarea.inp{min-height:84px;}
#entity_profile_layer .text-[11px]{font-size:10px !important;}
#entity_profile_layer .mt-3{margin-top:6px !important;}
#entity_profile_layer .space-y-4 > :not([hidden]) ~ :not([hidden]){margin-top:8px;}
@media (max-width: 768px){
  #entity_profile_layer{padding:4px;}
  #entity_profile_layer .entity-profile-classic-shell{height:calc(100dvh - 8px);max-height:calc(100dvh - 8px);border-radius:6px !important;}
  #entity_profile_layer .entity-profile-simple-hero{padding:8px;flex-direction:row;align-items:flex-start;justify-content:space-between;}
  #entity_profile_layer .entity-profile-content-grid{grid-template-columns:1fr;}
  #entity_profile_layer .entity-profile-simple-side{min-width:0;width:auto;}
  #entity_profile_layer .entity-simple-balance{text-align:right;}
  #entity_profile_layer .entity-ledger-topbar{grid-template-columns:1fr;}
  #entity_profile_layer .entity-ledger-actions{grid-column:auto;display:grid;grid-template-columns:minmax(0,1fr) 40px 40px;gap:6px;}
  #entity_profile_layer .entity-ledger-table{min-width:640px;}
}

.entity-classic-tab:focus-visible{outline:2px solid rgba(15,124,144,.28);outline-offset:1px;}
