:root{
  --bg:#050505;
  --panel:#0b0b0c;
  --panel2:#0f0f11;
  --border: rgba(255,27,45,.22);
  --borderStrong: rgba(255,27,45,.45);
  --text:#f3f3f4;
  --muted:#a5a5ad;
  --red:#ff1b2d;
  --red2:#b5000d;
  --shadow: 0 16px 50px rgba(0,0,0,.55);
  --easeOut: cubic-bezier(.2,.8,.2,1);
  --easeSoft: cubic-bezier(.2,.9,.25,1);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: radial-gradient(1000px 600px at 20% 10%, rgba(255,27,45,.08), transparent 60%),
              radial-gradient(900px 500px at 80% 0%, rgba(255,27,45,.06), transparent 55%),
              var(--bg);
  color:var(--text);
}
a{color:inherit}
.muted{color:var(--muted)}
.mono{font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space:pre-wrap; color:var(--text)}
.divider{height:1px;background:var(--border);margin:14px 0}
.badge{
  display:inline-block;
  font-size:12px;
  padding:3px 8px;
  border:1px solid var(--border);
  border-radius:999px;
  background:rgba(255,255,255,.02);
  margin-right:8px;
}

.topbar{
  position:sticky; top:0; z-index:20;
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 18px;
  background:rgba(5,5,5,.72);
  backdrop-filter: blur(12px);
  border-bottom:1px solid var(--border);
}
.brand{
  text-decoration:none;
  font-weight:800;
  letter-spacing:.3px;
  display:flex;
  align-items:center;
  gap:10px;
}
.brand span{color:var(--red)}
.brand__logo{
  width:26px;height:26px;border-radius:10px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.02);
  display:inline-flex;align-items:center;justify-content:center;
  overflow:hidden;
}
.brand__logo img{width:100%;height:100%;object-fit:cover;display:block}
.topbar__right{display:flex; gap:10px; align-items:center}
.fi{
  width:18px;
  height:18px;
  display:inline-block;
  background: currentColor;
  opacity:.95;
  -webkit-mask-image: var(--fi);
  mask-image: var(--fi);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  flex:0 0 auto;
}
.fi--sm{width:16px;height:16px}
.fi--md{width:18px;height:18px}
.fi--lg{width:20px;height:20px}
.navlink{
  text-decoration:none;
  padding:8px 10px;
  border-radius:10px;
  transition: transform .22s var(--easeOut), background .22s var(--easeOut), border-color .22s var(--easeOut);
  border:1px solid transparent;
  display:inline-flex;
  gap:8px;
  align-items:center;
}
.navlink:hover{background:rgba(255,255,255,.04); transform: translateY(-1px)}
.navlink--primary{border-color:rgba(255,27,45,.55); background:rgba(255,27,45,.10)}
.navlink--danger{border-color:rgba(255,27,45,.25)}

.page{padding:22px; max-width:1100px; margin:0 auto}
.panel__header{margin-bottom:16px}
.panel h2{margin:6px 0 6px}

.hero{padding:40px 0}
.hero__content{
  border:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border-radius:18px;
  padding:34px;
  box-shadow: var(--shadow);
}
.hero h1{font-size:42px; margin:0 0 10px}
.hero__cta{display:flex; gap:12px; margin-top:18px}

.grid{display:grid; gap:16px}
.grid--2{grid-template-columns:1fr 1fr}
@media (max-width: 900px){ .grid--2{grid-template-columns:1fr} .page{padding:14px} }

.card{
  border:1px solid var(--border);
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border-radius:16px;
  padding:18px;
  box-shadow: var(--shadow);
}
.card h3{margin:0 0 10px}
.card--auth{max-width:480px; margin:0 auto}

