@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #667eea;
  --primary-2: #0899dc;
  --purple: #764ba2;
  --ink: #1f2430;
  --muted: #6b7280;
  --line: rgba(0,0,0,.08);
  --glass: rgba(255,255,255,.72);
  --radius: 18px;
  --shadow: 0 18px 40px rgba(31,36,48,.12);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1.6;
  background: #f7f9fc;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.mr-1 { margin-right: .35rem; }
.text-sm { font-size: .85rem; }
.text-xs { font-size: .72rem; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.container { width: min(1200px, 92%); margin: 0 auto; }

/* ---------- animated background ---------- */
.dynamic-bg {
  position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(-45deg, #fdf4ef, #eef8f2, #eef4fd, #f6eefc);
  background-size: 400% 400%; animation: gradient 18s ease infinite;
}
@keyframes gradient { 0%{background-position:0 50%} 50%{background-position:100% 50%} 100%{background-position:0 50%} }
.gradient-bg { background: linear-gradient(135deg, rgba(255,255,255,.92) 0%, rgba(235,244,255,.88) 100%); }

/* ---------- navbar ---------- */
.navbar { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; transition: all .3s ease; padding: 0; }
.navbar.scrolled { background: rgba(255,255,255,.92); backdrop-filter: blur(12px); box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.nav-inner { width: min(1280px,94%); margin: 0 auto; min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand img { height: 64px; width: auto; max-width: 320px; }
.nav-links { display: flex; gap: .5rem; align-self: stretch; }
.nav-link { position: relative; font-weight: 600; height: 100%; display: flex; align-items: center; padding: 0 1.1rem; border-radius: 0; color: #374151; transition: all .25s ease; }
.nav-link:hover { background: rgba(102,126,234,.12); color: var(--primary); }
.nav-link.active { background: linear-gradient(45deg, var(--primary), var(--primary-2)); color: #fff; }
.nav-actions { display: flex; gap: .6rem; align-items: center; }
.menu-btn { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--ink); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .7rem 1.4rem; border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: .95rem; cursor: pointer; transition: all .3s; }
.btn-sm { padding: .45rem 1rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(45deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 6px 18px rgba(102,126,234,.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(102,126,234,.5); color: #fff; }
.btn-outline { border-color: rgba(60,60,60,.35); background: rgba(255,255,255,.25); color: var(--ink); }
.btn-outline:hover { background: rgba(255,255,255,.6); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; border-radius: 16px; }

/* ---------- hero (first screen) ---------- */
.hero { min-height: 100vh; display: flex; align-items: center; padding: 130px 4% 90px; position: relative; }
.hero-grid { width: min(1200px,100%); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero-text h1 { font-size: clamp(2.2rem,4.4vw,3.6rem); font-weight: 800; line-height: 1.15; margin-bottom: 1.2rem; }
.hero-text .lead { font-size: 1.12rem; color: #4b5563; margin-bottom: 2rem; max-width: 620px; }
.hero-text .highlight { background: linear-gradient(90deg,var(--primary),var(--purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-image { position: relative; }
.hero-image-float { border: 0; background: transparent; box-shadow: none; border-radius: 0; animation: floatImg 6s ease-in-out infinite; }
.hero-image-float img { width: 100%; display: block; }
@keyframes floatImg { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
.scroll-indicator { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); text-align: center; color: var(--muted); animation: bounce 2s infinite; font-size: .85rem; }
@keyframes bounce { 0%,20%,50%,80%,100%{transform:translateX(-50%) translateY(0)} 40%{transform:translateX(-50%) translateY(-10px)} 60%{transform:translateX(-50%) translateY(-5px)} }

/* ---------- sections ---------- */
.section { padding: 84px 4%; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.8rem,3vw,2.6rem); font-weight: 800; margin-bottom: .8rem; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.grid { display: grid; gap: 1.6rem; }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-4 { grid-template-columns: repeat(4,1fr); }
.grid-2 { grid-template-columns: repeat(2,1fr); }

.feature-card, .pricing-card, .card {
  background: var(--glass); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.9);
  border-radius: var(--radius); box-shadow: var(--shadow); transition: all .3s ease;
}
.feature-card { padding: 1.8rem; }
.feature-card:hover, .pricing-card:hover, .card.hoverable:hover { transform: translateY(-8px); box-shadow: 0 26px 50px rgba(31,36,48,.18); }
.feature-icon { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 1.5rem; margin-bottom: 1.2rem; }
.feature-card h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.feature-card p, .text-muted { color: var(--muted); font-size: .95rem; }
.bg-blue { background: linear-gradient(135deg,#3b82f6,#8b5cf6); }
.bg-green { background: linear-gradient(135deg,#10b981,#14b8a6); }
.bg-orange { background: linear-gradient(135deg,#f97316,#ef4444); }
.bg-purple { background: linear-gradient(135deg,#a855f7,#ec4899); }
.bg-yellow { background: linear-gradient(135deg,#eab308,#f59e0b); }
.bg-indigo { background: linear-gradient(135deg,#6366f1,#3b82f6); }

.pricing-card { padding: 2rem 1.5rem; text-align: center; display: flex; flex-direction: column; }
.pricing-card.popular { outline: 2px solid var(--primary); transform: scale(1.02); }
.pricing-card h3 { font-size: 1.4rem; margin-bottom: 1rem; }
.price { font-size: 2.6rem; font-weight: 800; color: var(--purple); }
.price small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.pricing-card ul { list-style: none; margin: 1.4rem 0 2rem; flex: 1; }
.pricing-card li { margin: .7rem 0; font-size: .92rem; }
.pricing-card li i { color: #22c55e; margin-right: .4rem; }

/* ---------- contact / content ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2rem; }
.contact-panel, .info-panel { padding: 2rem; }
.info-row { display: flex; gap: 1rem; align-items: flex-start; padding: .8rem 0; }
.info-row .ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.info-row .ico.plain { background: transparent !important; color: #6b7280; }
.info-row .ico.plain i { color: #6b7280; }
.footer-social, .social-row { display: flex; gap: 1rem; }
.footer-social a img { width: 72px; height: 72px; border-radius: 12px; cursor: pointer; transition: transform .3s; }
.footer-social a:hover img { transform: translateY(-4px); }

/* ---------- footer ---------- */
.footer { padding: 64px 4% 26px; border-top: 1px solid rgba(255,255,255,.7); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.4fr; gap: 2.4rem; }
.footer-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.footer-brand .cube { width: 42px; height: 42px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--purple); font-size: 1.2rem; box-shadow: var(--shadow); }
.footer-brand h2 { font-size: 1.4rem; font-weight: 800; }
.footer-about p { color: var(--muted); margin-bottom: 1.2rem; }
.footer h3 { font-size: 1.05rem; margin-bottom: 1rem; }
.footer-links { list-style: none; }
.footer-links li { margin: .55rem 0; color: var(--muted); font-size: .9rem; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: space-between; color: var(--muted); font-size: .84rem; }
.footer-bottom a:hover { color: var(--primary); }
.footer-legal { display: flex; gap: 1.2rem; }

/* ---------- floating service / back to top ---------- */
.service-panel { position: fixed; right: 26px; top: 50%; transform: translateY(-50%); z-index: 1001; }
.service-main-btn { width: 58px; height: 58px; border-radius: 50%; background: linear-gradient(135deg,#3b82f6,#2563eb); color: #fff; display: grid; place-items: center; font-size: 1.5rem; cursor: pointer; box-shadow: 0 8px 24px rgba(37,99,235,.4); }
.service-options { position: absolute; right: 72px; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.9); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transition: all .3s; text-align: center; }
.service-panel.active .service-options { opacity: 1; visibility: visible; transform: translateY(-50%) translateX(-8px); }
.qrcode-image { width: 120px; height: 120px; border-radius: 8px; margin: 8px auto; }
.service-items { display: flex; gap: .8rem; justify-content: center; margin-top: 8px; }
.service-item { position: relative; width: 40px; height: 40px; border-radius: 50%; color: #fff; display: grid; place-items: center; cursor: pointer; }
.service-item.qq { background: #3b82f6; }
.service-item.phone { background: #22c55e; }
.service-tooltip { position: absolute; right: 48px; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.75); color: #fff; padding: 5px 8px; border-radius: 6px; font-size: .72rem; white-space: nowrap; opacity: 0; transition: .3s; pointer-events: none; }
.service-item:hover .service-tooltip { opacity: 1; }
.back-to-top { position: fixed; bottom: 28px; right: 28px; width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(45deg,#2563eb,#3b82f6); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; visibility: hidden; transition: all .3s; box-shadow: 0 6px 20px rgba(37,99,235,.4); z-index: 1001; }
.back-to-top.show { opacity: .9; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); opacity: 1; }

/* ---------- mobile menu ---------- */
.mobile-menu { position: fixed; top: 0; right: 0; width: 280px; height: 100vh; background: rgba(255,255,255,.96); backdrop-filter: blur(16px); box-shadow: -10px 0 30px rgba(0,0,0,.1); padding: 1.5rem; transform: translateX(100%); transition: transform .3s; z-index: 1100; overflow-y: auto; }
.mobile-menu.open { transform: translateX(0); }
.mobile-menu > .menu-btn { float: right; margin-bottom: 2rem; }
.mobile-links { display: flex; flex-direction: column; gap: .3rem; clear: both; }
.mobile-links > a { font-size: 1.1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.mobile-actions { display: flex; flex-direction: column; gap: .8rem; margin-top: 1.5rem; }
.mobile-qrcode-section { margin-top: 2rem; padding: 1.2rem; text-align: center; background: rgba(102,126,234,.06); border-radius: 12px; }
.mobile-qrcode-image { width: 110px; margin: .6rem auto; border-radius: 8px; }

/* ---------- modals ---------- */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(5px); z-index: 2000; }
.modal.active { display: grid; place-items: center; }
.modal-content { width: min(480px,92%); max-height: 90vh; overflow-y: auto; background: rgba(255,255,255,.97); border-radius: 20px; padding: 2rem; box-shadow: 0 30px 70px rgba(0,0,0,.3); transform: scale(.94); opacity: 0; transition: .3s; }
.modal.active .modal-content { transform: scale(1); opacity: 1; }
.video-modal-content { width: min(820px,95%); }
.modal-content.wide { width: min(760px,94%); }
.cover-preview { max-width: 240px; max-height: 140px; width: auto; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.course-cover { width: 100%; max-height: 340px; object-fit: cover; border-radius: 12px; margin-bottom: 1.2rem; }
.modal-hint { font-size: .84rem; color: var(--muted); margin-top: .35rem; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.4rem; }
.modal-head h3 { font-size: 1.4rem; }
.modal-close { background: none; border: 0; font-size: 1.3rem; cursor: pointer; color: var(--muted); }
.video-container { position: relative; padding-bottom: 56.25%; height: 0; border-radius: 12px; overflow: hidden; margin-bottom: 1rem; background: #000; }
.video-container iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.form-stack { display: flex; flex-direction: column; gap: 1rem; }
.form-stack label, .field label { display: block; font-weight: 600; margin-bottom: .4rem; font-size: .9rem; }
.form-stack input, .form-stack textarea, .field input, .field textarea, .field select {
  width: 100%; padding: .75rem 1rem; border: 1px solid #d8dee9; border-radius: 12px; font: inherit; background: #fff; outline: none;
}
.form-stack input:focus, .form-stack textarea:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(102,126,234,.15); }

/* ---------- inner pages ---------- */
.page-hero { padding: 150px 4% 60px; text-align: center; }
.page-hero h1 { font-size: clamp(2rem,4vw,3rem); font-weight: 800; }
.page-hero p { color: var(--muted); margin-top: .8rem; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-top: 1rem; }
.breadcrumb a:hover { color: var(--primary); }
.panel { background: var(--glass); backdrop-filter: blur(12px); border: 1px solid #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.4rem; }
.chip { padding: .5rem 1.1rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .9rem; }
.chip:hover, .chip.active { background: linear-gradient(45deg,var(--primary),var(--primary-2)); color: #fff; border-color: transparent; }
.list-card { display: flex; gap: 1.2rem; padding: 1.2rem; border-radius: 14px; background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.04); margin-bottom: 1rem; transition: .25s; border: 1px solid var(--line); }
.list-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.list-card .thumb { width: 150px; height: 100px; object-fit: cover; border-radius: 10px; flex: none; background: #eef2f7; }
.list-card h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.list-card h3:hover { color: var(--primary); }
.list-card .meta { font-size: .8rem; color: var(--muted); margin-top: .5rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .72rem; background: rgba(102,126,234,.12); color: var(--primary); }
.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 38px; height: 38px; display: grid; place-items: center; padding: 0 .6rem; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: .9rem; }
.pagination a:hover, .pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }
.article { line-height: 1.9; }
.article h1 { font-size: 2rem; margin-bottom: 1rem; }
.article-meta { color: var(--muted); font-size: .85rem; margin-bottom: 1.6rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.article-body { font-size: 1rem; }
.article-body img { max-width: 100%; border-radius: 12px; margin: 1rem 0; }
.article-body p { margin: .8rem 0; }
.sidebar { position: sticky; top: 100px; }
.side-card { padding: 1.4rem; margin-bottom: 1.4rem; }
.side-card h3 { font-size: 1.05rem; margin-bottom: 1rem; padding-bottom: .6rem; border-bottom: 2px solid var(--primary); }
.side-list { list-style: none; }
.side-list li { padding: .55rem 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.side-list li:hover { color: var(--primary); }
.answer-item { padding: 1.2rem; background: #fff; border-radius: 12px; margin-bottom: 1rem; border: 1px solid var(--line); }
.answer-item .who { font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }
.notice { padding: 1rem 1.2rem; border-radius: 12px; margin-bottom: 1.2rem; font-size: .92rem; }
.notice.err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.notice.ok { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.empty { text-align: center; padding: 3rem; color: var(--muted); }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 120px 4% 60px; }
.auth-card { width: min(440px,100%); padding: 2.4rem; }
.auth-card h1 { font-size: 1.8rem; margin-bottom: .4rem; }
.auth-card .sub { color: var(--muted); margin-bottom: 1.6rem; }
.auth-card .field { margin-bottom: 1.1rem; }
.auth-alt { margin-top: 1.2rem; text-align: center; font-size: .9rem; color: var(--muted); }
.auth-alt a { color: var(--primary); font-weight: 600; }

/* ---------- admin ---------- */
.admin-body { background: #f1f3f8; }
.admin-layout { display: flex; min-height: 100vh; }
.sidebar-admin { width: 240px; background: linear-gradient(180deg,#1f2440,#2b2f52); color: #cfd4ea; flex: none; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; overflow: hidden; transition: width .25s ease; }
.admin-logo { height: 64px; box-sizing: border-box; padding: 0 1.2rem; font-size: 1.2rem; font-weight: 800; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: .6rem; flex: none; white-space: nowrap; overflow: hidden; }
.admin-logo i { flex: none; }
.admin-nav { list-style: none; padding: .8rem 0; flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #252b4c transparent; }
.admin-nav::-webkit-scrollbar { width: 4px; }
.admin-nav::-webkit-scrollbar-track { background: transparent; }
.admin-nav::-webkit-scrollbar-thumb { background: #252b4c; border-radius: 4px; }
.admin-nav::-webkit-scrollbar-thumb:hover { background: #39416d; }
.admin-nav li.nav-hidden { display: none; }
.admin-nav li a { display: flex; align-items: center; gap: .7rem; padding: .7rem 1.2rem; font-size: .92rem; white-space: nowrap; }
.admin-nav li a i { flex: none; width: 18px; text-align: center; }
.admin-nav li a:hover { background: rgba(255,255,255,.1); color: #fff; }
.admin-nav li a.active { background: linear-gradient(90deg, #2563eb, #3b82f6); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 #93c5fd; }
.admin-nav li a.active:hover { background: linear-gradient(90deg, #1d4ed8, #2563eb); }
.admin-nav .group { padding: 1rem 1.2rem .3rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: #7b82a6; white-space: nowrap; cursor: pointer; user-select: none; display: flex; align-items: center; justify-content: space-between; }
.admin-nav .group:hover { color: #cfd4ea; }
.group-arrow { font-size: .62rem; margin-right: .3rem; transition: transform .2s ease; }
.admin-nav .group.collapsed .group-arrow { transform: rotate(-90deg); }
.sidebar-toggle { flex: none; width: 100%; border: 0; border-top: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.16); color: #cfd4ea; padding: .9rem 0; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: .6rem; font: inherit; font-size: .85rem; transition: background .2s, color .2s; }
.sidebar-toggle:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-toggle i { flex: none; transition: transform .25s ease; }
.admin-main { margin-left: 240px; flex: 1; min-width: 0; transition: margin-left .25s ease; }
body.admin-collapsed .sidebar-admin { width: 68px; }
body.admin-collapsed .admin-main { margin-left: 68px; }
body.admin-collapsed .nav-text { display: none; }
body.admin-collapsed .admin-logo, body.admin-collapsed .admin-nav li a { justify-content: center; padding-left: 0; padding-right: 0; }
body.admin-collapsed .admin-nav .group { display: none; }
body.admin-collapsed .sidebar-toggle i { transform: rotate(180deg); }
.admin-tooltip { position: fixed; z-index: 1200; background: #1f2440; color: #fff; padding: .45rem .75rem; border-radius: 8px; font-size: .84rem; font-weight: 500; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.3); pointer-events: none; opacity: 0; visibility: hidden; transform: translateY(-50%); transition: opacity .15s ease; }
.admin-tooltip.show { opacity: 1; visibility: visible; }
.admin-top { height: 64px; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.05); display: flex; align-items: center; justify-content: space-between; padding: 0 1.6rem; }
.admin-content { padding: 1.8rem; }
.admin-card { background: #fff; border-radius: 14px; box-shadow: 0 4px 16px rgba(0,0,0,.05); padding: 1.5rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 1.2rem; }
.stat { background: #fff; border-radius: 14px; padding: 1.4rem; box-shadow: 0 4px 16px rgba(0,0,0,.05); display: flex; align-items: center; gap: 1rem; }
.stat .ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 1.3rem; }
.stat .num { font-size: 1.7rem; font-weight: 800; }
.stat .lbl { color: var(--muted); font-size: .85rem; }
.table-tools { display: flex; gap: .6rem; justify-content: space-between; margin-bottom: 1rem; flex-wrap: wrap; }
.table-tools input, .table-tools select { padding: .6rem .9rem; border: 1px solid #d8dee9; border-radius: 10px; font: inherit; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th, .data-table td { padding: .7rem .8rem; text-align: left; border-bottom: 1px solid #eef0f4; white-space: nowrap; }
.data-table th { background: #f8f9fc; color: #4b5563; font-weight: 600; }
.data-table tr:hover td { background: #fafbff; }
.data-table .cell-clip { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-links { display: flex; gap: .5rem; }
.action-links a { color: var(--primary); }
.action-links a.danger { color: #ef4444; }
.form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.1rem; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid textarea { min-height: 130px; resize: vertical; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-light { background: #eef1f7; color: #374151; }

/* ---------- contact section (distinct from classroom) ---------- */
.section-contact {
  position: relative;
  background: linear-gradient(135deg, #eaf1ff 0%, #e3edfd 50%, #f2ebff 100%);
  color: var(--ink);
  border-radius: 0;
  margin-top: 0;
  border-top: 1px solid rgba(102,126,234,.18);
}
.section-contact .section-head h2, .section-contact h3 { color: var(--ink); }
.section-contact .section-head p, .section-contact .text-muted { color: var(--muted); }
.section-contact .font-medium { color: var(--ink); }
.section-contact .contact-panel, .section-contact .info-panel {
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 0;
  padding: 1.6rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(31,36,48,.08);
}
.section-contact .btn-outline { border-color: rgba(60,60,60,.35); color: var(--ink); }
.section-contact .btn-outline:hover { background: rgba(255,255,255,.7); color: var(--ink); }

.course-card { overflow: hidden; display: flex; flex-direction: column; }
.course-card-img { width: 100%; height: 117px; overflow: hidden; background: #eef2f7; }
.course-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.course-card-ph { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, #6366f1, #3b82f6); color: #fff; font-size: 2.4rem; }
.course-card-body { padding: 1.3rem; display: flex; flex-direction: column; flex: 1; }
.course-card-body h3 { margin: 0 0 .4rem; font-size: 1.1rem; }
.course-card-body p { flex: 1; }

.chapter-card { position: relative; min-height: 175px; padding: 1.8rem 1.1rem 1.2rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .8rem; }
.chapter-index { position: absolute; top: .6rem; right: .6rem; background: #ef4444; color: #fff; padding: .2rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 700; box-shadow: 0 3px 10px rgba(239,68,68,.3); }
.chapter-play { display: grid; place-items: center; color: var(--primary); font-size: 2.4rem; line-height: 1; transition: transform .25s ease; }
.chapter-card:hover .chapter-play { transform: scale(1.12); }
.chapter-card h4 { font-size: .95rem; margin: 0; line-height: 1.4; color: var(--ink); }
.chapter-card.locked .chapter-play { color: #94a3b8; }
.chapter-card.locked { cursor: default; }

/* ---------- member center ---------- */
.member-card { padding: 1.6rem; display: flex; flex-direction: column; min-height: 210px; }
.member-card h3 { margin: .9rem 0 .5rem; font-size: 1.15rem; }
.member-card p { flex: 1; }
.member-count { margin-top: auto; color: var(--primary); font-weight: 700; font-size: 1.05rem; }

/* ---------- products / orders ---------- */
.product-card { overflow: hidden; display: flex; flex-direction: column; }
.product-img { height: 170px; background: #eef2f7; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 1.3rem; display: flex; flex-direction: column; flex: 1; }
.product-body h3 { margin: .6rem 0; font-size: 1.1rem; }
.product-summary { flex: 1; min-height: 2.8rem; }
.product-body .price { margin: 1rem 0; font-size: 1.25rem; font-weight: 700; color: #111; }
.order-product { display: flex; gap: 1.2rem; align-items: flex-start; }
.order-product img { width: 180px; height: 130px; object-fit: cover; border-radius: 10px; flex: none; background: #eef2f7; }
.order-product h4 { font-size: 1.2rem; margin-bottom: .5rem; }
.order-product .meta { font-size: .85rem; color: var(--muted); margin-top: .6rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.product-unit-price { margin-top: 1rem; color: var(--muted); }
.product-unit-price strong { color: #111; font-size: 1.2rem; }
.order-total-row { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.order-total-row strong { font-size: 1.6rem; color: var(--purple); }
.order-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.pay-qr-wrap { display: flex; justify-content: center; margin: 1rem 0; }
.order-qr { display: block; margin: 0 auto; width: 220px; height: 220px; border-radius: 12px; background: #fff; padding: 8px; box-shadow: var(--shadow); }
.pay-steps { list-style: none; counter-reset: step; }
.pay-steps li { position: relative; padding: .5rem 0 .5rem 2.4rem; color: var(--muted); font-size: .92rem; }
.pay-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: .45rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: .75rem; }

/* ---------- online classroom ---------- */
.badges { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0; }
.badge-free { background: rgba(34,197,94,.14); color: #15803d; }
.badge-paid { background: rgba(245,158,11,.16); color: #b45309; }
.badge-lock { background: rgba(239,68,68,.13); color: #dc2626; }
.chapter-list { list-style: none; }
.chapter-list li { border-bottom: 1px solid var(--line); }
.chapter-list li a, .chapter-list li > span { display: flex; gap: .6rem; align-items: center; padding: .7rem .4rem; font-size: .92rem; }
.chapter-list li a:hover { color: var(--primary); }
.chapter-list li.active a { color: var(--primary); font-weight: 700; background: rgba(102,126,234,.07); border-radius: 8px; }
.player-panel { padding: 0; overflow: hidden; background: #0f1118; }
.course-video { width: 100%; display: block; max-height: 70vh; background: #000; }
.player-panel .video-container { margin: 0; border-radius: 0; }
.player-locked { min-height: 380px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; color: #cbd5e1; text-align: center; padding: 2rem; }
.player-locked h3 { color: #fff; }
.player-locked p { color: #94a3b8; }
.access-notice { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.check-row { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; font-size: .9rem; color: var(--muted); }
.radio-row { display: flex; flex-wrap: wrap; gap: 1.6rem; padding: .4rem 0; }
.radio-row label { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; color: #374151; cursor: pointer; }
.radio-row input[type=radio] { accent-color: var(--primary); width: 16px; height: 16px; flex: none; }
.check-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.link-btn { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0; font: inherit; }
.link-btn.danger { color: #ef4444; }
.file-input { padding: .6rem !important; }
.file-input::file-selector-button { border: 0; border-radius: 8px; padding: .5rem .9rem; margin-right: .8rem; background: var(--primary); color: #fff; cursor: pointer; }

@media (max-width: 900px) {
  .nav-links, .nav-actions { display: none; }
  .menu-btn { display: block; }
  .hero-grid, .contact-grid, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .sidebar-admin { width: 100%; height: auto; position: static; }
  .admin-main { margin-left: 0; }
  .sidebar-toggle { display: none; }
  body.admin-collapsed .sidebar-admin { width: 100%; }
  body.admin-collapsed .admin-main { margin-left: 0; }
  body.admin-collapsed .nav-text { display: inline; }
  body.admin-collapsed .admin-nav .group { display: block; }
  body.admin-collapsed .admin-logo, body.admin-collapsed .admin-nav li a { justify-content: flex-start; padding-left: 1.2rem; padding-right: 1.2rem; }
  .admin-tooltip { display: none; }
  .list-card { flex-direction: column; }
  .list-card .thumb { width: 100%; height: 180px; }
  .service-panel { display: none; }
}
