:root{
  --bg:#f3f6fc;
  --panel:#ffffff;
  --panel-2:#eef3ff;
  --border:rgba(15,23,42,.12);
  --text:#0f172a;
  --muted:rgba(15,23,42,.62);
  --shadow: 0 18px 45px rgba(15,23,42,.10);

  --accent:#5b7cfa;
  --accent-2:#22c55e;
  --danger:#ef4444;
  --warn:#f59e0b;

  --radius:14px;
}

*{box-sizing:border-box}
html,body{min-height:100%}
body{
  margin:0;
  color:var(--text);
  background:
    radial-gradient(1100px 600px at 15% -10%, rgba(91,124,250,.12), transparent 60%),
    radial-gradient(900px 500px at 95% 0%, rgba(34,197,94,.09), transparent 55%),
    radial-gradient(1200px 800px at 40% 120%, rgba(245,158,11,.08), transparent 55%),
    var(--bg);
  background-repeat:no-repeat;
  background-size:100% 100%, 100% 100%, 100% 100%, auto;
  background-attachment:scroll;
  font-family: "Google Sans", "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing:.2px;
}

a{color:inherit}

.page{
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:14px;
  padding:28px 16px;
}

.card{
  width:min(430px, 100%);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(250,253,255,.92));
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
  backdrop-filter: blur(10px);
}

.page__footer{
  margin-top:0;
  color:var(--muted);
  font-size:12px;
  text-align:center;
}

.card__top{
  padding:22px 22px 14px;
  border-bottom:1px solid var(--border);
  background: linear-gradient(180deg, rgba(238,243,255,.95), rgba(255,255,255,.92));
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.card__top .brand{
  justify-content:center;
}
.brand__title{
  line-height:1.1;
}
.brand__title strong{display:block;font-weight:700}
.brand__title span{display:block;color:var(--muted);font-size:13px;margin-top:2px}
.brand__wordmark{
  height:44px;
  width:auto;
  max-width:220px;
  object-fit:contain;
  display:block;
}

.card__body{padding:18px 22px 22px}

.alert{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.75);
  margin-bottom:14px;
}
.alert__icon{margin-top:1px;color:var(--muted)}
.alert__text{
  font-size:13px;
  line-height:1.35;
}
.alert--error{border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.08)}
.alert--error .alert__icon{color: rgba(239,68,68,.95)}
.alert--success{border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.08)}
.alert--success .alert__icon{color: rgba(34,197,94,.95)}

.field{margin-bottom:12px}
.label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  color:var(--muted);
  font-size:13px;
  margin-bottom:7px;
}

.input{
  width:100%;
  border-radius:12px;
  padding:11px 12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.94);
  color:var(--text);
  outline:none;
}
.input--withbtn{padding-right:44px}
.input:focus{
  border-color: rgba(91,124,250,.55);
  box-shadow: 0 0 0 4px rgba(91,124,250,.15);
}

.inputwrap{
  position:relative;
  display:block;
}
.iconbtn{
  position:absolute;
  right:6px;
  top:50%;
  transform:translateY(-50%);
  border:0;
  background: transparent;
  color: rgba(15,23,42,.70);
  width:36px;
  height:36px;
  border-radius:10px;
  cursor:pointer;
}
.iconbtn:hover{color: rgba(15,23,42,.92)}
.iconbtn:active{transform:translateY(calc(-50% + 1px))}
.iconbtn:focus{
  outline:none;
  box-shadow: 0 0 0 4px rgba(91,124,250,.15);
}

.row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:8px;
  margin-bottom:14px;
}
.hint{color:var(--muted);font-size:12px}

.btn{
  width:100%;
  border:0;
  cursor:pointer;
  padding:11px 12px;
  border-radius:12px;
  font-weight:700;
  letter-spacing:.2px;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(91,124,250,1), rgba(34,197,94,.95));
}
.btn:hover{filter:brightness(1.03)}
.btn:active{transform: translateY(1px)}

.foot{
  margin-top:14px;
  display:flex;
  justify-content:space-between;
  color:var(--muted);
  font-size:12px;
}
.kbd{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding:2px 6px;
  border-radius:8px;
  border:1px solid var(--border);
  background: rgba(238,243,255,.95);
  color: rgba(15,23,42,.72);
}

.shell{
  width:min(980px, 100%);
  padding:18px 18px;
}