.auth{padding:24px 0}
.form{display:flex; flex-direction:column; gap:12px; margin-top:12px}
label span{display:block; font-size:13px; color:var(--muted); margin-bottom:6px}
input, textarea{
  width:100%;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.25);
  color:var(--text);
  padding:12px 12px;
  outline:none;
  transition: border-color .15s ease, transform .15s ease;
}
input:focus, textarea:focus{border-color: rgba(255,27,45,.65)}
.checkbox{display:flex; gap:10px; align-items:center}
.checkbox input{
  width:18px;
  height:18px;
  border-radius:6px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.02);
  appearance:none;
  -webkit-appearance:none;
  display:inline-grid;
  place-content:center;
  cursor:pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .12s ease;
}
.checkbox input:hover{transform: translateY(-1px); border-color: rgba(255,27,45,.40)}
.checkbox input:focus{outline:none; box-shadow: 0 0 0 5px rgba(255,27,45,.14)}
.checkbox input:checked{
  background: rgba(255,27,45,.18);
  border-color: rgba(255,27,45,.70);
}
.checkbox input:checked::before{
  content:'';
  width:10px;
  height:10px;
  border-radius:3px;
  background: rgba(255,255,255,.92);
}

.btn{
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  color:var(--text);
  padding:10px 14px;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition: transform .22s var(--easeOut), box-shadow .22s var(--easeOut), border-color .22s var(--easeOut), background .22s var(--easeOut);
}
.btn:hover{transform: translateY(-1px); border-color: rgba(255,27,45,.35)}
.btn:disabled{opacity:.55; cursor:not-allowed; transform:none}
.btn--primary{
  border-color: rgba(255,27,45,.65);
  background: linear-gradient(180deg, rgba(255,27,45,.18), rgba(255,27,45,.08));
  box-shadow: 0 10px 30px rgba(255,27,45,.12);
}
.btn--ghost{background:transparent}
.btn--full{width:100%}
.iconbtn{
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  color:var(--text);
  border-radius:12px;
  padding:8px 10px;
  cursor:pointer;
  transition: transform .22s var(--easeOut), border-color .22s var(--easeOut), background .22s var(--easeOut);
}
.iconbtn:hover{transform: translateY(-1px); border-color: rgba(255,27,45,.35)}

.alert{
  border-radius:14px;
  padding:12px 12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  margin:12px 0;
}
.alert ul{margin:0; padding-left:18px}
.alert--danger{border-color: rgba(255,27,45,.35)}
.alert--success{border-color: rgba(120,255,120,.22)}

/* Pricing */
.pricing__grid{display:grid; gap:16px; grid-template-columns:repeat(3, 1fr)}
@media (max-width: 900px){ .pricing__grid{grid-template-columns:1fr} }
.pricecard{
  position:relative;
  border:1px solid var(--border);
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border-radius:16px;
  padding:18px;
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  gap:10px;
  transition: transform .22s var(--easeOut), border-color .22s var(--easeOut), box-shadow .22s var(--easeOut);
}
.pricecard:hover{transform: translateY(-2px); border-color: rgba(255,27,45,.35)}
.pricecard--featured{border-color: rgba(255,27,45,.70); box-shadow: 0 20px 60px rgba(255,27,45,.10)}
.pill{
  position:absolute; top:12px; right:12px;
  font-size:12px; padding:4px 10px;
  background: rgba(255,27,45,.15);
  border:1px solid rgba(255,27,45,.50);
  border-radius:999px;
}
.price{font-size:34px; font-weight:800}
.price span{font-size:14px; color:var(--muted); font-weight:500}
.pricecard ul{margin:0; padding-left:18px; color:var(--muted)}

