/* Qualyvo 4.6.0 — Visual Refresh Part 1
   Scope: app shell, sidebar, dashboard, portal, account/modal and button system.
   No exam/study/visual-memory behavior is changed here. */

:root{
  --qv-navy:#082846;
  --qv-navy-2:#0b3a67;
  --qv-blue:#087fe3;
  --qv-blue-2:#0b6fc2;
  --qv-cyan:#35b9f5;
  --qv-ink:#10233a;
  --qv-soft:#f4f8fc;
  --qv-line:#dce7f1;
  --qv-shadow:0 16px 42px rgba(25,61,94,.08);
  --qv-shadow-sm:0 8px 22px rgba(25,61,94,.07);
  --qv-radius:18px;
}

/* ---------- APP SHELL ---------- */
#appShell:not(.app-hidden){background:linear-gradient(180deg,#f7fafe 0,#f3f7fb 100%)}
#appShell .appbar{
  height:66px;
  padding:0 24px;
  background:rgba(255,255,255,.94);
  border-bottom:1px solid #dfe9f3;
  box-shadow:0 1px 0 rgba(17,56,91,.03);
  backdrop-filter:saturate(160%) blur(16px);
}
#appShell .brand{gap:10px}
#appShell .v7mark{
  width:34px;height:34px;display:grid;place-items:center;border-radius:11px;
  color:#fff;font-weight:900;font-size:18px;letter-spacing:-.06em;
  background:linear-gradient(145deg,#087fe3,#2eb9f3);
  box-shadow:0 7px 18px rgba(8,127,227,.22);
}
#appShell .brandtext{color:#10233a;font-size:15px;font-weight:850;letter-spacing:-.01em}
#appShell .brandtext span{color:#74869a;font-weight:600;font-size:12px}
#appShell .topactions{gap:8px}
#appShell .savepill,#appShell .timer{
  border:1px solid #dce7f1;background:#f7fafe;color:#52687e;border-radius:10px;
  box-shadow:none;font-weight:750
}
#appShell .iconbtn{
  min-height:38px;border-radius:11px;border:1px solid #dbe6f0;background:#fff;color:#17324d;
  transition:transform .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease
}
#appShell .iconbtn:hover{transform:translateY(-1px);background:#f6faff;border-color:#bdd7ec;box-shadow:0 5px 14px rgba(25,61,94,.08)}
#appShell .layout{max-width:none;width:100%;grid-template-columns:252px minmax(0,1fr);min-height:calc(100vh - 66px)}
#appShell .main{padding:26px clamp(18px,2.7vw,42px) 56px;background:linear-gradient(180deg,#f7fafe 0,#f4f8fc 100%)}
#appShell .content{max-width:1260px;margin:0 auto}