/* App layout (dashboard) */
.app{
  min-height:100%;
  display:grid;
  grid-template-columns: 264px 1fr;
}
.main{
  padding:18px 18px;
}
.muted{color:var(--muted)}
.main__top{
  position: sticky;
  top: 12px;
  z-index: 30;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(8px);
  box-shadow:var(--shadow);
}
.main__title{
  display:flex;
  align-items:center;
  gap:10px;
}
.main__title h1{
  margin:0;
  font-size:16px;
  font-weight:850;
  letter-spacing:.2px;
}
.main__subtitle{
  margin-top:3px;
  color:var(--muted);
  font-size:12px;
}
.main__title > .navitem__icon{
  width:36px;
  height:36px;
  border-radius:12px;
  font-size:14px;
}
/* main__top accent — same palette as sidebar navitem--active */
.main__top--dashboard{
  border-color: rgba(91,124,250,.25);
  background: linear-gradient(180deg, rgba(91,124,250,.09), rgba(255,255,255,.52));
}
.main__top--dashboard .main__title > .navitem__icon{
  background: rgba(91,124,250,.12);
  border-color: rgba(91,124,250,.28);
  color: rgba(91,124,250,.95);
}
.main__top--audience{
  border-color: rgba(139,92,246,.24);
  background: linear-gradient(180deg, rgba(139,92,246,.08), rgba(255,255,255,.52));
}
.main__top--audience .main__title > .navitem__icon{
  background: rgba(139,92,246,.11);
  border-color: rgba(139,92,246,.26);
  color: rgba(139,92,246,.95);
}
.main__top--campaigns{
  border-color: rgba(249,115,22,.26);
  background: linear-gradient(180deg, rgba(249,115,22,.08), rgba(255,255,255,.52));
}
.main__top--campaigns .main__title > .navitem__icon{
  background: rgba(249,115,22,.10);
  border-color: rgba(249,115,22,.28);
  color: rgba(234,88,12,.96);
}
.main__top--analytics{
  border-color: rgba(16,185,129,.24);
  background: linear-gradient(180deg, rgba(16,185,129,.08), rgba(255,255,255,.52));
}
.main__top--analytics .main__title > .navitem__icon{
  background: rgba(16,185,129,.10);
  border-color: rgba(16,185,129,.26);
  color: rgba(5,150,105,.96);
}
.main__top--orders{
  border-color: rgba(14,165,233,.26);
  background: linear-gradient(180deg, rgba(14,165,233,.08), rgba(255,255,255,.52));
}
.main__top--orders .main__title > .navitem__icon{
  background: rgba(14,165,233,.10);
  border-color: rgba(14,165,233,.28);
  color: rgba(2,132,199,.96);
}
.main__top--reports{
  border-color: rgba(236,72,153,.24);
  background: linear-gradient(180deg, rgba(236,72,153,.08), rgba(255,255,255,.52));
}
.main__top--reports .main__title > .navitem__icon{
  background: rgba(236,72,153,.10);
  border-color: rgba(236,72,153,.26);
  color: rgba(219,39,119,.95);
}
.main__top--settings{
  border-color: rgba(100,116,139,.26);
  background: linear-gradient(180deg, rgba(100,116,139,.09), rgba(255,255,255,.52));
}
.main__top--settings .main__title > .navitem__icon{
  background: rgba(100,116,139,.11);
  border-color: rgba(100,116,139,.28);
  color: rgba(71,85,105,.96);
}
.main__user{
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 8px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(238,243,255,.8);
}
.main__userName{
  font-size:12px;
  font-weight:800;
  line-height:1.1;
}
.main__userHint{
  font-size:11px;
  color:var(--muted);
  line-height:1.1;
  margin-top:2px;
}

.userMenu{
  position:relative;
}
.userMenu__trigger{
  cursor:pointer;
}
.userMenu__caret{
  color:var(--muted);
  font-size:11px;
  margin-left:2px;
}
.userMenu__dropdown{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  min-width:190px;
  border:1px solid var(--border);
  border-radius:12px;
  padding:6px;
  background: rgba(255,255,255,.98);
  box-shadow:var(--shadow);
  opacity:0;
  visibility:hidden;
  transform: translateY(4px);
  transition: .16s ease;
  z-index:20;
}
.userMenu:hover .userMenu__dropdown,
.userMenu:focus-within .userMenu__dropdown{
  opacity:1;
  visibility:visible;
  transform: translateY(0);
}
.userMenu__item{
  display:flex;
  align-items:center;
  gap:9px;
  width:100%;
  padding:9px 10px;
  border-radius:10px;
  text-decoration:none;
  color: rgba(15,23,42,.86);
  font-size:13px;
}
.userMenu__item:hover{
  background: rgba(91,124,250,.14);
}
.userMenu__item--danger:hover{
  background: rgba(239,68,68,.12);
  color: rgba(127,29,29,.95);
}

