/* AdvocateDesk / EduDesk stylesheet.
   Cleaned: duplicate declarations removed (each property set once per selector and media query).
   Rules are still applied in source order; later rules win, so edit with care.
   Theme colours come from the :root variables that the app sets at runtime. */
:root {
  --ink: #1e293b;
  --bg: #f1f5f9;
  --ln: #e2e8f0;
  --side: #1e1b4b;
  --g0: #4f46e5;
  --g1: #0ea5e9;
  --g2: #10b981;
  --g3: #f59e0b;
  --g4: #ec4899;
  --g5: #8b5cf6;
  --g6: #64748b;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font: 14px/1.5 system-ui,"Segoe UI",Roboto,sans-serif;
  color: var(--ink);
  display: flex;
  min-height: 100vh;
}
aside {
  color: var(--sfg,#cbd5e1);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  flex: none;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  color: var(--sfgh,#fff);
  min-width: 0;
}
.brand img {
  width: 56px;
  height: 56px;
  flex: none;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 1px 4px #0004;
}
.brand .ico {
  width: 56px;
  height: 56px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: #ffffff26;
  border-radius: 10px;
}
.brand span {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.brand.dark {
  color: #0f172a;
}
aside a {
  text-decoration: none;
}
aside a.on {
  border-left-color: var(--g);
}
main {
  flex: 1;
}
header {
  color: #fff;
  text-shadow: 0 1px 2px #0005;
  display: flex;
  align-items: center;
}
header h1 {
  margin: 0;
}
header small {
  margin-right: auto;
}
#mb {
  display: none;
  padding: 6px 10px;
}
.net {
  font-size: 12px;
  background: #0003;
  padding: 2px 10px;
  border-radius: 99px;
}
section {
  padding: 18px 22px;
}
.bar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.bar input,.bar select {
  flex: 1;
  min-width: 140px;
}
input,select,textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  font: inherit;
  background: #fff;
}
button,.btn {
  background: var(--c,#4f46e5);
  color: #fff;
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.ghost {
  background: #e2e8f0;
  color: var(--ink);
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {
  outline: 3px solid #93c5fd;
}
.tw {
  background: #fff;
  border: 1px solid var(--ln);
  border-radius: 8px;
  overflow: auto;
  margin-bottom: 16px;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  background: color-mix(in srgb,var(--c) 12%,#fff);
  text-align: left;
  padding: 9px 12px;
  white-space: nowrap;
}
td {
  padding: 8px 12px;
  border-top: 1px solid var(--ln);
}
tr:hover td {
  background: #f8fafc;
}
.ac a {
  cursor: pointer;
  margin-right: 10px;
  color: var(--c);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.ac a.del {
  color: #ef4444;
}
.empty {
  padding: 26px;
  text-align: center;
  color: #64748b;
}
.pill {
  background: color-mix(in srgb,var(--p) 15%,#fff);
  color: var(--p);
  padding: 2px 10px;
  white-space: nowrap;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(170px,1fr));
  margin-bottom: 16px;
}
.card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--ln);
  border-top: 4px solid var(--p);
}
.card b {
  font-size: 24px;
  display: block;
}
.card span {
  color: #64748b;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(300px,1fr));
}
.pn {
  background: #fff;
  border: 1px solid var(--ln);
  border-radius: 8px;
}
.pn h2 {
  margin: 0 0 10px;
  font-size: 16px;
}
.br {
  display: grid;
  grid-template-columns: 120px 1fr 30px;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
}
.br i {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: var(--p);
}
.tg {
  background: #e2e8f0;
  color: var(--ink);
  margin-right: 6px;
}
.tg.onP {
  background: #10b981;
  color: #fff;
}
.tg.onA {
  background: #ef4444;
  color: #fff;
}
dialog {
  border: 0;
  padding: 20px;
  width: min(520px,94vw);
  max-height: 92vh;
}
dialog::backdrop {
  background: #0008;
}
dialog label {
  display: block;
  font-weight: 600;
  margin: 8px 0;
}
dialog label>* {
  margin-top: 3px;
  font-weight: 400;
}
dialog.w {
  width: min(960px,96vw);
}
.g2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.g2 .pn {
  margin-bottom: 12px;
}
.pn h3 {
  margin: 0 0 8px;
  font-size: 15px;
}
.tl {
  border-left: 3px solid #cbd5e1;
  padding: 3px 0 3px 10px;
  margin: 8px 0;
}
.tl p {
  margin: 2px 0;
  white-space: pre-wrap;
}
.nl {
  cursor: pointer;
  color: var(--c);
  font-weight: 700;
  text-decoration: underline;
}
.mut {
  color: #64748b;
}
@media(max-width:760px) {
  .g2 {
    grid-template-columns: 1fr;
  }
}
.dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  padding: 0;
  border: 2px solid #fff;
  margin-left: 4px;
  vertical-align: middle;
}
.lg {
  max-height: 44px;
  max-width: 150px;
  border-radius: 6px;
  vertical-align: middle;
  margin-right: 6px;
}
.cell-p {
  color: #059669;
  font-weight: 700;
}
.cell-a {
  color: #dc2626;
  font-weight: 700;
}
.mx td,.mx th {
  padding: 6px 5px;
  text-align: center;
}
.mx td:first-child,.mx th:first-child {
  text-align: left;
  white-space: nowrap;
  position: sticky;
  left: 0;
  background: #fff;
}
#bd {
  display: none;
}
.cols2 {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 14px;
}
.cp {
  display: block;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ln);
  cursor: pointer;
}
.cp.on {
  background: color-mix(in srgb,var(--c) 14%,#fff);
  font-weight: 600;
}
.cmsg {
  align-self: flex-start;
  white-space: pre-wrap;
}
@media(max-width:760px) {
  .cols2 {
    grid-template-columns: 1fr;
  }
}
@media(max-width:820px) {
  aside {
    left: 0;
    top: 0;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .2s,visibility .2s;
  }
  aside.open {
    transform: none;
    visibility: visible;
    box-shadow: 4px 0 24px #0005;
  }
  #bd.on {
    display: block;
    position: fixed;
    inset: 0;
    background: #0006;
  }
  input,select,textarea {
    font-size: 16px;
  }
  .bar button,.bar .btn {
    text-align: center;
  }
  dialog,dialog.w {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  td,th {
    padding: 8px;
  }
}
:root {
  color-scheme: light;
}
body {
  letter-spacing: .005em;
}
.gh {
  margin-top: 18px;
}
aside a {
  border-left: 0;
}
aside a.on {
  border-left: 0;
}
header {
  min-height: 72px;
  padding: 12px 22px;
  gap: 12px;
}
header small {
  font-size: 12px;
  opacity: .78;
}
header .net {
  white-space: nowrap;
  padding: 6px 11px;
  background: #ffffff24;
  border: 1px solid #ffffff25;
}
button,.btn {
  border-radius: 10px;
  padding: 10px 15px;
  box-shadow: 0 2px 5px #0f172a12;
  transition: filter .15s,transform .15s,box-shadow .15s;
}
button:hover,.btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 5px 12px #0f172a18;
}
button:active,.btn:active {
  transform: translateY(0);
}
.ghost {
  border: 1px solid #dbe2ea;
}
input,select,textarea {
  border-radius: 10px;
  padding: 10px 12px;
}
input:focus,select:focus,textarea:focus {
  border-color: var(--c);
  box-shadow: 0 0 0 3px color-mix(in srgb,var(--c) 15%,transparent);
  outline: 0;
}
.tw,.pn,.card {
  border-radius: 14px;
  box-shadow: 0 4px 18px #0f172a08;
}
.pn {
  padding: 17px;
}
.card {
  padding: 15px 17px;
  transition: transform .15s,box-shadow .15s;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 24px #0f172a12;
}
.cards {
  gap: 14px;
}
.grid {
  gap: 18px;
}
th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .045em;
}
td {
  vertical-align: middle;
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
#mb {
  border-radius: 10px;
  background: #ffffff25;
  min-width: 42px;
  min-height: 42px;
}
@media(max-width:820px) {
  header {
    display: flex;
    flex-wrap: wrap;
  }
  header h1 {
    flex: 1 1 calc(100% - 64px);
  }
  header small {
    display: none;
  }
  header .net {
    order: 3;
    margin-left: auto;
    padding: 5px 8px;
  }
  .grid {
    grid-template-columns: minmax(0,1fr);
    gap: 12px;
  }
  table {
    min-width: 620px;
  }
  .bar>* {
    min-width: 0;
    flex: 1 1 145px;
  }
  .bar button,.bar .btn {
    min-height: 42px;
  }
  .g2 {
    grid-template-columns: minmax(0,1fr);
  }
  .cols2 {
    grid-template-columns: minmax(0,1fr);
  }
  dialog,dialog.w {
    padding: 18px 14px;
  }
}
@media(max-width:420px) {
  header h1 {
    font-size: 16px;
  }
  .cards {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .card b {
    font-size: 18px;
  }
  .card span {
    font-size: 11px;
  }
  .bar>* {
    flex-basis: 100%;
  }
}
aside {
  width: 258px;
  padding: 18px 13px 14px;
  background: linear-gradient(180deg,var(--side),color-mix(in srgb,var(--side) 91%,#000 9%));
  box-shadow: 8px 0 28px #0f172a16;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brand {
  margin: 2px 5px 18px;
  padding: 10px 9px 16px;
  border-bottom: 1px solid color-mix(in srgb,var(--sfgh) 13%,transparent);
  gap: 11px;
}
.brand img,.brand .ico {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}
.brand span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.brand span b {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.brand .brand-sub {
  font-size: 10px;
  opacity: .65;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.side-caption {
  padding: 2px 12px 7px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
  color: var(--sfg);
  opacity: .48;
}
.gh {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 15px 9px 6px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--sfg);
  opacity: .72;
}
.gh i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--g);
  box-shadow: 0 0 0 3px color-mix(in srgb,var(--g) 17%,transparent);
}
aside a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 2px 0;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--sfg);
  transition: background .16s,border-color .16s,transform .16s,color .16s;
}
aside a:hover {
  background: color-mix(in srgb,var(--sfgh) 8%,transparent);
  border-color: color-mix(in srgb,var(--sfgh) 8%,transparent);
  transform: translateX(2px);
}
aside a.on {
  background: linear-gradient(100deg,color-mix(in srgb,var(--g) 24%,transparent),color-mix(in srgb,var(--g) 9%,transparent));
  border-color: color-mix(in srgb,var(--g) 28%,transparent);
  color: var(--sfgh);
  box-shadow: inset 3px 0 var(--g),0 5px 14px #00000012;
}
.nav-ico {
  width: 29px;
  height: 29px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: color-mix(in srgb,var(--sfgh) 8%,transparent);
  line-height: 1;
}
aside a.on .nav-ico {
  background: var(--g);
  color: white;
  box-shadow: 0 3px 9px color-mix(in srgb,var(--g) 40%,transparent);
}
.nav-label {
  flex: 1;
  min-width: 0;
}
.nav-arrow {
  font-size: 20px;
  line-height: 1;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .16s,transform .16s;
}
aside a:hover .nav-arrow,aside a.on .nav-arrow {
  opacity: .6;
  transform: translateX(0);
}
aside a .pill {
  margin-left: auto;
}
.side-bottom {
  margin-top: auto;
  padding-top: 12px;
}
.side-divider {
  height: 1px;
  margin: 5px 8px 10px;
  background: color-mix(in srgb,var(--sfgh) 13%,transparent);
}
aside .logout-link:hover {
  background: #ef44441a;
  border-color: #ef444433;
  color: #fca5a5;
}
@media(max-width:820px) {
  aside {
    box-shadow: 18px 0 45px #0003;
  }
  .brand {
    margin-bottom: 12px;
  }
  .gh {
    margin-top: 12px;
  }
  .nav-ico {
    width: 31px;
    height: 31px;
  }
}
:root {
  --ui-font-family: system-ui,"Segoe UI",Roboto,sans-serif;
  --ui-font-size: 14px;
  --ui-line-height: 1.5;
  --sidebar-font-family: Inter,"Segoe UI",system-ui,sans-serif;
  --sidebar-font-size: 13px;
  --sidebar-line-height: 1.4;
}
body {
  font-family: var(--ui-font-family);
  font-size: var(--ui-font-size);
  line-height: var(--ui-line-height);
}
input,select,textarea,button,.btn,table {
  font-family: var(--ui-font-family);
}
aside {
  font-family: var(--sidebar-font-family);
  font-size: var(--sidebar-font-size);
  line-height: var(--sidebar-line-height);
}
aside .brand,aside .side-caption,aside .gh,aside a {
  font-family: inherit;
}
aside a {
  font-size: var(--sidebar-font-size);
  line-height: var(--sidebar-line-height);
}
aside .brand span b {
  font-family: inherit;
  font-weight: 800;
  letter-spacing: -.025em;
}
aside .gh {
  font-size: 10px;
  letter-spacing: .12em;
}
.typography-card .font-preview {
  margin-top: 13px;
  padding: 14px 15px;
  border: 1px dashed var(--ln);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
}
.typography-card .font-preview b {
  display: block;
  margin-bottom: 5px;
  font-size: 1.1em;
}
.typography-card .font-preview small {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: .9em;
}
.side-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 5px 12px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb,var(--sfgh) 15%,transparent);
  border-radius: 11px;
  background: color-mix(in srgb,var(--sfgh) 7%,transparent);
}
.side-search span {
  opacity: .7;
  font-size: 14px;
}
.side-search input {
  min-width: 0;
  width: 100%;
  padding: 3px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--sfgh);
  font: inherit;
  font-size: 12px;
  box-shadow: none;
}
.side-search input::placeholder {
  color: var(--sfg);
  opacity: .7;
}
aside a {
  min-height: 42px;
  font-weight: 650;
  letter-spacing: .008em;
}
aside a.on .nav-label {
  font-weight: 800;
}
.side-empty {
  display: none;
  padding: 10px 12px;
  color: var(--sfg);
  opacity: .7;
  font-size: 12px;
}
.settings-layout>.pn,.settings-layout>.settings-card {
  min-width: 0;
  margin: 0 !important;
  padding: 13px 14px;
}
.settings-layout input:not([type=file]),.settings-layout select,.settings-layout textarea {
  min-width: 0;
  min-height: 36px;
  padding: 7px 9px;
  font-size: 13px;
  border-radius: 8px;
}
.settings-layout .font-preview b {
  margin-bottom: 2px;
}
.settings-layout .font-preview small {
  margin-top: 2px;
}
.settings-layout .bar {
  gap: 7px;
  margin: 8px 0 0;
}
.settings-layout button,.settings-layout .btn {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 8px;
}
.settings-institute .settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 5px;
}
.settings-layout .settings-password form label:first-child {
  grid-column: 1/-1;
}
.settings-layout .settings-password form #pm {
  grid-column: 1/-1;
  margin: 0;
}
@media(max-width:760px) {
  .settings-layout {
    grid-template-columns: minmax(0,1fr);
    gap: 9px;
  }
  .settings-layout>.pn,.settings-layout>.settings-card {
    padding: 11px 12px;
  }
  .settings-layout>.settings-institute {
    grid-column: auto;
  }
  .settings-institute .settings-fields {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 0 8px;
  }
  .settings-layout .g2 {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 7px 8px;
  }
  .settings-layout .font-preview {
    padding: 7px 9px;
  }
  .settings-layout .settings-password form {
    grid-template-columns: minmax(0,1fr);
    gap: 0;
  }
  .settings-layout .settings-password form label:first-child,.settings-layout .settings-password form #pm {
    grid-column: auto;
  }
}
@media(max-width:390px) {
  .settings-institute .settings-fields,.settings-layout .g2 {
    grid-template-columns: minmax(0,1fr);
  }
}
.global-search-dialog {
  width: min(760px,calc(100vw - 28px));
  max-width: 760px;
  max-height: min(78vh,720px);
  height: auto;
  margin: 8vh auto;
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  padding: 0;
  box-shadow: 0 24px 80px #0f172a40;
}
.global-search-dialog::backdrop {
  background: #0b1220a8;
  backdrop-filter: blur(3px);
}
.gs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 18px 10px;
}
.gs-head b {
  display: block;
  font-size: 17px;
}
.gs-head small {
  display: block;
  color: #64748b;
  margin-top: 2px;
}
.gs-controls {
  display: grid;
  grid-template-columns: minmax(0,1fr) 170px;
  gap: 9px;
  padding: 8px 18px 14px;
}
.gs-controls input {
  min-width: 0;
}
.gs-results {
  max-height: 52vh;
  overflow: auto;
  border-top: 1px solid #e2e8f0;
  padding: 6px 10px;
}
.gs-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 11px 10px;
  min-height: 56px;
  border-radius: 10px;
  color: #1e293b;
}
.gs-row:hover,.gs-row.active {
  background: #eef2ff;
  transform: none;
  box-shadow: none;
}
.gs-type {
  width: 105px;
  flex: none;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
}
.gs-main {
  min-width: 0;
  flex: 1;
}
.gs-main b,.gs-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gs-main small {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}
.gs-arrow {
  color: #64748b;
}
.gs-empty {
  padding: 28px 12px;
  text-align: center;
  color: #64748b;
}
.gs-foot {
  display: flex;
  gap: 18px;
  justify-content: flex-end;
  padding: 10px 18px;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 11px;
}
.global-search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
  max-width: 280px;
  flex: 1;
  background: #ffffff1c;
  color: inherit;
  border: 1px solid #ffffff55;
  box-shadow: none;
  text-align: left;
  padding: 8px 11px;
}
.global-search-trigger kbd {
  margin-left: auto;
  border: 1px solid #ffffff55;
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 10px;
  opacity: .85;
}
.enq-wrap {
  display: grid;
  gap: 14px;
}
.enq-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.enq-top h2 {
  font-size: 22px;
  margin: 2px 0;
}
.enq-top p {
  margin: 0;
}
.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  color: #64748b;
}
.enq-kpis {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 10px;
}
.enq-kpis .pn {
  margin: 0;
  padding: 14px 15px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 3px 12px #0f172a08;
}
.enq-kpis small,.enq-kpis span {
  display: block;
  color: #64748b;
}
.enq-kpis b {
  display: block;
  font-size: 27px;
  line-height: 1.2;
  margin: 5px 0;
}
.enq-kpis .warn,.warn {
  color: #dc2626 !important;
}
.pipeline,.smart-panel,.enq-list,.source-summary {
  margin: 0;
}
.pipeline-title,.smart-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.pipeline h3,.smart-panel h3,.source-summary h3 {
  margin: 0 0 3px;
}
.pipeline-stages {
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  gap: 8px;
  margin-top: 12px;
}
.stage {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
  background: #f8fafc;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  box-shadow: none;
  padding: 10px;
  border-radius: 10px;
}
.stage b {
  font-size: 22px;
}
.stage span {
  font-size: 12px;
  font-weight: 700;
}
.stage small {
  color: #64748b;
}
.stage.selected {
  border-color: #4f46e5;
  background: #eef2ff;
  color: #3730a3;
}
.smart-panel {
  border: 1px solid #c7d2fe;
  background: linear-gradient(135deg,#f8faff,#fff);
}
.free-tag {
  font-size: 9px;
  background: #dcfce7;
  color: #166534;
  border-radius: 20px;
  padding: 4px 7px;
  vertical-align: middle;
}
.smart-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.smart-stats span {
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
}
.smart-leads {
  display: grid;
  gap: 6px;
}
.smart-lead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  background: #fff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}
.smart-lead span {
  min-width: 0;
}
.smart-lead b,.smart-lead small {
  display: block;
}
.smart-lead small {
  font-size: 11px;
  color: #64748b;
  white-space: normal;
  margin-top: 3px;
}
.smart-lead strong {
  white-space: nowrap;
  color: #4338ca;
}
.enq-filters {
  display: grid;
  grid-template-columns: minmax(180px,2fr) repeat(3,minmax(120px,1fr)) auto;
  gap: 8px;
  align-items: center;
}
.enq-filters input,.enq-filters select {
  min-width: 0;
}
.enq-table-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0 8px;
}
.enq-row {
  cursor: pointer;
}
.enq-row:hover {
  background: #f8fafc;
}
.subline {
  display: block;
  color: #64748b;
  font-size: 11px;
}
.score {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
}
.score.high {
  background: #fee2e2;
  color: #991b1b;
}
.score.mid {
  background: #fef3c7;
  color: #92400e;
}
.score.low {
  background: #dcfce7;
  color: #166534;
}
.source-line {
  display: grid;
  grid-template-columns: 150px minmax(0,1fr) 35px;
  align-items: center;
  gap: 10px;
  margin: 9px 0;
  font-size: 12px;
}
.source-line div {
  height: 8px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}