/* ---------- SIDEBAR ---------- */
#sidebar.ce442-sidebar{
  top:66px;height:calc(100vh - 66px);padding:16px 14px 14px;
  background:linear-gradient(180deg,#092d50 0%,#0b3b69 52%,#082846 100%);
  border-right:0;box-shadow:12px 0 30px rgba(4,31,57,.06);color:#fff;
  scrollbar-color:rgba(255,255,255,.22) transparent;
}
#sidebar .qv46-side-brand{display:flex;align-items:center;gap:11px;padding:4px 7px 15px;margin-bottom:7px;border-bottom:1px solid rgba(255,255,255,.12)}
#sidebar .qv46-side-mark{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:linear-gradient(145deg,#168cf0,#46c3f7);color:white;font-size:20px;font-weight:950;box-shadow:0 8px 24px rgba(15,144,236,.28)}
#sidebar .qv46-side-brand b{display:block;color:#fff;font-size:21px;letter-spacing:-.035em;line-height:1.05}
#sidebar .qv46-side-brand small{display:block;color:#a9c4da;font-size:10px;font-weight:700;margin-top:4px;letter-spacing:.035em;text-transform:uppercase}
#sidebar.ce442-sidebar>.side-title{display:none!important}
#sidebar.ce442-sidebar .ce442-label{color:#8fb1cd;font-size:9.5px;margin:12px 9px 7px;letter-spacing:.12em}
#sidebar.ce442-sidebar .ce442-group{margin-bottom:9px}
#sidebar.ce442-sidebar .ce442-group.ce442-support{border-top:1px solid rgba(255,255,255,.11);padding-top:10px;margin-top:auto}
#sidebar.ce442-sidebar .side-btn{
  min-height:42px;margin:2px 0;padding:9px 10px;border-radius:11px;color:#e9f3fb;
  border:1px solid transparent;font-size:13px;font-weight:650;transition:background .16s ease,border-color .16s ease,transform .16s ease,color .16s ease
}
#sidebar.ce442-sidebar .side-btn:hover{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.10);color:#fff;transform:translateX(2px)}
#sidebar.ce442-sidebar .side-btn.active{
  color:#fff;background:linear-gradient(135deg,rgba(19,137,232,.96),rgba(20,116,210,.90));
  border-color:rgba(123,205,255,.35);box-shadow:0 9px 22px rgba(0,98,178,.24)
}
#sidebar.ce442-sidebar .ce442-ico{
  width:22px;height:22px;flex:0 0 22px;border-radius:7px;background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);color:#d9efff;font-size:12px
}
#sidebar.ce442-sidebar .side-btn.active .ce442-ico{background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.18);color:#fff}
#sidebar.ce442-sidebar .cycle-card{background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.10);color:#f5fbff;border-radius:12px}
#sidebar.ce442-sidebar .cycle-card small,#sidebar.ce442-sidebar .side-note{color:#a9c4da}
#sidebar.ce442-sidebar .cyclebar{background:rgba(255,255,255,.12)}
#sidebar.ce442-sidebar .cyclebar>div{background:linear-gradient(90deg,#31b8f3,#1c88eb)}
#sidebar .qv46-profile{
  width:calc(100% - 4px);display:block;text-align:left;
  margin:9px 2px 8px;padding:11px;border:1px solid rgba(117,198,252,.20);border-radius:14px;
  background:linear-gradient(145deg,rgba(31,123,199,.22),rgba(255,255,255,.045));color:#fff;cursor:pointer
}
#sidebar .qv46-profile:hover{border-color:rgba(117,198,252,.38);background:linear-gradient(145deg,rgba(31,123,199,.30),rgba(255,255,255,.065))}
#sidebar .qv46-profile-top{display:flex;align-items:center;gap:9px}
#sidebar .qv46-avatar{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#33baf4,#0f79d5);font-weight:900;color:white;border:2px solid rgba(255,255,255,.24)}
#sidebar .qv46-profile b{display:block;font-size:12px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#sidebar .qv46-profile small{display:block;color:#b9d0e1;font-size:10px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#sidebar .side-note{font-size:9px!important;opacity:.78!important;line-height:1.5!important;padding:8px 9px 3px!important}

/* ---------- BUTTON SYSTEM ---------- */
#appShell .primary,#appShell .secondary{
  min-height:42px;border-radius:11px;padding:10px 15px;font-weight:800;letter-spacing:-.005em;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease
}
#appShell .primary{border-color:#087fe3;background:linear-gradient(135deg,#087fe3,#0870ca);box-shadow:0 8px 18px rgba(8,127,227,.18)}
#appShell .primary:hover{background:linear-gradient(135deg,#0875d2,#0867b9);transform:translateY(-1px);box-shadow:0 11px 22px rgba(8,127,227,.23)}
#appShell .secondary{border-color:#d4e1ec;background:#fff;color:#18344f}
#appShell .secondary:hover{background:#f7fbff;border-color:#bcd5e8;transform:translateY(-1px)}

