/* ============================================================
   PIXLECT WORKSPACE - shared stylesheet
   Used by: index.html, docs.html, slides.html, image.html, pdf.html
   ============================================================ */

:root{
  --bg:#f5f5f7;
  --panel:#ffffff;
  --border:#e8e8ee;
  --text:#1b1b1f;
  --muted:#6b6b7b;
  --docs:#2b579a;
  --pres:#d24726;
  --img:#7b3fe4;
  --sheet:#1e7a4a;
  --notes:#c9971b;
  --shadow:0 10px 30px rgba(20,20,50,.10);
}
*{box-sizing:border-box;}
[hidden]{display:none !important;}
html,body{height:100%;}
body{
  margin:0;
  font-family:"Segoe UI Variable Display","Segoe UI",system-ui,-apple-system,Inter,sans-serif;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  overflow:hidden;
}
button{font:inherit;color:inherit;}
code{font-family:ui-monospace,Consolas,monospace;}

/* ============================================================
   1. AUTH SCREEN
   ============================================================ */
#authScreen{
  position:fixed;inset:0;z-index:500;display:none;
  place-items:center;padding:24px;overflow-y:auto;
  background:
    radial-gradient(1100px 600px at 12% -8%, #dbe6fb 0%, transparent 55%),
    radial-gradient(900px 620px at 92% 108%, #e6dcfb 0%, transparent 55%),
    #f5f5f7;
  -webkit-overflow-scrolling:touch;
}
#authScreen.active{display:grid;}
.auth-card{
  width:min(430px,100%);background:#fff;border-radius:22px;padding:34px;
  border:1px solid #ececf3;box-shadow:0 24px 70px rgba(20,20,60,.14);
}
.auth-brand{display:flex;align-items:center;gap:11px;font-weight:800;letter-spacing:.3px;margin-bottom:22px;}
.auth-brand small{display:block;font-size:10px;font-weight:600;color:var(--muted);letter-spacing:1.6px;margin-top:-3px;}
.auth-card h1{font-size:24px;margin:0 0 6px;font-weight:800;letter-spacing:-.4px;}
.auth-sub{margin:0 0 20px;color:var(--muted);font-size:13.5px;line-height:1.5;}
.auth-tabs{display:flex;background:#f2f2f7;border-radius:11px;padding:4px;margin-bottom:20px;}
.auth-tab{
  flex:1;border:none;background:transparent;padding:9px;border-radius:8px;
  font-size:13.5px;font-weight:600;color:var(--muted);cursor:pointer;transition:.15s;
}
.auth-tab.active{background:#fff;color:var(--text);box-shadow:0 2px 8px rgba(20,20,60,.10);}
#authForm{display:flex;flex-direction:column;gap:14px;}
#authForm label{display:flex;flex-direction:column;gap:6px;font-size:12.5px;font-weight:600;color:#4a4a58;}
#authForm input{
  border:1px solid var(--border);border-radius:10px;padding:11px 13px;font:inherit;
  font-size:14px;outline:none;transition:.15s;background:#fbfbfd;
}
#authForm input:focus{border-color:#9db8e0;background:#fff;box-shadow:0 0 0 3px rgba(43,87,154,.10);}
.auth-error{
  background:#fdecef;border:1px solid #f7ccd4;color:#b3243c;border-radius:10px;
  padding:9px 12px;font-size:12.5px;line-height:1.45;
}
.auth-submit{
  border:none;border-radius:11px;padding:13px;font-size:14.5px;font-weight:700;cursor:pointer;
  background:linear-gradient(135deg,#2b579a,#7b3fe4);color:#fff;transition:.16s;
  box-shadow:0 6px 18px rgba(60,60,160,.26);
}
.auth-submit:hover{filter:brightness(1.07);}
.auth-submit:disabled{opacity:.6;cursor:default;}
.auth-divider{
  display:flex;align-items:center;gap:12px;margin:20px 0 16px;
  color:#a8a8b8;font-size:11.5px;letter-spacing:1px;text-transform:uppercase;
}
.auth-divider::before,.auth-divider::after{content:"";flex:1;height:1px;background:var(--border);}
.auth-alt{
  width:100%;border:1px solid var(--border);background:#fff;border-radius:11px;padding:11px;
  font-size:13.5px;font-weight:600;cursor:pointer;margin-bottom:9px;transition:.15s;
}
.auth-alt:hover{background:#f7f7fb;border-color:#d6d6e4;}
.auth-foot{margin:16px 0 0;font-size:11.5px;color:var(--muted);text-align:center;line-height:1.5;}

/* ============================================================
   2. APP SHELL / TOP BAR
   ============================================================ */
#app{display:none;flex-direction:column;height:100vh;min-height:0;}
#app.ready{display:flex;}

.topbar{
  height:56px;flex:0 0 56px;display:flex;align-items:center;gap:18px;
  padding:0 18px;background:#fff;border-bottom:1px solid var(--border);z-index:60;
}
.brand{display:flex;align-items:center;gap:10px;font-weight:800;letter-spacing:.3px;white-space:nowrap;}
.brand-mark{
  width:30px;height:30px;border-radius:9px;display:grid;place-items:center;
  color:#fff;font-weight:800;font-size:15px;
  background:linear-gradient(135deg,#2b579a,#7b3fe4);
  box-shadow:0 3px 10px rgba(60,60,160,.30);
}
.brand small{display:block;font-size:10px;font-weight:600;color:var(--muted);letter-spacing:1.6px;margin-top:-3px;}
.topsearch{
  flex:1;max-width:420px;display:flex;align-items:center;gap:8px;
  background:#f2f2f6;border:1px solid transparent;border-radius:9px;padding:7px 12px;transition:.16s;
}
.topsearch:focus-within{background:#fff;border-color:#c9d6ee;box-shadow:0 0 0 3px rgba(43,87,154,.10);}
.topsearch input{border:none;background:transparent;outline:none;font:inherit;font-size:13px;width:100%;}
.topbar-right{margin-left:auto;display:flex;align-items:center;gap:12px;}
.icon-btn{
  width:34px;height:34px;border-radius:9px;border:1px solid transparent;background:transparent;
  display:grid;place-items:center;cursor:pointer;color:#4a4a58;
}
.icon-btn:hover{background:#f0f0f6;}

.userchip{
  display:flex;align-items:center;gap:9px;padding:4px 10px 4px 4px;border-radius:30px;
  border:1px solid var(--border);background:#fff;cursor:pointer;transition:.15s;position:relative;
}
.userchip:hover{background:#f7f7fb;}
.avatar{
  width:30px;height:30px;border-radius:50%;color:#fff;
  display:grid;place-items:center;font-size:11.5px;font-weight:700;flex:0 0 auto;
  background:linear-gradient(135deg,#7b3fe4,#2b579a);
}
.u-meta{display:flex;flex-direction:column;line-height:1.15;max-width:150px;}
.u-name{font-size:12.5px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.u-mail{font-size:10.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.user-menu{
  position:absolute;top:46px;right:0;min-width:230px;background:#fff;border:1px solid var(--border);
  border-radius:13px;box-shadow:0 18px 45px rgba(20,20,60,.16);padding:7px;display:none;z-index:100;
}
.user-menu.open{display:block;}
.user-menu button{
  width:100%;text-align:left;border:none;background:transparent;border-radius:8px;
  padding:9px 11px;font-size:13px;cursor:pointer;
}
.user-menu button:hover{background:#f3f3f8;}
.user-menu hr{border:none;border-top:1px solid var(--border);margin:6px 4px;}
.sync-dot{width:8px;height:8px;border-radius:50%;background:#22a06b;display:inline-block;transition:.2s;}
.sync-dot.saving{background:#e8a33d;}
.sync-dot.error{background:#d64545;}

/* ============================================================
   3. MAIN / SCREENS  (SCROLL FIX)
   ============================================================ */
#main{
  flex:1;
  min-height:0;
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.screen{
  display:none;
  flex-direction:column;
  flex:1;
  min-height:0;
  overflow:hidden;
}
.screen.active{display:flex;}

/* Home page scrolls vertically */
#screen-home{
  overflow-y:auto;
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
}

/* ============================================================
   4. HOME PAGE
   ============================================================ */
.home-inner{
  max-width:1240px;margin:0 auto;padding:34px 28px 90px;width:100%;
  display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:36px;align-items:start;
}
@media (max-width:1080px){
  .home-inner{grid-template-columns:1fr;}
  .home-rail{display:none;}
}
.home-rail{display:flex;flex-direction:column;gap:18px;position:sticky;top:0;}
.hero{margin-bottom:26px;}
.hero h1{font-size:40px;margin:0 0 10px;font-weight:800;letter-spacing:-1px;}
.hero h1 span{
  background:linear-gradient(90deg,#2b579a,#7b3fe4);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.hero p{margin:0;color:var(--muted);font-size:15px;max-width:620px;line-height:1.55;}
.section-title{
  font-size:13px;text-transform:uppercase;letter-spacing:1.4px;
  color:var(--muted);font-weight:700;margin:0 0 14px;
}
.app-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:16px;margin-bottom:38px;}
.app-card{
  background:#fff;border:1px solid var(--border);border-radius:15px;padding:18px;
  display:flex;flex-direction:column;gap:14px;cursor:pointer;text-align:left;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.app-card:hover{transform:translateY(-3px);box-shadow:var(--shadow);border-color:#d6d6e4;}
.app-card:active{transform:translateY(-1px);}
.app-card h3{margin:0;font-size:15px;font-weight:700;}
.app-card p{margin:3px 0 0;font-size:12px;color:var(--muted);line-height:1.45;}
.tile{width:46px;height:46px;border-radius:12px;display:grid;place-items:center;color:#fff;flex:0 0 auto;}
.tile svg{width:24px;height:24px;}
.tile-docs{background:linear-gradient(135deg,#3a6fc4,#1c3f7a);}
.tile-pres{background:linear-gradient(135deg,#e8654a,#b23a1c);}
.tile-img{background:linear-gradient(135deg,#9b62f0,#5a25b5);}
.tile-sheet{background:linear-gradient(135deg,#2f9c63,#16603a);}
.tile-notes{background:linear-gradient(135deg,#e8b833,#a87b0c);}
.tile-pdf{background:linear-gradient(135deg,#d64545,#8c1c1c);}
.tile-soon{background:linear-gradient(135deg,#a0a0b0,#6a6a7a);}
.app-card.soon{opacity:.62;}
.app-card.soon:hover{transform:none;box-shadow:none;}

.recent-list{display:flex;flex-direction:column;gap:8px;}
.recent-empty{
  background:#fff;border:1px dashed #d8d8e4;border-radius:12px;padding:22px;
  text-align:center;color:var(--muted);font-size:13px;
}
.recent-item{
  display:flex;align-items:center;gap:14px;background:#fff;border:1px solid var(--border);
  border-radius:12px;padding:12px 16px;cursor:pointer;transition:.16s;
}
.recent-item:hover{border-color:#d6d6e4;box-shadow:0 4px 14px rgba(20,20,50,.07);}
.recent-item .mini{
  width:34px;height:34px;border-radius:9px;display:grid;place-items:center;color:#fff;
  font-size:13px;font-weight:700;flex:0 0 auto;
}
.recent-meta{flex:1;min-width:0;}
.recent-meta strong{display:block;font-size:13.5px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.recent-meta span{font-size:11.5px;color:var(--muted);}
.pill{font-size:11px;color:var(--muted);background:#f2f2f6;border-radius:20px;padding:3px 10px;flex:0 0 auto;}

.rail-card{background:#fff;border:1px solid var(--border);border-radius:16px;padding:16px;}
.rail-card h4{margin:0 0 6px;font-size:13.5px;font-weight:700;}
.rail-card p{margin:0 0 12px;font-size:12px;color:var(--muted);line-height:1.5;}

/* ============================================================
   5. ADS  (Google AdSense + house fallback)
   ============================================================ */
.ad-slot{
  position:relative;background:#fff;border:1px solid var(--border);border-radius:16px;
  display:block;overflow:hidden;
}
.ad-label{
  position:absolute;top:7px;left:10px;font-size:9px;letter-spacing:1.5px;
  text-transform:uppercase;color:#b0b0c0;font-weight:700;z-index:2;
}
.ad-rect{width:100%;min-height:250px;}
.ad-leaderboard{width:100%;max-width:728px;min-height:90px;border-radius:12px;margin:0 auto;}

.ad-slot ins.adsbygoogle{
  display:block !important;
  width:100% !important;
  min-height:90px;
  margin:0;
  background:transparent;
}
.ad-rect ins.adsbygoogle{min-height:250px;}

.ad-inner{
  position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;gap:3px;
  padding:14px 18px;color:#fff;animation:adFade .55s ease;
}
@keyframes adFade{from{opacity:0;transform:translateY(6px);}to{opacity:1;transform:none;}}
.ad-tag{font-size:9.5px;letter-spacing:1.6px;font-weight:800;opacity:.85;text-transform:uppercase;}
.ad-title{font-size:15px;font-weight:800;line-height:1.2;}
.ad-body{font-size:11.5px;opacity:.9;line-height:1.4;max-width:80%;}
.ad-cta{
  align-self:flex-start;margin-top:6px;border:none;border-radius:20px;
  background:rgba(255,255,255,.95);color:#1b1b1f;font-size:11.5px;font-weight:700;
  padding:6px 15px;cursor:pointer;transition:.15s;
}
.ad-cta:hover{background:#fff;transform:translateY(-1px);}
.ad-leaderboard .ad-inner{flex-direction:row;align-items:center;gap:14px;padding:10px 18px;}
.ad-leaderboard .ad-title{font-size:14.5px;white-space:nowrap;}
.ad-leaderboard .ad-body{max-width:none;flex:1;}
.ad-leaderboard .ad-cta{margin-top:0;}
.app-ad{
  flex:0 0 auto;padding:10px 14px;background:#fafafd;
  border-top:1px solid var(--border);display:flex;justify-content:center;
}

/* ============================================================
   6. APP CHROME (header, ribbon, statusbar)
   ============================================================ */
.app-header{
  display:flex;align-items:center;gap:12px;padding:8px 14px;background:#fff;
  border-bottom:1px solid var(--border);flex:0 0 auto;
}
.back-btn{
  width:34px;height:34px;border-radius:9px;border:1px solid var(--border);background:#fff;
  cursor:pointer;display:grid;place-items:center;font-size:16px;color:#444;
}
.back-btn:hover{background:#f4f4f9;}
.app-title{display:flex;align-items:center;gap:9px;font-weight:600;font-size:14px;min-width:0;}
.app-title .t{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.dot{width:9px;height:9px;border-radius:3px;display:inline-block;flex:0 0 auto;}
.dot-docs{background:var(--docs);}
.dot-pres{background:var(--pres);}
.dot-img{background:var(--img);}
.dot-sheet{background:var(--sheet);}
.dot-notes{background:var(--notes);}
.dot-pdf{background:#c0392b;}
.app-actions{margin-left:auto;display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.btn{
  border:1px solid var(--border);background:#fff;border-radius:8px;padding:7px 14px;
  font-size:13px;cursor:pointer;transition:.15s;white-space:nowrap;
}
.btn:hover{background:#f4f4f9;}
.btn-primary{background:var(--docs);border-color:var(--docs);color:#fff;}
.btn-primary:hover{filter:brightness(1.08);}

.ribbon{
  display:flex;gap:12px;padding:8px 14px;background:#fbfbfd;
  border-bottom:1px solid var(--border);flex-wrap:wrap;align-items:center;flex:0 0 auto;
}
.ribbon-group{
  display:flex;gap:4px;align-items:center;padding-right:12px;
  border-right:1px solid var(--border);
}
.ribbon-group:last-child{border-right:none;padding-right:0;}
.tb{
  min-width:32px;height:32px;padding:0 6px;border-radius:7px;border:1px solid transparent;
  background:transparent;cursor:pointer;display:grid;place-items:center;
  font-size:13.5px;color:#3a3a46;
}
.tb:hover{background:#eeeef6;}
.tb.active{background:#e3ecfa;color:var(--docs);}
.tb svg{width:16px;height:16px;}
.select{
  height:32px;border:1px solid var(--border);border-radius:7px;background:#fff;
  font:inherit;font-size:12.5px;padding:0 8px;cursor:pointer;color:#3a3a46;outline:none;
}
.select:focus{border-color:#c9d6ee;}
.color-input{
  width:34px;height:32px;border:1px solid var(--border);border-radius:7px;
  background:#fff;cursor:pointer;padding:2px;
}
.statusbar{
  height:28px;flex:0 0 28px;background:#fff;border-top:1px solid var(--border);
  display:flex;align-items:center;gap:18px;padding:0 16px;
  font-size:12px;color:var(--muted);
}

/* ============================================================
   7. DOCS
   ============================================================ */
.workspace{
  flex:1;min-height:0;overflow:auto;
  padding:30px 20px;display:flex;justify-content:center;
  background:#ececf1;
  -webkit-overflow-scrolling:touch;
}
.page{
  width:min(820px,100%);min-height:1050px;background:#fff;border-radius:3px;
  padding:72px 78px;box-shadow:0 2px 14px rgba(0,0,0,.10);outline:none;
  font-size:15.5px;line-height:1.75;color:#1b1b1f;
}
.page:focus{outline:none;}
.page h1{font-size:31px;margin:0 0 6px;font-weight:700;}
.page h2{font-size:21px;margin:24px 0 6px;}
.page p{margin:0 0 12px;}
.page ul,.page ol{margin:0 0 12px;padding-left:26px;}

/* ============================================================
   8. PRESENTATIONS
   ============================================================ */
.pres-layout{flex:1;min-height:0;display:flex;overflow:hidden;}
.slide-list{
  width:206px;flex:0 0 206px;background:#fff;border-right:1px solid var(--border);
  overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:11px;
  -webkit-overflow-scrolling:touch;
}
.thumb{
  position:relative;aspect-ratio:16/9;border-radius:8px;border:2px solid #e4e4ec;
  background:#fff;cursor:pointer;overflow:hidden;padding:9px 10px;
  display:flex;flex-direction:column;justify-content:center;gap:4px;transition:.15s;
}
.thumb:hover{border-color:#c9c9d8;}
.thumb.active{border-color:var(--pres);box-shadow:0 0 0 3px rgba(210,71,38,.12);}
.thumb .num{position:absolute;top:3px;left:6px;font-size:9.5px;color:#a0a0b0;font-weight:700;}
.t-title{font-size:9.5px;font-weight:700;line-height:1.2;white-space:pre-line;overflow:hidden;}
.t-body{font-size:7.5px;line-height:1.25;opacity:.7;white-space:pre-line;overflow:hidden;}
.slide-stage{
  flex:1;min-width:0;display:grid;place-items:center;background:#ececf1;padding:30px;overflow:auto;
  -webkit-overflow-scrolling:touch;
}
.slide-canvas{
  width:min(880px,100%);aspect-ratio:16/9;background:#fff;border-radius:6px;
  padding:6% 7%;box-shadow:0 10px 34px rgba(0,0,0,.14);
  display:flex;flex-direction:column;justify-content:center;gap:14px;
}
.slide-title{font-size:clamp(19px,3.1vw,40px);font-weight:700;outline:none;line-height:1.2;white-space:pre-line;}
.slide-body{font-size:clamp(11px,1.5vw,19px);opacity:.85;outline:none;line-height:1.5;white-space:pre-line;}
.slide-title:focus,.slide-body:focus{outline:2px dashed rgba(120,120,160,.35);outline-offset:6px;border-radius:4px;}

/* ============================================================
   9. IMAGES
   ============================================================ */
.image-stage{
  flex:1;min-height:0;overflow:auto;display:grid;place-items:center;background:#ececf1;padding:26px;
  -webkit-overflow-scrolling:touch;
}
#imgCanvas{
  background:#fff;border-radius:6px;box-shadow:0 10px 34px rgba(0,0,0,.14);
  max-width:100%;height:auto;cursor:crosshair;touch-action:none;
}

/* ============================================================
   10. SHEETS
   ============================================================ */
.formula-bar{
  display:flex;align-items:center;gap:10px;padding:7px 14px;background:#fff;
  border-bottom:1px solid var(--border);flex:0 0 auto;
}
.cell-ref{
  min-width:56px;text-align:center;font-size:12.5px;font-weight:600;color:var(--muted);
  border:1px solid var(--border);border-radius:6px;padding:4px 8px;background:#fafafd;
}
.formula-bar input{
  flex:1;border:1px solid var(--border);border-radius:6px;padding:6px 10px;font:inherit;
  font-size:13px;outline:none;font-family:ui-monospace,Consolas,monospace;
}
.formula-bar input:focus{border-color:#a9c7a9;box-shadow:0 0 0 3px rgba(30,122,74,.10);}
.sheet-wrap{flex:1;min-height:0;overflow:auto;background:#fff;-webkit-overflow-scrolling:touch;}
table.sheet{border-collapse:collapse;font-size:13px;table-layout:fixed;}
table.sheet th{
  background:#f5f5f9;border:1px solid #e2e2ea;color:var(--muted);
  font-weight:600;height:26px;width:78px;font-size:11.5px;position:sticky;top:0;z-index:2;
}
table.sheet th.rowhead{position:sticky;left:0;top:auto;z-index:1;width:42px;}
table.sheet th.corner{left:0;top:0;z-index:3;width:42px;}
table.sheet td{
  border:1px solid #e8e8f0;height:26px;width:78px;padding:0 6px;outline:none;
  overflow:hidden;white-space:nowrap;
}
table.sheet td:focus{outline:2px solid var(--sheet);outline-offset:-2px;background:#f2fbf6;}

/* ============================================================
   11. NOTES
   ============================================================ */
.notes-wrap{flex:1;min-height:0;overflow:auto;padding:26px;background:#ececf1;-webkit-overflow-scrolling:touch;}
.notes-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(215px,1fr));gap:18px;
  max-width:1200px;margin:0 auto;
}
.note{
  border-radius:14px;padding:12px 14px 16px;min-height:180px;display:flex;
  flex-direction:column;box-shadow:0 5px 16px rgba(30,30,60,.10);transition:.18s;position:relative;
}
.note:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(30,30,60,.16);}
.note-head{display:flex;align-items:center;gap:6px;margin-bottom:8px;}
.swatch{width:14px;height:14px;border-radius:50%;border:2px solid rgba(0,0,0,.12);cursor:pointer;}
.note-del{
  margin-left:auto;border:none;background:transparent;cursor:pointer;color:rgba(0,0,0,.35);
  font-size:16px;line-height:1;padding:2px 6px;border-radius:6px;
}
.note-del:hover{background:rgba(0,0,0,.08);color:#b00020;}
.note-body{flex:1;outline:none;font-size:13.5px;line-height:1.55;color:#2a2a30;white-space:pre-wrap;}

/* ============================================================
   12. PDF EDITOR
   ============================================================ */
.pdf-layout{flex:1;min-height:0;display:flex;overflow:hidden;}
.pdf-rail{
  width:180px;flex:0 0 180px;background:#fff;border-right:1px solid var(--border);
  overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:10px;
  -webkit-overflow-scrolling:touch;
}
.pdf-thumb{
  position:relative;border:2px solid #e4e4ec;border-radius:6px;background:#fff;
  cursor:pointer;padding:4px;transition:.15s;
}
.pdf-thumb:hover{border-color:#c9c9d8;}
.pdf-thumb.active{border-color:var(--pres);box-shadow:0 0 0 3px rgba(210,71,38,.12);}
.pdf-thumb canvas{width:100%;display:block;border-radius:3px;}
.pdf-thumb .num{
  position:absolute;top:6px;left:8px;font-size:10px;font-weight:700;color:#a0a0b0;
  background:#fff;padding:1px 5px;border-radius:8px;box-shadow:0 1px 3px rgba(0,0,0,.08);
}
.pdf-thumb .del{
  position:absolute;top:4px;right:4px;width:18px;height:18px;border-radius:50%;
  background:rgba(0,0,0,.55);color:#fff;border:none;cursor:pointer;font-size:11px;
  line-height:1;display:none;place-items:center;padding:0;
}
.pdf-thumb:hover .del{display:grid;}
.pdf-stage{
  flex:1;min-width:0;overflow:auto;background:#ececf1;padding:26px;
  display:flex;justify-content:center;align-items:flex-start;
  -webkit-overflow-scrolling:touch;
}
.pdf-canvas-wrap{
  position:relative;box-shadow:0 10px 34px rgba(0,0,0,.14);background:#fff;
  line-height:0;
}
#pdfCanvas,#annoCanvas{display:block;}
#annoCanvas{position:absolute;top:0;left:0;cursor:crosshair;}
.pdf-text-input{
  position:absolute;border:1px dashed #4a90e2;
  background:rgba(255,255,255,.96);outline:none;padding:4px 6px;border-radius:3px;
  font-family:inherit;min-width:80px;min-height:24px;z-index:10;resize:none;
  box-shadow:0 4px 12px rgba(30,60,120,.15);line-height:1.35;
}
.pdf-empty{display:grid;place-items:center;height:100%;width:100%;}
.pdf-dropzone{
  border:2px dashed #c8c8d4;border-radius:20px;padding:60px 80px;text-align:center;
  background:#fff;cursor:pointer;transition:.2s;max-width:520px;
}
.pdf-dropzone:hover{border-color:var(--docs);background:#f8fbff;}
.pdf-dropzone.dragover{border-color:var(--docs);background:#eaf2ff;transform:scale(1.02);}
.pdf-dropzone .big-icon{font-size:52px;margin-bottom:14px;line-height:1;color:#c0392b;font-weight:900;}
.pdf-dropzone h2{font-size:22px;margin:0 0 8px;font-weight:800;letter-spacing:-.3px;}
.pdf-dropzone p{color:var(--muted);margin:0;font-size:14px;line-height:1.55;}
.pdf-dropzone .btn{margin-top:20px;}
.pdf-zoom-label{font-size:12px;color:var(--muted);min-width:44px;text-align:center;}

/* ============================================================
   13. PRESENTATION OVERLAY
   ============================================================ */
.overlay{
  position:fixed;inset:0;background:#101014;z-index:400;display:none;
  place-items:center;padding:24px;
}
.overlay.active{display:grid;}
.present-slide{
  width:min(90vw,158vh);aspect-ratio:16/9;border-radius:8px;padding:6% 7%;
  display:flex;flex-direction:column;justify-content:center;gap:2%;
  box-shadow:0 24px 70px rgba(0,0,0,.65);white-space:pre-line;overflow:hidden;
}
.present-hint{
  position:fixed;bottom:16px;left:50%;transform:translateX(-50%);
  color:#8a8a99;font-size:12.5px;letter-spacing:.4px;
}
.present-close{
  position:fixed;top:16px;right:20px;background:rgba(255,255,255,.10);border:none;
  color:#fff;width:60px;height:38px;border-radius:10px;cursor:pointer;font-size:13px;
}
.present-close:hover{background:rgba(255,255,255,.2);}

/* ============================================================
   14. TOAST
   ============================================================ */
#toast{
  position:fixed;bottom:26px;left:50%;transform:translate(-50%,20px);
  background:#1f1f28;color:#fff;padding:11px 20px;border-radius:10px;font-size:13px;
  opacity:0;pointer-events:none;transition:.25s;z-index:600;
  box-shadow:0 10px 30px rgba(0,0,0,.3);max-width:90vw;text-align:center;
}
#toast.show{opacity:1;transform:translate(-50%,0);}

/* ============================================================
   15. SCROLLBARS
   ============================================================ */
::-webkit-scrollbar{width:11px;height:11px;}
::-webkit-scrollbar-thumb{
  background:#c8c8d4;border-radius:8px;border:3px solid transparent;background-clip:content-box;
}
::-webkit-scrollbar-thumb:hover{background:#a8a8ba;background-clip:content-box;border:3px solid transparent;}
::-webkit-scrollbar-track{background:transparent;}