:root {
  color-scheme: light;
  --accent: #047857;
  --accent-light: #e0f5ec;
  --sidebar: #102e25;
  --ink: #14352b;
  --muted: #536d62;
  --line: #dbe7e1;
  --paper: #fff;
  --bg: #f3f7f5;
  font-family: Inter, "Noto Sans Bengali", "Nirmala UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
a { color: var(--accent); }
button, input, textarea, select { font: inherit; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.85rem, 4vw, 2.6rem); line-height: 1.2; letter-spacing: -.035em; }
h2 { font-size: 1.12rem; margin-bottom: .7rem; }
p + p { margin-top: .4rem; }
small, .muted { color: var(--muted); }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: .65rem;
  padding: .52rem .8rem; color: var(--ink); text-decoration: none; cursor: pointer;
  font-size: .87rem; font-weight: 600; min-height: 42px;
}
button:hover, .button:hover { border-color: var(--accent); }
:focus-visible { outline: 3px solid #087c63; outline-offset: 3px; }
button.primary { color: white; background: var(--accent); border-color: transparent; }
label { display: grid; gap: .3rem; font-size: .84rem; font-weight: 600; min-width: 0; }
input, textarea, select {
  color: var(--ink); background: var(--paper); border: 1px solid var(--line);
  padding: .55rem .68rem; border-radius: .6rem; min-height: 42px; width: 100%;
  min-width: 0; font-size: 1rem;
}
input[type=color] { padding: .2rem; }
input[type=checkbox] { width: 1.1rem; min-height: 1.1rem; accent-color: var(--accent); }
textarea { resize: vertical; }
summary { cursor: pointer; font-weight: 600; }
.layout { display: grid; grid-template-columns: 235px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: var(--sidebar); padding: 1.6rem 1rem; color: #ecfff6;
  position: sticky; top: 0; height: 100dvh; overflow: auto; display: flex; flex-direction: column;
}
.logo { display: inline-flex; align-items: center; gap: .65rem; font-weight: 800; font-size: 1.25rem; text-decoration: none; color: inherit; }
.logo span {
  display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: .72rem;
  color: #123529; background: #8ce9bd; font-size: 1.45rem;
}
.workspace-name { border: 1px solid #396052; border-radius: .8rem; padding: .65rem .75rem; margin: 1.5rem 0 1rem; font-weight: 700; overflow-wrap: anywhere; }
.workspace-name small { display: block; color: #bad8ca; font-size: .64rem; letter-spacing: .11em; }
.sidebar nav { display: grid; gap: .22rem; }
.sidebar nav a { padding: .55rem .65rem; display: flex; align-items: center; gap: .6rem; color: #d9efe5; text-decoration: none; font-size: .87rem; border-radius: .6rem; }
.sidebar nav a:hover { background: #25473b; }
.sidebar nav a[aria-current] { background: var(--accent); color: #fff; font-weight: 600; }
.sidebar nav a span { width: 1.15rem; font-size: 1.1rem; text-align: center; }
.customer-link { margin-top: auto; padding: 1rem .6rem 0; font-size: .85rem; color: #b7f5d7; }
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .85rem; min-height: 65px;
  padding: .75rem clamp(1rem, 3vw, 2.1rem); background: var(--paper); border-bottom: 1px solid var(--line);
}
.top-business { font-weight: 700; overflow-wrap: anywhere; }
.top-business small { font-weight: 500; }
.search { margin-left: auto; width: min(240px, 100%); }
.profile { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.role, .badge { padding: .2rem .55rem; border-radius: 1rem; background: var(--accent-light); color: #075742; font-weight: 600; font-size: .78rem; }
.badge.warn { background: #fff0d4; color: #814c01; }
.content { max-width: 1450px; margin: auto; padding: 1.7rem clamp(.9rem, 3vw, 2.1rem) 3rem; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.eyebrow { font-size: .67rem; color: var(--muted); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; overflow-wrap: anywhere; }
.date { font-size: .78rem; color: var(--muted); padding: .25rem .55rem; background: #e6efea; border-radius: .45rem; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .85rem; margin-bottom: .9rem; }
.metric, .card {
  background: var(--paper); border: 1px solid var(--line); border-radius: .95rem;
  padding: clamp(.85rem, 2vw, 1.25rem); min-width: 0; box-shadow: 0 3px 10px #10372806;
}
.metric span { font-size: .84rem; color: var(--muted); display: block; font-weight: 600; }
.metric strong { font-size: clamp(1.1rem, 2.1vw, 1.65rem); letter-spacing: -.025em; display: block; margin: .3rem 0 .12rem; overflow-wrap: anywhere; }
.metric small { font-size: .73rem; display: block; }
.card { margin-bottom: .9rem; }
.split { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(0,1fr); gap: .9rem; }
.section-head, .line { display: flex; align-items: center; justify-content: space-between; gap: .65rem; flex-wrap: wrap; }
.section-head { margin-bottom: .5rem; }
.section-head h2 { margin: 0; }
.line { padding: .55rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.line:last-child { border-bottom: 0; }
.line p { font-size: .9rem; }
.chart { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: .3rem; min-height: 165px; }
.chart-day { display: grid; align-content: end; text-align: center; min-width: 0; }
.chart-day small { font-size: .68rem; overflow-wrap: anywhere; }
.chart-track { height: 120px; display: flex; align-items: end; justify-content: center; border-bottom: 1px solid var(--line); }
.chart-track i { display: block; background: var(--accent); width: 60%; border-radius: .36rem .36rem 0 0; }
.chart-track i.negative { background: #b75046; }
.spotlight {
  display: flex; align-items: center; gap: .85rem; text-decoration: none; padding: 1rem 1.15rem;
  background: #ddf6eb; color: #114334; border-radius: .95rem;
}
.spotlight > span { font-size: 1.65rem; }
.spotlight b { margin-left: auto; }
.spotlight p { color: #385f51; font-size: .87rem; }
.fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(155px,1fr)); gap: .7rem; align-items: end; }
.inline, .chips { display: flex; flex-wrap: wrap; gap: .65rem; align-items: end; }
.filter { margin-bottom: .9rem; }
.stack { display: grid; gap: .7rem; justify-items: start; }
.stack label, .stack .fields, .stack .stack { width: 100%; }
.compact { margin-top: .65rem; min-width: 130px; }
.check { display: flex; align-items: center; gap: .55rem; font-weight: 500; }
.grow { flex: 1 1 235px; }
.line-input { display: grid; width: 100%; grid-template-columns: minmax(0,2fr) minmax(65px,1fr) auto; align-items: end; gap: .6rem; }
.form-card[open] > summary { margin-bottom: .75rem; }
.scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .87rem; }
th, td { padding: .65rem .55rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 700; white-space: nowrap; }
.order-row { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.order-row:last-child { border-bottom: 0; }
.order-row summary > span, .order-row summary > strong { display: inline-block; margin-right: .55rem; overflow-wrap: anywhere; }
.order-row form { margin-top: .65rem; }
.notice { padding: .7rem .85rem; margin-bottom: .85rem; border-radius: .65rem; background: #e3f5ec; color: #12553f; }
.notice.error { background: #ffe7e4; color: #862821; }
.bubble { background: #e5f6ee; padding: .75rem .9rem; border-radius: .85rem; margin: .65rem 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble.customer { background: #eff3f2; }
.after { margin-top: .75rem; }
.access { max-width: 940px; margin: 8vh auto; padding: 1rem; display: grid; grid-template-columns: 1.12fr 1fr; }
.access-brand, .access-form { padding: clamp(1.25rem, 4vw, 3rem); }
.access-brand { background: var(--sidebar); color: #f1fff8; border-radius: 1.15rem 0 0 1.15rem; overflow: hidden; }
.access-brand h1 { margin: 2rem 0 .8rem; }
.access-brand p { color: #c1decf; }
.access-form { background: var(--paper); border: 1px solid var(--line); border-radius: 0 1.15rem 1.15rem 0; display: grid; align-content: center; gap: 1rem; }
.mini-chart { height: 80px; display: flex; gap: .75rem; align-items: end; margin-top: 1.35rem; }
.mini-chart i { background: #61cda0; display: block; width: 24px; border-radius: .35rem .35rem 0 0; height: 45%; }
.mini-chart i:nth-child(2n) { height: 70%; }
.mini-chart i:nth-child(n+5) { height: 95%; }
.chat-shell { width: min(640px, 100%); margin: auto; padding: 1.25rem; }
.chat-shell h1 { margin: 1.2rem 0 .7rem; }
.chat-feed { margin-bottom: 1rem; }
.chat-feed .bubble.customer { margin-left: 2rem; }
.mobile-menu, .bottom-nav { display: none; }
@media (max-width: 1030px) {
  .layout { grid-template-columns: 195px minmax(0,1fr); }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 730px) {
  .layout { display: block; }
  .sidebar, .search, .top-business small { display: none; }
  .topbar { padding: .55rem .75rem; }
  .top-business { flex: 1; }
  .mobile-menu { display: block; position: relative; }
  .mobile-menu summary { border: 1px solid var(--line); border-radius: .55rem; padding: .35rem .5rem; list-style: none; }
  .mobile-menu[open] { flex-basis: 100%; }
  .mobile-menu a { display: block; padding: .4rem .5rem; text-decoration: none; }
  .profile .button span { display: none; }
  .content { padding-bottom: 5.6rem; }
  .bottom-nav { display: flex; position: fixed; z-index: 2; bottom: 0; left: 0; right: 0; padding-bottom: env(safe-area-inset-bottom); background: var(--paper); border-top: 1px solid var(--line); }
  .bottom-nav a { color: var(--muted); flex: 1; text-align: center; font-size: .73rem; text-decoration: none; padding: .3rem; }
  .bottom-nav a span { display: block; font-size: 1.2rem; }
  .bottom-nav a[aria-current] { color: var(--accent); font-weight: 800; }
  .split { grid-template-columns: minmax(0,1fr); }
  .access { display: block; margin: 0 auto; }
  .access-brand { border-radius: 1rem 1rem 0 0; }
  .access-brand h1 { margin-top: 1rem; }
  .access-form { border-radius: 0 0 1rem 1rem; }
  .mini-chart { display: none; }
}
