/* ── Reset & Base ─────────────────────────────────────── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:'Segoe UI',system-ui,-apple-system,sans-serif;font-size:16px;line-height:1.6;background:#f4f6fb;color:#1a1a2e;transition:background .3s,color .3s}
a{color:#534AB7;text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%}
table{border-collapse:collapse;width:100%;margin:1rem 0}
th,td{padding:8px 12px;border:1px solid #dee2e6;text-align:left;font-size:14px}
th{background:#534AB7;color:#fff;font-weight:600}
tr:nth-child(even){background:#f8f9ff}
ul,ol{padding-left:1.5rem;margin:.5rem 0}
li{margin:.3rem 0}
h2{font-size:1.4rem;font-weight:700;color:#534AB7;margin:1.2rem 0 .6rem}
h3{font-size:1.1rem;font-weight:600;color:#3C3489;margin:1rem 0 .4rem}
canvas{max-width:100%!important}

/* ── Dark Mode ────────────────────────────────────────── */
[data-theme="dark"]{background:#0f0f1a;color:#e8e8f0}
[data-theme="dark"] body{background:#0f0f1a;color:#e8e8f0}
[data-theme="dark"] .navbar{background:#1a1a2e;border-color:#2a2a4a}
[data-theme="dark"] .auth-card,[data-theme="dark"] .payment-card,[data-theme="dark"] .notes-main,[data-theme="dark"] .notes-sidebar,[data-theme="dark"] .mcq-item,[data-theme="dark"] .result-item,[data-theme="dark"] .feedback-card,[data-theme="dark"] .admin-wrap,[data-theme="dark"] .subject-section,[data-theme="dark"] .ql-card{background:#1e1e30;color:#e8e8f0;border-color:#2a2a4a}
[data-theme="dark"] th{background:#3C3489}
[data-theme="dark"] tr:nth-child(even){background:#1a1a2e}
[data-theme="dark"] td{border-color:#2a2a4a}
[data-theme="dark"] .sidebar-link{color:#b0b0d0}
[data-theme="dark"] .sidebar-link.active,[data-theme="dark"] .sidebar-link:hover{background:#3C3489;color:#fff}
[data-theme="dark"] .topic-item{border-color:#2a2a4a}
[data-theme="dark"] .mcq-opt{border-color:#2a2a4a;background:#1a1a2e}
[data-theme="dark"] .mcq-opt:hover{background:#2a2a4a}
[data-theme="dark"] .mcq-opt.selected{background:#3C3489;border-color:#7F77DD}
[data-theme="dark"] h2{color:#7F77DD}
[data-theme="dark"] h3{color:#AFA9EC}
[data-theme="dark"] .hero{background:linear-gradient(135deg,#1a1a2e 0%,#2a2a4a 100%)}
[data-theme="dark"] .section-title{color:#7F77DD}

/* ── Navbar ───────────────────────────────────────────── */
.navbar{position:sticky;top:0;z-index:100;background:#fff;border-bottom:1px solid #e8eaf0;box-shadow:0 2px 8px rgba(0,0,0,.06)}
.nav-inner{max-width:1200px;margin:0 auto;padding:0 1rem;display:flex;align-items:center;justify-content:space-between;height:60px}
.nav-brand{display:flex;align-items:center;gap:8px;font-weight:700;font-size:1.1rem;color:#534AB7;text-decoration:none}
.brand-icon{font-size:1.3rem}
.brand-accent{color:#1D9E75}
.nav-links{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.nav-link{padding:6px 12px;border-radius:6px;color:#444;font-size:.9rem;transition:background .2s}
.nav-link:hover,.nav-link.active{background:#EEEDFE;color:#534AB7;text-decoration:none}
.nav-admin{color:#D85A30!important}
.nav-user{display:flex;align-items:center;gap:8px;margin-left:.5rem}
.nav-avatar{width:32px;height:32px;border-radius:50%;object-fit:cover}
.nav-name{font-size:.85rem;font-weight:500;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.btn-login{padding:8px 16px;background:#534AB7;color:#fff!important;border-radius:8px;font-size:.9rem;font-weight:600;text-decoration:none;transition:background .2s}
.btn-login:hover{background:#3C3489;text-decoration:none}
.btn-logout{padding:5px 10px;background:transparent;border:1px solid #ddd;border-radius:6px;color:#666;font-size:.8rem;cursor:pointer;transition:all .2s}
.btn-logout:hover{background:#fee2e2;border-color:#f87171;color:#dc2626}
.theme-toggle{background:none;border:none;font-size:1.2rem;cursor:pointer;padding:6px;border-radius:6px;transition:background .2s}
.theme-toggle:hover{background:#f0f0f0}
.hamburger{display:none;flex-direction:column;gap:5px;background:none;border:none;cursor:pointer;padding:4px}
.hamburger span{display:block;width:24px;height:2px;background:#534AB7;border-radius:2px;transition:all .3s}
@media(max-width:768px){
  .hamburger{display:flex}
  .nav-links{display:none;position:absolute;top:60px;left:0;right:0;background:#fff;border-bottom:1px solid #e8eaf0;flex-direction:column;align-items:flex-start;padding:1rem;gap:.3rem;box-shadow:0 4px 12px rgba(0,0,0,.1)}
  .nav-links.open{display:flex}
  .nav-user{flex-direction:column;align-items:flex-start}
  [data-theme="dark"] .nav-links{background:#1a1a2e}
}

/* ── Page Wrap ────────────────────────────────────────── */
.page-wrap{min-height:calc(100vh - 60px)}

/* ── Hero ─────────────────────────────────────────────── */
.hero{background:linear-gradient(135deg,#534AB7 0%,#185FA5 50%,#1D9E75 100%);color:#fff;padding:4rem 1rem;text-align:center}
.hero-inner{max-width:800px;margin:0 auto}
.hero-badge{display:inline-block;background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.3);border-radius:20px;padding:4px 16px;font-size:.85rem;margin-bottom:1rem}
.hero-title{font-size:2.5rem;font-weight:800;line-height:1.2;margin-bottom:1rem}
.hero-accent{color:#FAC775}
.hero-desc{font-size:1.1rem;opacity:.9;margin-bottom:2rem;max-width:600px;margin-left:auto;margin-right:auto}
.hero-stats{display:flex;justify-content:center;gap:2rem;margin-bottom:2rem;flex-wrap:wrap}
.stat{text-align:center}
.stat-num{display:block;font-size:2rem;font-weight:800}
.stat-label{font-size:.8rem;opacity:.8;text-transform:uppercase;letter-spacing:.5px}
.btn-hero{display:inline-block;background:#FAC775;color:#1a1a2e;padding:14px 32px;border-radius:30px;font-size:1rem;font-weight:700;text-decoration:none;transition:transform .2s,box-shadow .2s}
.btn-hero:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(0,0,0,.2);text-decoration:none;color:#1a1a2e}

/* ── Sections ─────────────────────────────────────────── */
.section-inner{max-width:1100px;margin:0 auto;padding:3rem 1rem}
.section-title{text-align:center;font-size:1.8rem;font-weight:700;color:#534AB7;margin-bottom:2rem}
.subjects-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:1rem}
.subject-card{padding:1.5rem;border-radius:14px;text-align:center;cursor:pointer;transition:transform .2s}
.subject-card:hover{transform:translateY(-4px)}
.subject-purple{background:#EEEDFE;border:1px solid #AFA9EC}
.subject-teal{background:#E1F5EE;border:1px solid #5DCAA5}
.subject-amber{background:#FAEEDA;border:1px solid #EF9F27}
.subject-coral{background:#FAECE7;border:1px solid #F0997B}
.subject-blue{background:#E6F1FB;border:1px solid #85B7EB}
.subject-icon{font-size:2rem;margin-bottom:.5rem}
.subject-name{font-weight:700;font-size:.95rem;color:#333}
.subject-meta{font-size:.8rem;color:#666;margin-top:.25rem}
.features-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem}
.feature-card{background:#fff;border:1px solid #e8eaf0;border-radius:12px;padding:1.2rem;font-size:.9rem}
.feedback-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1rem}
.feedback-card{background:#fff;border:1px solid #e8eaf0;border-radius:12px;padding:1.5rem}
.fb-stars{font-size:1rem;margin-bottom:.5rem}
.fb-msg{font-size:.9rem;color:#444;font-style:italic;margin-bottom:.5rem}
.fb-name{font-size:.8rem;color:#888}
.cta-section{background:#534AB7;color:#fff;padding:4rem 1rem;text-align:center}
.cta-section h2{color:#fff;font-size:2rem}
.cta-section p{opacity:.9;margin:1rem 0 2rem}
.subjects-section{background:#fff}
.features-section{background:#f4f6fb}
.feedback-section{background:#fff}

/* ── Auth ─────────────────────────────────────────────── */
.auth-body{background:linear-gradient(135deg,#534AB7,#185FA5);min-height:100vh;display:flex;align-items:center;justify-content:center}
.auth-wrap{width:100%;max-width:460px;padding:1rem}
.auth-card{background:#fff;border-radius:20px;padding:2.5rem;text-align:center;box-shadow:0 20px 60px rgba(0,0,0,.2)}
.auth-logo{font-size:3rem;margin-bottom:.5rem}
.auth-title{font-size:1.8rem;font-weight:800;color:#534AB7;margin-bottom:.5rem}
.auth-sub{color:#666;font-size:.9rem;margin-bottom:1.5rem}
.auth-features{text-align:left;background:#f8f9ff;border-radius:10px;padding:1rem;margin-bottom:1.5rem}
.auth-feat{padding:.3rem 0;font-size:.9rem;color:#444}
.btn-google{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:14px;background:#fff;border:2px solid #e8eaf0;border-radius:12px;font-size:1rem;font-weight:600;color:#333;cursor:pointer;transition:all .2s;text-decoration:none}
.btn-google:hover{border-color:#534AB7;background:#f8f9ff;text-decoration:none;color:#333}
.auth-note{font-size:.8rem;color:#888;margin-top:1rem}

/* ── Payment ──────────────────────────────────────────── */
.payment-wrap{display:flex;justify-content:center;padding:3rem 1rem}
.payment-card{background:#fff;border-radius:20px;padding:2.5rem;max-width:480px;width:100%;box-shadow:0 8px 30px rgba(0,0,0,.1)}
.payment-title{font-size:1.6rem;font-weight:800;color:#534AB7;text-align:center;margin-bottom:1.5rem}
.payment-features{display:grid;grid-template-columns:1fr 1fr;gap:.5rem;margin-bottom:1.5rem}
.pf{font-size:.9rem;background:#f8f9ff;padding:.5rem .75rem;border-radius:8px}
.payment-price{text-align:center;margin-bottom:1.5rem;padding:1.5rem;background:linear-gradient(135deg,#EEEDFE,#E6F1FB);border-radius:12px}
.price-old{font-size:1.1rem;color:#999;text-decoration:line-through;margin-right:.5rem}
.price-new{font-size:2.5rem;font-weight:900;color:#534AB7}
.price-discount{display:block;color:#1D9E75;font-weight:600;font-size:.9rem;margin-top:.25rem}
.price-note{display:block;color:#666;font-size:.85rem;margin-top:.25rem}
.referral-form-wrap{margin-bottom:1rem;text-align:center}
.ref-hint{font-size:.85rem;color:#666;margin-bottom:.5rem}
.ref-form{display:flex;gap:.5rem}
.ref-input{flex:1;padding:8px 12px;border:1px solid #ddd;border-radius:8px;font-size:.9rem}
.btn-ref{padding:8px 16px;background:#534AB7;color:#fff;border:none;border-radius:8px;cursor:pointer;font-size:.9rem}
.btn-pay{width:100%;padding:16px;background:linear-gradient(135deg,#534AB7,#185FA5);color:#fff;border:none;border-radius:12px;font-size:1.1rem;font-weight:700;cursor:pointer;transition:transform .2s,box-shadow .2s}
.btn-pay:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(83,74,183,.4)}
.payment-secure{text-align:center;color:#666;font-size:.8rem;margin-top:.75rem}

/* ── Dashboard ────────────────────────────────────────── */
.dashboard-wrap{max-width:1200px;margin:0 auto;padding:2rem 1rem}
.dashboard-header{display:flex;align-items:center;justify-content:space-between;background:#fff;border-radius:16px;padding:1.5rem;margin-bottom:1.5rem;box-shadow:0 2px 12px rgba(0,0,0,.06);flex-wrap:wrap;gap:1rem}
.dash-welcome{display:flex;align-items:center;gap:1rem}
.dash-avatar{width:56px;height:56px;border-radius:50%;object-fit:cover}
.dash-welcome h1{font-size:1.4rem;font-weight:700;color:#1a1a2e}
.dash-welcome p{font-size:.9rem;color:#666}
.dash-stats{display:flex;gap:1.5rem}
.dstat{text-align:center}
.dstat-num{font-size:1.5rem;font-weight:800;color:#534AB7}
.dstat-label{font-size:.75rem;color:#888;text-transform:uppercase}
.upgrade-banner{background:linear-gradient(135deg,#FAC775,#EF9F27);border-radius:14px;padding:1.2rem 1.5rem;display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem;flex-wrap:wrap;gap:.5rem}
.upgrade-text{font-weight:600;color:#1a1a2e}
.btn-upgrade{padding:10px 24px;background:#534AB7;color:#fff;border-radius:8px;font-weight:700;text-decoration:none;transition:background .2s}
.btn-upgrade:hover{background:#3C3489;text-decoration:none;color:#fff}
.subjects-dash-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:1.2rem;margin-bottom:2rem}
.subject-section{background:#fff;border-radius:14px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.06)}
.subject-head{display:flex;align-items:center;gap:.75rem;padding:1rem 1.2rem;font-weight:700;font-size:.95rem}
.subject-purple .subject-head{background:#EEEDFE;color:#3C3489}
.subject-teal .subject-head{background:#E1F5EE;color:#0F6E56}
.subject-amber .subject-head{background:#FAEEDA;color:#854F0B}
.subject-coral .subject-head{background:#FAECE7;color:#993C1D}
.subject-blue .subject-head{background:#E6F1FB;color:#0C447C}
.subj-icon{font-size:1.3rem}
.subj-count{margin-left:auto;font-size:.8rem;opacity:.7}
.topic-list{padding:.5rem}
.topic-item{display:flex;align-items:center;justify-content:space-between;padding:.6rem .8rem;border-radius:8px;border:1px solid #f0f0f0;margin-bottom:.3rem;transition:background .2s}
.topic-item:hover{background:#f8f9ff}
.topic-info{display:flex;flex-direction:column}
.topic-name{font-size:.9rem;font-weight:500;color:#333}
.topic-mcq{font-size:.75rem;color:#888}
.topic-actions{display:flex;gap:.4rem;flex-shrink:0}
.quick-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:1rem;margin-bottom:2rem}
.ql-card{background:#fff;border-radius:14px;padding:1.5rem;text-align:center;text-decoration:none;border:1px solid #e8eaf0;transition:all .2s;box-shadow:0 2px 8px rgba(0,0,0,.06)}
.ql-card:hover{transform:translateY(-3px);box-shadow:0 8px 20px rgba(0,0,0,.1);text-decoration:none;border-color:#534AB7}
.ql-icon{font-size:2rem;margin-bottom:.5rem}
.ql-label{font-size:.9rem;font-weight:600;color:#333}
.referral-box{background:linear-gradient(135deg,#EEEDFE,#E6F1FB);border-radius:16px;padding:1.5rem;margin-top:1rem}
.referral-box h3{color:#3C3489;margin-bottom:.5rem}
.referral-box p{font-size:.9rem;color:#444;margin-bottom:1rem}
.ref-code-wrap{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.ref-code{font-family:monospace;background:#fff;padding:8px 16px;border-radius:8px;font-size:1rem;font-weight:700;color:#534AB7;border:2px dashed #534AB7;letter-spacing:2px}
.btn-copy{padding:8px 16px;background:#534AB7;color:#fff;border:none;border-radius:8px;cursor:pointer;font-size:.85rem;transition:background .2s}
.btn-copy:hover{background:#3C3489}
.wallet-bal{font-size:.9rem;font-weight:600;color:#1D9E75;margin-top:.75rem}

/* ── Buttons ──────────────────────────────────────────── */
.btn-sm{padding:5px 12px;border-radius:7px;font-size:.8rem;font-weight:600;text-decoration:none;transition:all .2s;display:inline-block}
.btn-notes{background:#EEEDFE;color:#3C3489;border:1px solid #AFA9EC}
.btn-notes:hover{background:#3C3489;color:#fff;text-decoration:none}
.btn-mcq{background:#E1F5EE;color:#0F6E56;border:1px solid #5DCAA5}
.btn-mcq:hover{background:#0F6E56;color:#fff;text-decoration:none}
.btn-lock{background:#f3f4f6;color:#999;border:1px solid #ddd}
.btn-translate{padding:8px 16px;background:#EEEDFE;color:#3C3489;border:1px solid #AFA9EC;border-radius:8px;cursor:pointer;font-size:.85rem;font-weight:600;transition:all .2s}
.btn-translate:hover{background:#3C3489;color:#fff}

/* ── Notes ────────────────────────────────────────────── */
.notes-wrap{display:flex;max-width:1300px;margin:0 auto;min-height:calc(100vh - 60px)}
.notes-sidebar{width:260px;flex-shrink:0;background:#fff;border-right:1px solid #e8eaf0;padding:1rem 0;overflow-y:auto;max-height:calc(100vh - 60px);position:sticky;top:60px}
.sidebar-head{padding:.75rem 1rem;font-weight:700;font-size:.85rem;color:#888;text-transform:uppercase;letter-spacing:.5px}
.sidebar-subject{padding:.5rem 1rem .2rem;font-size:.75rem;font-weight:700;color:#534AB7;text-transform:uppercase;letter-spacing:.5px;border-top:1px solid #f0f0f0;margin-top:.5rem}
.sidebar-link{display:block;padding:.5rem 1rem .5rem 1.5rem;font-size:.87rem;color:#444;transition:all .2s;border-left:3px solid transparent}
.sidebar-link:hover{background:#f0f0f8;color:#534AB7;text-decoration:none}
.sidebar-link.active{background:#EEEDFE;color:#534AB7;border-left-color:#534AB7;font-weight:600}
.notes-main{flex:1;padding:1.5rem;min-width:0}
.notes-topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem;flex-wrap:wrap;gap:.5rem}
.notes-breadcrumb{font-size:.85rem;color:#888}
.notes-breadcrumb a{color:#534AB7}
.notes-actions{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}
.notes-content{background:#fff;border-radius:16px;padding:2rem;box-shadow:0 2px 12px rgba(0,0,0,.06);line-height:1.8}
.notes-content h2{color:#534AB7;border-bottom:2px solid #EEEDFE;padding-bottom:.5rem}
.notes-content h3{color:#3C3489}
.notes-nav{display:flex;justify-content:space-between;align-items:center;margin-top:1.5rem;flex-wrap:wrap;gap:.5rem}
.btn-nav{padding:10px 20px;background:#fff;border:1px solid #534AB7;color:#534AB7;border-radius:10px;font-size:.9rem;font-weight:600;transition:all .2s;text-decoration:none}
.btn-nav:hover{background:#534AB7;color:#fff;text-decoration:none}
.btn-nav-mcq{background:#1D9E75;border-color:#1D9E75;color:#fff}
.btn-nav-mcq:hover{background:#0F6E56;text-decoration:none;color:#fff}
.btn-nav-right{margin-left:auto}
@media(max-width:768px){.notes-wrap{flex-direction:column}.notes-sidebar{width:100%;max-height:200px;position:relative;top:0;border-right:none;border-bottom:1px solid #e8eaf0}}

/* ── MCQ ──────────────────────────────────────────────── */
.mcq-wrap{max-width:800px;margin:0 auto;padding:1.5rem 1rem}
.mcq-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem;flex-wrap:wrap;gap:.5rem}
.mcq-breadcrumb{font-size:.85rem;color:#888}
.mcq-breadcrumb a{color:#534AB7}
.mcq-timer{font-size:1rem;font-weight:700;background:#EEEDFE;color:#534AB7;padding:6px 16px;border-radius:20px}
.mcq-list{display:flex;flex-direction:column;gap:1.2rem}
.mcq-item{background:#fff;border-radius:14px;padding:1.5rem;box-shadow:0 2px 8px rgba(0,0,0,.06)}
.mcq-q{font-size:1rem;font-weight:600;margin-bottom:1rem;display:flex;gap:.5rem;align-items:flex-start}
.mcq-num{background:#534AB7;color:#fff;width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:.8rem;font-weight:700;flex-shrink:0;margin-top:1px}
.mcq-opts{display:flex;flex-direction:column;gap:.5rem}
.mcq-opt{display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;border-radius:10px;border:2px solid #e8eaf0;cursor:pointer;transition:all .2s}
.mcq-opt:hover{border-color:#AFA9EC;background:#f8f9ff}
.mcq-opt.selected{border-color:#534AB7;background:#EEEDFE}
.mcq-opt input{display:none}
.opt-letter{width:28px;height:28px;border-radius:50%;background:#f0f0f0;display:flex;align-items:center;justify-content:center;font-size:.8rem;font-weight:700;color:#666;flex-shrink:0}
.mcq-opt.selected .opt-letter{background:#534AB7;color:#fff}
.opt-text{font-size:.93rem;color:#333}
.mcq-submit-wrap{text-align:center;margin-top:2rem;padding-bottom:2rem}
.btn-submit-mcq{padding:14px 40px;background:linear-gradient(135deg,#534AB7,#185FA5);color:#fff;border:none;border-radius:12px;font-size:1.05rem;font-weight:700;cursor:pointer;transition:transform .2s,box-shadow .2s}
.btn-submit-mcq:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(83,74,183,.3)}
/* Results */
.mcq-results{padding-bottom:2rem}
.result-score-wrap{background:#fff;border-radius:16px;padding:2rem;text-align:center;margin-bottom:1.5rem;box-shadow:0 4px 16px rgba(0,0,0,.08)}
.result-circle{display:inline-block;width:120px;height:120px;border-radius:50%;background:linear-gradient(135deg,#534AB7,#1D9E75);display:flex;flex-direction:column;align-items:center;justify-content:center;margin:0 auto 1rem}
.rc-num{font-size:1.5rem;font-weight:800;color:#fff}
.rc-pct{font-size:1rem;font-weight:600;color:rgba(255,255,255,.85)}
.result-msg{font-size:1.1rem;font-weight:600;color:#444}
.result-actions{display:flex;justify-content:center;gap:1rem;margin-bottom:1.5rem}
.result-details{display:flex;flex-direction:column;gap:.75rem}
.result-item{background:#fff;border-radius:12px;padding:1.2rem;border-left:4px solid #e8eaf0;display:flex;gap:.75rem}
.result-item.correct{border-left-color:#1D9E75}
.result-item.wrong{border-left-color:#D85A30}
.ri-num{font-weight:700;color:#888;flex-shrink:0;margin-top:2px}
.ri-q{font-weight:600;margin-bottom:.4rem}
.ri-given{font-size:.88rem;color:#D85A30;margin-bottom:.25rem}
.ri-correct{font-size:.88rem;color:#1D9E75;margin-bottom:.25rem}
.ri-exp{font-size:.85rem;color:#666;background:#f8f9ff;padding:.5rem .75rem;border-radius:6px}

/* ── Papers ───────────────────────────────────────────── */
.papers-wrap{max-width:1100px;margin:0 auto;padding:2rem 1rem}
.papers-header{text-align:center;margin-bottom:2.5rem}
.papers-header h1{font-size:2rem;font-weight:800;color:#534AB7}
.papers-header p{color:#666;margin-top:.5rem}
.papers-set{background:#fff;border-radius:16px;overflow:hidden;margin-bottom:1.5rem;box-shadow:0 2px 12px rgba(0,0,0,.06)}
.set-head{display:flex;align-items:center;gap:1rem;padding:1.2rem 1.5rem;font-weight:700}
.set-purple{background:#EEEDFE;color:#3C3489}
.set-teal{background:#E1F5EE;color:#0F6E56}
.set-amber{background:#FAEEDA;color:#854F0B}
.set-coral{background:#FAECE7;color:#993C1D}
.set-icon{font-size:1.5rem}
.set-label{font-size:1rem;font-weight:700}
.set-desc{font-size:.83rem;opacity:.8}
.papers-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:.5rem;padding:1.2rem 1.5rem}
.paper-btn{display:block;text-align:center;padding:10px;background:#f8f9ff;border:1px solid #e8eaf0;border-radius:10px;font-size:.88rem;font-weight:600;color:#534AB7;transition:all .2s;text-decoration:none}
.paper-btn:hover{background:#534AB7;color:#fff;border-color:#534AB7;text-decoration:none;transform:translateY(-2px)}

/* ── Feedback ─────────────────────────────────────────── */
.feedback-wrap{display:flex;justify-content:center;padding:3rem 1rem}
.feedback-card{background:#fff;border-radius:20px;padding:2.5rem;max-width:520px;width:100%;box-shadow:0 8px 30px rgba(0,0,0,.1)}
.feedback-card h1{font-size:1.6rem;font-weight:800;color:#534AB7;margin-bottom:.5rem}
.feedback-form{margin-top:1.5rem}
.form-group{margin-bottom:1.2rem}
.form-group label{display:block;font-size:.88rem;font-weight:600;color:#555;margin-bottom:.4rem}
.form-group input,.form-group textarea{width:100%;padding:10px 14px;border:1px solid #ddd;border-radius:10px;font-size:.93rem;transition:border-color .2s;font-family:inherit}
.form-group input:focus,.form-group textarea:focus{border-color:#534AB7;outline:none;box-shadow:0 0 0 3px rgba(83,74,183,.1)}
.btn-submit{width:100%;padding:14px;background:linear-gradient(135deg,#534AB7,#185FA5);color:#fff;border:none;border-radius:12px;font-size:1rem;font-weight:700;cursor:pointer;transition:transform .2s}
.btn-submit:hover{transform:translateY(-2px)}
.rating-group{display:flex;align-items:center;gap:1rem;margin-bottom:1.2rem}
.stars-input{display:flex;flex-direction:row-reverse;gap:.25rem}
.stars-input input{display:none}
.stars-input label{font-size:1.8rem;cursor:pointer;opacity:.4;transition:opacity .2s}
.stars-input input:checked ~ label,.stars-input label:hover,.stars-input label:hover ~ label{opacity:1}

/* ── Admin ────────────────────────────────────────────── */
.admin-wrap{max-width:1200px;margin:0 auto;padding:2rem 1rem}
.admin-wrap h1{font-size:1.8rem;font-weight:800;color:#534AB7;margin-bottom:1.5rem}
.admin-wrap h2{font-size:1.2rem;margin:2rem 0 1rem}
.admin-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:1rem;margin-bottom:2rem}
.astat{background:#fff;border-radius:14px;padding:1.2rem;text-align:center;box-shadow:0 2px 8px rgba(0,0,0,.06)}
.astat-num{font-size:2rem;font-weight:800;color:#534AB7}
.astat-label{font-size:.8rem;color:#888;text-transform:uppercase}
.admin-table-wrap{overflow-x:auto;background:#fff;border-radius:14px;box-shadow:0 2px 8px rgba(0,0,0,.06);margin-bottom:2rem}
.admin-table{width:100%;font-size:.85rem}
.admin-table th{background:#534AB7;color:#fff;padding:10px 14px}
.admin-table td{padding:8px 14px;border-bottom:1px solid #f0f0f0}
.admin-table tr:hover td{background:#f8f9ff}
.feedback-admin{display:flex;flex-direction:column;gap:.75rem}
.fb-admin-item{background:#fff;border-radius:12px;padding:1rem 1.2rem;box-shadow:0 1px 4px rgba(0,0,0,.06)}
.fb-admin-head{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem;flex-wrap:wrap;font-size:.85rem}
.fb-email{color:#888;font-size:.8rem}
.fb-date{color:#aaa;font-size:.78rem;margin-left:auto}
.fb-admin-msg{font-size:.88rem;color:#444;font-style:italic}

/* ── Alerts ───────────────────────────────────────────── */
.alert-success{background:#d1fae5;border:1px solid #6ee7b7;color:#065f46;padding:12px 20px;border-radius:10px;margin:1rem auto;max-width:800px;font-weight:600}

/* ── Footer ───────────────────────────────────────────── */
.footer{background:#1a1a2e;color:#aaa;padding:2rem 1rem;margin-top:3rem}
.footer-inner{max-width:1100px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:1rem}
.footer-brand{font-weight:700;color:#7F77DD;font-size:1rem}
.footer-links{display:flex;gap:1.5rem;flex-wrap:wrap}
.footer-links a{color:#aaa;font-size:.85rem;transition:color .2s}
.footer-links a:hover{color:#7F77DD;text-decoration:none}
.footer-copy{font-size:.8rem}

/* ── Responsive ───────────────────────────────────────── */
@media(max-width:640px){
  .hero-title{font-size:1.8rem}
  .hero-stats{gap:1rem}
  .dashboard-header{flex-direction:column}
  .dash-stats{justify-content:center}
  .papers-grid{grid-template-columns:repeat(auto-fill,minmax(80px,1fr))}
  .notes-main{padding:1rem}
  .notes-content{padding:1rem}
  .payment-features{grid-template-columns:1fr}
  .section-title{font-size:1.4rem}
}

.btn-xs{padding:3px 10px;border-radius:5px;font-size:.78rem;font-weight:600;border:none;cursor:pointer;}
.btn-green{background:#22c55e;color:#fff;}
.btn-red{background:#ef4444;color:#fff;}
.btn-xs:hover{opacity:.85;}


/* ── Branding Bar ──────────────────────────────────────── */
.brand-bar {
  background: linear-gradient(90deg, #1a0533 0%, #2d0a5e 50%, #1a0533 100%);
  color: #c4b5fd;
  text-align: center;
  padding: 5px 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 200;
}
.brand-bar strong { color: #e9d5ff; }
.footer-powered {
  margin-top: 0.6rem;
  font-size: 0.75rem;
  color: #888;
}
.footer-powered strong { color: #555; }
[data-theme="dark"] .footer-powered { color: #666; }
[data-theme="dark"] .footer-powered strong { color: #999; }

/* ── AI Upsell Modal ───────────────────────────────────── */
.ai-upsell-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
}
.ai-upsell-box {
  background: var(--card-bg, #fff); border-radius: 16px;
  padding: 2rem; max-width: 380px; width: 90%; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.ai-upsell-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.ai-upsell-box h3 { font-size: 1.2rem; margin: 0 0 .5rem; }
.ai-upsell-box p  { font-size: .88rem; color: #666; margin: 0 0 1.2rem; }
.ai-upsell-price  { font-size: 1.6rem; font-weight: 700; color: #6c63ff; margin-bottom: 1rem; }
.ai-upsell-price span { font-size: .9rem; font-weight: 400; color: #888; }
.btn-upsell-pay {
  display: block; width: 100%; padding: .75rem;
  background: linear-gradient(135deg, #6c63ff, #e040fb);
  color: #fff; border: none; border-radius: 10px;
  font-size: 1rem; font-weight: 700; cursor: pointer; margin-bottom: .7rem;
  text-decoration: none;
}
.btn-upsell-close {
  background: none; border: none; color: #999;
  font-size: .85rem; cursor: pointer; padding: .3rem;
}
[data-theme="dark"] .ai-upsell-box { background: #1e1e2e; }
[data-theme="dark"] .ai-upsell-box p { color: #aaa; }

/* ── Papers in Dashboard ───────────────────────────────── */
.papers-dash-section { margin: 2rem 0; }
.papers-set-dash { margin-bottom: 1.2rem; }
.set-head-dash {
  padding: .5rem 1rem; border-radius: 8px 8px 0 0;
  font-size: .88rem; font-weight: 600;
}
.set-teal   { background: #e1f5ee; color: #0f6e56; }
.set-amber  { background: #faeeda; color: #854f0b; }
.set-coral  { background: #faece7; color: #993c1d; }
.set-purple { background: #eeedfe; color: #534ab7; }
[data-theme="dark"] .set-teal   { background: #04342c; color: #9fe1cb; }
[data-theme="dark"] .set-amber  { background: #412402; color: #fac775; }
[data-theme="dark"] .set-coral  { background: #4a1b0c; color: #f5c4b3; }
[data-theme="dark"] .set-purple { background: #26215c; color: #cecbf6; }
.papers-grid-dash {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: .75rem; border: 1px solid var(--border, #e5e7eb);
  border-top: none; border-radius: 0 0 8px 8px;
}
.paper-btn-dash {
  display: inline-block; padding: 4px 10px; font-size: .78rem;
  background: var(--card-bg, #fff); border: 1px solid var(--border, #ddd);
  border-radius: 6px; color: var(--text, #333); text-decoration: none;
  transition: background .15s;
}
.paper-btn-dash:hover { background: #6c63ff; color: #fff; border-color: #6c63ff; }

/* ── AI Quota Bar ──────────────────────────────────────── */
.ai-quota-bar {
  display: flex; align-items: center; gap: .5rem;
  font-size: .8rem; margin-bottom: .8rem; flex-wrap: wrap;
}
.ai-upgrade-link {
  font-size: .78rem; color: #6c63ff; font-weight: 600;
  text-decoration: none; white-space: nowrap;
}
.ai-upgrade-link:hover { text-decoration: underline; }

/* ── Language Toggle Button ────────────────────────────── */
.lang-toggle {
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.lang-toggle:hover   { opacity: 0.88; }
.lang-toggle:disabled { opacity: 0.6; cursor: wait; }

/* ── Branding bar update ───────────────────────────────── */
.brand-bar {
  background: linear-gradient(90deg, #0f0c29 0%, #302b63 50%, #0f0c29 100%);
  color: #c4b5fd;
  text-align: center;
  padding: 5px 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  z-index: 200;
  position: relative;
}
.brand-bar strong { color: #fde68a; }

/* ── Referral card button ───────────────────────────────── */
.btn-ref-card {
  display: inline-block;
  margin-top: .8rem;
  padding: .55rem 1.2rem;
  background: linear-gradient(135deg, #6c63ff, #e040fb);
  color: #fff;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity .2s;
}
.btn-ref-card:hover { opacity: .88; }

/* ── Wallet Mini in Dashboard ───────────────────────────── */
.wallet-mini{display:flex;align-items:center;justify-content:space-between;background:linear-gradient(135deg,#1e1852,#302b63);border-radius:12px;padding:.9rem 1.2rem;margin-top:.8rem;flex-wrap:wrap;gap:.5rem;}
.wm-bal{display:flex;align-items:center;gap:.5rem;}
.wm-icon{font-size:1.3rem;}
.wm-amount{font-size:1.3rem;font-weight:700;color:#fde68a;}
.wm-label{font-size:.75rem;color:#a78bfa;}
.btn-withdraw-link{background:linear-gradient(135deg,#6c63ff,#e040fb);color:#fff;padding:.5rem 1.1rem;border-radius:8px;font-size:.82rem;font-weight:700;text-decoration:none;}
.btn-withdraw-link:hover{opacity:.88;}