.source-line i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg,#4f46e5,#0ea5e9);
  border-radius: 10px;
}
.toggle-line {
  display: flex !important;
  align-items: center;
  gap: 9px;
  font-weight: 600 !important;
}
.toggle-line input {
  width: auto !important;
}
@media(max-width:850px) {
  .enq-kpis {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .pipeline-stages {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .enq-filters {
    grid-template-columns: 1fr 1fr;
  }
  .enq-filters input {
    grid-column: 1/-1;
  }
}
@media(max-width:560px) {
  .global-search-dialog {
    width: calc(100vw - 14px);
    margin: 4vh auto;
    max-height: 88vh;
  }
  .gs-controls {
    grid-template-columns: 1fr;
    padding: 8px 12px;
  }
  .gs-head {
    padding: 13px 12px;
  }
  .gs-results {
    max-height: 60vh;
    padding: 5px;
  }
  .gs-type {
    width: 75px;
    font-size: 9px;
  }
  .gs-foot {
    gap: 9px;
    padding: 9px 12px;
  }
  .global-search-trigger {
    min-width: 0;
    max-width: none;
  }
  .global-search-trigger kbd {
    display: none;
  }
  .enq-kpis {
    gap: 7px;
  }
  .enq-kpis .pn {
    padding: 10px;
  }
  .enq-kpis b {
    font-size: 23px;
  }
  .pipeline-stages {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .enq-filters {
    grid-template-columns: 1fr;
  }
  .enq-filters input {
    grid-column: auto;
  }
  .source-line {
    grid-template-columns: 100px minmax(0,1fr) 28px;
  }
  .enq-top h2 {
    font-size: 19px;
  }
}
:root {
  --panel-shadow: 0 8px 26px rgba(15,23,42,.055);
  --panel-radius: 16px;
}
#app>div>section {
  padding: 22px clamp(12px,2vw,28px) 34px;
  max-width: 1680px;
  margin: 0 auto;
}
#app .pn,#app .card,.enq-wrap .pn {
  border: 1px solid var(--ln);
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
  background: var(--panel,var(--bg2,#fff));
}
#app .pn {
  padding: 18px;
  margin: 0 0 16px;
}
#app .bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
#app .bar input,#app .bar select {
  min-width: 180px;
  flex: 1;
}
#app h2 {
  font-size: clamp(16px,1.2vw,19px);
  font-weight: 800;
  letter-spacing: -.025em;
  margin: 0 0 13px;
}
#app h3 {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -.015em;
}
#app .tw {
  border: 1px solid var(--ln);
  border-radius: 14px;
  overflow: auto;
  background: var(--panel,#fff);
  box-shadow: var(--panel-shadow);
  margin-bottom: 16px;
}
#app table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 620px;
}
#app th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-weight: 800;
  text-transform: uppercase;
  padding: 13px 14px;
  border-bottom: 1px solid var(--ln);
}
#app td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--ln);
  font-size: 13px;
  vertical-align: middle;
}
#app tbody tr {
  transition: background .15s;
}
#app tbody tr:last-child td {
  border-bottom: 0;
}
#app input:not([type=checkbox]):not([type=color]):not([type=file]),#app select,#app textarea {
  border-radius: 10px;
  border: 1px solid var(--ln);
  background: var(--panel,#fff);
  min-height: 39px;
}
#app button,.btn {
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: .005em;
}
#app .card {
  padding: 17px 18px;
  min-height: 100px;
  position: relative;
  overflow: hidden;
}
#app .card:after {
  content: "";
  position: absolute;
  right: -18px;
  top: -25px;
  width: 85px;
  height: 85px;
  border-radius: 50%;
  background: var(--p);
  opacity: .09;
}
#app .cards {
  gap: 13px;
  margin-bottom: 16px;
}
#app .empty {
  padding: 26px 16px;
  text-align: center;
  border: 1px dashed var(--ln);
  border-radius: 13px;
}
#app header {
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 18px rgba(15,23,42,.05);
}
.smart-workspace {
  border: 1px solid color-mix(in srgb,#6366f1 25%,var(--ln));
  background: linear-gradient(125deg,color-mix(in srgb,#6366f1 7%,var(--panel,#fff)),var(--panel,#fff));
  border-radius: 15px;
  padding: 14px 16px;
  margin: 0 0 16px;
  box-shadow: 0 7px 22px rgba(79,70,229,.055);
}
.smart-workspace .sw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.smart-workspace .sw-title {
  font-weight: 800;
  font-size: 13px;
  color: var(--ink);
}
.smart-workspace .sw-chip {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #4f46e5;
  background: #eef2ff;
  border-radius: 20px;
  padding: 5px 8px;
}
.smart-workspace ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 6px 22px;
}
.smart-workspace li {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
}
@media(max-width:700px) {
  #app>div>section {
    padding: 13px 10px 24px;
  }
  #app .pn {
    padding: 13px;
    margin-bottom: 12px;
  }
  #app .bar input,#app .bar select {
    min-width: 100%;
    flex-basis: 100%;
  }
  .smart-workspace ul {
    grid-template-columns: 1fr;
  }
  #app .card {
    min-height: 86px;
    padding: 13px;
  }
}
th.srt {
  cursor: pointer;
  user-select: none;
}
th.srt:hover {
  color: var(--sfgh,#0f172a);
}
th.srt::after {
  content: ' \21C5';
  opacity: .35;
  font-size: .9em;
}
th.srt.asc::after {
  content: ' \25B2';
  opacity: 1;
}
th.srt.desc::after {
  content: ' \25BC';
  opacity: 1;
}
.chh {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.chh h2 {
  margin: 0;
}
.chsel {
  width: auto;
  max-width: 100%;
  font-size: 13px;
  padding: 5px 8px;
}
.pie {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.pie svg {
  width: 180px;
  height: 180px;
  flex: none;
}
.pl {
  flex: 1 1 150px;
  min-width: 0;
}
.pl div {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 4px 0;
}
.pl i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: none;
}
.fkg {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(170px,1fr));
  gap: 10px;
}
.fk {
  background: var(--bg,#f1f5f9);
  border-radius: 10px;
  padding: 10px 14px;
}
.fk small {
  display: block;
  color: #64748b;
}
.fk b {
  font-size: 22px;
  display: block;
}
.fk span {
  font-size: 12px;
  color: #64748b;
}
.fctl {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.fctl select,.fctl input {
  width: auto;
}
.fee-profile {
  margin-top: 12px;
}
.fee-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(145px,1fr));
  gap: 9px;
  margin: 10px 0;
}
.fee-metric {
  background: var(--bg);
  border: 1px solid var(--ln);
  border-radius: 11px;
  padding: 11px;
}
.fee-metric small {
  display: block;
  color: #64748b;
  font-size: 11px;
}
.fee-metric b {
  display: block;
  font-size: 20px;
  overflow-wrap: anywhere;
}
.fee-table {
  max-height: 320px;
  overflow: auto;
}
.fee-table table {
  min-width: 570px;
}
.fee-pay-form {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px;
  align-items: end;
}
.fee-pay-form label {
  font-size: 12px;
}
.fee-pay-form button {
  grid-column: 1/-1;
  justify-self: start;
}
.cf-settings {
  margin-top: 12px;
}
.cf-settings table {
  min-width: 600px;
}
@media(max-width:620px) {
  .fee-pay-form {
    grid-template-columns: 1fr;
  }
  .fee-pay-form button {
    grid-column: auto;
  }
}
dialog.profile-dialog {
  height: auto;
  background: #f8fafc;
  overscroll-behavior: contain;
}
dialog.profile-dialog .profile-head {
  position: sticky;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid var(--ln);
  box-shadow: 0 4px 12px #0f172a0b;
}
dialog.profile-dialog .profile-head-main {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}
dialog.profile-dialog .profile-head-main h2 {
  overflow-wrap: anywhere;
}
dialog.profile-dialog .profile-head-main .mut {
  overflow-wrap: anywhere;
}
dialog.profile-dialog .profile-close {
  flex: none;
}
dialog.profile-dialog .profile-columns {
  display: grid;
  align-items: start;
}
dialog.profile-dialog .profile-columns>div {
  min-width: 0;
}
dialog.profile-dialog .profile-actions,dialog.profile-dialog .profile-main {
  display: grid;
  min-width: 0;
}
dialog.profile-dialog .pn {
  min-width: 0;
  margin: 0;
  overflow: hidden;
}
dialog.profile-dialog .profile-details .profile-detail-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
}
dialog.profile-dialog .profile-detail-item {
  min-width: 0;
  border: 1px solid var(--ln);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
dialog.profile-dialog .profile-detail-item span {
  color: #64748b;
  font-weight: 600;
  line-height: 1.3;
}
dialog.profile-dialog .profile-detail-item b {
  font-weight: 650;
  overflow-wrap: anywhere;
  word-break: break-word;
}
dialog.profile-dialog .fee-metrics {
  grid-template-columns: repeat(auto-fit,minmax(min(100%,155px),1fr));
  gap: 8px;
}
dialog.profile-dialog .fee-metric {
  min-width: 0;
  padding: 10px;
}
dialog.profile-dialog .fee-metric b {
  font-size: clamp(16px,1.7vw,20px);
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}
dialog.profile-dialog .fee-table {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--ln);
  border-radius: 9px;
  background: #fff;
  overscroll-behavior-x: contain;
}
dialog.profile-dialog .fee-table table {
  min-width: 650px;
  width: 100%;
  font-size: 12px;
}
dialog.profile-dialog .fee-table th,dialog.profile-dialog .fee-table td {
  padding: 8px 9px;
  white-space: nowrap;
}
dialog.profile-dialog .fee-pay-form {
  grid-template-columns: repeat(2,minmax(0,1fr));
}
dialog.profile-dialog .fee-pay-form label {
  min-width: 0;
  overflow-wrap: anywhere;
}
dialog.profile-dialog .fee-pay-form input,dialog.profile-dialog .fee-pay-form select {
  min-width: 0;
}
dialog.profile-dialog .tl {
  overflow-wrap: anywhere;
  word-break: break-word;
}
dialog.profile-dialog .profile-main>.pn>p,dialog.profile-dialog .profile-main .mut {
  overflow-wrap: anywhere;
}
@media(max-width:900px) {
  dialog.profile-dialog .profile-columns {
    grid-template-columns: minmax(0,1fr);
  }
  dialog.profile-dialog .profile-actions {
    grid-template-columns: repeat(2,minmax(0,1fr));
    align-items: start;
  }
}
@media(max-width:620px) {
  dialog.profile-dialog,dialog.profile-dialog.w {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
    padding: 12px;
    overflow-y: auto;
  }
  dialog.profile-dialog .profile-head {
    top: -12px;
    margin: -12px -12px 12px;
    padding: 12px;
    gap: 8px;
  }
  dialog.profile-dialog .profile-head-main h2 {
    font-size: 18px;
  }
  dialog.profile-dialog .profile-head-main .mut {
    font-size: 12px;
  }
  dialog.profile-dialog .profile-columns {
    grid-template-columns: minmax(0,1fr);
    gap: 10px;
  }
  dialog.profile-dialog .profile-actions {
    grid-template-columns: minmax(0,1fr);
  }
  dialog.profile-dialog .profile-details .profile-detail-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 6px;
  }
  dialog.profile-dialog .profile-detail-item {
    padding: 8px;
  }
  dialog.profile-dialog .profile-detail-item b {
    font-size: 12px;
  }
  dialog.profile-dialog .fee-pay-form {
    grid-template-columns: minmax(0,1fr);
  }
  dialog.profile-dialog .fee-pay-form button {
    grid-column: auto;
    justify-self: stretch;
  }
  dialog.profile-dialog .fee-metrics {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  dialog.profile-dialog .fee-table table {
    min-width: 630px;
  }
  dialog.profile-dialog .pn {
    padding: 12px;
  }
}
@media(max-width:360px) {
  dialog.profile-dialog .profile-details .profile-detail-grid {
    grid-template-columns: minmax(0,1fr);
  }
  dialog.profile-dialog .fee-metrics {
    grid-template-columns: minmax(0,1fr);
  }
}
.settings-layout {
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px !important;
  align-items: stretch !important;
}
.settings-layout>.pn, .settings-layout>.settings-card {
  min-width: 0;
  margin: 0 !important;
  padding: 19px !important;
  border: 1px solid var(--line,rgba(120,130,150,.18)) !important;
  border-radius: 16px !important;
  background: var(--panel,#fff);
  box-shadow: 0 5px 18px rgba(15,23,42,.045);
  transition: box-shadow .18s ease,border-color .18s ease,transform .18s ease;
}
.settings-layout>.pn:hover, .settings-layout>.settings-card:hover {
  border-color: color-mix(in srgb,var(--accent,#4f46e5) 28%,var(--line,transparent)) !important;
  box-shadow: 0 9px 25px rgba(15,23,42,.075);
}
.settings-layout h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 16px !important;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.3;
  margin: 0 0 8px !important;
}
.settings-layout h2:before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 19px;
  flex: 0 0 4px;
  border-radius: 5px;
  background: var(--accent,#4f46e5);
}
.settings-layout .mut {
  font-size: 12.5px !important;
  line-height: 1.55 !important;
  color: var(--muted,#64748b);
  margin: 0 0 13px !important;
}
.settings-layout label {
  display: block;
  min-width: 0;
  font-size: 12px !important;
  font-weight: 700;
  color: var(--fg,#1e293b);
  margin: 0 0 10px !important;
}
.settings-layout input:not([type=file]):not([type=checkbox]), .settings-layout select, .settings-layout textarea {
  width: 100%;
  min-width: 0;
  min-height: 39px !important;
  padding: 9px 11px !important;
  border: 1px solid var(--line,rgba(120,130,150,.25)) !important;
  border-radius: 10px !important;
  background: var(--input-bg,#fff);
  color: var(--fg,#1e293b);
  font: inherit;
  font-size: 13px !important;
  outline: none;
  box-shadow: none;
  transition: border-color .15s,box-shadow .15s;
}
.settings-layout input:focus, .settings-layout select:focus, .settings-layout textarea:focus {
  border-color: var(--accent,#4f46e5) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb,var(--accent,#4f46e5) 13%,transparent) !important;
}
.settings-layout .g2 {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px 12px !important;
}
.settings-layout .bar, .settings-layout .settings-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px !important;
  margin-top: 12px !important;
}
.settings-layout button, .settings-layout .btn {
  min-height: 37px !important;
  padding: 8px 13px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 750;
  letter-spacing: .005em;
}
.settings-layout button.ghost {
  border: 1px solid var(--line,rgba(120,130,150,.25));
  background: transparent;
}
.settings-layout .settings-institute {
  grid-column: 1/-1;
  background: linear-gradient(135deg,var(--panel,#fff),color-mix(in srgb,var(--accent,#4f46e5) 4%,var(--panel,#fff)));
}
.settings-institute .settings-fields {
  display: grid !important;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 2px 14px !important;
}
.settings-institute .settings-fields label:last-child {
  grid-column: auto;
}
.settings-institute .settings-actions {
  padding-top: 12px;
  border-top: 1px solid var(--line,rgba(120,130,150,.16));
}
.settings-layout .settings-password form {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 0 12px;
  align-items: end;
}
.settings-layout .settings-password form label:first-child, .settings-layout .settings-password form #pm {
  grid-column: 1/-1;
}
.settings-layout .settings-password form button {
  justify-self: start;
}
.settings-layout .font-preview {
  margin-top: 10px !important;
  padding: 12px 14px !important;
  border: 1px solid var(--line,rgba(120,130,150,.2));
  border-radius: 12px !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}
.settings-layout .toggle-line {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line,rgba(120,130,150,.2));
  border-radius: 11px;
  background: color-mix(in srgb,var(--accent,#4f46e5) 3%,var(--panel,#fff));
}
.settings-layout .toggle-line input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent,#4f46e5);
}
.settings-layout .settings-institute img.lg {
  max-width: 150px;
  max-height: 70px;
  object-fit: contain;
  border-radius: 9px;
}
.settings-layout .nl {
  font-weight: 750;
  text-decoration: none;
}
.settings-layout .nl:hover {
  text-decoration: underline;
}
.settings-layout .settings-recq {
  min-width: 0;
}
.settings-layout .settings-recq>.pn {
  height: 100%;
  margin: 0 !important;
  padding: 19px !important;
  border: 1px solid var(--line,rgba(120,130,150,.18));
  border-radius: 16px;
  background: var(--panel,#fff);
  box-shadow: 0 5px 18px rgba(15,23,42,.045);
}
@media(max-width:900px) {
  .settings-layout {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 12px !important;
  }
  .settings-institute .settings-fields {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
}
@media(max-width:640px) {
  .settings-layout {
    grid-template-columns: minmax(0,1fr) !important;
    gap: 11px !important;
  }
  .settings-layout>.pn,.settings-layout>.settings-card,.settings-layout .settings-recq>.pn {
    padding: 15px !important;
    border-radius: 13px !important;
  }
  .settings-layout .settings-institute {
    grid-column: auto;
  }
  .settings-institute .settings-fields {
    grid-template-columns: minmax(0,1fr) !important;
  }
  .settings-layout .g2,.settings-layout .settings-password form {
    grid-template-columns: minmax(0,1fr) !important;
  }
  .settings-layout .settings-password form label:first-child, .settings-layout .settings-password form #pm {
    grid-column: auto;
  }
  .settings-layout button,.settings-layout .btn {
    min-height: 40px !important;
  }
}
.settings-layout {
  display: block !important;
  max-width: 1180px;
  margin: 0 auto;
}
.settings-group {
  border: 1px solid var(--ln,rgba(120,130,150,.2));
  border-radius: 16px;
  background: var(--panel,#fff);
  box-shadow: 0 5px 18px rgba(15,23,42,.045);
  margin: 0 0 14px;
  overflow: hidden;
}
.settings-group>summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 20px;
  user-select: none;
  background: linear-gradient(110deg,color-mix(in srgb,var(--g0,#4f46e5) 6%,var(--panel,#fff)),var(--panel,#fff));
}
.settings-group>summary::-webkit-details-marker {
  display: none;
}
.settings-group>summary>span:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.settings-group>summary b {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink,#172033);
}
.settings-group>summary small {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted,#64748b);
}
.settings-chevron {
  font-size: 22px;
  color: var(--muted,#64748b);
  transition: transform .18s ease;
  flex: none;
}
.settings-group[open]>.settings-chevron,.settings-group[open]>summary .settings-chevron {
  transform: rotate(180deg);
}
.settings-group-body {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
  align-items: start;
  border-top: 1px solid var(--ln,rgba(120,130,150,.16));
}
.settings-group-body>.pn,.settings-group-body>.settings-card {
  min-width: 0;
  margin: 0 !important;
  height: 100%;
}
.settings-group-body>.typography-card {
  height: auto;
}
.settings-group-body>.cf-settings,.settings-group-body>.settings-institute,.settings-group-body>.settings-password {
  grid-column: 1/-1;
}
.settings-group-body>.settings-institute .settings-fields {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 0 14px;
}
.settings-group-body>.settings-institute .settings-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.settings-group-body>.settings-institute .settings-actions label {
  margin: 0 !important;
}
.settings-group-body .font-preview {
  border: 1px solid var(--ln);
  border-radius: 11px;
  padding: 12px;
  background: var(--bg,#f8fafc);
  margin-top: 10px;
}
.settings-group-body .tw {
  max-width: 100%;
}
.settings-group-body .settings-password form {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
  align-items: end;
}
.settings-group-body .settings-password form button {
  grid-column: 1/-1;
  justify-self: start;
}
.settings-group-body .settings-password form p {
  grid-column: 1/-1;
  margin: 0;
}
.settings-group-body .settings-recq {
  min-width: 0;
}
@media(max-width:760px) {
  .settings-group>summary {
    padding: 14px;
  }
  .settings-group-body {
    grid-template-columns: minmax(0,1fr);
    padding: 12px;
    gap: 11px;
  }
  .settings-group-body>.settings-institute .settings-fields {
    grid-template-columns: minmax(0,1fr);
  }
  .settings-group-body>.settings-password form {
    grid-template-columns: minmax(0,1fr);
  }
  .settings-group-body>.settings-password form button,.settings-group-body>.settings-password form p {
    grid-column: auto;
  }
  .settings-group-body>.settings-password form button {
    justify-self: stretch;
  }
}
.ui-ico {
  display: inline-block;
  vertical-align: middle;
  flex: none;
}
.nav-ico {
  font-size: 0;
}
.nav-ico .ui-ico {
  width: 18px;
  height: 18px;
}
header h1 .ui-ico {
  width: 22px;
  height: 22px;
  margin-right: 5px;
  vertical-align: -4px;
}
#mb .ui-ico {
  width: 20px;
  height: 20px;
}
.chat-shell {
  display: grid;
  grid-template-columns: minmax(210px,270px) minmax(0,1fr);
  gap: 14px;
  align-items: stretch;
}
.chat-people {
  padding: 8px;
  min-width: 0;
}
.chat-people .cp {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 10px;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  margin: 2px 0;
}
.chat-people .cp.on {
  background: #eef2ff;
  color: #3730a3;
}
.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #e0e7ff;
  color: #4338ca;
  font-weight: 800;
  flex: none;
}
.chat-person-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-main {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 65vh;
}
.chat-top {
  padding: 15px 18px;
  border-bottom: 1px solid var(--ln);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.chat-top small {
  display: block;
  color: #64748b;
  font-size: 12px;
}
.chat-live {
  font-size: 11px;
  color: #047857;
  white-space: nowrap;
}
.chat-live i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  margin-right: 5px;
}
.chat {
  height: 58vh;
  min-height: 300px;
  padding: 18px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg,#f8fafc,#f1f5f9);
}
.cmsg {
  max-width: min(78%,620px);
  padding: 10px 13px;
  border-radius: 15px 15px 15px 5px;
  background: #fff;
  box-shadow: 0 2px 8px #0f172a0a;
  overflow-wrap: anywhere;
}
.cmsg.me {
  align-self: flex-end;
  border-radius: 15px 15px 5px 15px;
  background: #e0e7ff;
  color: #1e1b4b;
}
.cmsg small {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 5px;
  color: #64748b;
  font-size: 10px;
}
.receipt {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 700;
}
.receipt .ui-ico {
  width: 13px;
  height: 13px;
}
.receipt.seen {
  color: #2563eb;
}
.receipt.delivered {
  color: #64748b;
}
.receipt.sent {
  color: #64748b;
}
.chat-compose {
  display: flex;
  gap: 10px;
  padding: 13px;
  border-top: 1px solid var(--ln);
  background: #fff;
}
.chat-compose input {
  flex: 1;
  min-width: 0;
}
.chat-compose button {
  display: flex;
  align-items: center;
  gap: 7px;
}
.chat-empty {
  margin: auto;
  text-align: center;
}
.logout-link .nav-ico {
  font-size: 0;
}
.logout-link .nav-ico:after {
  content: '';
}
.side-bottom .logout-link .nav-ico:before {
  content: none;
}
@media(max-width:760px) {
  .chat-shell {
    grid-template-columns: 1fr;
  }
  .chat-people {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding: 7px;
  }
  .chat-people .cp {
    min-width: fit-content;
    border: 1px solid var(--ln);
    margin: 0;
  }
  .chat-main {
    min-height: 60vh;
  }
  .chat {
    height: 55vh;
    min-height: 260px;
    padding: 12px;
  }
  .cmsg {
    max-width: 88%;
  }
  .chat-top {
    padding: 12px;
  }
  .chat-compose {
    padding: 10px;
  }
}
.si-dialog {
  width: min(1080px,96vw);
  max-width: 1080px;
  max-height: 92vh;
  padding: 22px;
  border: 1px solid var(--ln);
  border-radius: 18px;
  background: var(--panel);
  color: var(--ink);
}
.si-dialog::backdrop {
  background: rgba(15,23,42,.58);
}
.si-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}
.si-head h2 {
  margin: 4px 0;
}
.si-report {
  display: grid;
  gap: 14px;
}
.si-kpis {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
}
.si-kpis .pn {
  margin: 0;
  min-width: 0;
}
.si-kpis small,.si-kpis span {
  display: block;
  color: var(--muted,#64748b);
  font-size: 11px;
}
.si-kpis b {
  display: block;
  font-size: 24px;
  margin: 5px 0;
  overflow-wrap: anywhere;
}
.si-report-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
}
.si-report .pn {
  min-width: 0;
}
.si-bar-row {
  display: grid;
  grid-template-columns: minmax(90px,1fr) minmax(80px,2fr) 32px;
  gap: 8px;
  align-items: center;
  margin: 9px 0;
  font-size: 12px;
}
.si-bar-row>div {
  height: 9px;
  background: var(--soft,#eef2f7);
  border-radius: 20px;
  overflow: hidden;
}
.si-bar-row i {
  display: block;
  height: 100%;
  background: var(--accent,#4f46e5);
  border-radius: 20px;
}
.si-report .tw {
  overflow-x: auto;
}
.si-report table {
  width: 100%;
  border-collapse: collapse;
}
.si-report td,.si-report th {
  padding: 9px 8px;
  border-bottom: 1px solid var(--ln);
  text-align: left;
  font-size: 12px;
  vertical-align: top;
}
.si-report ol,.si-report ul {
  padding-left: 20px;
}
.si-report li {
  margin: 7px 0;
  line-height: 1.5;
}
.si-report .mut {
  font-size: 11px;
  line-height: 1.5;
}
@media(max-width:700px) {
  .si-dialog {
    padding: 14px;
    width: 96vw;
  }
  .si-head {
    display: block;
  }
  .si-head .bar {
    margin: 10px 0;
  }
  .si-kpis {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .si-report-grid {
    grid-template-columns: 1fr;
  }
  .si-kpis b {
    font-size: 20px;
  }
}
@media print {
  body * {
    visibility: hidden !important;
  }
  .si-dialog,.si-dialog * {
    visibility: visible !important;
  }
  .si-dialog {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: none;
    max-height: none;
    border: 0;
    box-shadow: none;
  }
  .si-head .bar {
    display: none !important;
  }
}
dialog.profile-dialog {
  width: min(1080px,96vw);
  max-width: 1080px;
  max-height: 88dvh;
  padding: 12px;
  overflow: auto;
  border-radius: 12px;
}
dialog.profile-dialog .profile-head {
  top: -12px;
  margin: -12px -12px 10px;
  padding: 10px 12px;
  gap: 10px;
  align-items: center;
}
dialog.profile-dialog .profile-head-main h2 {
  font-size: 19px;
  line-height: 1.15;
}
dialog.profile-dialog .profile-head-main .mut {
  font-size: 11px;
  line-height: 1.3;
  margin-top: 3px;
}
dialog.profile-dialog .profile-head-actions {
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
dialog.profile-dialog .profile-head-actions button {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 12px;
  border-radius: 8px;
}
dialog.profile-dialog .profile-close {
  min-width: 58px;
}
dialog.profile-dialog .profile-columns {
  grid-template-columns: minmax(260px,.78fr) minmax(0,1.55fr);
  gap: 10px;
}
dialog.profile-dialog .profile-actions,dialog.profile-dialog .profile-main {
  gap: 9px;
}
dialog.profile-dialog .pn {
  padding: 10px 11px;
  border-radius: 10px;
}
dialog.profile-dialog .pn h3 {
  font-size: 13px;
  margin: 0 0 6px;
}
dialog.profile-dialog label {
  font-size: 12px;
  margin: 5px 0;
}
dialog.profile-dialog input:not([type=checkbox]),dialog.profile-dialog select, dialog.profile-dialog textarea {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 12px;
  border-radius: 7px;
}
dialog.profile-dialog textarea {
  min-height: 52px;
  height: 52px;
  resize: vertical;
}
dialog.profile-dialog .profile-details .profile-detail-grid {
  gap: 6px;
}
dialog.profile-dialog .profile-detail-item {
  padding: 6px 8px;
  border-radius: 7px;
}
dialog.profile-dialog .profile-detail-item span {
  font-size: 10px;
}
dialog.profile-dialog .profile-detail-item b {
  font-size: 12px;
  line-height: 1.25;
}
dialog.profile-dialog .tl {
  margin: 5px 0;
  padding: 2px 0 2px 8px;
  font-size: 12px;
}
dialog.profile-dialog .tl p {
  font-size: 12px;
  line-height: 1.35;
}
dialog.profile-dialog button {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 12px;
}
@media(max-width:760px) {
  dialog.profile-dialog,dialog.profile-dialog.w {
    width: 96vw;
    max-width: 96vw;
    max-height: 92dvh;
    height: auto;
    margin: auto;
    padding: 10px;
  }
  dialog.profile-dialog .profile-head {
    top: -10px;
    margin: -10px -10px 9px;
    padding: 9px 10px;
    flex-wrap: wrap;
  }
  dialog.profile-dialog .profile-columns {
    grid-template-columns: minmax(0,1fr);
    gap: 9px;
  }
  dialog.profile-dialog .profile-actions {
    grid-template-columns: minmax(0,1fr);
  }
  dialog.profile-dialog .profile-head-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
main {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}
section {
  min-width: 0;
}
img,canvas,svg,video {
  max-width: 100%;
  height: auto;
}
button,.btn,a {
  touch-action: manipulation;
}
button,.btn {
  min-height: 44px;
}
input,select,textarea {
  min-height: 44px;
  max-width: 100%;
  font-size: 16px;
}
textarea {
  min-height: 88px;
}
:focus-visible {
  scroll-margin: 90px;
}
.tw {
  max-width: 100%;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.tw table {
  min-width: 640px;
}
.bar {
  align-items: stretch;
}
.bar>* {
  min-width: 0;
}
.pn,.card,.tw {
  min-width: 0;
}
@media(max-width:820px) {
  body {
    display: block;
  }
  main {
    min-height: 100dvh;
  }
  header {
    position: sticky;
    top: 0;
    z-index: 4;
    min-height: 58px;
    padding: 8px 10px;
    gap: 8px;
  }
  #mb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    font-size: 20px;
  }
  header h1 {
    font-size: 17px;
    line-height: 1.2;
    min-width: 0;
  }
  header .net {
    font-size: 10px;
    max-width: 48vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  section {
    padding: 10px 9px calc(20px + env(safe-area-inset-bottom));
  }
  aside {
    position: fixed;
    inset: 0 auto 0 0;
    height: 100dvh;
    max-height: 100dvh;
    width: min(310px,88vw);
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 30;
    padding: 12px 10px calc(18px + env(safe-area-inset-bottom));
  }
  #bd.on {
    z-index: 29;
  }
  aside a {
    min-height: 48px;
    padding: 11px 12px;
    font-size: 14px;
  }
  .brand {
    margin: 0 4px 12px;
  }
  .bar {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: 8px;
    margin-bottom: 10px;
  }
  .bar input,.bar select {
    width: 100%;
    min-width: 0;
    grid-column: 1/-1;
  }
  .bar button,.bar .btn {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }
  .cards {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px;
  }
  .card {
    padding: 10px 11px;
  }
  .card b {
    font-size: clamp(17px,5vw,21px);
    overflow-wrap: anywhere;
  }
  .card span {
    font-size: 11px;
    line-height: 1.3;
  }
  .grid,.g2,.cols2 {
    grid-template-columns: minmax(0,1fr);
    gap: 10px;
  }
  .pn {
    padding: 12px;
  }
  .pn h2 {
    font-size: 15px;
  }
  .tw {
    margin: 0 -1px 12px;
    border-radius: 10px;
  }
  .tw table {
    min-width: 680px;
  }
  .tw th,.tw td {
    padding: 9px 9px;
    font-size: 12px;
  }
  .tw th {
    position: sticky;
    top: 0;
    z-index: 1;
  }
  .ac a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    margin: 2px 8px 2px 0;
  }
  .pill {
    min-height: 26px;
    padding: 4px 9px;
  }
  .chat {
    height: calc(100dvh - 220px);
    min-height: 260px;
  }
  .cmsg {
    max-width: 90%;
    overflow-wrap: anywhere;
  }
  .cp {
    min-height: 48px;
    padding: 12px;
  }
  .br {
    grid-template-columns: 76px minmax(0,1fr) 26px;
    gap: 6px;
  }
  dialog,dialog.w,dialog.profile-dialog,dialog.profile-dialog.w {
    position: fixed;
    inset: 0;
    margin: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    padding: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  dialog::backdrop {
    background: #0f172a88;
  }
  dialog form {
    min-width: 0;
  }
  dialog label {
    margin: 8px 0;
    font-size: 13px;
  }
  dialog .g2 {
    grid-template-columns: minmax(0,1fr);
    gap: 8px;
  }
  dialog .bar {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  dialog .bar button {
    width: 100%;
  }
  dialog .profile-head {
    position: sticky;
    top: -10px;
    z-index: 12;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: -10px -10px 10px;
    padding: 10px;
    background: #fff;
  }
  dialog .profile-head-main {
    flex: 1 1 100%;
    min-width: 0;
  }
  dialog .profile-head-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    width: 100%;
  }
  dialog .profile-head-actions button {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 8px;
    font-size: 12px;
  }
  dialog .profile-head-actions .profile-close {
    grid-column: 1/-1;
  }
  dialog .profile-columns {
    grid-template-columns: minmax(0,1fr);
    gap: 9px;
  }
  dialog .profile-actions {
    grid-template-columns: minmax(0,1fr);
  }
  dialog .profile-details .profile-detail-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  dialog .profile-detail-item {
    overflow-wrap: anywhere;
  }
  dialog .pn {
    padding: 11px;
  }
  dialog button {
    min-height: 44px;
  }
}
@media(max-width:480px) {
  header {
    padding: 7px 8px;
  }
  header h1 {
    font-size: 16px;
  }
  header .net {
    max-width: 42vw;
  }
  section {
    padding-left: 8px;
    padding-right: 8px;
  }
  .cards {
    gap: 7px;
  }
  .card {
    padding: 9px;
  }
  .card b {
    font-size: 17px;
  }
  .bar {
    grid-template-columns: minmax(0,1fr);
  }
  .bar input,.bar select {
    grid-column: auto;
  }
  .bar button,.bar .btn {
    width: 100%;
  }
  .enq-kpis {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .enq-kpis .pn {
    padding: 10px;
  }
  .enq-kpis b {
    font-size: 20px;
  }
  dialog .profile-details .profile-detail-grid {
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  }
  .tw table {
    min-width: 650px;
  }
}
@media(max-width:360px) {
  .cards {
    grid-template-columns: minmax(0,1fr);
  }
  dialog .profile-head-actions {
    grid-template-columns: minmax(0,1fr);
  }
  dialog .profile-head-actions .profile-close {
    grid-column: auto;
  }
  dialog .profile-details .profile-detail-grid {
    grid-template-columns: minmax(0,1fr);
  }
}
:root {
  --pl-r: 14px;
  --pl-r-sm: 10px;
  --pl-line: #e2e8f0;
  --pl-muted: #64748b;
  --pl-shadow: 0 1px 2px rgba(15,23,42,.04),0 6px 18px rgba(15,23,42,.06);
  --pl-shadow-hover: 0 2px 4px rgba(15,23,42,.05),0 14px 30px rgba(15,23,42,.10);
  --pl-ease: cubic-bezier(.2,.7,.2,1);
}
html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
* {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
  background-clip: content-box;
}
header {
  background-image: linear-gradient(120deg,rgba(255,255,255,.12),rgba(255,255,255,0) 55%);
}
header h1 {
  letter-spacing: -.02em;
}
#app .pn,#app .card,#app .tw,.enq-wrap .pn {
  border: 1px solid var(--pl-line);
  border-radius: var(--pl-r);
  box-shadow: var(--pl-shadow);
}
#app .card {
  transition: transform .2s var(--pl-ease),box-shadow .2s var(--pl-ease);
}
#app .card:hover {
  transform: translateY(-2px);
  box-shadow: var(--pl-shadow-hover);
}
#app .card b,.fk b,.enq-kpis b,.stage b {
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
#app .card span,.fk span,.enq-kpis span,.enq-kpis small {
  color: var(--pl-muted);
}
#app th {
  font-size: 10.5px;
  letter-spacing: .08em;
}
#app td {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
#app button:not(.ghost):not(.nl):not(.gs-row):not(.cp):not(.settings-chevron), .btn {
  box-shadow: 0 1px 2px rgba(15,23,42,.12),inset 0 1px 0 rgba(255,255,255,.14);
}
#app button.ghost,.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid #cfd8e3;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
button:disabled,.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  filter: none;
  box-shadow: none;
}
#app label,dialog label {
  color: #334155;
  font-weight: 650;
}
input::placeholder,textarea::placeholder {
  color: #94a3b8;
}
.pill {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
  border-radius: 999px;
}
dialog {
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15,23,42,.26);
}
dialog::backdrop {
  backdrop-filter: blur(2px);
}
#app .empty {
  color: var(--pl-muted);
  background: #fff;
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  #app .card:hover {
    transform: none;
  }
}
body {
  background: linear-gradient(165deg,var(--side) 0%,color-mix(in srgb,var(--side) 55%,var(--g0,#4f46e5)) 38%,var(--bg) 38%);
}
main {
  background: radial-gradient(900px 420px at 0% -8%,color-mix(in srgb,var(--g0,#4f46e5) 13%,transparent),transparent 70%),radial-gradient(700px 380px at 100% 0%,color-mix(in srgb,var(--g1,#0ea5e9) 10%,transparent),transparent 70%),var(--bg);
}
header {
  background: linear-gradient(100deg,var(--c,#4f46e5) 0%,color-mix(in srgb,var(--c,#4f46e5) 62%,var(--g1,#0ea5e9)) 100%);
  box-shadow: 0 8px 24px color-mix(in srgb,var(--c,#4f46e5) 28%,transparent);
}
header h1 {
  font-size: clamp(18px,2.2vw,24px);
  font-weight: 800;
}
#app .cards .card {
  background: linear-gradient(160deg,color-mix(in srgb,var(--p,var(--g0)) 16%,#fff) 0%,#fff 62%);
  border-top-width: 4px;
}
#app .cards .card b {
  font-size: 28px;
  font-weight: 800;
  color: color-mix(in srgb,var(--p,var(--g0)) 80%,#0f172a);
}
#app .cards .card span {
  font-weight: 600;
  font-size: 12.5px;
}
#app .pn {
  border-top: 3px solid color-mix(in srgb,var(--g0,#4f46e5) 55%,#fff);
}
#app .pn h2,#app .pn h3 {
  color: color-mix(in srgb,var(--g0,#4f46e5) 70%,#0f172a);
}
#app .tw {
  border-top: 3px solid color-mix(in srgb,var(--g1,#0ea5e9) 55%,#fff);
}
#app th {
  background: color-mix(in srgb,var(--g0,#4f46e5) 9%,#fff);
  color: color-mix(in srgb,var(--g0,#4f46e5) 70%,#0f172a);
}
#app tbody tr:hover {
  background: color-mix(in srgb,var(--g0,#4f46e5) 7%,transparent);
}
#app button:not(.ghost):not(.nl):not(.gs-row):not(.cp):not(.settings-chevron):not(.side-link):not(.stage):not(.smart-lead), .btn {
  background-image: linear-gradient(135deg,var(--c,#4f46e5),color-mix(in srgb,var(--c,#4f46e5) 66%,var(--g1,#0ea5e9)));
}
#app button.ghost,.ghost {
  background-image: none;
}
#app .bar {
  padding: 10px;
  border-radius: var(--pl-r,14px);
  background: color-mix(in srgb,var(--g0,#4f46e5) 4%,#fff);
  border: 1px solid var(--pl-line,#e2e8f0);
}
#app input:focus,#app select:focus,#app textarea:focus {
  border-color: var(--c,#4f46e5);
}
dialog {
  border-top: 4px solid var(--c,#4f46e5);
}
body {
  overflow-x: clip;
}
main {
  min-width: 0;
}
@media (min-width:821px) {
  aside {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100dvh;
    width: 258px;
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 20;
  }
  main {
    margin-left: 258px;
  }
}
@media (max-width:820px) {
  body {
    display: block;
  }
  main {
    margin-left: 0;
    min-height: 100dvh;
  }
  aside {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 30;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }
  header {
    padding-left: 10px;
    padding-right: 10px;
  }
}
@media (max-width:640px) {
  #app .tw:not(.mx) {
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }
  #app .tw:not(.mx) table {
    min-width: 0 !important;
    display: block;
    border-spacing: 0;
  }
  #app .tw:not(.mx) thead {
    display: none;
  }
  #app .tw:not(.mx) tbody {
    display: grid;
    gap: 10px;
  }
  #app .tw:not(.mx) tr {
    display: block;
    background: #fff;
    border: 1px solid var(--pl-line,#e2e8f0);
    border-radius: 12px;
    padding: 4px 12px;
    box-shadow: var(--pl-shadow,0 4px 14px #0f172a0d);
  }
  #app .tw:not(.mx) td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 9px 0 !important;
    white-space: normal;
    text-align: right;
    overflow-wrap: anywhere;
  }
  #app .tw:not(.mx) tr td:last-child {
    border-bottom: 0 !important;
  }
  #app .tw:not(.mx) td::before {
    content: attr(data-label);
    flex: none;
    max-width: 45%;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--pl-muted,#64748b);
    text-align: left;
  }
  #app .tw:not(.mx) td:empty {
    display: none;
  }
  #app .tw:not(.mx) td[colspan] {
    display: block;
    text-align: center;
  }
  #app .tw:not(.mx) td[colspan]::before {
    content: none;
  }
  #app .tw:not(.mx) tbody tr:hover {
    background: #fff;
  }
  #app .tw:not(.mx) td a,#app .tw:not(.mx) td button {
    min-height: 40px;
  }
  #app .pn {
    padding: 12px;
  }
  #app .cards {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  #app .card b {
    font-size: 22px;
  }
  #app .bar {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 8px;
  }
  #app .bar>* {
    width: 100%;
  }
  input,select,textarea {
    font-size: 16px;
  }
}

/* Conversion funnel stage cards are light buttons, not primary buttons */
#app button.stage,#app button.smart-lead{background-image:none;color:var(--ink)}
#app button.stage:hover{border-color:var(--c,#4f46e5);background-color:color-mix(in srgb,var(--c,#4f46e5) 6%,#fff)}

/* Funnel stage cards must stay light in every theme, even if an older rule loads first */
#app .pipeline-stages .stage,#app button.stage{background:#f8fafc!important;background-image:none!important;color:#1e293b!important;border:1px solid #e2e8f0!important}
#app .pipeline-stages .stage.selected{background:#eef2ff!important;border-color:#4f46e5!important;color:#3730a3!important}
#app .pipeline-stages .stage small{color:#475569!important}

/* Conversion funnel: match the light KPI dashboard cards */
#app .pipeline {
  background: #fff !important;
  color: #1e293b !important;
  border: 1px solid #e2eaf1 !important;
  border-top: 3px solid #8ec9e8 !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 18px rgba(15,23,42,.08) !important;
  padding: 16px !important;
}
#app .pipeline .pipeline-title h3 {
  color: #17324d !important;
  font-weight: 750;
}
#app .pipeline .pipeline-title .mut,
#app .pipeline .pipeline-title p {
  color: #64748b !important;
}
#app .pipeline-stages .stage,
#app button.stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 80px;
  padding: 10px 12px !important;
  gap: 2px;
  align-items: flex-start;
  background: linear-gradient(160deg,var(--stage-tint,#f2f6ff) 0%,#fff 78%) !important;
  color: #334155 !important;
  border: 1px solid #e1e8f0 !important;
  border-top: 3px solid var(--stage-color,#64748b) !important;
  border-radius: 12px !important;
  box-shadow: 0 3px 10px rgba(15,23,42,.07) !important;
  transition: transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}
#app .pipeline-stages .stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 74px;
  height: 74px;
  right: -22px;
  top: -34px;
  border-radius: 50%;
  background: color-mix(in srgb,var(--stage-color) 12%,transparent);
}
#app .pipeline-stages .stage:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 16px rgba(15,23,42,.10) !important;
  border-color: color-mix(in srgb,var(--stage-color) 45%,#e1e8f0) !important;
  filter: none;
}
#app .pipeline-stages .stage b {
  color: var(--stage-color) !important;
  font-size: 25px;
  line-height: 1.15;
  font-weight: 800;
}
#app .pipeline-stages .stage span {
  color: #334155 !important;
  font-weight: 700;
}
#app .pipeline-stages .stage small {
  color: #64748b !important;
  font-size: 11px;
  font-weight: 650;
}
#app .pipeline-stages .stage:nth-child(1) {--stage-color:#5146c8;--stage-tint:#f0efff}
#app .pipeline-stages .stage:nth-child(2) {--stage-color:#2695c9;--stage-tint:#eaf7fd}
#app .pipeline-stages .stage:nth-child(3) {--stage-color:#1d9b78;--stage-tint:#e9f8f2}
#app .pipeline-stages .stage:nth-child(4) {--stage-color:#d28a24;--stage-tint:#fff5e7}
#app .pipeline-stages .stage:nth-child(5) {--stage-color:#209c98;--stage-tint:#e9f8f6}
#app .pipeline-stages .stage:nth-child(6) {--stage-color:#cf527d;--stage-tint:#fff0f5}
#app .pipeline-stages .stage.selected {
  background: linear-gradient(160deg,var(--stage-tint) 0%,#fff 78%) !important;
  border: 1px solid color-mix(in srgb,var(--stage-color) 55%,#e1e8f0) !important;
  border-top: 3px solid var(--stage-color) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb,var(--stage-color) 13%,transparent),0 4px 12px rgba(15,23,42,.08) !important;
  color: #1e293b !important;
}
@media(max-width:760px) {
  #app .pipeline-stages {grid-template-columns:repeat(2,minmax(0,1fr));}
}


/* FINAL OVERRIDE: enquiry-page conversion funnel stages use light KPI-card styling */
#app .pipeline .pipeline-stages > button.stage,
#app .pipeline-stages > button.stage {
  appearance: none !important;
  background: linear-gradient(145deg, var(--stage-tint, #f2f6ff) 0%, #ffffff 82%) !important;
  background-color: #ffffff !important;
  background-image: linear-gradient(145deg, var(--stage-tint, #f2f6ff) 0%, #ffffff 82%) !important;
  color: #334155 !important;
  border: 1px solid #e1e8f0 !important;
  border-top: 3px solid var(--stage-color, #64748b) !important;
  border-radius: 12px !important;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .07) !important;
  filter: none !important;
}
#app .pipeline .pipeline-stages > button.stage::after {
  background: color-mix(in srgb, var(--stage-color, #64748b) 10%, transparent) !important;
}
#app .pipeline .pipeline-stages > button.stage > b { color: var(--stage-color, #334155) !important; }
#app .pipeline .pipeline-stages > button.stage > span { color: #334155 !important; }
#app .pipeline .pipeline-stages > button.stage > small { color: #64748b !important; }
#app .pipeline .pipeline-stages > button.stage.selected {
  background: linear-gradient(145deg, var(--stage-tint, #f2f6ff) 0%, #ffffff 82%) !important;
  background-color: #ffffff !important;
  color: #1e293b !important;
  border-color: color-mix(in srgb, var(--stage-color, #64748b) 55%, #e1e8f0) !important;
  border-top: 3px solid var(--stage-color, #64748b) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--stage-color, #64748b) 13%, transparent), 0 4px 12px rgba(15,23,42,.08) !important;
}

/* EduDesk CRM · Modern Light Sidebar refresh */
aside#sb{width:264px;padding:16px 12px 13px;background:#fff;color:#334155;border-right:1px solid #e7edf5;box-shadow:5px 0 22px rgba(15,23,42,.045);gap:3px;transition:width .22s ease,background .2s ease;scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent}
aside#sb .brand{color:#172554;border-bottom:1px solid #edf1f7;margin:0 3px 12px;padding:7px 5px 14px;gap:10px}
aside#sb .brand .ico{background:#eef2ff;color:#4338ca}
aside#sb .brand .brand-sub{color:#64748b;opacity:1}
aside#sb .side-caption{color:#94a3b8;opacity:1;padding:3px 12px 5px}
aside#sb .gh{color:#64748b;opacity:1;margin:13px 9px 5px;font-size:9px;letter-spacing:.13em}
aside#sb .gh i{width:5px;height:5px}
aside#sb .sb-nav-row{display:flex;align-items:center;position:relative;gap:2px;margin:2px 0}
aside#sb .sb-nav-row>a{flex:1;min-width:0;min-height:42px;margin:0;padding:6px 9px;border:1px solid transparent;border-radius:10px;color:#475569;font-size:13px;font-weight:600;gap:10px;box-shadow:none;transform:none}
aside#sb .sb-nav-row>a:hover{background:#f5f8ff;border-color:#edf2fb;color:#1e40af}
aside#sb .sb-nav-row>a.on{background:#edf3ff;border-color:#dce8ff;color:#234db5;box-shadow:inset 3px 0 #4778df}
aside#sb .nav-ico{width:30px;height:30px;border-radius:9px;background:#f1f5f9;color:#64748b}
aside#sb .sb-nav-row>a.on .nav-ico{background:#dce8ff;color:#315fc2;box-shadow:none}
aside#sb .sb-nav-row>a .nav-arrow{display:none}
aside#sb .sb-fav{border:0;background:transparent;box-shadow:none;color:#c0cad8;padding:4px 5px;min-width:25px;opacity:0;transform:none}
aside#sb .sb-nav-row:hover .sb-fav,aside#sb .sb-fav.active{opacity:1}
aside#sb .sb-fav.active{color:#e5a000}
aside#sb .sb-reorder{display:none;flex-direction:column;gap:0}
aside#sb .sb-nav-row:hover .sb-reorder{display:flex}
aside#sb .sb-reorder button{padding:0 4px;min-width:19px;min-height:15px;line-height:13px;border:0;background:transparent;color:#94a3b8;box-shadow:none;font-size:11px}
aside#sb .sb-count{display:inline-flex;align-items:center;justify-content:center;min-width:21px;height:20px;padding:0 6px;border-radius:20px;background:#dbeafe;color:#1d4ed8;font-size:10px;font-weight:800}
aside#sb .sb-count.amber{background:#fef3c7;color:#a16207}aside#sb .sb-count.red{background:#fee2e2;color:#b91c1c}
aside#sb .sb-bottom{margin-top:auto}
aside#sb .side-divider{background:#e9eef5}
aside#sb .sb-settings-btn{display:flex;align-items:center;gap:10px;width:100%;padding:6px 9px;min-height:42px;border:0;background:transparent;color:#475569;box-shadow:none;text-align:left;font-size:13px;font-weight:600}
aside#sb .sb-settings-btn:hover{background:#f5f8ff}
aside#sb .sb-settings-btn .nav-ico{background:#f1f5f9}
aside#sb .sb-tools{margin:8px 2px;padding:12px;border:1px solid #e4eaf3;border-radius:12px;background:#f8faff;color:#334155;font-size:12px;box-shadow:0 5px 16px #0f172a0b}
aside#sb .sb-tools>b{display:block;margin-bottom:9px;color:#1e293b}
aside#sb .sb-tools label{display:block;margin:8px 0;color:#475569;font-size:11px}
aside#sb .sb-tools select{width:100%;margin-top:4px;padding:7px;border:1px solid #dbe3ee;background:#fff;color:#334155;font-size:12px}
aside#sb .sb-tools .sb-check{display:flex;align-items:center;gap:7px}
aside#sb .sb-tools input{width:auto}
aside#sb .sb-tools p{font-size:10px;color:#64748b;margin:7px 0}
aside#sb .sb-tools button{width:100%;padding:7px;font-size:11px;background:#fff;color:#475569}
aside#sb .sb-collapse{margin-left:auto;min-width:27px;min-height:27px;padding:2px;border:1px solid #e5eaf2;background:#fff;color:#64748b;box-shadow:none;border-radius:8px}
aside#sb .logout-link{color:#64748b}
aside#sb .logout-link:hover{background:#fff1f2;color:#be123c}
aside#sb.sb-collapsed{width:78px;padding:14px 9px}
aside#sb.sb-collapsed .brand{justify-content:center;padding:4px 0 13px}
aside#sb.sb-collapsed .brand>span,aside#sb.sb-collapsed .brand-sub,aside#sb.sb-collapsed .side-caption,aside#sb.sb-collapsed .gh,aside#sb.sb-collapsed .nav-label,aside#sb.sb-collapsed .nav-arrow,aside#sb.sb-collapsed .side-search input,aside#sb.sb-collapsed .sb-fav,aside#sb.sb-collapsed .sb-reorder,aside#sb.sb-collapsed .sb-tools{display:none!important}
aside#sb.sb-collapsed .brand .ico,aside#sb.sb-collapsed .brand img{width:42px;height:42px}
aside#sb.sb-collapsed .sb-collapse{position:absolute;right:5px;top:60px;min-width:22px;min-height:22px;font-size:11px}
aside#sb.sb-collapsed .side-search{justify-content:center;margin:2px 0 8px;padding:8px 4px;border:0;background:#f1f5f9}
aside#sb.sb-collapsed .sb-nav-row>a{justify-content:center;padding:5px;min-height:44px}
aside#sb.sb-collapsed .nav-ico{width:34px;height:34px}
aside#sb.sb-collapsed .sb-settings-btn{justify-content:center;padding:5px}
aside#sb.sb-collapsed .sb-settings-btn .nav-label{display:none}
aside#sb.sb-collapsed .sb-nav-row>a[title]:hover:after{content:attr(title);position:absolute;left:57px;z-index:20;white-space:nowrap;background:#172554;color:#fff;padding:7px 10px;border-radius:7px;font-size:11px;box-shadow:0 5px 15px #0f172a25}
aside#sb.sb-collapsed .sb-collapse{transform:rotate(180deg)}
aside#sb.sb-theme-navy{background:#17243d;color:#dbeafe;border-color:#253653}
aside#sb.sb-theme-navy .brand{color:#fff;border-color:#ffffff18}aside#sb.sb-theme-navy .brand .brand-sub{color:#b6c5dc}aside#sb.sb-theme-navy .gh,aside#sb.sb-theme-navy .side-caption{color:#a8b8d0}aside#sb.sb-theme-navy .sb-nav-row>a{color:#d5dfef}aside#sb.sb-theme-navy .sb-nav-row>a:hover{background:#ffffff0d;color:#fff}aside#sb.sb-theme-navy .sb-nav-row>a.on{background:#29466f;border-color:#385d91;color:#fff}aside#sb.sb-theme-navy .nav-ico{background:#ffffff12;color:#dbeafe}aside#sb.sb-theme-navy .sb-nav-row>a.on .nav-ico{background:#4778df;color:#fff}aside#sb.sb-theme-navy .sb-tools{background:#20314d;border-color:#3a4c68;color:#e2e8f0}aside#sb.sb-theme-navy .sb-tools>b{color:#fff}aside#sb.sb-theme-navy .sb-tools label,aside#sb.sb-theme-navy .sb-tools p{color:#cbd5e1}aside#sb.sb-theme-navy .sb-settings-btn,aside#sb.sb-theme-navy .logout-link{color:#dbeafe}aside#sb.sb-theme-navy .side-divider{background:#ffffff20}
aside#sb.sb-theme-soft{background:#f7f5ff;color:#43386b;border-color:#e9e2ff}aside#sb.sb-theme-soft .brand{color:#37276d;border-color:#e9e2ff}aside#sb.sb-theme-soft .brand .brand-sub{color:#766a9b}aside#sb.sb-theme-soft .gh,aside#sb.sb-theme-soft .side-caption{color:#8175a5}aside#sb.sb-theme-soft .sb-nav-row>a{color:#514477}aside#sb.sb-theme-soft .sb-nav-row>a:hover{background:#eee9ff}aside#sb.sb-theme-soft .sb-nav-row>a.on{background:#e9e2ff;border-color:#dcd0ff;color:#4934a1}aside#sb.sb-theme-soft .sb-tools{background:#fff;border-color:#e4dcff}
@media(max-width:820px){aside#sb{position:fixed;left:0;top:0;bottom:0;height:100dvh;max-height:100dvh;width:min(292px,86vw);transform:translateX(-105%);transition:transform .22s ease,width .22s ease;z-index:30}aside#sb.open{transform:translateX(0)}aside#sb.sb-collapsed{width:min(292px,86vw)}aside#sb.sb-collapsed .brand>span,aside#sb.sb-collapsed .brand-sub,aside#sb.sb-collapsed .side-caption,aside#sb.sb-collapsed .gh,aside#sb.sb-collapsed .nav-label,aside#sb.sb-collapsed .side-search input{display:initial!important}aside#sb.sb-collapsed .gh{display:flex!important}aside#sb.sb-collapsed .sb-nav-row>a{justify-content:flex-start}aside#sb.sb-collapsed .sb-nav-row>a .nav-label{display:inline!important}aside#sb.sb-collapsed .sb-collapse{transform:none}#bd{position:fixed;inset:0;z-index:25;background:#0f172a66;backdrop-filter:blur(2px)}#bd.on{display:block}}
/* Admin-configurable sidebar palette and compact navigation density */
aside#sb{background:var(--sb-admin-bg,#fff);color:var(--sb-admin-text,#475569);border-color:var(--sb-admin-border,#e4eaf3)}
aside#sb .sb-nav-row>a{color:var(--sb-admin-text,#475569)}
aside#sb .sb-nav-row>a:hover{background:var(--sb-admin-hover,#f5f8ff);border-color:var(--sb-admin-border,#edf2fb)}
aside#sb .sb-nav-row>a.on{background:var(--sb-admin-active,#edf3ff);border-color:var(--sb-admin-border,#dce8ff);color:var(--sb-admin-text,#234db5);box-shadow:inset 3px 0 var(--sb-admin-accent,#4778df)}
aside#sb .sb-nav-row>a.on .nav-ico{background:color-mix(in srgb,var(--sb-admin-accent,#4778df) 18%,white);color:var(--sb-admin-accent,#315fc2)}
aside#sb .brand{border-color:var(--sb-admin-border,#e4eaf3)}
aside#sb .sb-density-comfortable .sb-nav-row>a{min-height:47px;padding-top:8px;padding-bottom:8px}
aside#sb .sb-density-spacious .sb-nav-row>a{min-height:53px;padding-top:10px;padding-bottom:10px}
aside#sb.sb-width-narrow{width:238px}aside#sb.sb-width-wide{width:292px}
aside#sb.sb-admin-dark .brand,aside#sb.sb-admin-dark .brand .brand-sub,aside#sb.sb-admin-dark .gh,aside#sb.sb-admin-dark .side-caption,aside#sb.sb-admin-dark .sb-nav-row>a,aside#sb.sb-admin-dark .logout-link{color:var(--sb-admin-text)}
aside#sb.sb-admin-dark .sb-nav-row>a.on{color:var(--sb-admin-text)}
.sidebar-preset-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:10px;margin:12px 0 18px}.sidebar-preset{display:flex;flex-direction:column;gap:7px;align-items:stretch;padding:8px;border:1px solid var(--line,#e2e8f0);border-radius:11px;background:var(--card,#fff);color:var(--text);box-shadow:none}.sidebar-preset>span{height:68px;border-radius:7px;padding:8px;display:flex;flex-direction:column;gap:5px}.sidebar-preset>span i{display:block;height:10px;width:75%;border-radius:4px;background:#e9eef5}.sidebar-preset>span i:first-child{width:90%;height:16px}.sidebar-preset b{font-size:11px;text-align:center}.sidebar-color-grid input[type=color]{height:38px;padding:3px;width:100%}
@media(max-width:820px){aside#sb.sb-width-narrow,aside#sb.sb-width-wide{width:min(292px,86vw)}}
/* Sidebar visual styles controlled by administrator Settings */
#sb.sb-style-rounded .sb-nav-row>a{border-radius:14px;margin:3px 8px;padding-left:12px;padding-right:12px}
#sb.sb-style-rounded .nav-ico{border-radius:12px}
#sb.sb-style-minimal .sb-nav-row>a{background:transparent;border-color:transparent;box-shadow:none;border-radius:7px}
#sb.sb-style-minimal .sb-nav-row>a:hover{background:var(--sb-admin-hover,#f5f8ff)}
#sb.sb-style-minimal .sb-nav-row>a.on{background:var(--sb-admin-active,#edf3ff);box-shadow:inset 3px 0 var(--sb-admin-accent,#4778df)}
#sb.sb-style-midnight{background:var(--sb-admin-bg,#17243d);color:var(--sb-admin-text,#dbeafe)}
#sb.sb-style-midnight .brand,#sb.sb-style-midnight .gh,#sb.sb-style-midnight .side-caption,#sb.sb-style-midnight .sb-nav-row>a,#sb.sb-style-midnight .logout-link{color:var(--sb-admin-text,#dbeafe)}
#sb.sb-style-midnight .sb-nav-row>a.on{color:var(--sb-admin-text,#dbeafe)}

/* EduDesk sidebar admin appearance: live settings take precedence over legacy theme classes */
#sb{background:var(--sb-admin-bg,#fff)!important;color:var(--sb-admin-text,#475569)!important;border-color:var(--sb-admin-border,#e4eaf3)!important}
#sb .brand,#sb .brand b,#sb .gh,#sb .side-caption,#sb .sb-nav-row>a,#sb .logout-link{color:var(--sb-admin-text,#475569)!important}
#sb .brand{border-color:var(--sb-admin-border,#e4eaf3)!important}
#sb .sb-nav-row>a:hover{background:var(--sb-admin-hover,#f5f8ff)!important;border-color:var(--sb-admin-border,#e4eaf3)!important}
#sb .sb-nav-row>a.on{background:var(--sb-admin-active,#edf3ff)!important;color:var(--sb-admin-text,#234db5)!important;box-shadow:inset 3px 0 var(--sb-admin-accent,#4778df)!important;border-color:var(--sb-admin-border,#dce8ff)!important}
#sb .sb-nav-row>a.on .nav-ico{background:color-mix(in srgb,var(--sb-admin-accent,#4778df) 18%,white)!important;color:var(--sb-admin-accent,#315fc2)!important}
#sb.sb-style-rounded .sb-nav-row>a{border-radius:14px!important;margin:3px 8px!important;padding-left:12px!important;padding-right:12px!important}
#sb.sb-style-minimal .sb-nav-row>a{background:transparent;border-color:transparent;box-shadow:none;border-radius:7px}
#sb.sb-style-minimal .sb-nav-row>a:hover{background:var(--sb-admin-hover,#f5f8ff)!important}
#sb.sb-style-minimal .sb-nav-row>a.on{background:var(--sb-admin-active,#edf3ff)!important;box-shadow:inset 3px 0 var(--sb-admin-accent,#4778df)!important}
#sb.sb-density-comfortable .sb-nav-row>a{min-height:47px;padding-top:8px;padding-bottom:8px}
#sb.sb-density-spacious .sb-nav-row>a{min-height:53px;padding-top:10px;padding-bottom:10px}
#sb.sb-width-narrow{width:238px}#sb.sb-width-wide{width:292px}
#sb.sb-admin-dark .brand,#sb.sb-admin-dark .brand b,#sb.sb-admin-dark .brand-sub,#sb.sb-admin-dark .gh,#sb.sb-admin-dark .side-caption,#sb.sb-admin-dark .sb-nav-row>a,#sb.sb-admin-dark .logout-link{color:var(--sb-admin-text)!important}
@media(max-width:820px){#sb.sb-width-narrow,#sb.sb-width-wide{width:min(292px,86vw)}}


/* SITE-WIDE TABLE NAVIGATION
   Every table wrapper gets its own viewport; headings and the first identifying
   column stay visible while an administrator scrolls through long/wide tables. */
#app .tw,
#app .fee-table,
#app div:has(> table) {
  position: relative;
  max-height: min(70vh, 680px);
  max-width: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}
#app .tw table,
#app .fee-table table,
#app div:has(> table) > table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
#app table thead th {
  position: sticky;
  top: 0;
  z-index: 6;
  background: color-mix(in srgb,var(--c) 12%,#fff);
  box-shadow: 0 1px 0 var(--ln), 0 2px 4px #0f172a12;
}
#app table th:first-child,
#app table td:first-child {
  position: sticky;
  left: 0;
}
#app table thead th:first-child {
  z-index: 8;
  background: color-mix(in srgb,var(--c) 12%,#fff);
}
#app table tbody td:first-child {
  z-index: 2;
  background: var(--panel,#fff);
  box-shadow: 1px 0 0 var(--ln);
}
#app table tbody tr:hover td:first-child {
  background: #f8fafc;
}
#app .tw::-webkit-scrollbar,
#app .fee-table::-webkit-scrollbar,
#app div:has(> table)::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}
#app .tw::-webkit-scrollbar-thumb,
#app .fee-table::-webkit-scrollbar-thumb,
#app div:has(> table)::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border: 2px solid #f8fafc;
  border-radius: 99px;
}
#app .tw::-webkit-scrollbar-track,
#app .fee-table::-webkit-scrollbar-track,
#app div:has(> table)::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 99px;
}
@media(max-width:820px) {
  #app .tw,
  #app .fee-table,
  #app div:has(> table) {
    max-height: 64vh;
    max-width: 100%;
  }
  #app .tw table,
  #app .fee-table table,
  #app div:has(> table) > table {
    min-width: 680px;
  }
}


/* Persistent horizontal navigation bar: positioned outside the scrolling table
   viewport so it remains visible while the table is vertically scrolled. */
#app .table-scroll-shell {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 16px;
}
#app .table-scroll-shell > .tw,
#app .table-scroll-shell > .fee-table,
#app .table-scroll-shell > .table-direct-scroll {
  max-width: 100%;
  margin-bottom: 0;
  padding-bottom: 16px;
}
#app .table-xbar {
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 1px;
  z-index: 30;
  height: 15px;
  overflow-x: auto;
  overflow-y: hidden;
  background: color-mix(in srgb,var(--panel,#fff) 92%,#94a3b8 8%);
  border: 1px solid #cbd5e1;
  border-radius: 0 0 8px 8px;
  scrollbar-width: auto;
  scrollbar-color: #64748b #e2e8f0;
  opacity: .98;
  cursor: ew-resize;
}
#app .table-xbar > div {
  height: 1px;
  min-width: 100%;
}
#app .table-xbar::-webkit-scrollbar {
  height: 13px;
}
#app .table-xbar::-webkit-scrollbar-thumb {
  background: #64748b;
  border: 2px solid #e2e8f0;
  border-radius: 99px;
}
#app .table-xbar::-webkit-scrollbar-track {
  background: #e2e8f0;
  border-radius: 99px;
}
@media(max-width:820px) {
  #app .table-xbar {
    height: 18px;
  }
  #app .table-scroll-shell > .tw,
  #app .table-scroll-shell > .fee-table,
  #app .table-scroll-shell > .table-direct-scroll {
    padding-bottom: 19px;
  }
}


/* Simplified student admission form and optional details disclosure */
#dlg .student-extra-details,
#dlg .student-initial-payment {
  border: 1px solid var(--ln);
  border-radius: 12px;
  background: var(--panel,#fff);
  margin: 14px 0;
  padding: 0;
  overflow: hidden;
}
#dlg .student-extra-details > summary,
#dlg .student-initial-payment > summary {
  cursor: pointer;
  list-style: none;
  padding: 13px 15px;
  font-weight: 700;
  color: var(--ink);
  background: color-mix(in srgb,var(--c) 6%,var(--panel,#fff));
}
#dlg .student-extra-details > summary::-webkit-details-marker,
#dlg .student-initial-payment > summary::-webkit-details-marker {
  display: none;
}
#dlg .student-extra-details > summary:after,
#dlg .student-initial-payment > summary:after {
  content: "+";
  float: right;
  font-size: 18px;
  line-height: 1;
  color: var(--c);
}
#dlg .student-extra-details[open] > summary:after,
#dlg .student-initial-payment[open] > summary:after {
  content: "−";
}
#dlg .student-extra-grid {
  padding: 14px;
}
#dlg .student-extra-details > h3 {
  margin: 8px 14px 0;
}
#dlg .student-initial-payment {
  margin: 0 14px 14px;
}
#dlg .student-initial-payment > div {
  padding: 12px;
}
#dlg .student-extra-details .student-initial-payment {
  background: var(--panel,#fff);
}