/* Dashboard rich blocks */
.surface{
  border:1px solid var(--border);
  border-radius:var(--radius);
  background: rgba(255,255,255,.84);
  box-shadow:var(--shadow);
  padding:14px;
}
.surface__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.surface__head strong{font-size:14px}
.surface__head span{font-size:12px;color:var(--muted)}

.filters{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:10px;
}
.filter{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.filter label{
  font-size:12px;
  color:var(--muted);
}
.filter select{
  width:100%;
  border-radius:10px;
  padding:9px 38px 9px 10px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.95);
  color:var(--text);
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(15,23,42,.45) 50%),
    linear-gradient(135deg, rgba(15,23,42,.45) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 1px),
    calc(100% - 12px) calc(50% - 1px);
  background-size:6px 6px, 6px 6px;
  background-repeat:no-repeat;
  color-scheme: light;
}
.filter select:focus{
  outline:none;
  border-color: rgba(91,124,250,.55);
  box-shadow: 0 0 0 4px rgba(91,124,250,.15);
}
.filter select option{
  background:#ffffff;
  color:#0f172a;
}

.kpiGrid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:10px;
}
.kpiCard{
  border:1px solid var(--border);
  border-radius:12px;
  background: rgba(238,243,255,.72);
  padding:12px;
}
.kpiCard__label{font-size:12px;color:var(--muted)}
.kpiCard__value{font-size:22px;font-weight:800;margin-top:5px;letter-spacing:.2px}
.kpiCard__meta{font-size:12px;color:rgba(91,124,250,.95);margin-top:6px}
.kpiCard__meta--good{color:rgba(34,197,94,.95)}
.kpiCard__meta--warn{color:rgba(245,158,11,.95)}

.contentGrid{
  display:grid;
  grid-template-columns: 2fr 1fr;
  gap:10px;
}
.surface--lg{
  grid-row: span 2;
}
.chartPanel{
  height:240px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(241,245,255,.65);
  position:relative;
  overflow:hidden;
}
.chartPanel__line{
  display:none;
}
.chartPanel__line--a{
  background: linear-gradient(180deg, transparent 35%, rgba(91,124,250,.24) 65%, transparent 66%);
}
.chartPanel__line--b{
  background: linear-gradient(180deg, transparent 45%, rgba(34,197,94,.22) 72%, transparent 73%);
}
.chartDummy{
  position:relative;
  z-index:2;
  display:flex;
  flex-direction:column;
  gap:10px;
  height:100%;
  padding:12px;
}
.chartDummy__legend{
  display:flex;
  gap:14px;
  align-items:center;
  font-size:12px;
  color:var(--muted);
}
.chartDummy__dot{
  width:9px;
  height:9px;
  border-radius:99px;
  display:inline-block;
  margin-right:6px;
}
.chartDummy__dot--a{background:rgba(91,124,250,.95)}
.chartDummy__dot--b{background:rgba(34,197,94,.9)}
.chartDummy__rows{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.chartDummy__row{
  display:grid;
  grid-template-columns: 38px 1fr auto;
  align-items:center;
  gap:10px;
  font-size:12px;
}
.chartDummy__label{color:var(--muted)}
.chartDummy__bars{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.chartDummy__bar{
  height:7px;
  border-radius:99px;
  max-width:100%;
}
.chartDummy__bar--a{
  background: linear-gradient(90deg, rgba(91,124,250,.95), rgba(91,124,250,.65));
}
.chartDummy__bar--b{
  background: linear-gradient(90deg, rgba(34,197,94,.95), rgba(34,197,94,.65));
}
.chartDummy__value{
  font-size:11px;
  color:var(--muted);
  white-space:nowrap;
}
.funnel{display:flex;flex-direction:column;gap:8px}
.funnel__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:13px;
}
.funnel__bar{
  width:100%;
  height:8px;
  border-radius:99px;
  background: rgba(15,23,42,.10);
  overflow:hidden;
}
.funnel__bar > div{
  height:100%;
  background: linear-gradient(90deg, rgba(91,124,250,.95), rgba(34,197,94,.85));
}
.miniList{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.miniList__row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:13px;
  padding:8px 10px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.78);
  border-radius:10px;
}
.miniList--highlight .miniList__row{
  background: rgba(238,243,255,.92);
  border-color: rgba(91,124,250,.24);
}
.miniList--highlight .miniList__row strong{
  color: rgba(15,23,42,.92);
}
.timeline{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.timeline__item{
  display:flex;
  align-items:flex-start;
  gap:10px;
  font-size:13px;
  padding:8px 10px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.78);
  border-radius:10px;
}
.timeline__dot{
  width:9px;
  height:9px;
  border-radius:99px;
  margin-top:5px;
  background: rgba(91,124,250,.95);
}