/* ---------- DASHBOARD ---------- */
#appShell .u-dash{display:grid;gap:16px}
#appShell .qv46-welcome{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;padding:0 2px 2px}
#appShell .qv46-welcome h2{margin:0;color:#10233a;font-size:clamp(24px,2.7vw,34px);letter-spacing:-.035em;line-height:1.08}
#appShell .qv46-welcome p{margin:5px 0 0;color:#6f8195;font-size:14px}
#appShell .qv46-welcome-badge{display:inline-flex;align-items:center;gap:8px;padding:8px 11px;border:1px solid #dce8f2;background:#fff;border-radius:999px;color:#48637c;font-size:11px;font-weight:800;box-shadow:var(--qv-shadow-sm)}
#appShell .u-backrow{margin:0;min-height:38px;align-items:center}
#appShell .u-switch-cert{border:1px solid #d8e5ef;background:#fff;color:#36516b;border-radius:10px;padding:8px 11px;font-weight:750}
#appShell .u-cert-pill{border:1px solid #dce8f1;background:#f7fbff;color:#70849a;border-radius:999px;padding:6px 9px;font-size:10px;font-weight:800}
#appShell .u-dash-top{
  position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;min-height:240px;
  padding:32px 34px;border:1px solid #d6e8f6;border-radius:22px;
  background:linear-gradient(118deg,#fafdff 0%,#eef7ff 48%,#dceeff 100%);box-shadow:var(--qv-shadow)
}
#appShell .u-dash-top::before{content:"";position:absolute;right:-50px;bottom:-85px;width:360px;height:280px;border-radius:58% 42% 0 0;background:linear-gradient(145deg,rgba(14,132,228,.16),rgba(78,189,247,.04));transform:rotate(-10deg)}
#appShell .u-dash-top::after{content:"Q";position:absolute;right:70px;top:34px;width:132px;height:132px;display:grid;place-items:center;border-radius:32px;background:linear-gradient(145deg,#118ae9,#3cbdf5);color:#fff;font-size:72px;font-weight:950;letter-spacing:-.08em;box-shadow:0 20px 45px rgba(31,137,218,.24);transform:rotate(-5deg)}
#appShell .u-dash-title{position:relative;z-index:2;max-width:720px;padding-right:190px}
#appShell .u-dash-title h1{display:flex;flex-direction:column;gap:8px;margin:0;color:#0f2943;font-size:16px;font-weight:850;line-height:1}
#appShell .u-dash-title h1::before{content:"CONTINUE ESTUDANDO";font-size:10px;letter-spacing:.12em;color:#507798;font-weight:900}
#appShell .u-dash-title h1>span{display:block;color:#10233a;font-size:clamp(30px,4vw,48px);line-height:1.02;letter-spacing:-.045em;font-weight:900}
#appShell .u-dash-title p{position:relative;z-index:2;max-width:650px;margin:14px 0 0;color:#587089;font-size:15px;line-height:1.6}
#appShell .u-dash-tools{position:absolute;right:18px;bottom:18px;z-index:3}
#appShell .u-dash-tools .secondary{background:rgba(255,255,255,.78);backdrop-filter:blur(10px)}
#appShell .u-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0}
#appShell .u-stat{
  min-height:112px;border:1px solid #dce7f1!important;border-radius:16px!important;background:#fff!important;
  box-shadow:var(--qv-shadow-sm)!important;padding:17px!important;color:#17324b!important
}
#appShell .u-stat>span{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:#eaf5ff;color:#087fe3;font-size:20px!important}
#appShell .u-stat small{color:#7a8da1!important;font-size:10px!important;font-weight:800!important;letter-spacing:.03em;text-transform:uppercase}
#appShell .u-stat b{color:#122a43!important;font-size:22px!important;letter-spacing:-.025em}
#appShell .u-stat p{color:#6f8194!important;font-size:11px!important;margin-top:3px!important}
#appShell .u-stat-action{background:linear-gradient(145deg,#0b3f70,#0a3158)!important;border-color:#0f568d!important;color:white!important}
#appShell .u-stat-action>span{background:rgba(62,189,248,.16);color:#51c7fb;border:1px solid rgba(98,202,249,.16)}
#appShell .u-stat-action small,#appShell .u-stat-action p{color:#a8c6de!important}#appShell .u-stat-action b{color:#fff!important}