/* Chat layout */
body.chatpage .page{max-width:none; padding:0}
.chatlayout{
  height: calc(100vh - 58px);
  display:grid;
  grid-template-columns: 320px 1fr;
  transition: grid-template-columns .26s var(--easeSoft);
}
@media (max-width: 900px){
  .chatlayout{grid-template-columns:1fr; height:auto}
  .sidebar{display:none}
}
.sidebar{
  border-right:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
  display:flex;
  flex-direction:column;
}
.sidebar--hover{
  width: 76px;
  transition: width .26s var(--easeSoft);
  overflow:hidden;
}
.chatlayout:has(.sidebar--hover){ grid-template-columns: 76px 1fr; }
.sidebar--hover:hover{
  width: 320px;
}
.chatlayout:has(.sidebar--hover:hover){ grid-template-columns: 320px 1fr; }
.sidebar--hover .sidebar__top,
.sidebar--hover .sidebar__bottom{padding:16px}
.sidebar__top{display:flex; flex-direction:column; gap:12px}
.sidebar--hover .sidebar__top{gap:12px}
.sidebar--hover .btn{padding:12px 14px}
.sidebar--hover .btn--full{justify-content:flex-start}
.sidebar--hover .btn--full + .btn--full{margin-top:2px}
.sidebar--hover .sidebar__list{
  padding:10px;
  overflow:hidden; /* no scrollbar while collapsed */
}
.sidebar--hover:hover .sidebar__list{
  overflow:auto; /* show only when expanded and needed */
}
.sidebar--hover .btn--full{justify-content:flex-start}
.sidebar--hover .btn__label,
.sidebar--hover .sidebrand__text,
.sidebar--hover .chatitem__title,
.sidebar--hover .chatitem__meta,
.sidebar--hover .me__name,
.sidebar--hover .me__plan,
.sidebar--hover .sidebar__sectionTitle{
  opacity:0;
  transform: translateX(-4px);
  transition: opacity .18s var(--easeOut), transform .18s var(--easeOut);
  white-space:nowrap;
}
.sidebar--hover:hover .btn__label,
.sidebar--hover:hover .sidebrand__text,
.sidebar--hover:hover .chatitem__title,
.sidebar--hover:hover .chatitem__meta,
.sidebar--hover:hover .me__name,
.sidebar--hover:hover .me__plan,
.sidebar--hover:hover .sidebar__sectionTitle{
  opacity:1;
  transform:none;
}
.sidebar--hover .btn__icon{
  display:inline-flex;
  width:34px;height:34px;
  align-items:center;justify-content:center;
  border-radius:10px;
  background: rgba(255,255,255,.04);
  border:1px solid var(--border);
}
.sidebar--hover .btn__icon .fi{
  width:20px;height:20px;
}
.sidebar--hover .chatitem__dot{
  width:12px;height:12px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 0 0 5px rgba(255,255,255,.07);
}
.sidebrand{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
}
.sidebrand__logo{
  width:56px;height:56px;border-radius:18px;
  background: radial-gradient(circle at 30% 30%, rgba(255,27,45,.35), rgba(255,255,255,.03) 55%),
              rgba(255,255,255,.02);
  border:1px solid rgba(255,27,45,.25);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.sidebrand__logo img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  image-rendering: -webkit-optimize-contrast;
  transform: translateZ(0);
  backface-visibility: hidden;
}
.sidebrand__title{font-weight:850}
.sidebrand__sub{font-size:12px;margin-top:2px}

/* Sidebar collapsed polish */
.sidebar--hover:not(:hover) .sidebrand{
  justify-content:center;
  margin-bottom:12px;
  width:100%;
}
.sidebar--hover:not(:hover) .sidebrand__text{display:none}
.sidebar--hover:not(:hover) .sidebrand__logo{margin:0 auto;}
.sidebar--hover:not(:hover) .btn--full{
  width:56px;
  align-self:center;
  justify-content:center;
  padding:0;
  border-color:transparent;
  background:transparent;
  box-shadow:none;
}
.sidebar--hover:not(:hover) .btn--primary{
  border-color:transparent;
  background:transparent;
}
.sidebar--hover:not(:hover) .btn__icon{
  width:56px;
  height:56px;
  border-radius:18px;
  background: transparent;
  border:1px solid transparent;
}
.sidebar--hover:not(:hover) .btn--primary .btn__icon{
  border-color: transparent;
  background: transparent;
}
.sidebar--hover:not(:hover) .btn{gap:0}
.sidebar--hover:not(:hover) .btn__label{display:none}
.sidebar--hover:not(:hover) .btn__icon .fi{width:22px;height:22px}
.sidebar--hover:not(:hover) .sidebar__sectionTitle{display:none}