/* Audience */
.audienceGrid{
  display:grid;
  grid-template-columns: 2fr 1fr;
  gap:10px;
}
.audienceTabs{
  display:inline-flex;
  gap:6px;
  padding:4px;
  border:1px solid var(--border);
  border-radius:10px;
  background: rgba(255,255,255,.82);
  margin-bottom:10px;
}
.audienceTabs__item{
  border:0;
  color:var(--muted);
  background:transparent;
  padding:7px 10px;
  border-radius:8px;
  cursor:pointer;
  font-size:12px;
}
.audienceTabs__item--active{
  color:var(--text);
  background: rgba(91,124,250,.2);
}
.tableWrap{
  border:1px solid var(--border);
  border-radius:12px;
  overflow:auto;
}
.dataTable{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}
.dataTable th,
.dataTable td{
  padding:10px 10px;
  text-align:left;
  border-bottom:1px solid rgba(15,23,42,.08);
}
.dataTable th{
  color:var(--muted);
  font-weight:600;
  font-size:12px;
  background: rgba(238,243,255,.92);
}
.dataTable tr:hover td{
  background: rgba(238,243,255,.62);
}
.badge{
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border-radius:99px;
  font-size:11px;
  font-weight:600;
  border:1px solid rgba(15,23,42,.14);
}
.badge--lead{
  color:#1e3a8a;
  background: rgba(59,130,246,.20);
  border-color: rgba(59,130,246,.45);
}
.badge--prospect{
  color:#92400e;
  background: rgba(245,158,11,.22);
  border-color: rgba(245,158,11,.48);
}
.badge--customer{
  color:#166534;
  background: rgba(34,197,94,.20);
  border-color: rgba(34,197,94,.45);
}

/* Sidebar */
.sidebar{
  position:sticky;
  top:0;
  height:100dvh;
  padding:16px 14px;
  border-right:1px solid var(--border);
  background: rgba(255,255,255,.74);
  backdrop-filter: blur(10px);
}
.sidebar__brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 10px 14px;
  border-bottom:1px solid var(--border);
}
.sidebar__nav{
  padding:14px 6px;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.navitem{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid transparent;
  text-decoration:none;
  color: rgba(15,23,42,.78);
  font-size:13px;
  line-height:1.2;
}
.navitem:hover{
  background: rgba(238,243,255,.82);
  border-color: var(--border);
}
.navitem--active{
  color: rgba(15,23,42,.92);
}
.navitem--active.navitem--dashboard{
  background: rgba(91,124,250,.12);
  border-color: rgba(91,124,250,.28);
}
.navitem--active.navitem--dashboard .navitem__icon{
  color: rgba(91,124,250,.95);
}
.navitem--active.navitem--audience{
  background: rgba(139,92,246,.11);
  border-color: rgba(139,92,246,.26);
}
.navitem--active.navitem--audience .navitem__icon{
  color: rgba(139,92,246,.95);
}
.navitem--active.navitem--campaigns{
  background: rgba(249,115,22,.10);
  border-color: rgba(249,115,22,.28);
}
.navitem--active.navitem--campaigns .navitem__icon{
  color: rgba(234,88,12,.96);
}
.navitem--active.navitem--analytics{
  background: rgba(16,185,129,.10);
  border-color: rgba(16,185,129,.26);
}
.navitem--active.navitem--analytics .navitem__icon{
  color: rgba(5,150,105,.96);
}
.navitem--active.navitem--orders{
  background: rgba(14,165,233,.10);
  border-color: rgba(14,165,233,.28);
}
.navitem--active.navitem--orders .navitem__icon{
  color: rgba(2,132,199,.96);
}
.navitem--active.navitem--reports{
  background: rgba(236,72,153,.10);
  border-color: rgba(236,72,153,.26);
}
.navitem--active.navitem--reports .navitem__icon{
  color: rgba(219,39,119,.95);
}
.navitem--active.navitem--settings{
  background: rgba(100,116,139,.11);
  border-color: rgba(100,116,139,.28);
}
.navitem--active.navitem--settings .navitem__icon{
  color: rgba(71,85,105,.96);
}
.navitem__icon{
  width:28px;
  height:28px;
  border-radius:10px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,.92);
  border:1px solid var(--border);
  color: rgba(15,23,42,.72);
  font-size:12px;
}
.navitem--danger:hover{
  background: rgba(239,68,68,.10);
  border-color: rgba(239,68,68,.22);
}
.navitem--danger .navitem__icon{
  color: rgba(239,68,68,.95);
}
.sidebar__foot{
  position:absolute;
  left:14px;
  right:14px;
  bottom:14px;
  border-top:1px solid var(--border);
  padding-top:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.sidebar__foot small{
  color:var(--muted);
  font-size:12px;
  text-align:center;
}
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background: rgba(255,255,255,.84);
  box-shadow:var(--shadow);
}
.topbar .left{
  display:flex; align-items:center; gap:10px;
}
.pill{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(238,243,255,.9);
  color: rgba(15,23,42,.75);
  font-size:12px;
}
.link{
  color: rgba(15,23,42,.78);
  text-decoration:none;
}
.link:hover{text-decoration:underline}