#appShell .qv46-quick-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
#appShell .qv46-quick{
  position:relative;min-height:132px;text-align:left;padding:16px 16px 14px;border-radius:16px;border:1px solid #dce7f1;background:#fff;color:#16324d;box-shadow:var(--qv-shadow-sm);overflow:hidden
}
#appShell .qv46-quick:hover{transform:translateY(-2px);border-color:#bed8eb;box-shadow:0 14px 28px rgba(25,61,94,.10)}
#appShell .qv46-quick .qv46-qi{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;font-size:18px;margin-bottom:12px}
#appShell .qv46-quick b{display:block;font-size:14px;margin-bottom:5px;color:#10263e}
#appShell .qv46-quick small{display:block;color:#718398;font-size:11px;line-height:1.45;padding-right:20px}
#appShell .qv46-quick::after{content:"→";position:absolute;right:14px;bottom:12px;font-weight:900;font-size:17px}
#appShell .qv46-quick.study .qv46-qi{background:#e9f5ff;color:#087fe3}#appShell .qv46-quick.study::after{color:#087fe3}
#appShell .qv46-quick.exam .qv46-qi{background:#f1ebff;color:#7650df}#appShell .qv46-quick.exam::after{color:#7650df}
#appShell .qv46-quick.read .qv46-qi{background:#eaf8f2;color:#179b6c}#appShell .qv46-quick.read::after{color:#179b6c}
#appShell .qv46-quick.visual .qv46-qi{background:#fff2e5;color:#df7a18}#appShell .qv46-quick.visual::after{color:#df7a18}

#appShell .u-panel{
  border:1px solid #dce7f1!important;border-radius:18px!important;background:#fff!important;box-shadow:var(--qv-shadow-sm)!important;padding:20px!important
}
#appShell .u-panel-head{gap:12px;margin-bottom:15px!important}
#appShell .u-panel-head h2{margin:0;color:#122a43;font-size:17px;letter-spacing:-.02em}
#appShell .u-panel-head p{margin:4px 0 0;color:#72859a;font-size:12px}
#appShell .u-visual-scroll{gap:12px;padding-bottom:3px}
#appShell .u-visual-card{border:1px solid #dce7f1!important;border-radius:15px!important;background:#fbfdff!important;overflow:hidden;box-shadow:none!important}
#appShell .u-visual-card>img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;background:#edf5fb}
#appShell .u-vbody{padding:12px!important}
#appShell .u-vbody b{font-size:12px!important;color:#17324b}
#appShell .u-domain{border:1px solid #e0e9f1!important;border-radius:13px!important;background:#fbfdff!important;padding:12px 13px!important}
#appShell .u-domain:hover{background:#f5faff!important;border-color:#c2daec!important;transform:translateY(-1px)}
#appShell .u-domain-icon{background:#eaf5ff!important;color:#087fe3!important;border-radius:9px!important}
#appShell .u-progress{background:#e8eef4!important}#appShell .u-progress i{background:linear-gradient(90deg,#087fe3,#2eb6f2)!important}
#appShell .u-support{gap:16px!important}
#appShell .u-allies button{border:1px solid #e0e9f1!important;border-radius:13px!important;background:#fbfdff!important}
#appShell .u-weak-list>div{border-bottom-color:#edf2f6!important}
#appShell .u-final{border:1px solid #cfe9dd!important;border-radius:18px!important;background:linear-gradient(115deg,#f4fcf7,#fbfefd)!important;box-shadow:var(--qv-shadow-sm)!important;padding:20px!important}