/* EduDesk responsive layout and compact admission dialog */
#app, #app > div, #app main, #app section, #app .grid, #app .cards,
#app .pn, #app .card, #app .tw, #app .table-scroll-shell {min-width:0;max-width:100%;}
#app .cards {grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:12px;}
#app .grid {grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:14px;}
#app .card {overflow-wrap:anywhere;}
#app .card b {overflow-wrap:anywhere;}
#dlg.student-admission-form {display:grid;gap:9px;}
#dlg .student-admission-form h2 {margin:0 0 3px;font-size:20px;}
#dlg .student-admission-form > label {margin:0;min-width:0;font-size:12px;}
#dlg .student-admission-form input,#dlg .student-admission-form select,#dlg .student-admission-form textarea {min-height:38px;padding:7px 9px;border-radius:8px;}
#dlg .student-admission-form .student-extra-details {margin:3px 0;}
#dlg .student-admission-form .student-extra-details > summary,
#dlg .student-admission-form .student-initial-payment > summary {padding:9px 12px;font-size:13px;}
#dlg .student-admission-form .student-extra-grid {padding:9px;gap:9px;}
#dlg .student-admission-form .form-actions {margin:2px 0 0;justify-content:flex-end;}
#dlg .fee-hidden {display:none!important;}
#dlg:has(.student-admission-form) {width:min(620px,94vw);max-height:88dvh;overflow:auto;padding:16px;}
#dlg .student-admission-form .g2 {grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
@media(max-width:760px) {
  body {min-width:0;}
  #app {width:100%;min-width:0;overflow-x:clip;}
  #app>div>section {padding:12px 10px;}
  #app .cards {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
  #app .grid {grid-template-columns:minmax(0,1fr);}
  #app .card {padding:11px;min-width:0;}
  #app .card b {font-size:clamp(16px,4.5vw,22px);}
  #app .card span {overflow-wrap:anywhere;}
  #app .bar {gap:7px;}
  #app .bar>* {min-width:0;}
  #app .tw,#app .table-scroll-shell {width:100%;max-width:100%;}
  #dlg:has(.student-admission-form) {width:calc(100vw - 20px);max-width:calc(100vw - 20px);max-height:88dvh;padding:12px;}
  #dlg .student-admission-form .g2 {grid-template-columns:minmax(0,1fr);}
  #dlg .student-admission-form .form-actions {position:sticky;bottom:-12px;background:var(--panel,#fff);padding:9px 0 2px;z-index:2;}
}
@media(max-width:380px) {
  #app .cards {grid-template-columns:minmax(0,1fr);}
}
#dlg .student-core-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
#dlg .student-core-grid label {min-width:0;margin:0;font-size:12px;}
#app .cards > *,#app .grid > * {position:relative;z-index:0;min-width:0;}
@media(max-width:760px){#dlg .student-core-grid{grid-template-columns:minmax(0,1fr);}}


/* Global compact dialog system: keep the student admission dialog unchanged. */
#dlg:not(:has(.student-admission-form)) {
  box-sizing:border-box;
  width:min(680px,calc(100vw - 32px));
  max-width:680px;
  max-height:min(86dvh,820px);
  margin:auto;
  padding:18px;
  overflow:auto;
  overscroll-behavior:contain;
  border:1px solid var(--ln,#dbe3ef);
  border-radius:16px;
  background:var(--panel,#fff);
  color:var(--ink,#172033);
  box-shadow:0 20px 64px rgba(15,23,42,.24);
}
#dlg:not(:has(.student-admission-form)) h2 {
  margin:0 0 10px;
  font-size:clamp(17px,2vw,20px);
  line-height:1.25;
}
#dlg:not(:has(.student-admission-form)) h3 {
  margin:12px 0 7px;
  font-size:14px;
}
#dlg:not(:has(.student-admission-form)) p {
  margin:6px 0 10px;
  line-height:1.45;
}
#dlg:not(:has(.student-admission-form)) form {
  display:grid;
  gap:10px;
  min-width:0;
}
#dlg:not(:has(.student-admission-form)) form label {
  display:flex;
  flex-direction:column;
  gap:5px;
  min-width:0;
  margin:0;
  font-size:12px;
  font-weight:650;
}
#dlg:not(:has(.student-admission-form)) input:not([type=checkbox]):not([type=radio]),
#dlg:not(:has(.student-admission-form)) select,
#dlg:not(:has(.student-admission-form)) textarea {
  box-sizing:border-box;
  width:100%;
  min-width:0;
  min-height:38px;
  padding:8px 10px;
  border-radius:9px;
  font:inherit;
  font-size:13px;
}
#dlg:not(:has(.student-admission-form)) textarea {min-height:76px;resize:vertical;}
#dlg:not(:has(.student-admission-form)) .g2,
#dlg:not(:has(.student-admission-form)) .g3 {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px 12px;
  min-width:0;
}
#dlg:not(:has(.student-admission-form)) .bar {
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
  gap:8px;
  margin-top:5px;
  padding-top:10px;
  border-top:1px solid var(--ln,#e2e8f0);
}
#dlg:not(:has(.student-admission-form)) .bar button,
#dlg:not(:has(.student-admission-form)) button {
  min-height:36px;
  border-radius:9px;
}
#dlg:not(:has(.student-admission-form)) .tw,
#dlg:not(:has(.student-admission-form)) .table-scroll-shell {
  max-width:100%;
  overflow:auto;
}
#dlg:not(:has(.student-admission-form)) .mut {line-height:1.4;}
#dlg:not(:has(.student-admission-form)):has(.gs-head),
#dlg:not(:has(.student-admission-form)):has(.si-head),
#dlg:not(:has(.student-admission-form)):has(.report) {
  width:min(900px,calc(100vw - 32px));
  max-width:900px;
}
#dlg:not(:has(.student-admission-form))::backdrop {
  background:rgba(12,20,35,.56);
  backdrop-filter:blur(3px);
}

