/* Allinone Study Point — visual theme layer (design only; loaded after style.css). */
:root {
  --brand: #5a3ff2; --brand-2: #3f26c9; --brand-ink: #fff;
  --teal: #0fb5a6; --coral: #ff6b6b; --sky: #2ea8ff; --pink: #f25aa8; --lime: #7bcf3f;
  --sun: #ffad1f; --sun-tint: #fff4dd;
  --tint: #f1edff; --paper: #f7f6fd; --line: #e4e1f2; --line-2: #f0eef9;
  --ink: #1b1840; --ink-2: #47436b; --muted: #77739a;
  --grad: linear-gradient(120deg, #5a3ff2 0%, #8b3ff2 45%, #f25aa8 100%);
  --grad-warm: linear-gradient(120deg, #ff8a3d, #ffad1f);
  --grad-cool: linear-gradient(120deg, #0fb5a6, #2ea8ff);
  --shadow: 0 1px 2px rgba(40,30,110,.06), 0 8px 24px rgba(40,30,110,.08);
  --glow: 0 18px 40px -12px rgba(90,63,242,.35);
}

/* ---------- page background: doodle texture + soft colour washes */
body {
  background-color: var(--paper);
  background-image:
    radial-gradient(900px 500px at 100% 0%, rgba(242,90,168,.08), transparent 60%),
    radial-gradient(800px 600px at 0% 30%, rgba(46,168,255,.07), transparent 60%),
    radial-gradient(900px 600px at 80% 100%, rgba(15,181,166,.07), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260' fill='none' stroke='%235a3ff2' stroke-opacity='.07' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='40' cy='40' r='5'/%3E%3Cellipse cx='40' cy='40' rx='22' ry='8'/%3E%3Cellipse cx='40' cy='40' rx='22' ry='8' transform='rotate(60 40 40)'/%3E%3Cellipse cx='40' cy='40' rx='22' ry='8' transform='rotate(120 40 40)'/%3E%3Ctext x='150' y='50' font-family='Georgia' font-size='30' fill='%235a3ff2' fill-opacity='.07' stroke='none'%3E%CF%80%3C/text%3E%3Cpath d='M200 120h30M215 105v30'/%3E%3Cpath d='M30 150l14 30h-28z'/%3E%3Cpath d='M105 120v18l-10 22h28l-10-22v-18'/%3E%3Ctext x='70' y='230' font-family='Georgia' font-size='26' fill='%235a3ff2' fill-opacity='.07' stroke='none'%3E%E2%88%91%3C/text%3E%3Cpath d='M170 190c10-14 20 14 30 0s20 14 30 0'/%3E%3Crect x='140' y='215' width='26' height='20' rx='3'/%3E%3Cpath d='M153 215v20'/%3E%3Ccircle cx='235' cy='230' r='9'/%3E%3Cpath d='M235 214v-6M249 230h6'/%3E%3C/svg%3E");
  background-attachment: fixed, fixed, fixed, scroll;
}
html { background-color: #f7f6fd; }
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
body.is-admin { background-image: none; background-color: #f6f5fb; }

/* floating decorative objects (markup in layout, purely decorative) */
.fx-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.fx-bg i { position: absolute; display: block; opacity: .55; animation: fx-float 18s ease-in-out infinite; }
.fx-bg svg { display: block; width: 100%; height: 100%; }
.fx-bg .f1 { width: 56px; height: 56px; left: calc(50% - 680px); top: 30%; animation-duration: 19s; }
.fx-bg .f2 { width: 44px; height: 44px; right: calc(50% - 670px); top: 24%; animation-duration: 23s; animation-delay: -6s; }
.fx-bg .f3 { width: 50px; height: 50px; left: calc(50% - 670px); top: 66%; animation-duration: 21s; animation-delay: -3s; }
.fx-bg .f4 { width: 40px; height: 40px; right: calc(50% - 660px); top: 58%; animation-duration: 17s; animation-delay: -9s; }
.fx-bg .f5 { width: 34px; height: 34px; right: calc(50% - 665px); top: 86%; animation-duration: 25s; animation-delay: -12s; }
.fx-bg .f6 { width: 30px; height: 30px; left: calc(50% - 655px); top: 88%; animation-duration: 20s; animation-delay: -4s; }
@media (max-width: 1380px) { .fx-bg .f1, .fx-bg .f2, .fx-bg .f3, .fx-bg .f4, .fx-bg .f5, .fx-bg .f6 { display: none; } }
.fx-bg .dot { width: 14px; height: 14px; border-radius: 50%; opacity: .5; }
.fx-bg .d1 { left: 18%; top: 40%; background: var(--sun); animation-duration: 14s; }
.fx-bg .d2 { right: 16%; top: 55%; background: var(--teal); width: 10px; height: 10px; animation-duration: 16s; animation-delay: -5s; }
.fx-bg .d3 { left: 35%; top: 12%; background: var(--pink); width: 9px; height: 9px; animation-duration: 12s; animation-delay: -2s; }
.fx-bg .d4 { right: 40%; top: 65%; background: var(--sky); width: 11px; height: 11px; animation-duration: 15s; animation-delay: -7s; }
@keyframes fx-float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(14px, -22px) rotate(8deg); }
  50% { transform: translate(-8px, -38px) rotate(-6deg); }
  75% { transform: translate(-16px, -14px) rotate(5deg); }
}
@media (max-width: 760px) { .fx-bg .d4 { display: none; } }
main, .foot, .top, .announce { position: relative; z-index: 1; }
.top { z-index: 30; }

/* ---------- header */
.announce { background: var(--grad); color: #fff; font-weight: 600; letter-spacing: .01em; background-size: 200% 100%; animation: fx-pan 12s linear infinite; }
@keyframes fx-pan { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.top { background: rgba(255,255,255,.82); border-bottom: 0; box-shadow: 0 1px 0 var(--line), 0 6px 24px -14px rgba(40,30,110,.25); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: linear-gradient(90deg, var(--brand), var(--pink), var(--sun), var(--teal), var(--sky), var(--brand)); background-size: 200% 100%; animation: fx-pan 10s linear infinite; }
.logo-mark { background: var(--grad); box-shadow: 0 6px 16px -6px rgba(90,63,242,.6), inset 0 -3px 0 rgba(255,173,31,.9); transition: transform .3s; }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
.nav a { position: relative; }
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--grad); transform: scaleX(0); transition: transform .25s; }
.nav a:hover::after, .nav a.on::after { transform: scaleX(1); }
.nav a:hover, .nav a.on { background: var(--tint); color: var(--brand-2); }
.top-search input[type=search] { background: var(--paper); border-color: var(--line); transition: box-shadow .2s, border-color .2s; }
.top-search input[type=search]:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(90,63,242,.12); outline: 0; }
@media (max-width: 980px) { .top.open .nav { background: #fff; } }

/* ---------- buttons */
.btn { background: var(--grad); background-size: 150% 100%; background-position: 0% 50%; border: 0; position: relative; overflow: hidden; box-shadow: 0 8px 18px -8px rgba(90,63,242,.55); transition: background-position .4s, transform .15s, box-shadow .2s; }
.btn:hover { background-position: 100% 50%; color: #fff; transform: translateY(-1px); box-shadow: 0 12px 24px -8px rgba(90,63,242,.6); }
.btn::before { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); transition: left .6s; }
.btn:hover::before { left: 120%; }
.btn-sun { background: var(--grad-warm); color: #3a2000; box-shadow: 0 8px 18px -8px rgba(255,138,61,.6); }
.btn-sun:hover { color: #2a1700; }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn-ghost:hover { background: #fff; color: var(--brand-2); border-color: var(--brand); box-shadow: 0 8px 18px -10px rgba(90,63,242,.4); }
.btn-danger { background: linear-gradient(120deg, #e03131, #ff6b6b); box-shadow: 0 8px 18px -8px rgba(224,49,49,.5); }
.linkbtn { color: var(--brand); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 0; box-shadow: 0 0 0 4px rgba(90,63,242,.12); }
.check input, .opt input { accent-color: var(--brand); }
.seg { background: var(--tint); }

/* ---------- surfaces */
.card { border-color: var(--line); border-radius: 18px; transition: box-shadow .25s, transform .25s; }
.panel { background: linear-gradient(135deg, #f1edff, #e9f8ff); border: 1px solid #e3ddff; border-radius: 18px; }
.badge { background: var(--tint); color: var(--brand-2); }
.b-brand { background: var(--tint); color: var(--brand-2); }
.b-sun { background: #fff1d6; color: #9a5b00; }
.section-title h2, .hero h1, h1 { color: var(--ink); }
.section-title h2 { position: relative; padding-left: 16px; }
.section-title h2::before { content: ""; position: absolute; left: 0; top: .18em; bottom: .18em; width: 6px; border-radius: 6px; background: var(--grad); }
.empty { background: rgba(255,255,255,.7); border-color: #d9d3f5; }
.lock { background: linear-gradient(135deg, #fff6e2, #ffeedd); border-color: #ffd89a; }

/* page headings get a colourful band */
.page-head { position: relative; padding: 34px 0 18px; }
.page-head h1, .wrap > h1:first-child { background: linear-gradient(120deg, var(--ink) 30%, var(--brand) 70%, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
main > .page-head:first-child::before, main > .wrap > .page-head:first-child::before { content: ""; position: absolute; left: 50%; top: 0; width: 100vw; height: 100%; transform: translateX(-50%); z-index: -1;
  background: radial-gradient(500px 160px at 15% 30%, rgba(90,63,242,.12), transparent 70%), radial-gradient(500px 160px at 85% 20%, rgba(242,90,168,.10), transparent 70%), radial-gradient(400px 140px at 60% 100%, rgba(15,181,166,.10), transparent 70%); }
.crumbs a:hover { color: var(--brand); }

/* ---------- hero */
.hero { padding: 64px 0 54px; }
.hero::before { background:
  radial-gradient(520px 320px at 88% 12%, rgba(242,90,168,.20), transparent 70%),
  radial-gradient(620px 380px at 8% 88%, rgba(90,63,242,.18), transparent 70%),
  radial-gradient(420px 260px at 55% 40%, rgba(46,168,255,.12), transparent 70%);
  -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.hero::after { content: ""; position: absolute; width: 520px; height: 520px; right: -140px; top: -160px; border-radius: 50%; z-index: -1;
  border: 2px dashed rgba(90,63,242,.18); animation: fx-spin 60s linear infinite; }
@keyframes fx-spin { to { transform: rotate(360deg); } }
.hero h1 em { font-style: italic; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 4px; }
.hero h1 { color: var(--ink); }
.hero .badge.b-sun { background: #fff; color: var(--brand-2); border: 1px solid #e3ddff; box-shadow: var(--shadow); padding: 5px 12px; }
.hero .badge.b-sun::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(123,207,63,.7); animation: fx-ping 2s infinite; }
@keyframes fx-ping { 0% { box-shadow: 0 0 0 0 rgba(123,207,63,.7); } 80%, 100% { box-shadow: 0 0 0 8px rgba(123,207,63,0); } }
.picker { position: relative; border: 0; border-radius: 22px; box-shadow: 0 30px 60px -20px rgba(60,40,160,.35); animation: fx-bob 7s ease-in-out infinite; }
.picker::before { content: ""; position: absolute; inset: -2px; border-radius: 24px; background: var(--grad); z-index: -1; }
.picker::after { content: ""; position: absolute; inset: 0; border-radius: 22px; background: #fff; z-index: -1; }
@keyframes fx-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.class-pills a { background: #fff; border-color: var(--line); transition: transform .15s, background .2s, color .2s, box-shadow .2s; }
.class-pills a:nth-child(4n+1):hover { background: #5a3ff2; } .class-pills a:nth-child(4n+2):hover { background: #f25aa8; }
.class-pills a:nth-child(4n+3):hover { background: #0fb5a6; } .class-pills a:nth-child(4n):hover { background: #ff8a3d; }
.class-pills a:hover { color: #fff; border-color: transparent; transform: translateY(-3px); box-shadow: 0 10px 18px -10px rgba(40,30,110,.5); }
.stats > div { background: rgba(255,255,255,.75); border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px; backdrop-filter: blur(4px); }
.stats > div:nth-child(1) b { color: var(--brand); } .stats > div:nth-child(2) b { color: var(--pink); }
.stats > div:nth-child(3) b { color: var(--teal); } .stats > div:nth-child(4) b { color: #f08a1c; }
@media (max-width: 560px) { .stats { gap: 10px; } .stats > div { flex: 1 1 40%; } }

/* features: one colour each */
.feature { position: relative; overflow: hidden; border-radius: 18px; border-color: var(--line); transition: transform .25s, box-shadow .25s; }
.feature::after { content: ""; position: absolute; right: -40px; top: -40px; width: 110px; height: 110px; border-radius: 50%; opacity: .12; background: var(--c, var(--brand)); transition: transform .4s; }
.feature:hover { transform: translateY(-4px); box-shadow: 0 20px 36px -18px rgba(40,30,110,.35); }
.feature:hover::after { transform: scale(1.6); }
.feature .ic { background: var(--c, var(--brand)); color: #fff; box-shadow: 0 8px 16px -8px var(--c, var(--brand)); transition: transform .3s; }
.feature:hover .ic { transform: rotate(-8deg) scale(1.08); }
.grid > .feature:nth-child(4n+1) { --c: #5a3ff2; } .grid > .feature:nth-child(4n+2) { --c: #f25aa8; }
.grid > .feature:nth-child(4n+3) { --c: #0fb5a6; } .grid > .feature:nth-child(4n) { --c: #ff8a3d; }

/* ---------- tiles (boards, subjects, chapters) */
.tile { position: relative; overflow: hidden; border-radius: 18px; border-color: var(--line); transition: transform .25s, box-shadow .25s, border-color .25s; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--c, var(--brand)); }
.tile:hover { transform: translateY(-4px); border-color: transparent; box-shadow: 0 22px 40px -20px rgba(40,30,110,.4); }
.grid > .tile:nth-child(6n+1) { --c: #5a3ff2; } .grid > .tile:nth-child(6n+2) { --c: #f25aa8; } .grid > .tile:nth-child(6n+3) { --c: #0fb5a6; }
.grid > .tile:nth-child(6n+4) { --c: #ff8a3d; } .grid > .tile:nth-child(6n+5) { --c: #2ea8ff; } .grid > .tile:nth-child(6n) { --c: #7bcf3f; }
.tile .badge { background: color-mix(in srgb, var(--c, var(--brand)) 12%, #fff); color: color-mix(in srgb, var(--c, var(--brand)) 80%, #000); }
.board-tile .abbr { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chapter-list .n { background: var(--tint); color: var(--brand-2); transition: transform .2s; }
.chapter-list li:nth-child(5n+2) .n { background: #ffe6f2; color: #c12a78; } .chapter-list li:nth-child(5n+3) .n { background: #dcf7f3; color: #0a7f74; }
.chapter-list li:nth-child(5n+4) .n { background: #ffeedd; color: #b85b07; } .chapter-list li:nth-child(5n) .n { background: #e2f2ff; color: #1471b8; }
.chapter-list .has .n { background: var(--grad) !important; color: #fff !important; }
.chapter-list li a { transition: background .2s, padding-left .2s; }
.chapter-list li a:hover { background: var(--tint); padding-left: 22px; }
.chapter-list li a:hover .n { transform: rotate(-8deg); }

/* ---------- course cards */
.course-card { border-radius: 18px; border-color: var(--line); transition: transform .25s, box-shadow .25s; }
.course-card:hover { transform: translateY(-5px) rotate(-.3deg); box-shadow: 0 26px 44px -20px rgba(40,30,110,.45); }
.course-cover { height: 132px; }
.course-cover::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(120px 80px at 15% 0%, rgba(255,255,255,.28), transparent 70%),
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' fill='none' stroke='white' stroke-opacity='.16' stroke-width='1.5'%3E%3Ccircle cx='20' cy='20' r='8'/%3E%3Cpath d='M55 15h18M64 6v18M10 60l10 18h-20zM50 70c6-8 12 8 18 0s12 8 18 0'/%3E%3C/svg%3E"); }
.course-cover::after { animation: fx-spin 30s linear infinite; transform-origin: center; }
.course-cover > * { position: relative; z-index: 1; }
.course-card:hover .course-cover::after { border-color: rgba(255,255,255,.22); }
.price b { color: var(--ink); }
.price .off { background: #e3f8ea; color: #1f8a43; padding: 1px 8px; border-radius: 99px; }

/* ---------- notes, tabs, MCQs */
.prose h2 { color: var(--brand-2); border-bottom: 0; padding-bottom: 8px; background: linear-gradient(90deg, var(--brand), var(--pink), transparent) left bottom / 100% 3px no-repeat; }
.prose th { background: var(--tint); color: var(--brand-2); }
.prose table { border-color: var(--line); }
.prose tr:nth-child(even) td { background: #faf9ff; }
.prose blockquote { border-left-color: var(--sun); background: var(--sun-tint); }
.mat-tabs a { transition: all .2s; }
.mat-tabs a.on, .mat-tabs a:hover { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 16px -10px rgba(90,63,242,.7); }
.mcq { border-radius: 16px; border-color: var(--line); transition: box-shadow .2s; }
.mcq:hover { box-shadow: var(--shadow); }
.opt { background: #fff; transition: border-color .15s, transform .15s, background .15s; }
.opt:hover { border-color: var(--brand); transform: translateX(3px); background: #faf9ff; }
.opt.right { animation: fx-pop .4s; } .opt.wrong { animation: fx-shake .4s; }
@keyframes fx-pop { 50% { transform: scale(1.02); } }
@keyframes fx-shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.explain { background: linear-gradient(135deg, #f1edff, #e9f8ff); }

/* ---------- progress */
.bar > i { background: linear-gradient(90deg, var(--brand), var(--pink), var(--sun)); background-size: 200% 100%; animation: fx-pan 6s linear infinite; }
.ring { background: conic-gradient(var(--brand) 0, var(--pink) calc(var(--p) * 1%), var(--line-2) 0); }

/* ---------- course & lesson pages */
.course-hero { position: relative; overflow: hidden; }
.course-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(400px 220px at 90% 0%, rgba(255,255,255,.22), transparent 70%),
  radial-gradient(300px 200px at 0% 100%, rgba(0,0,0,.18), transparent 70%),
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' fill='none' stroke='white' stroke-opacity='.10' stroke-width='1.6'%3E%3Ccircle cx='30' cy='30' r='5'/%3E%3Cellipse cx='30' cy='30' rx='18' ry='7'/%3E%3Cellipse cx='30' cy='30' rx='18' ry='7' transform='rotate(60 30 30)'/%3E%3Cellipse cx='30' cy='30' rx='18' ry='7' transform='rotate(120 30 30)'/%3E%3Cpath d='M110 20h24M122 8v24M20 120l12 24H8zM90 120c8-10 16 10 24 0s16 10 24 0'/%3E%3C/svg%3E"); }
.course-hero::after { content: ""; position: absolute; width: 340px; height: 340px; right: -80px; bottom: -170px; border-radius: 50%; border: 36px solid rgba(255,255,255,.08); animation: fx-spin 40s linear infinite; }
.course-hero > * { position: relative; z-index: 1; }
.buy-box .card, .buy-box.card { border: 0; box-shadow: 0 24px 50px -20px rgba(40,30,110,.4); }
.module { border-radius: 16px; border-color: var(--line); }
.module h3 { background: linear-gradient(90deg, #f1edff, #fff); color: var(--brand-2); }
.lesson-row { transition: background .2s, padding-left .2s; }
a.lesson-row:hover { background: var(--tint); padding-left: 22px; }
.lesson-row.cur { background: linear-gradient(90deg, #ece6ff, #fff); box-shadow: inset 4px 0 0 var(--brand); }
.player { border-radius: 18px; box-shadow: 0 24px 50px -24px rgba(20,10,80,.6); background: linear-gradient(135deg, #1b1840, #2a1f6b); }

/* ---------- dashboards */
.dash-head { position: relative; overflow: hidden; background: var(--grad); background-size: 200% 100%; animation: fx-pan 16s linear infinite; }
.dash-head::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' fill='none' stroke='white' stroke-opacity='.10' stroke-width='1.6'%3E%3Ccircle cx='30' cy='30' r='5'/%3E%3Cellipse cx='30' cy='30' rx='18' ry='7'/%3E%3Cellipse cx='30' cy='30' rx='18' ry='7' transform='rotate(60 30 30)'/%3E%3Cpath d='M110 20h24M122 8v24M20 120l12 24H8zM90 120c8-10 16 10 24 0s16 10 24 0'/%3E%3C/svg%3E"); }
.dash-head > * { position: relative; z-index: 1; }
.kpi { border-radius: 16px; border: 0; position: relative; overflow: hidden; transition: transform .25s; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c, var(--brand)); }
.kpi:hover { transform: translateY(-3px); }
.kpis > .kpi:nth-child(5n+1) { --c: #5a3ff2; } .kpis > .kpi:nth-child(5n+2) { --c: #f25aa8; } .kpis > .kpi:nth-child(5n+3) { --c: #0fb5a6; }
.kpis > .kpi:nth-child(5n+4) { --c: #ff8a3d; } .kpis > .kpi:nth-child(5n) { --c: #2ea8ff; }
.kpi b { color: var(--c, var(--ink)); }

/* ---------- tests */
.test-bar { background: rgba(255,255,255,.9); backdrop-filter: blur(8px); }
.timer { background: var(--grad); }
.timer.low { background: linear-gradient(120deg, #e03131, #ff6b6b); animation: fx-pop 1s infinite; }
.score-big { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- auth pages: card glows */
main .card:has(input[type=password]) { border: 0; box-shadow: 0 30px 60px -24px rgba(60,40,160,.4); position: relative; }
main .card:has(input[type=password])::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: 18px 18px 0 0; background: var(--grad); }

/* ---------- tables */
.table-wrap { border-radius: 16px; }
th { background: #f6f4ff; color: var(--brand-2); }
tbody tr { transition: background .15s; } tbody tr:hover td { background: #faf9ff; }

/* ---------- footer */
.foot { background: linear-gradient(160deg, #1b1840 0%, #261d5e 55%, #3a1f5e 100%); color: #c9c5ea; margin-top: 70px; position: relative; }
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: -38px; height: 40px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V22C240 0 480 0 720 18s480 22 720 0v22z' fill='%231b1840'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.foot a { color: #ebe8ff; } .foot a:hover { color: var(--sun); }
.foot h4 { color: #fff; } .foot h4::after { content: ""; display: block; width: 26px; height: 3px; border-radius: 3px; margin-top: 6px; background: var(--grad-warm); }
.foot .legal { border-top-color: rgba(255,255,255,.12); color: #9c97c9; }

/* ---------- chat */
.chat-fab { background: var(--grad); background-size: 200% 100%; animation: fx-pan 8s linear infinite, fx-bob 4s ease-in-out infinite; box-shadow: 0 14px 30px -10px rgba(90,63,242,.7); }
.chat-fab:hover { animation-play-state: paused; }
.chat-head { background: var(--grad); }
.chat-head small { color: rgba(255,255,255,.8); }
.msg.me { background: var(--grad); }
.msg.bot { border-color: var(--line); }
.chat-panel { border: 0; border-radius: 22px; animation: fx-rise .3s ease-out; }
@keyframes fx-rise { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.chips button:hover { border-color: var(--brand); color: var(--brand); background: var(--tint); }

/* ---------- admin keeps it calm: new palette only */
.admin-side { background: linear-gradient(180deg, #1b1840, #241c55); color: #c9c5ea; }
.admin-side a { color: #d9d6f5; } .admin-side a:hover { background: rgba(255,255,255,.08); }
.admin-side a.on { background: var(--grad); box-shadow: 0 8px 16px -10px rgba(242,90,168,.8); }
.admin-side .grp { color: #8d88bd; }
.chart .col i { background: linear-gradient(180deg, var(--brand), #8b3ff2); } .chart .col i.alt { background: var(--grad-warm); }
.watermark span { color: rgba(90,63,242,.08); }

/* ---------- scroll reveal (enabled by fx.js) */
.fx-on .fx-r { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.fx-on .fx-r.fx-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fx-on .fx-r { opacity: 1; transform: none; }
}
@media print { .fx-bg { display: none !important; } body { background: #fff !important; } }