/* ---------- CERTIFICATION PORTAL ---------- */
#appShell .u-portal{display:grid;gap:18px}
#appShell .u-portal-head{
  padding:26px 28px!important;border:1px solid #d7e7f4;border-radius:20px;background:linear-gradient(120deg,#fbfdff,#eaf5ff);box-shadow:var(--qv-shadow)
}
#appShell .u-brand h1{color:#10233a!important;letter-spacing:-.04em}#appShell .u-brand h1 span{color:#087fe3!important}
#appShell .u-brand p{color:#6d8196!important}
#appShell .u-cert-grid{gap:14px!important}
#appShell .u-cert-card{border:1px solid #dbe7f1!important;border-radius:18px!important;background:#fff!important;box-shadow:var(--qv-shadow-sm)!important;padding:20px!important}
#appShell .u-cert-card:hover{transform:translateY(-2px);border-color:#bad6e9!important;box-shadow:0 16px 30px rgba(25,61,94,.10)!important}
#appShell .u-cert-code{font-weight:900!important;color:#087fe3!important}#appShell .u-cert-name{color:#112a43!important}

/* ---------- MODALS / ACCOUNT ---------- */
#appShell .modalback{backdrop-filter:blur(7px);background:rgba(7,26,44,.46)}
#appShell .modal{border-radius:20px!important;border:1px solid #dce7f1!important;box-shadow:0 30px 80px rgba(8,31,52,.26)!important;padding:22px!important}
#appShell .modalhead{padding-bottom:13px;margin-bottom:14px;border-bottom:1px solid #e7eef4}
#appShell .modalhead h2{margin:0;color:#102a44;font-size:20px;letter-spacing:-.025em}
#appShell .account-card{border:1px solid #dce7f1!important;border-radius:14px!important;background:#f9fcff!important;overflow:hidden;padding:0!important}
#appShell .account-line{display:grid!important;grid-template-columns:minmax(120px,.65fr) minmax(0,1.35fr);gap:18px;padding:12px 14px!important;border-bottom:1px solid #e8eff5!important;align-items:center}
#appShell .account-line:last-child{border-bottom:0!important}
#appShell .account-line span{color:#74879a!important;font-size:11px!important;font-weight:750!important;text-transform:uppercase;letter-spacing:.04em}
#appShell .account-line b{color:#17324b!important;font-size:12px!important;text-align:right;word-break:break-word}

/* ---------- DARK MODE: keep learning areas usable ---------- */
html[data-theme="dark"] #appShell:not(.app-hidden),html[data-theme="dark"] #appShell .main{background:#101b28}
html[data-theme="dark"] #appShell .appbar{background:rgba(16,27,40,.94);border-bottom-color:#2c3d4f}
html[data-theme="dark"] #appShell .brandtext,html[data-theme="dark"] #appShell .qv46-welcome h2{color:#f4f8fc}
html[data-theme="dark"] #appShell .brandtext span,html[data-theme="dark"] #appShell .qv46-welcome p{color:#98aabd}
html[data-theme="dark"] #appShell .u-dash-top{background:linear-gradient(120deg,#17283a,#153653);border-color:#294962}
html[data-theme="dark"] #appShell .u-dash-title h1,html[data-theme="dark"] #appShell .u-dash-title h1>span{color:#f5f9fc}
html[data-theme="dark"] #appShell .u-dash-title p{color:#b2c0ce}
html[data-theme="dark"] #appShell .u-stat,html[data-theme="dark"] #appShell .qv46-quick,html[data-theme="dark"] #appShell .u-panel,html[data-theme="dark"] #appShell .u-cert-card,html[data-theme="dark"] #appShell .modal{background:#1b2734!important;border-color:#314356!important;color:#edf4fa!important}
html[data-theme="dark"] #appShell .u-stat b,html[data-theme="dark"] #appShell .qv46-quick b,html[data-theme="dark"] #appShell .u-panel-head h2,html[data-theme="dark"] #appShell .modalhead h2{color:#f3f7fb!important}
html[data-theme="dark"] #appShell .u-stat small,html[data-theme="dark"] #appShell .u-stat p,html[data-theme="dark"] #appShell .qv46-quick small,html[data-theme="dark"] #appShell .u-panel-head p{color:#a6b6c6!important}
html[data-theme="dark"] #appShell .secondary{background:#1b2734;color:#e9f2f9;border-color:#3a4d60}
html[data-theme="dark"] #appShell .account-card{background:#182431!important;border-color:#314356!important}
html[data-theme="dark"] #appShell .account-line{border-bottom-color:#2b3d50!important}html[data-theme="dark"] #appShell .account-line b{color:#eef5fb!important}
html[data-theme="dark"] #appShell .u-portal-head{background:linear-gradient(120deg,#17283a,#153653)!important;border-color:#294962!important}
html[data-theme="dark"] #appShell .u-brand h1{color:#f5f9fc!important}html[data-theme="dark"] #appShell .u-brand p{color:#a9bac9!important}
html[data-theme="dark"] #appShell .u-final{background:linear-gradient(120deg,#18322b,#182834)!important;border-color:#315146!important}