/* Consistent responsive page layout and card sizing. */
#app, #app * {box-sizing:border-box;}
#app {min-width:0;max-width:100%;overflow-x:clip;}
#app main, #app section, #app .pn, #app .grid, #app .cards,
#app .tw, #app .bar, #app form, #app .g2, #app .g3 {min-width:0;max-width:100%;}
#app .cards {grid-template-columns:repeat(auto-fit,minmax(min(100%,185px),1fr));}
#app .grid {grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));}
#app .card, #app .pn {overflow-wrap:anywhere;}
#app img, #app video, #app canvas {max-width:100%;height:auto;}
#app table {max-width:100%;}
#app .tw, #app .table-scroll-shell, #app .fee-table {overflow-x:auto;overscroll-behavior-x:contain;}
#app button, #app a {touch-action:manipulation;}
#app button {min-height:36px;}
#app input, #app select, #app textarea {max-width:100%;min-width:0;}

@media (max-width:820px) {
  body {min-width:0;overflow-x:hidden;}
  #app {width:100%;max-width:100%;padding-bottom:env(safe-area-inset-bottom);}
  #app>div, #app>div>section, #app main, #app section {min-width:0;max-width:100%;}
  #app>div>section {padding-left:12px;padding-right:12px;}
  #app .cards {grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
  #app .grid {grid-template-columns:minmax(0,1fr);gap:10px;}
  #app .card {min-width:0;padding:12px;}
  #app .card b {font-size:clamp(16px,4vw,22px);overflow-wrap:anywhere;}
  #app .bar {flex-wrap:wrap;gap:7px;}
  #app .bar>* {max-width:100%;min-width:0;}
  #app .tw, #app .fee-table, #app .table-scroll-shell {width:100%;max-width:100%;overflow-x:auto;}
  #app table {min-width:640px;}
  #app .tw:not(.mx) {overscroll-behavior-x:contain;}
  #app .pn {padding:12px;}
  #app input, #app select, #app textarea {font-size:16px;} /* avoids iOS input zoom */
  #dlg:not(:has(.student-admission-form)) {
    width:calc(100vw - 20px);
    max-width:calc(100vw - 20px);
    max-height:88dvh;
    padding:14px;
    border-radius:15px;
    margin:auto;
  }
  #dlg:not(:has(.student-admission-form)):has(.gs-head),
  #dlg:not(:has(.student-admission-form)):has(.si-head),
  #dlg:not(:has(.student-admission-form)):has(.report) {
    width:calc(100vw - 16px);
    max-width:calc(100vw - 16px);
  }
  #dlg:not(:has(.student-admission-form)) .g2,
  #dlg:not(:has(.student-admission-form)) .g3 {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
  #dlg:not(:has(.student-admission-form)) .bar {
    position:sticky;
    bottom:-14px;
    z-index:3;
    background:var(--panel,#fff);
    padding:10px 0 max(4px,env(safe-area-inset-bottom));
  }
  #dlg:not(:has(.student-admission-form)) button {min-height:40px;}
  aside#sb {max-width:88vw;}
}
@media (max-width:560px) {
  #app>div>section {padding:10px 9px;}
  #app .cards {grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;}
  #app .card {padding:10px;border-radius:12px;}
  #app .card span, #app .card small {font-size:12px;}
  #app .pn {padding:10px;border-radius:12px;}
  #app .bar button, #app .bar a {min-height:38px;}
  #app .g2, #app .g3 {grid-template-columns:minmax(0,1fr)!important;}
  #dlg:not(:has(.student-admission-form)) .g2,
  #dlg:not(:has(.student-admission-form)) .g3 {grid-template-columns:minmax(0,1fr);}
  #dlg:not(:has(.student-admission-form)) {padding:12px;}
  #dlg:not(:has(.student-admission-form)) h2 {font-size:17px;}
}
@media (max-width:380px) {
  #app .cards {grid-template-columns:minmax(0,1fr);}
  #app .card {display:flex;align-items:center;justify-content:space-between;gap:8px;}
  #app table {min-width:580px;}
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after {scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important;}
}