/* Collapsed chat items should match the same icon-tile style */
.sidebar--hover:not(:hover) .chatitem{
  width:56px;
  align-self:center;
  padding:0;
  margin:0 0 12px 0;
  border-color:transparent;
  background:transparent;
}
.sidebar--hover:not(:hover) .chatitem__row{justify-content:center}
.sidebar--hover:not(:hover) .chatitem__title,
.sidebar--hover:not(:hover) .chatitem__meta{display:none}
.sidebar--hover:not(:hover) .chatitem__ico{
  width:56px;
  height:56px;
  border-radius:18px;
  background: transparent;
  border:1px solid transparent;
}
.sidebar--hover:not(:hover) .chatitem--active .chatitem__ico{
  border-color: transparent;
  background: transparent;
}
.sidebar--hover:not(:hover) .chatitem__ico .fi{width:22px;height:22px}

/* Feature cards w/ icons */
.featuregrid--cards{margin-top:12px}
.feature--card{
  position:relative;
  padding:16px;
}
.feature--mini .feature__kicker{font-size:14px;line-height:1.25}
.feature--mini .muted{font-size:13px;line-height:1.35}
.featuremega{
  margin-top:12px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:12px;
}
@media (max-width: 1100px){
  .featuremega{grid-template-columns: repeat(2, minmax(0, 1fr));}
}
@media (max-width: 720px){
  .featuremega{grid-template-columns: 1fr;}
}
.feature__icon{
  width:44px;height:44px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(255,27,45,.25);
  background: radial-gradient(circle at 30% 30%, rgba(255,27,45,.22), rgba(255,255,255,.02) 60%);
  margin-bottom:10px;
}
.sidebar__sectionTitle{font-size:12px; margin:6px 8px 10px}
.chatitem__row{display:flex; gap:10px; align-items:center}
.chatitem__dot{display:none}
.chatitem__ico{
  width:34px;height:34px;
  border-radius:10px;
  background: rgba(255,255,255,.04);
  border:1px solid var(--border);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}
.chatitem__ico .fi{width:20px;height:20px}

/* Modern scrollbar */
html{scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) rgba(255,255,255,.04)}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background: rgba(255,255,255,.04); border-radius:999px}
::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, rgba(255,255,255,.20), rgba(255,255,255,.10));
  border:1px solid rgba(255,255,255,.10);
  border-radius:999px;
}
::-webkit-scrollbar-thumb:hover{
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.14));
}
.sidebar__top{padding:14px}
.sidebar__list{padding:8px; overflow:auto; flex:1}
.sidebar__bottom{padding:14px; border-top:1px solid var(--border)}
.chatitem{
  width:100%;
  text-align:left;
  background:transparent;
  border:1px solid transparent;
  border-radius:12px;
  padding:12px 12px;
  color:var(--text);
  cursor:pointer;
  transition: background .22s var(--easeOut), border-color .22s var(--easeOut), transform .22s var(--easeOut);
  margin-bottom:10px;
}
.chatitem:hover{background:rgba(255,255,255,.04); transform: translateY(-1px)}
.chatitem--active{border-color: rgba(255,27,45,.40); background: rgba(255,27,45,.07)}
.chatitem__title{font-weight:650}
.chatitem__meta{font-size:12px; margin-top:4px}
.me__name{font-weight:700}