/* ---------- RESPONSIVE ---------- */
@media(max-width:1100px){
  #appShell .layout{grid-template-columns:226px minmax(0,1fr)}
  #appShell .u-dash-title{padding-right:150px}
  #appShell .u-dash-top::after{right:35px;width:112px;height:112px;font-size:60px}
  #appShell .u-stats,#appShell .qv46-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:900px){
  #appShell .appbar{height:58px;padding:0 12px;position:sticky;top:0}
  #appShell .brandtext span{display:none}
  #appShell .layout{display:block;min-height:calc(100vh - 58px)}
  #sidebar.ce442-sidebar{top:58px;height:calc(100vh - 58px);width:min(86vw,310px);padding:13px 12px 14px;box-shadow:24px 0 60px rgba(3,24,43,.28)}
  #appShell .main{padding:16px 13px 42px}
  #appShell .content{max-width:none}
  #appShell .u-dash-top{min-height:210px;padding:24px 22px}
  #appShell .u-dash-title{padding-right:110px}
  #appShell .u-dash-top::after{right:20px;top:34px;width:88px;height:88px;border-radius:24px;font-size:46px}
  #appShell .u-dash-title h1>span{font-size:clamp(27px,7vw,38px)}
  #appShell .u-dash-tools{right:12px;bottom:12px}
  #appShell .u-support{grid-template-columns:1fr!important}
  #appShell .qv46-welcome-badge{display:none}
  #appShell .modal{max-height:calc(100vh - 24px);overflow:auto;padding:17px!important}
}
@media(max-width:600px){
  #appShell .hide-sm,#appShell .savepill{display:none!important}
  #appShell .topactions{gap:5px}#appShell .timer{min-width:72px;padding:7px 8px;font-size:12px}
  #appShell .qv46-welcome h2{font-size:25px}#appShell .qv46-welcome p{font-size:12px}
  #appShell .u-backrow{gap:7px;flex-wrap:wrap}
  #appShell .u-dash-top{min-height:225px;padding:20px 18px 66px}
  #appShell .u-dash-title{padding-right:0}
  #appShell .u-dash-top::after{right:16px;bottom:14px;top:auto;width:58px;height:58px;border-radius:17px;font-size:31px}
  #appShell .u-dash-top::before{width:220px;height:170px;right:-65px;bottom:-75px}
  #appShell .u-dash-title h1>span{font-size:29px}
  #appShell .u-dash-title p{font-size:13px;line-height:1.5}
  #appShell .u-dash-tools{left:18px;right:auto;bottom:16px}
  #appShell .u-stats,#appShell .qv46-quick-grid{grid-template-columns:1fr 1fr;gap:9px}
  #appShell .u-stat{min-height:108px;padding:13px!important}#appShell .u-stat b{font-size:19px!important}
  #appShell .qv46-quick{min-height:128px;padding:13px}
  #appShell .u-panel{padding:15px!important;border-radius:15px!important}
  #appShell .account-line{grid-template-columns:1fr!important;gap:4px!important}#appShell .account-line b{text-align:left!important}
}
@media(max-width:390px){
  #appShell .u-stats{grid-template-columns:1fr}
  #appShell .qv46-quick-grid{grid-template-columns:1fr 1fr}
}