/* Site-wide table scrolling: every table gets a usable vertical and horizontal viewport. */
#app .table-scroll-shell {
  position:relative;
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  overflow:visible;
  isolation:isolate;
}
#app .table-scroll-shell > .tw,
#app .table-scroll-shell > .fee-table,
#app .table-scroll-shell > .table-direct-scroll,
#app .tw,
#app .fee-table,
#app .table-direct-scroll {
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  max-height:min(68vh,720px);
  overflow:auto!important;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  scrollbar-width: auto;
  scrollbar-color:#64748b #e2e8f0;
  -webkit-overflow-scrolling:touch;
}
#app .table-scroll-shell table {max-width:none;}
#app .tw::-webkit-scrollbar,
#app .fee-table::-webkit-scrollbar,
#app .table-direct-scroll::-webkit-scrollbar {
  width:13px;
  height:13px;
}
#app .tw::-webkit-scrollbar-thumb,
#app .fee-table::-webkit-scrollbar-thumb,
#app .table-direct-scroll::-webkit-scrollbar-thumb {
  background:#64748b;
  border:2px solid #e2e8f0;
  border-radius:99px;
}
#app .tw::-webkit-scrollbar-track,
#app .fee-table::-webkit-scrollbar-track,
#app .table-direct-scroll::-webkit-scrollbar-track {
  background:#e2e8f0;
  border-radius:99px;
}
#app .table-xbar {display:block;touch-action:pan-x;}