/* Floating chat — AI-style assistant panel */
.chatDock{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:60;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
}
.chatDock__panel{
  position:relative;
}
.chatDock__toggle{
  cursor:pointer;
  display:block;
  padding:0;
  border:0;
  background:transparent;
  line-height:0;
}
.chatDock__logo{
  width:56px;
  height:56px;
  object-fit:contain;
  display:block;
  transform-origin: bottom right;
  transition: transform .2s ease, filter .2s ease;
}
.chatDock__toggle:hover .chatDock__logo{
  transform: translateY(-2px) scale(1.08);
  filter: drop-shadow(0 8px 14px rgba(15,23,42,.28));
}
.chatDock__sheet{
  position:absolute;
  right:0;
  bottom:70px;
  width:min(380px, calc(100vw - 28px));
  max-height:min(520px, calc(100vh - 120px));
  display:flex;
  flex-direction:column;
  border:1px solid rgba(148,163,184,.28);
  border-radius:16px;
  background: rgba(15,23,42,.98);
  box-shadow: 0 22px 55px rgba(2,6,23,.48), 0 0 0 1px rgba(255,255,255,.04) inset;
  overflow:hidden;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform: translateY(14px) scale(.96);
  transform-origin: bottom right;
  transition: opacity .2s ease, transform .25s cubic-bezier(.22,.9,.3,1), visibility .2s ease;
}
.chatDock__panel.is-open .chatDock__sheet{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform: translateY(0) scale(1);
}
.chatDock__panel.is-open .chatDock__logo{
  animation: chatDockPop .24s cubic-bezier(.2,.9,.3,1);
}
@keyframes chatDockPop{
  0%{transform: scale(1)}
  45%{transform: translateY(-2px) scale(1.12)}
  100%{transform: scale(1)}
}
.chatDock__head{
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  background: linear-gradient(180deg, rgba(30,41,59,.95), rgba(15,23,42,.92));
  border-bottom:1px solid rgba(148,163,184,.14);
}
.chatDock__headMain{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.chatDock__headAvatar{
  width:36px;
  height:36px;
  border-radius:12px;
  object-fit:cover;
  flex-shrink:0;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  border:1px solid rgba(148,163,184,.2);
}
.chatDock__headText{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.chatDock__headTitle{
  font-size:14px;
  font-weight:750;
  letter-spacing:-.01em;
  color: rgba(248,250,252,.98);
}
.chatDock__headMeta{
  font-size:11px;
  color: rgba(148,163,184,.92);
  display:flex;
  align-items:center;
  gap:6px;
}
.chatDock__pulse{
  width:6px;
  height:6px;
  border-radius:50%;
  background: #34d399;
  box-shadow: 0 0 0 2px rgba(52,211,153,.35);
  animation: chatDockPulse 2s ease-in-out infinite;
}
@keyframes chatDockPulse{
  0%,100%{ opacity:1; transform: scale(1)}
  50%{ opacity:.75; transform: scale(.92)}
}
.chatDock__chevron{
  font-size:12px;
  color: rgba(148,163,184,.75);
  transition: transform .2s ease;
  flex-shrink:0;
}
.chatDock__panel.is-open .chatDock__chevron{
  transform: rotate(180deg);
}
.chatDock__body{
  flex:1;
  min-height:0;
  display:flex;
  flex-direction:column;
  background: linear-gradient(180deg, rgba(15,23,42,.4), rgba(2,6,23,.35));
}
.chatDock__messages{
  flex:1;
  min-height:180px;
  max-height:340px;
  overflow-y:auto;
  overflow-x:hidden;
  padding:14px 12px;
  display:flex;
  flex-direction:column;
  gap:14px;
  scroll-behavior:smooth;
}
.chatDock__messages::-webkit-scrollbar{ width:6px}
.chatDock__messages::-webkit-scrollbar-thumb{
  background: rgba(100,116,139,.45);
  border-radius:99px;
}
.chatDock__msg{
  display:flex;
  gap:8px;
  align-items:flex-end;
  max-width:100%;
}
.chatDock__msg--assistant{
  align-self:flex-start;
}
.chatDock__msg--user{
  align-self:flex-end;
  flex-direction:row-reverse;
}
.chatDock__msgAvatar{
  width:28px;
  height:28px;
  border-radius:10px;
  object-fit:cover;
  flex-shrink:0;
  opacity:.95;
  border:1px solid rgba(148,163,184,.18);
}
.chatDock__msgStack{
  display:flex;
  flex-direction:column;
  gap:4px;
  max-width:min(280px, 85%);
  min-width:0;
}
.chatDock__msgStack--user{
  align-items:flex-end;
  max-width:min(300px, 90%);
}
.chatDock__msgLabel{
  font-size:10px;
  font-weight:650;
  text-transform:uppercase;
  letter-spacing:.06em;
  color: rgba(148,163,184,.75);
  padding-left:2px;
}
.chatDock__msgStack--user .chatDock__msgLabel{ display:none}
.chatDock__bubble{
  font-size:13px;
  line-height:1.45;
  border-radius:16px;
  padding:10px 14px;
  word-break:break-word;
}
.chatDock__bubble--assistant{
  color: rgba(241,245,249,.96);
  background: rgba(51,65,85,.72);
  border:1px solid rgba(148,163,184,.12);
  border-bottom-left-radius:6px;
}
.chatDock__bubble--user{
  color: rgba(255,255,255,.98);
  background: linear-gradient(135deg, rgba(37,99,235,.95), rgba(14,165,233,.88));
  border:1px solid rgba(255,255,255,.12);
  border-bottom-right-radius:6px;
  box-shadow: 0 4px 14px rgba(37,99,235,.22);
}
.chatDock__composer{
  flex-shrink:0;
  display:flex;
  align-items:flex-end;
  gap:8px;
  padding:10px 12px 12px;
  border-top:1px solid rgba(148,163,184,.12);
  background: rgba(15,23,42,.88);
}
.chatDock__srOnly{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
.chatDock__input{
  flex:1;
  min-width:0;
  min-height:44px;
  max-height:120px;
  border:1px solid rgba(148,163,184,.22);
  border-radius:22px;
  resize:none;
  padding:11px 16px;
  font:inherit;
  font-size:13px;
  line-height:1.4;
  color: rgba(248,250,252,.96);
  background: rgba(30,41,59,.55);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.chatDock__input::placeholder{
  color: rgba(148,163,184,.65);
}
.chatDock__input:focus{
  outline:none;
  border-color: rgba(96,165,250,.65);
  box-shadow: 0 0 0 3px rgba(59,130,246,.18);
}
.chatDock__send{
  flex-shrink:0;
  width:44px;
  height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:50%;
  cursor:pointer;
  color:#fff;
  font-size:15px;
  background: linear-gradient(145deg, rgba(37,99,235,1), rgba(14,165,233,.92));
  box-shadow: 0 4px 14px rgba(37,99,235,.35);
  transition: transform .12s ease, filter .12s ease;
}
.chatDock__send:hover{
  filter:brightness(1.06);
  transform: scale(1.04);
}
.chatDock__send:active{
  transform: scale(.97);
}

@media (max-width: 1180px){
  .contentGrid{grid-template-columns: 1fr}
  .surface--lg{grid-row:auto}
  .audienceGrid{grid-template-columns:1fr}
}
@media (max-width: 980px){
  .app{grid-template-columns: 1fr}
  .sidebar{display:none}
  .kpiGrid{grid-template-columns: repeat(2, minmax(0,1fr))}
  .filters{grid-template-columns:1fr}
  .chatDock{
    right:12px;
    bottom:12px;
  }
  .chatDock__logo{width:48px;height:48px}
  .chatDock__sheet{bottom:60px}
}