.chat{display:flex; flex-direction:column; min-width:0}
.chat__header{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px;
  border-bottom:1px solid var(--border);
  background: rgba(0,0,0,.25);
}
.chat__title{font-weight:750}
.chat__messages{
  flex:1;
  overflow:auto;
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.bubble{
  max-width: 820px;
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px 14px;
  background: rgba(255,255,255,.02);
  animation: pop .18s var(--easeOut);
}
@keyframes pop{from{transform: translateY(2px); opacity:.65}to{transform:none; opacity:1}}
.bubble__meta{font-size:12px; color:var(--muted); margin-bottom:6px}
.bubble__content{color:var(--text)}
.bubble--user{
  margin-left:auto;
  border-color: rgba(255,27,45,.25);
  background: linear-gradient(180deg, rgba(255,27,45,.09), rgba(255,255,255,.02));
}
.bubble--assistant{margin-right:auto}
.bubble--pending{opacity:.95}
.bubble__attach{margin-top:10px}

.chat__composer{
  border-top:1px solid var(--border);
  padding:14px 16px;
  background: rgba(0,0,0,.25);
}
#composerForm{display:flex; gap:10px; align-items:center}
#composerInput{flex:1}
.chat__hint{font-size:12px; margin-top:8px}

.chatComposerStack{display:flex; flex-direction:column; gap:8px}
.chatImagePreview img{
  max-width:100%;
  max-height:200px;
  border-radius:12px;
  border:1px solid var(--border);
  object-fit:contain;
  background:rgba(0,0,0,.25);
}
.bubble__userimg{
  margin-bottom:10px;
}
.bubble__userimg img{
  max-width:min(100%, 520px);
  max-height:360px;
  border-radius:12px;
  border:1px solid var(--border);
  object-fit:contain;
  display:block;
  background:rgba(0,0,0,.2);
}

/* Landing guest composer */
body.landing .landingComposer{display:flex; flex-direction:column; gap:10px}
body.landing .landingComposer__row{display:flex; gap:10px; align-items:center}
body.landing #landingComposer{
  flex:1;
  min-width:0;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.25);
  color:var(--text);
  padding:10px 12px;
  outline:none;
}
.landingThumb{
  max-width:160px;
  border-radius:12px;
  border:1px solid var(--border);
  object-fit:cover;
  background:rgba(0,0,0,.25);
}

/* Landing */
body.landing .page{max-width:none;padding:0}
body.landing{overflow:hidden}
.chatlayout--landing{height: calc(100vh - 58px)}
.featuregrid{display:grid; grid-template-columns:repeat(3,1fr); gap:14px}
@media (max-width:900px){ .featuregrid{grid-template-columns:1fr} }
.feature{
  border:1px solid var(--border);
  background: rgba(255,255,255,.02);
  border-radius:14px;
  padding:14px;
}
.feature__kicker{font-weight:780; margin-bottom:6px}

/* Modal (paywall) */
.modal{position:fixed; inset:0; z-index:50; display:none}
.modal--ui{z-index:120}
.modal.is-open{display:block}
.modal__backdrop{position:absolute; inset:0; background: rgba(0,0,0,.65); backdrop-filter: blur(6px)}
.modal__card{
  position:absolute;
  left:50%; top:50%;
  transform: translate(-50%, -50%);
  width:min(560px, calc(100vw - 24px));
  border:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border-radius:18px;
  padding:16px;
  box-shadow: var(--shadow);
}
.modal__top{display:flex; align-items:center; justify-content:space-between; gap:10px}
.modal__title{font-weight:850}

.dots{display:inline-flex; gap:6px; align-items:center; height:16px}
.dots span{
  width:7px; height:7px; border-radius:99px; display:inline-block;
  background: rgba(255,27,45,.85);
  animation: bounce 1s infinite ease-in-out;
}
.dots span:nth-child(2){animation-delay:.12s}
.dots span:nth-child(3){animation-delay:.24s}
@keyframes bounce{
  0%, 80%, 100% { transform: translateY(0); opacity:.5 }
  40% { transform: translateY(-6px); opacity:1 }
}

