/* ============================================================
   EduKart  -  Purple Gradient + Glassmorphism theme
   Pairs with Bootstrap 5. Load AFTER bootstrap.
   ============================================================ */
:root{
  --ek-violet:#7c3aed;
  --ek-indigo:#4f46e5;
  --ek-magenta:#a855f7;
  --ek-deep:#2e1065;
  --ek-ink:#1e1b3a;
  --ek-glass:rgba(255,255,255,.10);
  --ek-glass-strong:rgba(255,255,255,.16);
  --ek-border:rgba(255,255,255,.22);
  --ek-radius:18px;
  --ek-shadow:0 10px 40px rgba(46,16,101,.35);
  --ek-grad:linear-gradient(135deg,#7c3aed 0%,#a855f7 45%,#4f46e5 100%);
  --ek-grad-soft:linear-gradient(160deg,#1a1336 0%,#2e1065 55%,#3b1f7a 100%);
}

*{box-sizing:border-box}
body{
  font-family:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  color:#ece9ff;
  background:var(--ek-grad-soft);
  background-attachment:fixed;
  min-height:100vh;
  overflow-x:hidden;
}

/* ambient floating orbs behind everything */
body::before,body::after{
  content:"";position:fixed;z-index:-1;border-radius:50%;filter:blur(70px);opacity:.55;
  animation:float 14s ease-in-out infinite;
}
body::before{width:480px;height:480px;background:#a855f7;top:-120px;left:-100px}
body::after{width:560px;height:560px;background:#4f46e5;bottom:-160px;right:-120px;animation-delay:-7s}
@keyframes float{0%,100%{transform:translate(0,0)}50%{transform:translate(40px,-40px)}}

a{color:#d6ccff;text-decoration:none}
a:hover{color:#fff}

/* ---------- Glass surfaces ---------- */
.glass{
  background:var(--ek-glass);
  backdrop-filter:blur(16px) saturate(140%);
  -webkit-backdrop-filter:blur(16px) saturate(140%);
  border:1px solid var(--ek-border);
  border-radius:var(--ek-radius);
  box-shadow:var(--ek-shadow);
}
.glass-strong{background:var(--ek-glass-strong)}

/* ---------- Navbar ---------- */
.ek-nav{
  background:rgba(30,27,58,.55);
  backdrop-filter:blur(18px);
  border-bottom:1px solid var(--ek-border);
  position:sticky;top:0;z-index:1030;
}
.ek-brand{font-weight:800;font-size:1.4rem;letter-spacing:-.5px;color:#fff}
.ek-brand .cart{ -webkit-text-fill-color:initial }
.ek-nav .nav-link{color:#cfc6ff !important;font-weight:500}
.ek-nav .nav-link:hover{color:#fff !important}

/* ---------- Buttons ---------- */
.btn-ek{
  background:var(--ek-grad);border:0;color:#fff;font-weight:600;
  border-radius:999px;padding:.6rem 1.5rem;
  box-shadow:0 8px 24px rgba(124,58,237,.45);
  transition:transform .15s ease, box-shadow .15s ease;
}
.btn-ek:hover{color:#fff;transform:translateY(-2px);box-shadow:0 12px 32px rgba(168,85,247,.6)}
.btn-ghost{
  background:var(--ek-glass);border:1px solid var(--ek-border);color:#fff;
  border-radius:999px;padding:.6rem 1.5rem;font-weight:600;transition:.15s;
}
.btn-ghost:hover{background:var(--ek-glass-strong);color:#fff}

/* ---------- Hero ---------- */
.hero{position:relative;padding:5.5rem 0 4rem}
.hero h1{
  font-size:clamp(2.4rem,5.5vw,4.3rem);font-weight:800;line-height:1.05;letter-spacing:-1.5px;color:#fff;
}
.hero .grad-text{
  background:linear-gradient(120deg,#f0abfc,#c4b5fd,#818cf8);
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;
}
.hero p.lead{color:#d6cffb;font-size:1.2rem;max-width:560px}
.hero-card{
  animation:rise .8s cubic-bezier(.2,.8,.2,1) both;
}
.fade-up{animation:rise .7s cubic-bezier(.2,.8,.2,1) both}
.fade-up.d1{animation-delay:.1s}.fade-up.d2{animation-delay:.2s}.fade-up.d3{animation-delay:.3s}
@keyframes rise{from{opacity:0;transform:translateY(28px)}to{opacity:1;transform:translateY(0)}}

/* floating illustration tiles in hero */
.tile{
  border-radius:16px;padding:1rem 1.1rem;font-weight:600;color:#fff;
  background:var(--ek-glass);border:1px solid var(--ek-border);backdrop-filter:blur(12px);
  animation:bob 5s ease-in-out infinite;
}
.tile i{font-size:1.6rem}
.tile.b{animation-delay:-1.6s}.tile.c{animation-delay:-3.2s}
@keyframes bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-12px)}}

/* ---------- Stat strip ---------- */
.stat .n{font-size:2rem;font-weight:800;color:#fff}
.stat .l{color:#bcaff0;font-size:.85rem;text-transform:uppercase;letter-spacing:1px}

/* ---------- Category chips ---------- */
.cat-card{
  display:block;padding:1.4rem 1rem;text-align:center;color:#fff;
  transition:transform .18s ease, background .18s ease;
}
.cat-card:hover{transform:translateY(-5px);background:var(--ek-glass-strong);color:#fff}
.cat-card i{font-size:2rem;background:var(--ek-grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}

/* ---------- Product cards ---------- */
.prod{overflow:hidden;transition:transform .2s ease, box-shadow .2s ease;height:100%}
.prod:hover{transform:translateY(-6px);box-shadow:0 18px 50px rgba(124,58,237,.45)}
.prod .thumb{height:170px;background:var(--ek-grad);position:relative;display:flex;align-items:center;justify-content:center}
.prod .thumb img{width:100%;height:100%;object-fit:cover}
.prod .thumb .ptype{position:absolute;top:10px;left:10px;font-size:.7rem;background:rgba(0,0,0,.45);padding:.25rem .6rem;border-radius:999px}
.prod .feat{position:absolute;top:10px;right:10px;font-size:.7rem;background:linear-gradient(120deg,#fbbf24,#f59e0b);color:#3a2a00;font-weight:700;padding:.25rem .6rem;border-radius:999px}
.prod .body{padding:1rem}
.prod .title{font-weight:700;color:#fff;font-size:1rem;line-height:1.3}
.prod .price{font-weight:800;color:#fff;font-size:1.15rem}
.prod .store{color:#b9aef0;font-size:.8rem}

/* ---------- Forms ---------- */
.form-control,.form-select{
  background:rgba(255,255,255,.07);border:1px solid var(--ek-border);color:#fff;border-radius:12px;padding:.7rem .9rem;
}
.form-control:focus,.form-select:focus{
  background:rgba(255,255,255,.12);border-color:#a855f7;color:#fff;box-shadow:0 0 0 .2rem rgba(168,85,247,.3);
}
.form-control::placeholder{color:#a99fd6}
.form-label{color:#d6cffb;font-weight:500;margin-bottom:.35rem}
.form-select option{color:#1e1b3a}

/* ---------- Tables ---------- */
.table{color:#ece9ff}
.table>:not(caption)>*>*{background:transparent;border-color:var(--ek-border);color:#ece9ff}

/* ---------- Badges / pills ---------- */
.pill{font-size:.72rem;padding:.3rem .7rem;border-radius:999px;font-weight:600}
.pill-pending{background:rgba(251,191,36,.2);color:#fde68a}
.pill-approved{background:rgba(52,211,153,.2);color:#a7f3d0}
.pill-rejected{background:rgba(248,113,113,.2);color:#fecaca}
.pill-paid{background:rgba(52,211,153,.2);color:#a7f3d0}

/* ---------- Section heading ---------- */
.eyebrow{text-transform:uppercase;letter-spacing:3px;font-size:.75rem;color:#c4b5fd;font-weight:700}
.section-title{font-size:clamp(1.6rem,3vw,2.4rem);font-weight:800;color:#fff;letter-spacing:-.5px}

/* ---------- Footer ---------- */
.ek-footer{border-top:1px solid var(--ek-border);margin-top:4rem;background:rgba(20,16,40,.55);backdrop-filter:blur(14px)}
.ek-footer a{color:#bcaff0}
.ek-footer a:hover{color:#fff}

/* ---------- Dashboard sidebar ---------- */
.side-link{display:flex;align-items:center;gap:.7rem;padding:.7rem 1rem;border-radius:12px;color:#cfc6ff;font-weight:500;margin-bottom:.25rem}
.side-link:hover,.side-link.active{background:var(--ek-glass-strong);color:#fff}
.side-link i{font-size:1.1rem}

/* ---------- Star rating ---------- */
.stars{color:#fbbf24;letter-spacing:1px}

@media (prefers-reduced-motion: reduce){
  *{animation:none !important;transition:none !important}
}

/* ============================================================
   EduKart v1.1 — Patch fixes
   ============================================================ */

/* ---------- Footer text visibility fix ---------- */
.ek-footer,
.ek-footer p,
.ek-footer li,
.ek-footer span,
.ek-footer small {
  color: #c9c0f0 !important;
}
.ek-footer .text-muted {
  color: #c9c0f0 !important;
}
.ek-footer a {
  color: #d6cffb !important;
  transition: color .15s;
}
.ek-footer a:hover { color: #fff !important; }
.ek-footer .fw-600,
.ek-footer .fw-800 { color: #fff !important; }
.ek-footer hr { border-color: rgba(255,255,255,.15) !important; }

/* ---------- Quill rich-text editor (glassmorphism styled) ----------
   NOTE: Quill Snow defaults to stroke:#444 / fill:#444 for toolbar SVG icons.
   We MUST use !important here to override Quill's own stylesheet.
   ------------------------------------------------------------------ */
.ql-toolbar.ql-snow {
  background: rgba(124,58,237,.18) !important;
  border: 1px solid rgba(168,85,247,.55) !important;
  border-bottom: 1px solid rgba(168,85,247,.3) !important;
  border-radius: 14px 14px 0 0 !important;
  padding: 10px 12px !important;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.ql-container.ql-snow {
  background: rgba(255,255,255,.05) !important;
  border: 1px solid rgba(168,85,247,.55) !important;
  border-top: none !important;
  border-radius: 0 0 14px 14px !important;
  min-height: 200px;
  color: #ece9ff;
  font-size: .95rem;
}
.ql-editor {
  min-height: 200px;
  padding: 16px 18px;
  color: #ece9ff;
  line-height: 1.8;
}
.ql-editor.ql-blank::before {
  color: #9d8ec8 !important;
  font-style: italic;
  font-size: .9rem;
}

/* ---- Toolbar icon colours (SVG path overrides) ---- */
.ql-toolbar.ql-snow button { padding: 4px 5px; border-radius: 6px; transition: background .15s; }
.ql-toolbar.ql-snow button:hover { background: rgba(168,85,247,.25) !important; }
.ql-toolbar.ql-snow button.ql-active { background: rgba(168,85,247,.35) !important; }
/* SVG stroke (outlines — bold, italic, underline, list icons, etc.) */
.ql-toolbar.ql-snow .ql-stroke,
.ql-toolbar.ql-snow button .ql-stroke,
.ql-toolbar.ql-snow button svg .ql-stroke { stroke: #d8b4fe !important; }
/* SVG fill (block fill icons) */
.ql-toolbar.ql-snow .ql-fill,
.ql-toolbar.ql-snow button .ql-fill,
.ql-toolbar.ql-snow button svg .ql-fill { fill: #d8b4fe !important; }
/* Hover state */
.ql-toolbar.ql-snow button:hover .ql-stroke,
.ql-toolbar.ql-snow button:hover svg .ql-stroke { stroke: #fff !important; }
.ql-toolbar.ql-snow button:hover .ql-fill,
.ql-toolbar.ql-snow button:hover svg .ql-fill   { fill: #fff !important; }
/* Active / pressed state */
.ql-toolbar.ql-snow button.ql-active .ql-stroke,
.ql-toolbar.ql-snow button.ql-active svg .ql-stroke { stroke: #e879f9 !important; }
.ql-toolbar.ql-snow button.ql-active .ql-fill,
.ql-toolbar.ql-snow button.ql-active svg .ql-fill   { fill: #e879f9 !important; }

/* ---- Picker dropdowns (Headers, Colour, Align, etc.) ---- */
.ql-toolbar.ql-snow .ql-picker { color: #d8b4fe !important; }
.ql-toolbar.ql-snow .ql-picker-label { color: #d8b4fe !important; border-color: rgba(168,85,247,.4) !important; background: rgba(124,58,237,.15) !important; border-radius: 6px !important; padding: 2px 8px !important; }
.ql-toolbar.ql-snow .ql-picker-label:hover { color: #fff !important; background: rgba(168,85,247,.3) !important; }
.ql-toolbar.ql-snow .ql-picker-label .ql-stroke { stroke: #d8b4fe !important; }
.ql-snow .ql-picker-options { background: #1e1040 !important; border: 1px solid rgba(168,85,247,.5) !important; border-radius: 10px !important; box-shadow: 0 8px 32px rgba(0,0,0,.5) !important; }
.ql-snow .ql-picker-item { color: #d8b4fe !important; }
.ql-snow .ql-picker-item:hover { color: #fff !important; background: rgba(168,85,247,.2) !important; }
.ql-snow .ql-picker-item.ql-selected { color: #e879f9 !important; }
/* Colour swatch picker — keep normal colours but add border */
.ql-snow .ql-color-picker .ql-picker-item { border-radius: 4px !important; }
/* Separator between toolbar groups */
.ql-toolbar.ql-snow .ql-formats { margin-right: 8px !important; padding-right: 8px !important; border-right: 1px solid rgba(255,255,255,.12) !important; }
.ql-toolbar.ql-snow .ql-formats:last-child { border-right: none !important; margin-right: 0 !important; }

/* ---- Link / tooltip popup ---- */
.ql-snow .ql-tooltip { background: #1e1040 !important; border: 1px solid rgba(168,85,247,.5) !important; color: #d8b4fe !important; border-radius: 10px !important; box-shadow: 0 8px 24px rgba(0,0,0,.4) !important; }
.ql-snow .ql-tooltip a { color: #c4b5fd !important; }
.ql-snow .ql-tooltip input[type=text] { background: rgba(255,255,255,.1) !important; border: 1px solid rgba(168,85,247,.4) !important; border-radius: 6px !important; color: #fff !important; padding: 4px 10px !important; }
.ql-snow .ql-tooltip .ql-action::after, .ql-snow .ql-tooltip .ql-remove::before { color: #c4b5fd; }

/* ---------- Rich text display in product page ---------- */
.rich-content h1,.rich-content h2,.rich-content h3 { color: #fff; margin-bottom: .5rem; font-weight: 700; }
.rich-content h1 { font-size: 1.6rem; }
.rich-content h2 { font-size: 1.3rem; }
.rich-content h3 { font-size: 1.1rem; }
.rich-content p  { margin-bottom: .75rem; color: #d6cffb; line-height: 1.8; }
.rich-content ul,.rich-content ol { padding-left: 1.4rem; margin-bottom: .75rem; color: #d6cffb; }
.rich-content li { margin-bottom: .35rem; }
.rich-content strong { color: #fff; }
.rich-content em    { color: #e0d9ff; }
.rich-content blockquote {
  border-left: 3px solid #7c3aed;
  margin: 1rem 0;
  padding: .5rem 1rem;
  background: rgba(124,58,237,.12);
  border-radius: 0 10px 10px 0;
  color: #c4b5fd;
}
.rich-content a { color: #c4b5fd; text-decoration: underline; }
.rich-content a:hover { color: #fff; }

/* ---------- Demo URL badge ---------- */
.demo-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: linear-gradient(135deg,rgba(168,85,247,.25),rgba(124,58,237,.2));
  border: 1px solid rgba(168,85,247,.4);
  color: #e9d5ff;
  padding: .5rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  transition: .2s;
}
.demo-badge:hover {
  background: linear-gradient(135deg,rgba(168,85,247,.45),rgba(124,58,237,.35));
  color: #fff;
}

/* ---------- Password change card ---------- */
.pw-section { border-top: 1px solid rgba(255,255,255,.12); margin-top: 1.5rem; padding-top: 1.5rem; }

/* ---------- Thumbnail upload zone (label-based, reliable) ---------- */
.thumb-upload-label {
  display: block;
  position: relative;
  border: 2px dashed rgba(168,85,247,.45);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
  min-height: 180px;
  background: rgba(124,58,237,.08);
}
.thumb-upload-label:hover {
  border-color: #a855f7;
  background: rgba(124,58,237,.14);
  transform: translateY(-2px);
}
.thumb-upload-label.has-preview {
  border-style: solid;
  border-color: rgba(168,85,247,.7);
  min-height: unset;
}
.thumb-upload-label .thumb-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  gap: .5rem;
  min-height: 180px;
}
.thumb-upload-label .thumb-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg,rgba(124,58,237,.4),rgba(168,85,247,.3));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .5rem;
}
.thumb-upload-label .thumb-icon i { font-size: 1.8rem; color: #d8b4fe; }
.thumb-upload-label .thumb-btn {
  display: inline-block;
  background: var(--ek-grad);
  color: #fff; font-weight: 600; font-size: .88rem;
  padding: .45rem 1.2rem; border-radius: 999px;
  margin-top: .35rem;
  box-shadow: 0 4px 14px rgba(124,58,237,.4);
}
.thumb-preview-wrap { position: relative; display: none; }
.thumb-preview-wrap img { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.thumb-preview-wrap .thumb-change-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.thumb-upload-label:hover .thumb-change-overlay { opacity: 1; }
.thumb-change-overlay span {
  background: rgba(124,58,237,.8); color: #fff;
  padding: .4rem 1rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
}
input[type="file"].ek-file-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); opacity: 0; pointer-events: none;
}

/* ============================================================
   EduKart v2.0 — Single Seller Edition
   Promo banner · Notification bell · WhatsApp AI chat widget
   ============================================================ */

/* ---------- Promo Banner ---------- */
.promo-banner {
  background: linear-gradient(90deg, #7c3aed, #a855f7, #c026d3);
  background-size: 200% 100%;
  animation: promo-shimmer 8s ease infinite;
  position: relative;
  z-index: 1020;
}
@keyframes promo-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.promo-badge {
  background: rgba(255,255,255,.25);
  color: #fff;
  font-weight: 800;
  font-size: .78rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  white-space: nowrap;
}
.promo-text { color: #fff; font-size: .85rem; font-weight: 500; }
.promo-code {
  background: rgba(255,255,255,.2);
  border: 1px dashed rgba(255,255,255,.6);
  padding: .15rem .6rem;
  border-radius: 6px;
  cursor: pointer;
  margin: 0 .3rem;
  font-family: monospace;
  letter-spacing: .5px;
  transition: background .15s;
}
.promo-code:hover { background: rgba(255,255,255,.32); }
.promo-min { color: rgba(255,255,255,.85); font-size: .8rem; }
.promo-cta {
  background: rgba(255,255,255,.95);
  color: #7c3aed !important;
  font-weight: 700;
  font-size: .8rem;
  padding: .3rem 1rem;
  border-radius: 999px;
  white-space: nowrap;
}
.promo-cta:hover { background: #fff; color: #6d28d9 !important; }
.promo-close {
  background: none; border: none; color: rgba(255,255,255,.8);
  cursor: pointer; padding: .2rem; line-height: 1; margin-left: .5rem;
}
.promo-close:hover { color: #fff; }

/* ---------- Notification Bell ---------- */
.notif-bell-wrap { position: relative; }
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: #ef4444; color: #fff;
  font-size: .62rem; font-weight: 800;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #1e1b3a;
}
.notif-dropdown {
  width: 320px; max-height: 420px; overflow-y: auto;
  background: rgba(30,27,58,.97) !important;
  backdrop-filter: blur(20px);
}
.notif-item {
  display: flex; gap: .7rem; padding: .7rem .9rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  text-decoration: none; transition: background .15s;
}
.notif-item:hover { background: rgba(168,85,247,.1); }
.notif-item:last-child { border-bottom: none; }

/* ============================================================
   WHATSAPP-STYLE AI CHAT WIDGET
   ============================================================ */
#ek-chat-root { position: fixed; bottom: 22px; right: 22px; z-index: 2000; font-family: 'Inter',system-ui,sans-serif; }

#ek-chat-fab {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #1ebe5a);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 28px rgba(37,211,102,.5);
  position: relative;
  transition: transform .2s ease;
}
#ek-chat-fab:hover { transform: scale(1.08); }
#ek-chat-fab:active { transform: scale(.96); }

#ek-chat-badge {
  position: absolute; top: -2px; right: -2px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #ef4444; color: #fff; font-size: .7rem; font-weight: 800;
  align-items: center; justify-content: center;
  border: 2px solid #1e1040;
  display: none;
  animation: badge-pulse 1.8s ease infinite;
}
@keyframes badge-pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.15)} }

#ek-chat-panel {
  position: absolute; bottom: 76px; right: 0;
  width: 360px; max-width: calc(100vw - 40px);
  height: 520px; max-height: 70vh;
  background: #1a1333;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  border: 1px solid rgba(255,255,255,.1);
  display: flex; flex-direction: column;
  overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(20px) scale(.97);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
#ek-chat-panel.ek-chat-open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

#ek-chat-header {
  background: linear-gradient(135deg, #075E54, #128C7E);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
#ek-chat-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.ek-chat-header-text { flex-grow: 1; min-width: 0; }
.ek-chat-name { color: #fff; font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ek-chat-status { color: rgba(255,255,255,.85); font-size: .72rem; display: flex; align-items: center; gap: 5px; }
.ek-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; display: inline-block; }
#ek-chat-close-btn {
  background: none; border: none; color: #fff; font-size: 1.4rem;
  line-height: 1; cursor: pointer; padding: 0 4px; opacity: .85;
}
#ek-chat-close-btn:hover { opacity: 1; }

#ek-chat-messages {
  flex-grow: 1; overflow-y: auto; padding: 16px;
  background:
    radial-gradient(circle at 20% 30%, rgba(124,58,237,.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(37,211,102,.04) 0%, transparent 50%),
    #efe9e0;
  background-color: #f5f1e8;
  display: flex; flex-direction: column; gap: 8px;
}
.ek-msg-row { display: flex; }
.ek-msg-user { justify-content: flex-end; }
.ek-msg-assistant { justify-content: flex-start; }
.ek-msg-bubble {
  max-width: 80%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: .87rem;
  line-height: 1.5;
  word-wrap: break-word;
  box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.ek-msg-user .ek-msg-bubble {
  background: #dcf8c6;
  color: #1a1a1a;
  border-bottom-right-radius: 3px;
}
.ek-msg-assistant .ek-msg-bubble {
  background: #fff;
  color: #1a1a1a;
  border-bottom-left-radius: 3px;
}
.ek-msg-bubble a { color: #075E54; font-weight: 600; }

#ek-chat-typing { padding: 0 16px 8px; background-color: #f5f1e8; flex-shrink: 0; }
.ek-typing-bubble {
  display: inline-flex; gap: 4px; background: #fff; padding: 10px 14px;
  border-radius: 14px; border-bottom-left-radius: 3px;
}
.ek-typing-bubble span {
  width: 6px; height: 6px; border-radius: 50%; background: #999;
  animation: ek-typing-bounce 1.2s infinite ease-in-out;
}
.ek-typing-bubble span:nth-child(2) { animation-delay: .15s; }
.ek-typing-bubble span:nth-child(3) { animation-delay: .3s; }
@keyframes ek-typing-bounce { 0%,60%,100%{transform:translateY(0);opacity:.5} 30%{transform:translateY(-5px);opacity:1} }

#ek-chat-form {
  display: flex; gap: 8px; padding: 10px 12px;
  background: #1a1333; border-top: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
#ek-chat-input {
  flex-grow: 1; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px; padding: 9px 16px; color: #fff; font-size: .87rem; outline: none;
}
#ek-chat-input::placeholder { color: rgba(255,255,255,.45); }
#ek-chat-input:focus { border-color: #25D366; background: rgba(255,255,255,.14); }
#ek-chat-send {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: #25D366; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
#ek-chat-send:hover { background: #1ebe5a; }

#ek-chat-footer {
  text-align: center; padding: 6px 10px 10px;
  font-size: .68rem; color: rgba(255,255,255,.4);
  background: #1a1333; flex-shrink: 0;
}
#ek-chat-footer a { color: rgba(255,255,255,.6); }
#ek-chat-footer a:hover { color: #25D366; }

@media (max-width: 480px) {
  #ek-chat-root { bottom: 14px; right: 14px; }
  #ek-chat-panel { width: calc(100vw - 28px); height: 75vh; bottom: 74px; right: -8px; }
}

/* ---------- Chatbot training UI (admin) ---------- */
.training-card { transition: transform .15s; }
.training-card:hover { transform: translateY(-2px); }