/* Keep the dashboard's pending-fee KPI visible as a dedicated full-width mobile card. */
#app .dashboard-kpi-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  align-items:stretch;
  grid-auto-flow:row;
  overflow:visible;
  isolation:isolate;
}
#app .dashboard-kpi-grid > .card {
  position:relative;
  z-index:0;
  min-width:0;
  max-width:100%;
  overflow:hidden;
  isolation:isolate;
  transform:none;
}
#app .dashboard-kpi-grid > .card::after {
  z-index:-1;
  pointer-events:none;
}
#app .dashboard-kpi-grid > .pending-fee-card {
  border:2px solid color-mix(in srgb,var(--p,#4f46e5) 38%,var(--ln,#dbe3ef));
  background:var(--panel,#fff);
}
@media(max-width:1024px) {
  #app .dashboard-kpi-grid {grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media(max-width:820px) {
  #app .dashboard-kpi-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-auto-flow:row;
    gap:9px;
    overflow:visible;
  }
  #app .dashboard-kpi-grid > .card {
    width:auto;
    min-height:88px;
    margin:0;
    padding:12px;
    overflow:hidden;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  #app .dashboard-kpi-grid > .pending-fee-card {
    grid-column:1 / -1;
    min-height:76px;
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:13px 15px;
  }
  #app .dashboard-kpi-grid > .pending-fee-card b {
    flex:0 0 auto;
    font-size:clamp(20px,5vw,26px);
    text-align:right;
  }
  #app .dashboard-kpi-grid > .pending-fee-card span {
    flex:1 1 auto;
    min-width:0;
    font-size:13px;
    line-height:1.35;
    text-align:left;
  }
  #app .table-scroll-shell > .tw,
  #app .table-scroll-shell > .fee-table,
  #app .table-scroll-shell > .table-direct-scroll,
  #app .tw,#app .fee-table,#app .table-direct-scroll {
    max-height:64vh;
    overflow:auto!important;
  }
}
@media(max-width:420px) {
  #app .dashboard-kpi-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
  #app .dashboard-kpi-grid > .pending-fee-card {
    grid-column:1 / -1;
    min-height:74px;
  }
}