/* Admin */
.adminlist{display:flex; flex-direction:column; gap:10px; max-height:520px; min-height:220px; overflow:auto; contain:layout}
.adminitem{
  width:100%;
  text-align:left;
  border:1px solid var(--border);
  background: rgba(255,255,255,.02);
  border-radius:14px;
  padding:12px;
  cursor:pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.adminitem:hover{border-color: rgba(255,27,45,.35); background: rgba(255,27,45,.05); box-shadow:0 4px 14px rgba(0,0,0,.2)}
.adminitem--active{
  border-color: rgba(255,27,45,.55);
  background: rgba(255,27,45,.08);
  box-shadow:0 0 0 1px rgba(255,27,45,.2);
}
.adminitem__top{display:flex; justify-content:space-between; gap:10px; align-items:center}
.adminitem__title{font-weight:750; color:var(--text)}
.adminitem__user{font-size:12px; color:var(--muted)}
.adminitem__msg{margin-top:8px; color:rgba(243,243,244,.95); font-size:13px; line-height:1.45}

.adminThreadWrap{
  margin-top:12px;
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px 12px;
  background:rgba(0,0,0,.22);
}
.adminThreadWrap__head{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-bottom:8px}
.adminThreadWrap__label{font-size:12px; margin:0}
.btn--sm{padding:6px 10px; font-size:13px; border-radius:10px}
.adminThreadMessages{
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height:min(42vh,400px);
  overflow:auto;
  padding:6px 2px;
}
.adminThreadMessages .bubble{max-width:100%}
.adminThreadMessages .bubble--user{margin-left:0}

.adminusers{display:flex; flex-direction:column; gap:10px; min-height:280px; contain:layout}
.adminuser{
  display:flex;
  justify-content:space-between;
  gap:12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.02);
  border-radius:14px;
  padding:12px;
}
.adminuser__name{font-weight:800}
.adminuser__right{text-align:right; display:flex; flex-direction:column; gap:6px; align-items:flex-end}

/* Rich chat formatting (fenced code + inline `code`) */
.msg-richwrap{font-size:15px;line-height:1.55;color:var(--text);word-break:break-word}
.msg-p{margin:0 0 10px;color:var(--text)}
.msg-p:last-child{margin-bottom:0}
.msg-inline-code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:.92em;
  padding:2px 7px;
  border-radius:8px;
  background:rgba(255,27,45,.12);
  border:1px solid rgba(255,27,45,.22);
}
.msg-codeblock{
  border:1px solid var(--border);
  border-radius:14px;
  overflow:hidden;
  margin:12px 0;
  background:rgba(0,0,0,.38);
  box-shadow:0 10px 30px rgba(0,0,0,.25);
}
.msg-codeblock__bar{
  font-size:11px;
  font-weight:750;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
  padding:7px 12px;
  border-bottom:1px solid var(--border);
  background:rgba(255,255,255,.02);
}
.msg-codeblock__pre{margin:0;padding:12px 14px;overflow:auto;max-height:min(52vh,520px)}
.msg-codeblock__pre code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:13px;
  line-height:1.55;
  color:#ececf1;
  white-space:pre;
}

/* Admin: match selects / numbers / file buttons to dark UI */
body.adminpage select.ui-select,
body.adminpage select{
  width:auto;
  min-width:140px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.28);
  color:var(--text);
  padding:10px 12px;
  outline:none;
  cursor:pointer;
  transition:border-color .15s ease, box-shadow .15s ease;
}
body.adminpage select:focus{border-color:rgba(255,27,45,.65);box-shadow:0 0 0 4px rgba(255,27,45,.12)}
body.adminpage input[type="number"]{
  width:auto;
  min-width:100px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(0,0,0,.28);
  color:var(--text);
  padding:10px 12px;
}
body.adminpage input[type="number"]:focus{border-color:rgba(255,27,45,.65);box-shadow:0 0 0 4px rgba(255,27,45,.12)}
body.adminpage input[type="file"]{font-size:13px;color:var(--muted)}
body.adminpage input[type="file"]::file-selector-button{
  margin-right:10px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  color:var(--text);
  padding:8px 12px;
  cursor:pointer;
  transition:border-color .15s ease, background .15s ease;
}
body.adminpage input[type="file"]::file-selector-button:hover{border-color:rgba(255,27,45,.4);background:rgba(255,27,45,.06)}

body.adminpage #adminContext{color:var(--text)}
body.adminpage #adminContext .mono{color:var(--text)}
body.adminpage #adminContext .muted{color:var(--muted)}
body.adminpage #adminContext .msg-richwrap,
body.adminpage #adminContext .msg-p{color:var(--text)}

