:root {
  color-scheme: light;
  font-family: "Inter", "Noto Sans Bengali", "Nirmala UI", system-ui, sans-serif;
  color: #19243b;
  background: #f3f6fd;
  line-height: 1.55;
  --blue: #174aca;
  --border: #dbe3f2;
  --muted: #51617d;
  --navy: #101c37;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button, .button {
  border: 1px solid transparent;
  cursor: pointer;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 700;
  padding: 10px 16px;
  min-height: 44px;
  background: var(--blue);
  color: white;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button:hover, .button:hover { background: #113ba6; }
button:disabled { cursor: default; opacity: .56; }
:focus-visible { outline: 3px solid #688dea; outline-offset: 3px; }
.secondary { background: #fff; color: var(--blue); border-color: #b6c8ed; }
.secondary:hover { background: #eaf0ff; }
.compact { padding: 5px 10px; min-height: 38px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.24; letter-spacing: -.025em; }
h2 { font-size: 1.26rem; line-height: 1.4; }
h3 { font-size: 1rem; }
small { font-size: .85rem; }
.topbar {
  min-height: 76px;
  padding: 12px clamp(16px, 4vw, 54px);
  background: var(--navy);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.brand, .profile { display: flex; align-items: center; gap: 12px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.12rem; letter-spacing: -.02em; }
.brand small { color: #b9caf4; }
.monogram {
  display: grid; place-content: center; flex: 0 0 42px; height: 42px; border-radius: 12px;
  background: #517ef4; color: #0b1d47; font-size: 1rem; font-weight: 850; letter-spacing: -.05em;
}
.profile { min-width: 0; font-size: .88rem; }
.profile span { max-width: 24ch; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.avatar { width: 40px; height: 40px; object-fit: cover; flex: 0 0 40px; border-radius: 50%; background: #e6edff; }
.profile .avatar { width: 34px; height: 34px; flex-basis: 34px; }
.welcome {
  width: min(1160px, calc(100% - 40px)); margin: clamp(24px, 7vh, 90px) auto;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: stretch;
}
.intro { padding: clamp(24px, 6vw, 70px); min-height: 420px; border-radius: 20px; color: white; display: grid; align-content: center; background: linear-gradient(145deg, #142951 3%, #1d48b2 76%, #285cda); }
.intro h1 { font-size: clamp(2.1rem, 5vw, 4rem); margin: 10px 0 18px; }
.intro > p:last-child { color: #e0eaff; max-width: 40ch; }
.eyebrow { color: #345aaf; font-size: .9rem; font-weight: 750; margin-bottom: 5px; }
.intro .eyebrow { color: #d4e2ff; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: 15px; padding: clamp(16px, 3vw, 26px); box-shadow: 0 5px 20px #142e6508; }
.signup { align-self: center; padding: clamp(22px, 4vw, 35px); }
.panel > p, .section-head p { margin: 5px 0 15px; color: var(--muted); }
.layout { display: grid; grid-template-columns: 215px minmax(0, 1fr); min-height: calc(100vh - 76px); }
.nav { background: #fff; border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 25px 14px; }
.nav button { background: transparent; color: #374764; text-align: left; justify-content: flex-start; white-space: nowrap; }
.nav button:hover { background: #eff3fc; }
.nav button[aria-current] { background: #e4edff; color: #1746b5; box-shadow: inset 3px 0 #285cda; }
main { width: min(100%, 1350px); padding: clamp(15px, 3vw, 38px); min-width: 0; }
.heading, .section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.page { display: grid; gap: 18px; margin-top: 18px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.metric { padding: clamp(11px, 2.3vw, 21px); border-radius: 13px; min-width: 0; border: 1px solid var(--border); }
.metric p { font-size: .94rem; font-weight: 650; }
.metric strong { font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.35; }
.metric.blue { background: #e8efff; color: #153983; }
.metric.violet { background: #f0ebff; color: #4c3285; }
.metric.teal { background: #e3f6f3; color: #115c53; }
.metric.gold { background: #fff1dc; color: #78420d; }
form { display: grid; gap: 14px; margin-top: 12px; }
form > button, .actions > button { justify-self: start; }
label { display: grid; gap: 5px; font-size: .92rem; font-weight: 650; color: #273959; min-width: 0; }
input, select, textarea {
  width: 100%; border-radius: 9px; border: 1px solid #bac9e2; background: #fff; color: #172744;
  min-height: 43px; padding: 8px 10px; font-size: 1rem; font-weight: 400;
}
input[type=file] { background: #f7faff; padding: 9px; }
input[type=file]::file-selector-button { border: 0; border-radius: 6px; padding: 5px 8px; background: #e5eeff; color: #163ba0; font: inherit; margin-inline-end: 8px; cursor: pointer; }
select { appearance: none; padding-right: 35px; background-image: linear-gradient(45deg,transparent 50%,#36527d 50%),linear-gradient(135deg,#36527d 50%,transparent 50%); background-position: calc(100% - 17px) center, calc(100% - 12px) center; background-size: 5px 5px; background-repeat: no-repeat; }
select:disabled { background-color: #f2f4f9; color: #62718c; }
textarea { resize: vertical; }
.form-panel { width: min(100%, 790px); }
.form-status { font-size: .9rem; color: #145e4b; font-weight: 600; margin: 5px 0 0; }
.form-status:empty { display: none; }
.error { color: #a42d24; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
fieldset { min-width: 0; margin: 0; border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px 14px; }
legend { padding: 0 7px; font-size: .91rem; font-weight: 700; }
.actions, .filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters > label { flex: 1 0 125px; }
.search { width: min(220px, 100%); }
.section-head { margin-bottom: 14px; }
.section-head p { margin-bottom: 0; }
.people { display: grid; gap: 9px; }
.person { border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; }
.person summary { display: flex; align-items: center; gap: 10px; min-height: 64px; cursor: pointer; list-style: none; }
.person summary::-webkit-details-marker { display: none; }
.person summary::after { content: "+"; color: #345aaf; font-size: 1.2rem; font-weight: 650; }
.person[open] summary::after { content: "−"; }
.person-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.person-name strong, .person-name small, td small { display: block; }
.person-name small, td small, .hint, .empty { color: var(--muted); }
.person-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border-top: 1px solid var(--border); padding: 13px 0 17px; }
.multiline { white-space: pre-wrap; overflow-wrap: anywhere; }
.pill { display: inline-flex; align-items: center; border-radius: 99px; padding: 3px 8px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.pill.ok { color: #095443; background: #dff6ed; }
.pill.waiting { color: #815008; background: #fff1d5; }
.pill.progress { color: #2148a0; background: #e6edff; }
.table-scroll { max-width: 100%; overflow-x: auto; }
table { border-spacing: 0; width: 100%; margin-top: 9px; text-align: left; font-size: .94rem; }
th, td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { background: #edf2fc; color: #293b60; white-space: nowrap; }
td:first-child { min-width: 155px; overflow-wrap: anywhere; }
.empty { background: #f6f8fd; border: 1px dashed #c7d3e8; padding: 16px; border-radius: 9px; margin-top: 8px; }
footer { padding: 23px 0 0; color: var(--muted); font-size: .86rem; }
@media (max-width: 940px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .nav { flex-direction: row; overflow: auto; padding: 8px 13px; border-right: 0; border-bottom: 1px solid var(--border); }
  .nav button[aria-current] { box-shadow: inset 0 -3px #285cda; }
}
@media (max-width: 620px) {
  .topbar { min-height: 65px; }
  .profile span { display: none; }
  .welcome { grid-template-columns: 1fr; width: calc(100% - 28px); gap: 15px; }
  .intro { min-height: 220px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .heading { flex-wrap: wrap; }
  .filters { width: 100%; }
  .person-details { grid-template-columns: 1fr; }
  .table-scroll th, .table-scroll td { padding: 8px; }
}
@media (max-width: 360px) {
  .fields { grid-template-columns: 1fr; }
  .person summary { gap: 6px; }
  .person .avatar { width: 28px; height: 28px; flex-basis: 28px; }
}
.loading { display: block; max-width: 480px; }
.public-note { padding: 12px 16px; background: #e8efff; border: 1px solid #d2dffb; color: #153983; border-radius: 10px; }
.avatar-initials { display: grid; place-content: center; color: #183e98; font-size: .86rem; font-weight: 750; }
.approval-card { display: grid; gap: 12px; border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.approval-card fieldset { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.approval-card label { display: inline-flex; align-items: center; }
.approval-card input[type=checkbox] { width: 17px; min-height: 0; height: 17px; accent-color: var(--blue); }
.account-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
.account-actions > a { color: #fff; font-weight: 700; padding: 7px 12px; border: 1px solid #7189bc; border-radius: 8px; white-space: nowrap; }
#brand-grid th[scope=rowgroup] { background: #f1f5ff; color: #1e4089; }
#brand-grid input { min-width: 98px; }
#brand-grid td:nth-last-child(-n+2) { white-space: nowrap; }
#brand-grid .locked { color: #51617d; }
.account-actions > button { padding: 7px 12px; background: transparent; border-color: #7189bc; white-space: nowrap; }
.account-actions > button:hover { background: #2a3d62; }
.owner-setup { border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; }
.owner-setup summary { cursor: pointer; font-weight: 650; }
.owner-setup[open] label { margin-top: 9px; }
.approval-identity { display: flex; align-items: center; gap: 10px; overflow-wrap: anywhere; }