/* Attendance status controls */
#app .tg.onN{background:#fff7ed;border-color:#f59e0b;color:#9a3412}#app .tg.onL{background:#eff6ff;border-color:#60a5fa;color:#1d4ed8}#app .att-current{font-weight:600;white-space:nowrap}

/* EduDesk attendance status controls: light, high-contrast selected states */
#app [data-att-status]{
  background:#f1f5f9!important;color:#334155!important;border:1px solid #cbd5e1!important;
  border-radius:8px!important;font-weight:650!important;min-height:34px;padding:7px 11px!important;
  box-shadow:none!important;transition:background .15s ease,border-color .15s ease,color .15s ease;
}
#app [data-att-status].onP{background:#dcfce7!important;color:#166534!important;border:2px solid #4ade80!important}
#app [data-att-status].onA{background:#fee2e2!important;color:#991b1b!important;border:2px solid #f87171!important}
#app [data-att-status].onN{background:#ffedd5!important;color:#9a3412!important;border:2px solid #fb923c!important}
#app [data-att-status].onL{background:#dbeafe!important;color:#1e40af!important;border:2px solid #60a5fa!important}
#app .att-current{font-weight:700;white-space:nowrap}


/* Student profile popup: compact two-column workspace */
dialog.profile-dialog.w,
dialog.w.profile-dialog {
  width:min(1180px,96vw);
  max-width:96vw;
  max-height:94dvh;
  padding:14px;
  border:1px solid #dbe3ee;
  border-radius:14px;
  overflow:auto;
  background:#f5f7fb;
}
dialog.profile-dialog .profile-columns {
  grid-template-columns:minmax(220px,280px) minmax(0,1fr);
  gap:12px;
  align-items:start;
}
dialog.profile-dialog .profile-actions {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:10px;
  position:sticky;
  top:76px;
}
dialog.profile-dialog .profile-main {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:10px;
}
dialog.profile-dialog .pn {
  padding:12px;
  border-radius:10px;
}
dialog.profile-dialog .pn h3 {
  font-size:13px;
  margin:0 0 9px;
}
dialog.profile-dialog .profile-wa-message {
  min-height:110px!important;
  max-height:38vh!important;
  font-size:12px;
  padding:8px;
}
dialog.profile-dialog .profile-detail-grid {
  gap:6px;
}
dialog.profile-dialog .profile-detail-item {
  padding:7px 9px;
  border-radius:7px;
}
dialog.profile-dialog .profile-detail-item span {
  font-size:10px;
}
dialog.profile-dialog .profile-detail-item b {
  font-size:12px;
  line-height:1.3;
}
dialog.profile-dialog .fee-table {
  max-height:360px;
}
dialog.profile-dialog .fee-table table {
  min-width:0!important;
  width:100%;
  table-layout:fixed;
  font-size:11px;
}
dialog.profile-dialog .fee-table th,
dialog.profile-dialog .fee-table td {
  padding:7px 5px;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:normal;
  line-height:1.25;
}
dialog.profile-dialog .fee-table th:nth-child(1),
dialog.profile-dialog .fee-table td:nth-child(1){width:18%}
dialog.profile-dialog .fee-table th:nth-child(2),
dialog.profile-dialog .fee-table td:nth-child(2){width:13%}
dialog.profile-dialog .fee-table th:nth-child(3),
dialog.profile-dialog .fee-table td:nth-child(3){width:15%}
dialog.profile-dialog .fee-table th:nth-child(4),
dialog.profile-dialog .fee-table td:nth-child(4){width:17%}
dialog.profile-dialog .fee-table th:nth-child(5),
dialog.profile-dialog .fee-table td:nth-child(5){width:13%}
dialog.profile-dialog .fee-table th:nth-child(6),
dialog.profile-dialog .fee-table td:nth-child(6){width:24%}
dialog.profile-dialog .fee-metrics {
  grid-template-columns:repeat(auto-fit,minmax(125px,1fr));
}
dialog.profile-dialog .fee-metric {padding:8px}
dialog.profile-dialog .fee-metric small {font-size:10px}
dialog.profile-dialog .fee-metric b {font-size:16px}
.page-visibility-grid {gap:8px 18px}
.page-visibility-item {
  display:flex!important;
  align-items:center;
  gap:9px!important;
  padding:8px 10px;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#fff;
  font-weight:500!important;
  min-width:0;
}
.page-visibility-item input {
  width:16px!important;
  height:16px;
  flex:none;
  margin:0;
  accent-color:#4f46e5;
}
.page-visibility-item small {
  margin-left:auto;
  color:#64748b;
  font-size:10px;
}
.page-dashboard-toggle {
  border-color:#a5b4fc;
  background:#eef2ff;
}
@media(max-width:900px) {
  dialog.profile-dialog.w,dialog.w.profile-dialog {
    width:96vw;
    max-width:96vw;
  }
  dialog.profile-dialog .profile-columns {
    grid-template-columns:minmax(0,1fr);
  }
  dialog.profile-dialog .profile-actions {
    position:static;
    grid-template-columns:minmax(0,1fr);
  }
}
@media(max-width:620px) {
  dialog.profile-dialog.w,dialog.w.profile-dialog {
    width:100vw;
    max-width:100vw;
    max-height:100dvh;
    border-radius:0;
    padding:9px;
  }
  dialog.profile-dialog .profile-detail-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  dialog.profile-dialog .fee-table table {
    font-size:10px;
  }
  dialog.profile-dialog .fee-table th,
  dialog.profile-dialog .fee-table td {
    padding:6px 3px;
  }
  .page-visibility-item small {display:none}
}


/* Student profile dialog: complete, balanced information workspace */
dialog.profile-dialog.w,
dialog.w.profile-dialog {
  width:min(1360px,97vw);
  max-width:97vw;
  max-height:95dvh;
  padding:16px;
  overflow:auto;
  overscroll-behavior:contain;
  background:#f4f7fb;
}
dialog.profile-dialog .profile-head {
  position:sticky;
  top:-16px;
  z-index:8;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:12px 2px 14px;
  margin:0 0 12px;
  background:linear-gradient(#f4f7fb 88%,rgba(244,247,251,0));
}
dialog.profile-dialog .profile-head-main {min-width:0;flex:1 1 auto}
dialog.profile-dialog .profile-head-main h2 {font-size:19px;line-height:1.25;margin:0 0 5px}
dialog.profile-dialog .profile-head-main .mut {font-size:12px;line-height:1.5;overflow-wrap:anywhere}
dialog.profile-dialog .profile-head-actions {display:flex;flex-wrap:wrap;align-items:center;gap:7px;flex:0 0 auto}
dialog.profile-dialog .profile-columns {
  display:grid;
  grid-template-columns:minmax(245px,300px) minmax(0,1fr);
  gap:14px;
  align-items:start;
}
dialog.profile-dialog .profile-actions {
  display:flex;
  flex-direction:column;
  gap:12px;
  position:sticky;
  top:82px;
  min-width:0;
}
dialog.profile-dialog .profile-main {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  align-items:stretch;
  min-width:0;
}
dialog.profile-dialog .profile-main > .pn,
dialog.profile-dialog .profile-main > .fee-profile {min-width:0;margin:0}
dialog.profile-dialog .profile-main > .profile-details,
dialog.profile-dialog .profile-main > .fee-profile {
  grid-column:1 / -1;
}
dialog.profile-dialog .profile-main > .profile-details .profile-detail-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
dialog.profile-dialog .profile-detail-item {
  min-width:0;
  border:1px solid #e6ebf2;
  background:#f9fbfe;
  padding:9px 10px;
  border-radius:9px;
}
dialog.profile-dialog .profile-detail-item span {
  display:block;
  color:#64748b;
  font-size:10px;
  line-height:1.3;
  margin-bottom:4px;
}
dialog.profile-dialog .profile-detail-item b {
  display:block;
  color:#172033;
  font-size:12px;
  line-height:1.4;
  overflow-wrap:anywhere;
  word-break:break-word;
}
dialog.profile-dialog .profile-main > .pn h3,
dialog.profile-dialog .profile-main > .fee-profile h3 {font-size:13px;margin:0 0 10px}
dialog.profile-dialog .profile-main > .fee-profile .fee-metrics {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
dialog.profile-dialog .profile-main > .fee-profile .fee-metric {
  min-width:0;
  border:1px solid #e7edf5;
  background:#f9fbfe;
  border-radius:9px;
  padding:9px;
}
dialog.profile-dialog .fee-metric small {display:block;font-size:10px;line-height:1.35;color:#64748b}
dialog.profile-dialog .fee-metric b {display:block;font-size:15px;line-height:1.35;overflow-wrap:anywhere}
dialog.profile-dialog .fee-pay-form {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
  align-items:end;
  padding:11px;
  margin:10px 0 14px;
  border:1px solid #e5eaf2;
  border-radius:10px;
  background:#f9fbfe;
}
dialog.profile-dialog .fee-pay-form label {min-width:0;font-size:11px}
dialog.profile-dialog .fee-pay-form input,
dialog.profile-dialog .fee-pay-form select {width:100%;min-width:0}
dialog.profile-dialog .fee-pay-form button {align-self:end;min-height:38px}
dialog.profile-dialog .fee-table {
  width:100%;
  max-width:100%;
  max-height:300px;
  overflow:auto;
  border:1px solid #e5eaf2;
  border-radius:9px;
  background:#fff;
}
dialog.profile-dialog .fee-table table {
  width:100%;
  min-width:680px!important;
  table-layout:auto;
  font-size:11px;
}
dialog.profile-dialog .fee-table th {
  position:sticky;
  top:0;
  z-index:2;
  background:#eef3f9;
  white-space:nowrap;
}
dialog.profile-dialog .fee-table td,
dialog.profile-dialog .fee-table th {
  padding:8px 7px;
  white-space:nowrap;
  line-height:1.35;
}
dialog.profile-dialog .profile-wa-message {
  width:100%;
  min-height:160px!important;
  max-height:48vh!important;
  box-sizing:border-box;
  font-size:12px;
}
dialog.profile-dialog .profile-actions .pn {min-width:0}
dialog.profile-dialog .profile-actions select {width:100%;min-width:0}
dialog.profile-dialog .profile-actions button {max-width:100%;white-space:normal}
dialog.profile-dialog .profile-main .tl {
  padding:8px 0;
  border-bottom:1px solid #edf1f6;
  font-size:11px;
  line-height:1.45;
  overflow-wrap:anywhere;
}
dialog.profile-dialog .profile-main .tl:last-child {border-bottom:0}
@media(max-width:1050px) {
  dialog.profile-dialog .profile-main > .profile-details .profile-detail-grid {grid-template-columns:repeat(3,minmax(0,1fr))}
  dialog.profile-dialog .profile-main > .fee-profile .fee-metrics {grid-template-columns:repeat(3,minmax(0,1fr))}
  dialog.profile-dialog .profile-columns {grid-template-columns:minmax(220px,260px) minmax(0,1fr)}
}
@media(max-width:820px) {
  dialog.profile-dialog.w,dialog.w.profile-dialog {width:96vw;max-width:96vw}
  dialog.profile-dialog .profile-columns {grid-template-columns:minmax(0,1fr)}
  dialog.profile-dialog .profile-actions {position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  dialog.profile-dialog .profile-actions > .pn {min-width:0}
  dialog.profile-dialog .profile-main > .profile-details .profile-detail-grid {grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:620px) {
  dialog.profile-dialog.w,dialog.w.profile-dialog {
    width:100vw;max-width:100vw;max-height:100dvh;height:100dvh;
    padding:10px;border-radius:0;
  }
  dialog.profile-dialog .profile-head {
    top:-10px;
    display:block;
    padding:9px 0 11px;
    margin-bottom:9px;
  }
  dialog.profile-dialog .profile-head-actions {margin-top:9px}
  dialog.profile-dialog .profile-head-main h2 {font-size:17px}
  dialog.profile-dialog .profile-actions {grid-template-columns:minmax(0,1fr)}
  dialog.profile-dialog .profile-main {grid-template-columns:minmax(0,1fr)}
  dialog.profile-dialog .profile-main > .profile-details,
  dialog.profile-dialog .profile-main > .fee-profile {grid-column:1}
  dialog.profile-dialog .profile-main > .profile-details .profile-detail-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  dialog.profile-dialog .profile-main > .fee-profile .fee-metrics {grid-template-columns:repeat(2,minmax(0,1fr))}
  dialog.profile-dialog .fee-pay-form {grid-template-columns:repeat(2,minmax(0,1fr))}
  dialog.profile-dialog .fee-pay-form button {grid-column:1/-1}
}
@media(max-width:380px) {
  dialog.profile-dialog .profile-main > .profile-details .profile-detail-grid {grid-template-columns:minmax(0,1fr)}
  dialog.profile-dialog .fee-pay-form {grid-template-columns:minmax(0,1fr)}
}

/* Settings page: grouped, scan-friendly controls */
.page-settings-card {padding:18px}
.settings-section-heading {display:flex;align-items:flex-start;gap:11px;margin-bottom:14px}
.settings-section-heading h2 {margin:0 0 3px;font-size:16px}
.settings-section-heading p {margin:0;line-height:1.45}
.settings-section-icon {
  display:grid;place-items:center;flex:0 0 34px;height:34px;
  border-radius:10px;background:#eef2ff;color:#4338ca;font-size:18px;font-weight:700
}
.page-global-dashboard {
  display:flex!important;
  align-items:center;
  gap:12px!important;
  padding:13px 14px!important;
  margin:8px 0 16px;
  border:1px solid #a5b4fc!important;
  border-radius:11px!important;
  background:#eef2ff!important;
}
.page-global-dashboard > span {display:flex;flex-direction:column;gap:3px;min-width:0}
.page-global-dashboard b {font-size:13px;color:#312e81}
.page-global-dashboard small {font-size:11px;color:#555b78;line-height:1.4}
.page-visibility-group {
  padding:13px 0;
  border-top:1px solid #e8edf4;
}
.page-visibility-group h3 {
  margin:0 0 9px;
  color:#475569;
  font-size:11px;
  font-weight:750;
  text-transform:uppercase;
  letter-spacing:.07em;
}
.page-visibility-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.page-visibility-item {
  min-height:40px;
  display:flex!important;
  align-items:center;
  gap:9px!important;
  padding:9px 11px;
  border:1px solid #e3e9f1;
  border-radius:9px;
  background:#fff;
  font-size:12px;
  font-weight:550!important;
  min-width:0;
  cursor:pointer;
}
.page-visibility-item:hover {border-color:#a5b4fc;background:#fafaff}
.page-visibility-item input {
  width:16px!important;height:16px;flex:none;margin:0;accent-color:#4f46e5
}
.page-visibility-item span {min-width:0;line-height:1.35}
.personal-dashboard-setting {
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  margin-top:15px;padding:14px;
  border:1px solid #d7e5f4;border-radius:11px;background:#f7fbff
}
.personal-dashboard-setting > div {min-width:0}
.personal-dashboard-setting > div b {font-size:13px}
.personal-dashboard-setting p {margin:4px 0 0;font-size:11px;line-height:1.45}
.page-own-dashboard {flex:0 0 auto;white-space:nowrap;background:#fff}
@media(max-width:760px) {
  .page-visibility-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:480px) {
  .page-settings-card {padding:12px}
  .page-visibility-grid {grid-template-columns:minmax(0,1fr)}
  .personal-dashboard-setting {align-items:flex-start;flex-direction:column}
}

/* Student popup: expand the fee account and instalment ledger across the full dialog width. */
dialog.profile-dialog .profile-main > .fee-profile {
  position: relative;
  width: calc(100% + 314px);
  max-width: none;
  margin-left: -314px !important;
  box-sizing: border-box;
  overflow: visible;
}
dialog.profile-dialog .profile-main > .fee-profile .fee-table {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
}
dialog.profile-dialog .profile-main > .fee-profile .fee-table table {
  width: 100%;
  min-width: 760px !important;
  table-layout: auto;
}
@media (max-width: 1050px) and (min-width: 821px) {
  dialog.profile-dialog .profile-main > .fee-profile {
    width: calc(100% + 274px);
    margin-left: -274px !important;
  }
}
@media (max-width: 820px) {
  dialog.profile-dialog .profile-main > .fee-profile {
    width: 100%;
    max-width: 100%;
    margin-left: 0 !important;
  }
}

/* Student popup: place All details below History and Attendance, spanning full width. */
dialog.profile-dialog > .profile-details,
dialog.profile-dialog > .fee-profile,
dialog.profile-dialog > .pn {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
dialog.profile-dialog > .profile-details {
  margin-top: 12px;
}
dialog.profile-dialog > .fee-profile {
  margin-top: 12px;
}

/* Team Chat opens as a compact floating workspace, not a full page */
.ed-chat-popup{position:fixed;z-index:12000;right:22px;bottom:20px;width:min(900px,calc(100vw - 36px));height:min(650px,calc(100vh - 40px));display:flex;flex-direction:column;overflow:hidden;background:var(--panel,#fff);color:var(--ink,#172033);border:1px solid var(--ln,#dbe2ea);border-radius:18px;box-shadow:0 22px 70px #0f172a45}
.ed-chat-popup[hidden]{display:none}
.ed-chat-popup-head{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;background:var(--panel,#fff);border-bottom:1px solid var(--ln,#dbe2ea)}
.ed-chat-popup-head b{display:block;font-size:14px}.ed-chat-popup-head small{display:block;color:var(--muted,#64748b);font-size:11px;margin-top:2px}
.ed-chat-close{width:34px;height:34px;border:0;border-radius:10px;background:#f1f5f9;color:#334155;font-size:25px;line-height:1;cursor:pointer}
.ed-chat-popup-body{min-height:0;flex:1;padding:10px;overflow:hidden}
.ed-chat-popup .chat-shell{height:100%;min-height:0;grid-template-columns:minmax(180px,235px) minmax(0,1fr);gap:10px}
.ed-chat-popup .chat-people,.ed-chat-popup .chat-main{min-height:0;height:100%}
.ed-chat-popup .chat-main{min-height:0}.ed-chat-popup .chat{height:auto;min-height:0;flex:1}
.ed-chat-popup .chat-top{padding:10px 14px}.ed-chat-popup .chat-compose{padding:9px}
@media(max-width:640px){.ed-chat-popup{right:8px;bottom:8px;width:calc(100vw - 16px);height:min(78vh,680px);border-radius:14px}.ed-chat-popup-body{padding:6px}.ed-chat-popup .chat-shell{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);gap:6px}.ed-chat-popup .chat-people{height:auto;max-height:78px;overflow:auto}.ed-chat-popup .chat-main{height:auto}.ed-chat-popup .chat{min-height:0}}
